Moode Audio Player for Raspberry Pi

New "Radio France" radios

Hi Adrian,

Thanks. Updated stream links will be in next Moode update, also three new 192 kbps stations from France Musique compliments of Bernie :)

-Tim

Attached are the .pls files and logos of the most important "Radio France Group" radios, updated significantly in December 2016. Check on the newly launched "Classique Easy", "Classique Plus", "Concerts", "Musiques du monde", "La Jazz", "La contemporaine", "Classique Kids", "FIP rock", "FIP Jazz", "FIP Groove", "FIP autour du monde", "FIP tout nouveau", "FIP autour des disquaires" ---> all in near Hifi quality !

Would be great to have these part of the next Moode Audio update :) If it's too many .pls, at least I'd appreciate to have the logos and streaming address indexed in the radio SQL database, it's quite heavy to add them manually.

Thx & congrats again for the the continuous hard work!

Alec
 

Attachments

  • Radio France Radios for Moode Audio.zip
    254.4 KB · Views: 48
  • radio_france_-_adresses_flux_mp3_-_decembre_2016.pdf
    273.4 KB · Views: 74
when you finish work, call me! Im curious.

Here is another curious one ;) As mentioned, I don't use any mixer controls and just leave renderers at full volume, but was experimenting a bit with different audio devices. Here is the Matrix Mini-I Pro2 DAC over USB connection:

- When started as: (will just put relevant section)
spotify-connect-web --playback_device sysdefault:CARD=Series --mixer_device_index 1

It's picking up the mixer automatically but volume control from the Spotify is completely erratic and not synced with alsamixer itself. For example, look what will happen with alsamixer if volume from Spotify is notched down by approx third off the scale:

An externally hosted image should be here but it was not working when we last tested it.


spotify-connect-web console is reporting playback at 67 buy alsamixer goes all the way down to 15:

corected_playback_volume: 67
playback_volume: 41942


- When started with hw:1 or hw:CARD=Series as device selection:
spotify-connect-web --playback_device hw:1 --mixer_device_index 1"

Spotify volume is again not synced with alsamixer (as above) but as another twist playback couldn't be started and spotify-connect-web console is showing:

AlsaSink: device acquired
Ups! Some badness happened: Data size must be a multiple of framesize


- When started with plughw:CARD=Series or plughw:1 as device selection seems OK! and volume still not synced

Just for reference, my set-up atm:

pi@moode:~/src/spotify-connect-web $ aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
crossfeed
ladspa
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_digi,
Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_digi,
Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_digi,
Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_digi,
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_digi,
Hardware device with all software conversions
sysdefault:CARD=Series
Mini-i Series, USB Audio
Default Audio Device
front:CARD=Series,DEV=0
Mini-i Series, USB Audio
Front speakers
surround21:CARD=Series,DEV=0
Mini-i Series, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Series,DEV=0
Mini-i Series, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=Series,DEV=0
Mini-i Series, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Series,DEV=0
Mini-i Series, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Series,DEV=0
Mini-i Series, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Series,DEV=0
Mini-i Series, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Series,DEV=0
Mini-i Series, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=Series,DEV=0
Mini-i Series, USB Audio
Direct sample mixing device
dsnoop:CARD=Series,DEV=0
Mini-i Series, USB Audio
Direct sample snooping device
hw:CARD=Series,DEV=0
Mini-i Series, USB Audio
Direct hardware device without any conversions
plughw:CARD=Series,DEV=0
Mini-i Series, USB Audio
Hardware device with all software conversions


pi@moode:~/src/spotify-connect-web $pi@moode:~/src/spotify-connect-web $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Series [Mini-i Series], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0


pi@moode:~/src/spotify-connect-web $ amixer controls
numid=2,iface=MIXER,name='Mini-i Series Playback Switch'
numid=3,iface=MIXER,name='Mini-i Series Playback Switch',index=1
numid=4,iface=MIXER,name='Mini-i Series Playback Volume'
numid=5,iface=MIXER,name='Mini-i Series Playback Volume',index=1
numid=1,iface=PCM,name='Playback Channel Map'
 
Last edited:
Another update with volume control experiments... I've configured moOde without I2S and USB audio device was selected as playback device with hardware volume control (so that device PCM alsa mixer is accessed directly, as I understand, instead of MPD software volume control):

An externally hosted image should be here but it was not working when we last tested it.


Again, volume scale is not translated (synchronised) with alsamixer ... so it seems that it's not spotify-connect-web related!

By the way, not sure if I mentioned already, is there any chance that moOde is able to use *both* I2S and USB audio device as part of the standard feature? as in my case I have to configure I2S device, reboot etc and then manually edit mpd.conf for another (USB) audio_output as I can't select the USB audio device from the moOde itself.
 
Another update with volume control experiments... I've configured moOde without I2S and USB audio device was selected as playback device with hardware volume control (so that device PCM alsa mixer is accessed directly, as I understand, instead of MPD software volume control):

An externally hosted image should be here but it was not working when we last tested it.


Again, volume scale is not translated (synchronised) with alsamixer ... so it seems that it's not spotify-connect-web related!

By the way, not sure if I mentioned already, is there any chance that moOde is able to use *both* I2S and USB audio device as part of the standard feature? as in my case I have to configure I2S device, reboot etc and then manually edit mpd.conf for another (USB) audio_output as I can't select the USB audio device from the moOde itself.

Hi,

The volume control issues suggest bugs in the Spotify Connect code since MPD, Airplay, Squeezelite and UPnP don't have issues with volume.

I'd recommend posting the issues, screenshots and logs to the Spotify Connect Git repo and have the developer troubleshoot.

Active switching between I2S and USB audio devices could be done but its not a trivial amount of work and doesn't seem like a common usage scenario. The only way a feature like this would make it into the codebase is if the development were funded.

-Tim
 
Hi,

The volume control issues suggest bugs in the Spotify Connect code since MPD, Airplay, Squeezelite and UPnP don't have issues with volume.

I'd recommend posting the issues, screenshots and logs to the Spotify Connect Git repo and have the developer troubleshoot.

Active switching between I2S and USB audio devices could be done but its not a trivial amount of work and doesn't seem like a common usage scenario. The only way a feature like this would make it into the codebase is if the development were funded.

-Tim

Hi Tim,

Thanks for the follow up. Well, that's the thing ... I was unsure if erratic volume control is related specifically to spotify-connect-web code, so I've configured moOde MPD to use USB audio device and hardware volume control, so that USB audio device volume/mixer controls are accessed directly ... and MPD itself is behaving the same, as you may see from the last attached picture with volume levels in place. When I put moOde volume control at 67 USB driver mixer volume goes all the way down to 19, as shown form alsamixer itself ... basically it goes way ahead of what's selected. This is the relevant mpd.conf section btw, generated by moOde:

audio_output {
type "alsa"
name "ALSA default"
device "hw:1,0"
mixer_control "Mini-i Series"
mixer_device "hw:1"
mixer_index "0"
dsd_usb "no"
}

Personally, I don't use moOde volume control (or any software volume) as volume is controlled from the DAC/pre itself, but was keen to experiment a bit. It may happen that it's not spotify-connect-web issue, but related with USB DAC driver or other matters, so someone else may chip in with similar tests and/or experiences.

Not a problem about dual/selected audio devices (I2S+USB). I'm using one device for headphones set-up and one for the main system, hence dual or selective output was needed. I just configure moOde for I2S and then manually edit mpd.conf to include dual output I2S+USB audio interfaces:

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

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


Cheers
Igor
 
Attached are the .pls files and logos of the most important "Radio France Group" radios, updated significantly in December 2016. Check on the newly launched "Classique Easy", "Classique Plus", "Concerts", "Musiques du monde", "La Jazz", "La contemporaine", "Classique Kids", "FIP rock", "FIP Jazz", "FIP Groove", "FIP autour du monde", "FIP tout nouveau", "FIP autour des disquaires" ---> all in near Hifi quality !

Would be great to have these part of the next Moode Audio update :) If it's too many .pls, at least I'd appreciate to have the logos and streaming address indexed in the radio SQL database, it's quite heavy to add them manually.

Thx & congrats again for the the continuous hard work!

Alec

Merci ;)
 
Hi Tim,

Thanks for the follow up. Well, that's the thing ... I was unsure if erratic volume control is related specifically to spotify-connect-web code, so I've configured moOde MPD to use USB audio device and hardware volume control, so that USB audio device volume/mixer controls are accessed directly ... and MPD itself is behaving the same, as you may see from the last attached picture with volume levels in place. When I put moOde volume control at 67 USB driver mixer volume goes all the way down to 19, as shown form alsamixer itself ... basically it goes way ahead of what's selected. This is the relevant mpd.conf section btw, generated by moOde:

audio_output {
type "alsa"
name "ALSA default"
device "hw:1,0"
mixer_control "Mini-i Series"
mixer_device "hw:1"
mixer_index "0"
dsd_usb "no"
}

Personally, I don't use moOde volume control (or any software volume) as volume is controlled from the DAC/pre itself, but was keen to experiment a bit. It may happen that it's not spotify-connect-web issue, but related with USB DAC driver or other matters, so someone else may chip in with similar tests and/or experiences.

Not a problem about dual/selected audio devices (I2S+USB). I'm using one device for headphones set-up and one for the main system, hence dual or selective output was needed. I just configure moOde for I2S and then manually edit mpd.conf to include dual output I2S+USB audio interfaces:

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

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


Cheers
Igor

Hi Igor,

As far as volume issue goes, I see that the audio device has two volume controls in alsamixer. What is each one used for?

Moode uses command below to fetch the mixer name for USB device.
awk -F"'" '/Simple mixer control/{print $2;}' <(amixer -c 1)

I've run across a few USB audio devices that don't use the standard ALSA mixer name 'PCM' or have several volume controls and have not been able to revolve the volume issues.

-Tim
 
Hi Tim,

Thanks for the follow up. Well, that's the thing ... I was unsure if erratic volume control is related specifically to spotify-connect-web code, so I've configured moOde MPD to use USB audio device and hardware volume control, so that USB audio device volume/mixer controls are accessed directly ... and MPD itself is behaving the same, as you may see from the last attached picture with volume levels in place. When I put moOde volume control at 67 USB driver mixer volume goes all the way down to 19, as shown form alsamixer itself ... basically it goes way ahead of what's selected. This is the relevant mpd.conf section btw, generated by moOde:

audio_output {
type "alsa"
name "ALSA default"
device "hw:1,0"
mixer_control "Mini-i Series"
mixer_device "hw:1"
mixer_index "0"
dsd_usb "no"
}

Personally, I don't use moOde volume control (or any software volume) as volume is controlled from the DAC/pre itself, but was keen to experiment a bit. It may happen that it's not spotify-connect-web issue, but related with USB DAC driver or other matters, so someone else may chip in with similar tests and/or experiences.

Not a problem about dual/selected audio devices (I2S+USB). I'm using one device for headphones set-up and one for the main system, hence dual or selective output was needed. I just configure moOde for I2S and then manually edit mpd.conf to include dual output I2S+USB audio interfaces:

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

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


Cheers
Igor

Hi Igor, did you perhaps try the --dbrange option? If it is 'erratic' in the meaning that it jumps up and down while moving spotify volume in a single direction, then that's a bug, for certain.

If just goes down too quickly, that may be due to the range? I believe the default mapping is 0-100 gets made into 50-100 which are the Alsa defaults.

Perhaps you can test with that parameter to check if things get working better?

Best regards,
Rafa.
Edit: I agree though that this is probably better discussed on the spotify-connect-web issues?
 
Friends,

I have finished a 'proof of concept' of Spotify Connect actually taking over Moode audio automatically, and regaining control back. I also made a small 'hook' of the spotify metadata into the moode player, everything is working nicely.

I made a small video showing how things couple toghether:
https://www.youtube.com/watch?v=Pd4K2CtaVBo

(I have volume control disabled in my setup, so I didn't showcase that, but that is working for external DAC scenarios as well)

I wouldn't go into much more effort, this is 'good enough' for the moment. Ideally, Moode should 'ping' or fetch the data as the songs change (or listen to an external event to prevent constant polling?), and the transport controls (play, next, back, pause) could be easily mapped to the Spotify Client, but, as mentioned by others, that is perfectly fine within the phone or tablet, so I am happy with how things are working right now.

To accomplish this I created my own 'hooks' to start and stop events (this is not built into Spotify Connect Web at this point) with a service that is polling the localhost:4000 api every second. This is not really ideal, but it works as a proof of concept. It also allowed for a faster integration as opposed to doing a complete reverse-engineering of the Moode play libraries! :p

But the concept works and I believe this could be achieved better with a deeper knowledge of Moode. I did add one extra row to the cfg table in the player.db to listen for the spotifyactv with identical behavior and syntax as the airplayactv counterpart.

Its great to play around with these things, at least I have always enjoyed it. Thanks,
Best regards,
Rafa.
 
Last edited:
Friends,

I have finished a 'proof of concept' of Spotify Connect actually taking over Moode audio automatically, and regaining control back. I also made a small 'hook' of the spotify metadata into the moode player, everything is working nicely.

I made a small video showing how things couple toghether:
https://www.youtube.com/watch?v=Pd4K2CtaVBo

(I have volume control disabled in my setup, so I didn't showcase that, but that is working for external DAC scenarios as well)

I wouldn't go into much more effort, this is 'good enough' for the moment. Ideally, Moode should 'ping' or fetch the data as the songs change (or listen to an external event to prevent constant polling?), and the transport controls (play, next, back, pause) could be easily mapped to the Spotify Client, but, as mentioned by others, that is perfectly fine within the phone or tablet, so I am happy with how things are working right now.

To accomplish this I created my own 'hooks' to start and stop events (this is not built into Spotify Connect Web at this point) with a service that is polling the localhost:4000 api every second. This is not really ideal, but it works as a proof of concept. It also allowed for a faster integration as opposed to doing a complete reverse-engineering of the Moode play libraries! :p

But the concept works and I believe this could be achieved better with a deeper knowledge of Moode. I did add one extra row to the cfg table in the player.db to listen for the spotifyactv with identical behavior and syntax as the airplayactv counterpart.

Its great to play around with these things, at least I have always enjoyed it. Thanks,
Best regards,
Rafa.

Hi Rafa,

Nice work :)

If I get some spare time I might be able to work on some of these the Software volume issue by signing up for 30-day Spotify Premium trial.

-Tim