(07-22-2024, 10:27 PM)Tim Curtis Wrote: I don't know why it's reverting, maybe camilla has to be restarted after manually editing the yml file? You might want to ask in the CamillaDSP thread at diyAudio.
The Output device can only be changed via the WebUI because there are many parts of the audio config that are updated when this changes. Have a look /var/www/snd-config.php.
Thank you for this. It sent me down an interesting path. Unfortunately, I think fixing my issue (by fundamentally switching from 2 channel to 8 channel) will break everything.
I'm seeing a lot of regex alteration of config files...
Code:
bruno@moode:~ $ rg sndaloop /var/www
/var/www/daemon/worker.php
2319: sysCmd("sed -i '0,/_audioout__ {/s//_audioout {/' /etc/alsa/conf.d/_sndaloop.conf");
2322: sysCmd("sed -i '0,/_audioout {/s//_audioout__ {/' /etc/alsa/conf.d/_sndaloop.conf");
2405: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm " . $output . " }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
2411: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm " . $output . " }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
2443: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm " . $output . " }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
2459: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm " . $output . " }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
2464: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm " . $output . " }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
/var/www/inc/autocfg.php
332: $values['alsa_loopback'] == 'On' ? sysCmd("sed -i '0,/_audioout__ {/s//_audioout {/' /etc/alsa/conf.d/_sndaloop.conf") :
333: sysCmd("sed -i '0,/_audioout {/s//_audioout__ {/' /etc/alsa/conf.d/_sndaloop.conf");
/var/www/inc/audio.php
210: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm \"alsaequal\" }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
213: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm \"camilladsp\" }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
216: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm \"crossfeed\" }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
219: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm \"eqfa12p\" }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
222: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm \"invpolarity\" }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
227: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm \"" . $alsaDevice . "\" }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
232: sysCmd("sed -i '/a { channels 2 pcm/c\a { channels 2 pcm \"btstream\" }' " . ALSA_PLUGIN_PATH . '/_sndaloop.conf');
Don't get me wrong. I've been a DBA for a major news organization supporting Data Journalists in analyzing data dumps from FoIA, whistle-blower, and NGO sources. I have written tens of thousands of lines of `sed` and `awk`. [Yo, Dawg] I have written sed and awk that write sed and awk. sed and awk is my jam!
That said, I think using sed here is only suitable as a temporary "
Real Artists Ship" solution. Are you open to using a syntax aware tool for the editing of data structures? I ask this because I am willing to contribute to the search/creation and implementation of such a tool.