Renewed Spotify Premium after waiting long for HiFi

The android phone as no role to play other than sending command to librespot on the pi to play a song. So if android phone shows disconnected it means that the pi is getting disconnected for some reason.

Is this by any chance the allo boss player with the metal case?
Mine is a Digione Signature in an open transparent case. I reflashed the OS and that seems to have solved the disconnection issue. However, now my dac is not getting a signal. Troubleshooting that now.

Also, I thought wifi 5Ghz was a Volumio issue, but even Moode is not seeing it, Looks like its a Pi3 limitation then. Only 2.4Ghz signal is seen.

MaSh
 
Mine is a Digione Signature in an open transparent case. I reflashed the OS and that seems to have solved the disconnection issue. However, now my dac is not getting a signal. Troubleshooting that now.

Also, I thought wifi 5Ghz was a Volumio issue, but even Moode is not seeing it, Looks like its a Pi3 limitation then. Only 2.4Ghz signal is seen.

MaSh
If your dac is not getting signal, then check if it is connected

Login to your pi. Run the command
$ aplay -l

e.g. on my usbridge signature (it is the same hardware without the digione card)
usbridgepi) /home/pi >aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Revolution [Revolution], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

If your dac is listed as card 0, then music will play on that. Else it will play somewhere else (the hdmi or the headphone out). What I do is disable the onboard broadcom audio device completely in /boot/config.txt
# Enable/disable audio (loads snd_bcm2835)
dtparam=audio=off
 
@MaSh If your /boot/config.txt doesn't have dtoverlay=allo-digione, music will not play on the dac connected to the digione signature.

EDIT:
See this post. The FM has used the original raspbian OS rather than using moode, volumio. I too use the original OS rather than using any third party distributions (dietpi, volumio, moode, etc).


e.g. I don't have the allo digione signature. If the driver is there you will find a kernel object (.ko) file. The digione driver is not part of the linux kernel. If you run the find command you will find the driver. If not, sound will not play
usbridge (pi) /lib/modules/5.15.32-v8+ >find . -name '*allo-*'
./kernel/sound/soc/bcm/snd-soc-allo-piano-dac.ko
./kernel/sound/soc/bcm/snd-soc-allo-katana-codec.ko
./kernel/sound/soc/bcm/snd-soc-allo-boss-dac.ko
./kernel/sound/soc/bcm/snd-soc-allo-boss2-dac.ko
./kernel/sound/soc/bcm/snd-soc-allo-piano-dac-plus.ko
./kernel/drivers/clk/clk-allo-dac.ko
 
Last edited:
If your dac is not getting signal, then check if it is connected

Login to your pi. Run the command
$ aplay -l

e.g. on my usbridge signature (it is the same hardware without the digione card)


If your dac is listed as card 0, then music will play on that. Else it will play somewhere else (the hdmi or the headphone out). What I do is disable the onboard broadcom audio device completely in /boot/config.txt
pi@moode:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndallodigione [snd_allo_digione], device 0: Allo DigiOne HiFi wm8804-spdif-0 [Allo DigiOne HiFi wm8804-spdif-0]
Subdevices: 1/1

Subdevice #0: subdevice #0


@MaSh If your /boot/config.txt doesn't have dtoverlay=allo-digione, music will not play on the dac connected to the digione signature.

EDIT:
See this post. The FM has used the original raspbian OS rather than using moode, volumio. I too use the original OS rather than using any third party distributions (dietpi, volumio, moode, etc).

I already seem to have this line as I disabled hdmi in the Moode configuration.

MaSh
 
pi@moode:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndallodigione [snd_allo_digione], device 0: Allo DigiOne HiFi wm8804-spdif-0 [Allo DigiOne HiFi wm8804-spdif-0]
Subdevices: 1/1

Subdevice #0: subdevice #0



I already seem to have this line as I disabled hdmi in the Moode configuration.

MaSh
This rules out driver problem. Now if you have any wav file, run the following command and see if any sound comes from your dac. e.g lets say your wave file is named test_sound.wav

$ aplay -D hw:sndallodigione test_sound.wav
 
Last edited:
You can also try the foloowing in /etc/raspotify/conf.

You will have to be root to edit the file.

$ sudo nano /etc/raspotify/conf

LIBRESPOT_DEVICE="hw:CARD=sndallodigione,DEV=0"

After editing the file, restart spotify service

$ sudo systemctl restart raspotify.service
 
Sure, will try this too.
Update:
Do not have this path: /etc/raspotify/conf

In the mean time I tried setting the i2s device as Digione instead of Digione Signature. This change sent out the signal to the DAC and music played for about 20-25 seconds, however, the disconnection issue returned. Spotify connect lost connection and now I cannot find it in the Device list. Rebooting. On rebooting, the Shutdown/Reboot menu options don't seem to be working. I am having to do a hard reboot.

MaSh
 
Last edited:
Sure, will try this too.
Update:
Do not have this path: /etc/raspotify/conf

In the mean time I tried setting the i2s device as Digione instead of Digione Signature. This change sent out the signal to the DAC and music played for about 20-25 seconds, however, the disconnection issue returned. Spotify connect lost connection and now I cannot find it in the Device list. Rebooting. On rebooting, the Shutdown/Reboot menu options don't seem to be working. I am having to do a hard reboot.

MaSh
You should contact allo to find out what the entry should be in /boot/config.txt for digione signature. All this while you are depending on volumio/mode to set the entry in /boot/config.txt. But only the manufacturer will have the right answer. I don't think using the older digione driver instead of the newer digione signature is the correct thing to do.

@jmascreen what entry do you have in your /boot/config.txt for digone signature?

@MaSh never do a hard reboot and corrup the SD card. You can login and run the command below to shutdown your pi.

$ sudo shutdown -h now

Also when you say disconnection, is librespot restarting? You can do ps -ef |grep spot to check the pid. When the disconnection happens, does the pid change?
 
Last edited:
You should contact allo to find out what the entry should be in /boot/config.txt for digione signature. All this while you are depending on volumio/mode to set the entry in /boot/config.txt. But only the manufacturer will have the right answer. I don't think using the older digione driver instead of the newer digione signature is the correct thing to do.

@jmascreen what entry do you have in your /boot/config.txt for digone signature?

@MaSh never do a hard reboot and corrup the SD card. You can login and run the command below to shutdown your pi.

$ sudo shutdown -h now

Also when you say disconnection, is librespot restarting? You can do ps -ef |grep spot to check the pid. When the disconnection happens, does the pid change?
The idea came from Volumio. It is Digione for both Digione and Signature. Read in some forum that the driver is same.

ps -ef |grep spot
Ran this after it got disconnected and looks like the service itself is not running
pi@moode:~ $ ps -ef |grep spot
pi 1955 770 0 01:58 pts/0 00:00:00 grep --color=auto spot

MaSh
 
The idea came from Volumio. It is Digione for both Digione and Signature. Read in some forum that the driver is same.

ps -ef |grep spot
Ran this after it got disconnected and looks like the service itself is not running
pi@moode:~ $ ps -ef |grep spot
pi 1955 770 0 01:58 pts/0 00:00:00 grep --color=auto spot

MaSh
That's why the Android shows disconnected. Tomorrow we will install the librespot from the official GitHub repo rather than using the moode supplied binary
 
Is it just me or like me you also find it infuriating that when I want to jive to my favourite tunes, I have to instead spend hours troubleshooting?
The younger me with lots of free time would have enjoyed that a whole lot but now....nah, I just want to listen to music when I want to.
One of the reasons why I have stayed away deliberately from DIY streaming solutions, maybe one of these days...
Spotify lets you achieve that simple pleasure of being able to listen to music without a fuss and I love it for that. After a while pretty much all it plays for you, none of it you will hate. Consistency and being able to count on a promise, that becomes extremely important with you having less and less time at your disposal for the simple pleasures.
 
One of the reasons why I have stayed away deliberately from DIY streaming solutions, maybe one of these days...
In the olden days when humans didn't understand nature they fell prey to gurus, tantriks, and self proclaimed prophets. It's the same thing now. In this case people rather than using the official Linux resort to second hand distributions and when things don't work, their tiny reserve of patience runs out. 😁

In fact whatever is happening is not rocket science. It's a case of too many cooks spoiling the broth. It's like blaming allopathy after taking ayurvedic medicine and then saying allopathy doesn't work.
 
In the olden days when humans didn't understand nature they fell prey to gurus, tantriks, and self proclaimed prophets. It's the same thing now. In this case people rather than using the official Linux resort to second hand distributions and when things don't work, their tiny reserve of patience runs out. 😁

In fact whatever is happening is not rocket science. It's a case of too many cooks spoiling the broth. It's like blaming allopathy after taking ayurvedic medicine and then saying allopathy doesn't work.
I know what you mean, lets put it out there that not even for a second I am blaming Linux for our maladies!
I did dabble into Linux back in the college days, now I do not have the patience. In fact only a few months back I was hell bent to switch away from Windows, I went very far and was so very close but had to give up since one of the proprietary software that my company runs just would not run properly on Linux, with wine and all that even.
I just do not wish to get into that troubleshooting spree when it comes to music, time for music is precious as it is with a toddler running around, you can imagine I am sure!
 
It sure is a pain. That's one of the reasons I stuck to Volumio+ Airplay which just works. Necer had an issue with it. If Spotify with moode still does not work, just going back to what has been working for me.

But then i also love to get my hands dirty!!! So it's all good learning and fun in the end.

MaSh
 
Is it just me or like me you also find it infuriating that when I want to jive to my favourite tunes, I have to instead spend hours troubleshooting?
The younger me with lots of free time would have enjoyed that a whole lot but now....nah, I just want to listen to music when I want to.
Agree. My workaround is playing all the streaming services through an Nvidia shield which connects into the DAC. Local files i still use the RPI.
Spotify and Amazon music work well. But Apple music and Idagio don't have native Android TV apps and the sideloaded apps are cumbersome to use
 
Okay, so moode is in place. However, I have an issue. The connect does not stick for more than 7 seconds in the android phone. For those 7 seconds the Pi shows connected and music plays quite well. However, after 7 seconds device gets disconnected and then the music stops. I do not lose connected when connected to the Moode UI on the browser. Tried rebooting it, rebooting my router, restarting spotify service, etc.

MaSh

Okay, so moode is in place. However, I have an issue. The connect does not stick for more than 7 seconds in the android phone. For those 7 seconds the Pi shows connected and music plays quite well. However, after 7 seconds device gets disconnected and then the music stops. I do not lose connected when connected to the Moode UI on the browser. Tried rebooting it, rebooting my router, restarting spotify service, etc.

MaSh
Are you using dhcp or static IP address in Moode? If it's static, make sure you configure dns servers also... a public dns server like 8.8.8.8 will be better. This is because the connection works purely between your rpi and Spotify servers, so local name resolution is mandatory.
 
@MaSh We have to figure out where the issue is. It has to be either
  1. The driver
  2. raspotify
One question. Does airplay on this moode setup run continuously? If both airplay and raspotify are exhibiting the same issue, it could point to a driver issue.

Fist step after powering on your device run the two commands below
$ ps -ef |grep spot
$ sudo systemctl status raspotify.service

You should get something like this
1657163794496.png

After that play music. You say it disconnects after few seconds. When it disconnects, run the command

$ sudo systemctl status raspotify.service

Another useful troubleshooting is to look at the logs when playing music. So before you play music run the following command on another terminal and press the ENTER key twice. If there is any issue with the driver it will get printed here. e.g. screenshot

1657164005007.png

We will continue after you do this. Most probably we will install the official version of raspotify from github rather than the one supplied by moode.
Regarding that, what is the listing in /etc/apt/sources.list.d ?

1657166793817.png
 
Last edited:
In Moode its not raspotify but its directly call the librespot library. A moodeutl command will show all the system details, the below is from my box.

root@moode:~# moodeutl -l |grep renderer
20220706 233620 worker: Reset renderer active flags
20220706 233621 worker: Airplay renderer (available: started)
20220706 233621 worker: Spotify renderer (available: started)
20220706 233621 worker: RoonBridge renderer (not installed)
20220706 233621 worker: UPnP renderer (available: started)


root@moode:~# ps -aux|grep librespot
root 935 0.0 0.0 10540 3360 ? S 09:03 0:00 sudo librespot --name Moode Spotify --bitrate 320 --format S16 --mixer softvol --initial-volume 50 --volume-ctrl log --volume-range 60 --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device _audioout --onevent /var/local/www/commandw/spotevent.sh
root 939 0.0 0.1 12576 5040 ? S 09:03 0:00 librespot --name Moode Spotify --bitrate 320 --format S16 --mixer softvol --initial-volume 50 --volume-ctrl log --volume-range 60 --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device _audioout --onevent /var/local/www/commandw/spotevent.sh
root 1973 0.0 0.0 7348 552 pts/0 S+ 09:14 0:00 grep librespot
 
root@moode:~# ps -aux|grep librespot
root 935 0.0 0.0 10540 3360 ? S 09:03 0:00 sudo librespot --name Moode Spotify --bitrate 320 --format S16 --mixer softvol --initial-volume 50 --volume-ctrl log --volume-range 60 --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device _audioout --onevent /var/local/www/commandw/spotevent.sh
root 939 0.0 0.1 12576 5040 ? S 09:03 0:00 librespot --name Moode Spotify --bitrate 320 --format S16 --mixer softvol --initial-volume 50 --volume-ctrl log --volume-range 60 --cache /var/local/www/spotify_cache --disable-audio-cache --backend alsa --device _audioout --onevent /var/local/www/commandw/spotevent.sh
root 1973 0.0 0.0 7348 552 pts/0 S+ 09:14 0:00 grep librespot

So moode is using a virtual sound device named _audioout as the output for spotify, instead of directly sending it to allo digione?

@premoddev how does one disable librespot startup in moode? I guess there must be a moodeutl command to do that or it has to be done in the web interface?
 
@premoddev how does one disable librespot startup in moode? I guess there must be a moodeutl command to do that or it has to be done in the web interface?

Enable/Disable all has to do through web, but you can restart renderer using moodeutl as below..

root@moode:~# moodeutl -R --spotify
Renderer restarted
 
A beautiful, well-constructed speaker with class-leading soundstage, imaging and bass that is fast, deep, and precise.
Back
Top