Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Where is CamillaDSP "Devices" configuration stored?
#1
See:
[Image: attachment.php?aid=3971]
Under Devices [tab] > Playback device [section] I have to change "channels" to 8. I can't figure out how to do this without the web interface. I want to be able to do via the CLI. My goal is to document concise instruction on how to recreate my system from scratch. I want write a bash script that will do everything without having to hunt and click things in a browser.


Attached Files Thumbnail(s)
   
Reply
#2
Prolly stored in the config yml file.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(07-22-2024, 11:35 AM)Tim Curtis Wrote: Prolly stored in the config yml file.

You are correct. However, something is changing that value any time I reload http://moode.local/camilladsp/gui/index.html Do you have any idea how that might be happening?

Also, do you have any idea how this setting is stored on the system (and where I might change it)?
[Image: attachment.php?aid=3972]

I will create a new thread for that if needed.


Attached Files Thumbnail(s)
   
Reply
#4
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.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
(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.
Reply
#6
Not really. because sed and awk are rock stable, widely used and work just fine for editing and parsing config files.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
(07-23-2024, 06:57 PM)Tim Curtis Wrote: Not really. because sed and awk are rock stable, widely used and work just fine for editing and parsing config files.

Yes, the programs are rock solid. But, they depend on their source file being exactly a certain way. And in my case, I have to change the channel count from 2 to 8 and when I do,
Code:
sed -i '/a { channels 2 pcm/...
is not going to find its target anymore.
Reply
#8
(07-27-2024, 12:38 AM)brunobronosky Wrote:
(07-23-2024, 06:57 PM)Tim Curtis Wrote: Not really. because sed and awk are rock stable, widely used and work just fine for editing and parsing config files.

Yes, the programs are rock solid. But, they depend on their source file being exactly a certain way. And in my case, I have to change the channel count from 2 to 8 and when I do,
Code:
sed -i '/a { channels 2 pcm/...
is not going to find its target anymore.

Try to post here the line AS IS now, and HOW you want it changed.
There is almost nothing sed cannot do.
Reply


Forum Jump: