Thank you for your donation!


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


MPD volume issue (and question)
#1
I installed today's download (8.3.7) on a fresh system, configured Airplay -> CamillaDSP (with a custom config file); and was having issues where Airplay would drop out.

The journal showed lots of
```
Jan 13 16:01:08 tower systemd[1]: Failed to start Synchronize MPD volume to CamillaDSP.
Jan 13 16:01:14 tower systemd[1]: Started Synchronize MPD volume to CamillaDSP.
Jan 13 16:01:15 tower mpd2cdspvolume[4890]: Traceback (most recent call last):
Jan 13 16:01:15 tower mpd2cdspvolume[4890]:   File "/usr/local/bin/mpd2cdspvolume", line 42, in <module>
Jan 13 16:01:15 tower mpd2cdspvolume[4890]:     from camilladsp import CamillaConnection
Jan 13 16:01:15 tower mpd2cdspvolume[4890]: ImportError: cannot import name 'CamillaConnection' from 'camilladsp' (/usr/lib/python3/dist-packages/camilladsp/__init__.py)
Jan 13 16:01:15 tower systemd[1]: mpd2cdspvolume.service: Main process exited, code=exited, status=1/FAILURE
Jan 13 16:01:15 tower systemd[1]: mpd2cdspvolume.service: Failed with result 'exit-code'.
```

I guess I'm using camillaDSP volume type.  Not sure that was an intentional choice.
Anway, after replacing `mpd2cdspvolume` (file said version 0.3.1) with version 0.4.0 from github, the problem went away.

So, a couple questions,
- is this a known issue? Happy to report a github issue if that's a better way to report issues like this.  I guess it's a temporary thing, since camilladsp 2.0.0 is in the 8.3.8 release.
- I'm new to Moode's (MPD) volume settings, is that mainly for physical controls?  I should probably set fixed, for my use where mostly Airplay volume is enough control.
Reply
#2
The 0.4.0 version of mpd2cdspvolume is for Camilla 2 and upcoming moOde 8.3.8. It hasn't been tested with Camilla 1x but it seems like you have it working.

I've experienced some glitches when Airplay 2 initially connects to moOde/Camilla but usually stop/play on airplay client remedies that. I haven't done any debugging but I suspect the additional latency when camilla is in the pipeline is a factor.

The Volume type options:
- Software, Hardware, Fixed (0dB) are for controlling MPD player volume.
- Null and CamillaDSP are for controlling volume using another application. Null is where MPD outputs 0dB but still emits volume change events so another application can process them. Volume type CamillaDSP uses Null internally.

Volume type is automatically switched to "CamillaDSP" when CamillaDSP is enabled and the configuration contains a volume filter. You can override this by manually changing Volume type.

CamillaDSP 2 always maintains an internal volume filter that defaults to 0dB. There is no need to explicitly define a Volume filter in the config unless special capabilities are needed like a fader. 

We are still testing CamillaDSP 2 and I'm not sure yet whether the automatic Volume type switch will remain. It could end up being removed in favor of leaving it up to user to manually set the Volume type.

Be **very careful** about experimenting with untested package combinations especially if they involve volume handling. The 0.4.0 version of mpd2cdspvolume for example has a bug that causes unintentional 0dB volume with CamillaDSP 2. A fix is in the works but it hasn't been tested yet.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
I forgot to mention the process flow when a client for example an Airplay client connects to moOde and Camilla is in the audio chain and Camilla volume is being used.

1. Renderer before-play-starts event script fires: /var/local/www/commandw/spspre.sh
- Save MPD volume
- Set MPD volume to 100 so it outputs 0dB

2. Renderer starts playback
- Camilla starts and sets its volume
- This volume level is based on a state file maintained by Camilla and updated by mpd2cdspvolumesync daemon
- The initial level is the saved MPD volume from #1 above
.
3. Renderer stops playback
- Camilla stops

4. Renderer after-play-ends event script fires: /var/local/www/commandw/spspost.sh
- MPD volume is set to the saved MPD volume from #1 above
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#4
(01-14-2024, 01:47 AM)hpyle Wrote: I installed today's download (8.3.7) on a fresh system, configured Airplay -> CamillaDSP (with a custom config file); and was having issues where Airplay would drop out.

The journal showed lots of
```
...
Jan 13 16:01:15 tower mpd2cdspvolume[4890]: Traceback (most recent call last):
Jan 13 16:01:15 tower mpd2cdspvolume[4890]:   File "/usr/local/bin/mpd2cdspvolume", line 42, in <module>
Jan 13 16:01:15 tower mpd2cdspvolume[4890]:     from camilladsp import CamillaConnection
...
```

@hpyle I can be wrong but I'm almost sure that this isn't a fresh installed system.
This message can only occures if you upgraded your camilladsp related packages or did an apt upgrade?
The message indicates that the python package for camilladsp version 1.x can't be found, which is typical when the camilladsp 2.x related python packages are installed.

I will update the lock files s to prevent an accidentally upgrade and system breakage on apt upgrade in the future.
Reply


Forum Jump: