Moode Audio Player for Raspberry Pi

Interestingly enough, with hardware volume set in MPD, I can control the Spotify Connect volume output within Moode client with the volume 'spinner'. Maybe this gives some pointers as to what things are doing internally?

Edit: Both the Moode volume control and Spotify Connect 'fight' fight for the same mixer. If I change from Moode to 20, it sets it to 20, if I click the volume on the phone, it 'jumps' to 93 if the phone expected full volume to be set.
 
Last edited:
Interestingly enough, with hardware volume set in MPD, I can control the Spotify Connect volume output within Moode client with the volume 'spinner'. Maybe this gives some pointers as to what things are doing internally?

Edit: Both the Moode volume control and Spotify Connect 'fight' fight for the same mixer. If I change from Moode to 20, it sets it to 20, if I click the volume on the phone, it 'jumps' to 93 if the phone expected full volume to be set.

Hi Rafa,

Its because both players are using volume mixer. Same can happen with Airplay. Airplay (shairport-sync) provides pre and post events so that the "other player" can do things after Airplay session ends for example restore its volume setting.

Next test is to see if Spotify Connect can use Software volume so it can work with all the ES9023 based DAC's that don't provide hardware volume.

I'm not sure what the SC cmd string looks like for Software volume.

-Tim
 
Interestingly enough, with hardware volume set in MPD, I can control the Spotify Connect volume output within Moode client with the volume 'spinner'. Maybe this gives some pointers as to what things are doing internally?

Edit: Both the Moode volume control and Spotify Connect 'fight' fight for the same mixer. If I change from Moode to 20, it sets it to 20, if I click the volume on the phone, it 'jumps' to 93 if the phone expected full volume to be set.

Thanks RafaPolit and Tim for the fantastic work. If you could get it in to 3.2 I and many with me would be incredible thankful. I will surely make a donation as soon as the first paycheck after Christmas will land.
 
But this help doesn't work with moode 3.1

Be there,
I do not have a display

Lorenzo Ferrara will help you :)

"@Lorenzo Ferrara Mod burdie • 6 days ago
Hi burdie, thanks for informing us about the problems. I'm going to test the guide using the Pi3, the Raspberry Pi 7" official touchscreen, and the latest Moode, I will keep you updated."
 
Last edited:
Friends, I'm not doing anything other than bothering Tim without end with this. He is the one doing it all!

He is the king of every day here! :)

That said, the instructions I posted are more or less easilly followed if you want a taste of how it could work. I'm using it (even as I write listening to my weekly discovery) with great success! Try it, if you find the instructions hard to follow, let me know and we can improve to the point that they are hassle-free!

Best regards,
Rafa.
 
There is software volume built into spotify-connect-web, that is listed in several places, apparently if you set the mixer to 'Digital', it acually does software volume control.

I'll test in a few hours, though I have no other DAC to test it with. Perhaps it could be simulated with local onboard audio and analog out? (even if the quality is crapy?)

Hi Rafa,

The Pi onboard audio chip has hardware volume controller. One way to determine whether the audio device has hardware volume is to run alsamixer or 'amixer controls'. If for example 'amixer controls' returns nothing then device has no hardware volume controller.

-Tim
 
Hey Tim,

Yeah, that is not going to happen with me. The software volume can be tested though, doesn't it? If I find a 'combo' that will reduce volume without changing the PCM mixer value, then that would be happening software-side, right? (given I have a single mixer, that would 'discard' hardware volume control, right?)

Correct.

Its similar to MPD config where Software volume is selected even though the audio device has hardware volume controller. In this case Moode sets hardware volume to 0dB (100%).

-Tim
 
Ok, so I believe I have Software Volume working, still I need some sanity check from you Tim to see if this is a viable solution:

There is no /etc/asound.conf file, which is where spotify-connect-web is looking for (apparently) 'extra' configurations. So:

- Create /etc/asound.conf file with:
Code:
pcm.softvol {
type softvol
slave {
pcm "hw:1"
}
control {
name "Master"
card 0
}
}

This creates, as I understand it, a 'virtual' mixer named "Master" inside a new 'softvol' device slaved to the hw:1 card. This would need to be 'custom configured' with the correct device.

After that, alsamixer command shows a new Master mixer (next to the PCM) in the bcm2835 ALSA card (not inside the USB card!!!).

Then, I am able to run spotify-connect-web with: --playback_device softvol -m Master

This works as expected, the audio outputs from the USB card, if I change the volume from inside Spotify, it changes the volume, but the PCM mixer and the USB mixer are not affected, only the Master mixer is affected.

In this case, changing the sotware volume from Moode player DOES NOT change the spotify volume (as opposed to when configured as hardware). Of course, if configured as hardware in Moode, it still controls the hardware volume, but I have full range of software volume inside that hardware limit with this configuration.

Is that test enough to conclude that software volume control is possible?

Thanks,
Rafa.
 
Ok, so I believe I have Software Volume working, still I need some sanity check from you Tim to see if this is a viable solution:

There is no /etc/asound.conf file, which is where spotify-connect-web is looking for (apparently) 'extra' configurations. So:

- Create /etc/asound.conf file with:
Code:
pcm.softvol {
type softvol
slave {
pcm "hw:1"
}
control {
name "Master"
card 0
}
}

This creates, as I understand it, a 'virtual' mixer named "Master" inside a new 'softvol' device slaved to the hw:1 card. This would need to be 'custom configured' with the correct device.

After that, alsamixer command shows a new Master mixer (next to the PCM) in the bcm2835 ALSA card (not inside the USB card!!!).

Then, I am able to run spotify-connect-web with: --playback_device softvol -m Master

This works as expected, the audio outputs from the USB card, if I change the volume from inside Spotify, it changes the volume, but the PCM mixer and the USB mixer are not affected, only the Master mixer is affected.

In this case, changing the sotware volume from Moode player DOES NOT change the spotify volume (as opposed to when configured as hardware). Of course, if configured as hardware in Moode, it still controls the hardware volume, but I have full range of software volume inside that hardware limit with this configuration.

Is that test enough to conclude that software volume control is possible?

Thanks,
Rafa.

Hi Rafa,

I think it needs to be tested using an audio device that does not have a hardware volume controller for example Mamboberry LS or Audiophonics ES9023. The Spotify Connect cmd string would not contain a mixer name or index for these devices since they don't have a hardware mixer. It could be similar to how MPD and Airplay are configured.

For example here are audio_output sections from mpd.conf for the Mambo and IQaudIO devices. The IQaudIO Device has hardware volume controller, the Mambo does not.

Mambo LS /etc/mpd.conf. Only option for volume control is Software. There is no ALSA volume (PCM, Digital, etc).

audio_output {
type "alsa"
name "ALSA default"
device "hw:0,0"
dsd_usb "no"
}

IQaudIO Pi-DAC+ /etc/mpd.conf. This device can be configured for either Software or Hardware volume.

1) mpd configured for Software volume control. This block same as for Mambo but since this device has hardware volume controller, Moode sets ALSA volume to 0dB (100%). This is to ensure that when Software volume is at 100% the audio device is outputting 0dB (100%).

audio_output {
type "alsa"
name "ALSA default"
device "hw:0,0"
dsd_usb "no"
}

2) mpd configured for Hardware volume control

audio_output {
type "alsa"
name "ALSA default"
device "hw:0,0"
mixer_control "Digital"
mixer_device "hw:0"
mixer_index "0"
dsd_usb "no"
}

MPD volume is controlling ALSA volume.

-Tim
 
Is there any chance to include multiple audio devices output support? Natively, MPD is supporting this by configuring several "audio_output" sections. In my case, I have such configuration in place for HiFiBerry Digi+ (I2S) and external USB DAC, but with manual mpd.conf editing as natively you can't select anything else (either singularly or in parallel) when I2S device is in place.

Interesting observations about the volume control. I would guess that hardware volume control is direct manipulation of DAC data paths supporting this? For example some of my ESS Sabre DACs with 32bit digital volume control in place are matching or exceeding some of the best analogue pre-amps I had, but not sure how OS hardware level control would interact actually (if DAC offers digitally controlled volume pot)?!

Speaking of spotify-connect-web and volume control, it would be the best that master volume control is safely handled by moOde and just leave everything else at max (including other players).
 
Is there any chance to include multiple audio devices output support? Natively, MPD is supporting this by configuring several "audio_output" sections. In my case, I have such configuration in place for HiFiBerry Digi+ (I2S) and external USB DAC, but with manual mpd.conf editing as natively you can't select anything else (either singularly or in parallel) when I2S device is in place.

Interesting observations about the volume control. I would guess that hardware volume control is direct manipulation of DAC data paths supporting this? For example some of my ESS Sabre DACs with 32bit digital volume control in place are matching or exceeding some of the best analogue pre-amps I had, but not sure how OS hardware level control would interact actually (if DAC offers digitally controlled volume pot)?!

Speaking of spotify-connect-web and volume control, it would be the best that master volume control is safely handled by moOde and just leave everything else at max (including other players).

Hi,

AFAIK, due to ESS licensing restrictions, there is no Linux/OpenSource driver for their chips which allows access to their nice on-chip hardware volume controllers and other features. ESS even restricts access to the full datasheets for their chips. What you see on their website are just summary sheets.

For renderers like Spotify Connect, Airplay, Squeezelite, UPnP the client is responsible for controlling volume, not Moode.

-Tim
 
Hi Tim,

Yes, not surprising from ESS. As far as I'm aware, some DACs do allow direct hardware volume control via USB HID but those are particular cases.

Comment regarding other renderers volume control is that it could be (by certain degree) sonically damaging if done by client. Just to be on the safe side, I just set all renderers volume (client or otherwise) to 100% and control the volume from single point (either pre-amp or OS). In that respect, I would just leave the volume control to safe moOde hands (instead of fiddling with renderers mixer interaction) ... but surely that would be my personal practice/choice.

Regards,
Igor
 
I had 2.7 for months successfully and finally bit the bullet and went to 3.1.

Now I'm having problems with configuring sources.

I had a working mount point for my Synology NAS using NFS,

remote directory = volume1/music/
mount flags = nfsvers=3,ro,noatime

but with those flags enabled, the player is not connecting.

not only that, but in trying to delete the source, moode hangs in the Remove mount point confirmation dialog. if i open up another window into moode, there is a notice that the source has been removed successfully. but if i go and look at sources again, the source is still there. horrors!

i'm going to try to erase and reinstall, but …*