Thank you for your donation!


Instruction Guide Loudness compensated volume control with CamillaDSP
#11
(10-12-2022, 06:54 AM)roderickvd Wrote:
(10-11-2022, 11:44 PM)Tim Curtis Wrote: Yes alsa-cdsp does not do resampling but IIRC it update the camilla config with the source sample rate before piping the output to Camilla because Camilla itself does not do sample rate switching on-the-fly. Correct?

CamillaDSP does rate detection itself (and so does switch on the fly). I believe that alsa-cdsp can help by "hinting" the incoming sample rate but it's not necessary.

Do you think it is possible to slave the Alsa dummy mixer to _audioout? My asoundrc-fu is not up to par.

Still a bit confusing since the alsa cdsp doc states 

Code:
To aid in handling hardware parameter changes such as sample rate, format, or the number of input channels the plugin can automatically replace fields in the YAML files with the appropriate parameters and restart CamillaDSP.

IIRC its required to enable automatic rate, format and channel switching possible with Camilla, otherwise Camilla has to be manually stopped/started when these parameters change for example when current song is 16/44.1 and next song in the Queue is 24/192.

I'm not sure about slaving the mixer device to  _audioout but if I understand your config correctly it involves changing the mixer device param in MPD, Shairport-sync, Spotify  etc configs. That could possibly be done with a script that has some SED's to apply or revert the changes. 

Integrating this into moOde as an option though would involve quite a few moving parts and modifications. For example currently all the renderers default to using mixer softvol. That would need to be parameterized.

Food for thought.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#12
(10-12-2022, 03:17 PM)Tim Curtis Wrote:
(10-12-2022, 06:54 AM)roderickvd Wrote:
(10-11-2022, 11:44 PM)Tim Curtis Wrote: Yes alsa-cdsp does not do resampling but IIRC it update the camilla config with the source sample rate before piping the output to Camilla because Camilla itself does not do sample rate switching on-the-fly. Correct?

CamillaDSP does rate detection itself (and so does switch on the fly). I believe that alsa-cdsp can help by "hinting" the incoming sample rate but it's not necessary.

Do you think it is possible to slave the Alsa dummy mixer to _audioout? My asoundrc-fu is not up to par.

Still a bit confusing since the alsa cdsp doc states 

Code:
To aid in handling hardware parameter changes such as sample rate, format, or the number of input channels the plugin can automatically replace fields in the YAML files with the appropriate parameters and restart CamillaDSP.

IIRC its required to enable automatic rate, format and channel switching possible with Camilla, otherwise Camilla has to be manually stopped/started when these parameters change for example when current song is 16/44.1 and next song in the Queue is 24/192.

Note that it says aid. It is not required. In CamillaDSP's GUI you can see it locking onto a new sample rate when something new comes in.

Quote:I'm not sure about slaving the mixer device to  _audioout but if I understand your config correctly it involves changing the mixer device param in MPD, Shairport-sync, Spotify  etc configs. That could possibly be done with a script that has some SED's to apply or revert the changes. 

Changing the mixer parameters would be the "hard" route.
Slaving it to _audioout would be easier, but I don't know if it can be done.

Quote:Integrating this into moOde as an option though would involve quite a few moving parts and modifications. For example currently all the renderers default to using mixer softvol. That would need to be parameterized.

Food for thought.

Indeed. If this would be considered for the roadmap, I can help of course.
Reply
#13
Nice job @roderickvd!

@Tim Curtis some time ago, when I was helping @roderickvd, I submitted the following issue to CamillaDSP https://github.com/HEnquist/camilladsp/issues/231.
When this is implemented it will simplify the integration of the loudness function. No need to do all hassle with the alsa conf and also dummy mixer or use the camilladsp volume it self.

The implementation is currently planned for CamillaDSP 1.2.
Reply
#14
Awesome. Let's wait for that then and look back at this as a fun exercise :-)
Reply
#15
Super nice :-)

Will alsa cdsp plugin still be needed for upcoming 1.2 ?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#16
@Tim Curtis: From the beginning Scripples alsa-cdsp is essential for a good integration of CamillaDSP in Moode.
It makes it possible when the audio format of a source changes that CamillaDSP is restarted with the correct audio format to use.

This is completely separate from other functions like loudness or other CamillaDSP features.
Reply
#17
(10-13-2022, 05:37 PM)bitlab Wrote: @Tim Curtis: From the beginning Scripples alsa-cdsp is essential for a good integration of CamillaDSP in Moode.
It makes it possible when the audio format of a source changes that CamillaDSP is restarted with the correct audio format to use.

This is completely separate from other functions like loudness or other CamillaDSP features.

Yes, now I remember. Also your nice alsa-cdsp fix for r820 release :-)
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: