I just tried to use HiFiBerryOS on my RPi 2B with a DAC+ Pro. Unfortunately I cant select Spotify as source at hifiberry.local and the device is also not selectable in the Spotify app. Is this a known issue?
24 comments
-
HiFiBerry team The Pi2 isn't tested by us. It might be a bug or a compatibility problem. You can login and check
systemctl status spotify -
Max Mustermann systemctl status spotify gives:
● spotify.service - Spotify connect
Loaded: loaded (/usr/lib/systemd/system/spotify.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Condition: start condition failed at Wed 2020-05-27 15:25:05 CEST; 14min ago
└─ ConditionPathExists=/etc/features/arm7 was not metMay 27 15:25:05 hifiberry systemd[1]: Condition check resulted in Spotify connect being skipped.
-
HiFiBerry team Ok, the Pi2 isn't recogniozed as "supported". I'm not sure if this has been changed already with the latest release. Try upgrading to 20200527 and check with this version.
-
Max Mustermann I upgraded to 20200527 today, systemctl status spotify now gives:
● spotify.service - Spotify connect
Loaded: loaded (/usr/lib/systemd/system/spotify.service; disabled; vendor preset: enabled)
Active: inactive (dead) -
HiFiBerry team Can you enable it in the GUI?
-
Roie Geron I have been able to enable Spotify connect on RP2 by remark the following line from
/usr/lib/systemd/system/spotify.service
edit it using vi or nano
# ConditionPathExists=/etc/features/arm7
Remak the line and then reboot the RP2 .
you should see it on the devices list in your Spotify application although it will not be shown in the HIFIBerryOS GUI.
-
HiFiBerry team Ok, looks like the Pi2 didn't get the ARM7 feature. We'll fix this in the next release.
-
HiFiBerry team To fix this, we need an identification of the Pi2. Can you please post the output ouf the following command:
cat /proc/device-tree/model -
Roie Geron # cat /proc/device-tree/model
Raspberry Pi 2 Model B Rev 1.1 -
HiFiBerry team Thanks, we'll include this in the next release.
-
Olsen This doesn't seem to have been fixed in 20200908. I've got the same Pi Model as Roie (Raspberry Pi 2 Model B Rev 1.1) but Spotify is only available after applying Roie's fix. It would be great if you could fix it!
-
Olsen ..I think this patch should do it:
$ diff -u4 reconfigure-players reconfigure-players-orig
--- reconfigure-players 2020-10-12 22:10:52.055002540 +0200
+++ reconfigure-players-orig 2020-10-12 22:09:37.924245059 +0200
@@ -117,14 +117,8 @@
FEATURES="$FEATURES bluetooth"
return
fi
- if [[ $modelname == *"Pi 2 Model B Rev 1.1" ]]; then
- PIMODEL="2"
- PIVERSION=2
- return
- fi
-
if [[ $modelname == *"Pi 2 Model B" ]]; then
PIMODEL="2"
PIVERSION=2
FEATURES="$FEATURES arm7" -
HiFiBerry team This has been included already in the September release:
https://github.com/hifiberry/hifiberry-os/blob/master/buildroot/package/hifiberry-tools/reconfigure-players -
Olsen I started with September release on my Pi2 and had to comment out the line
ConditionPathExists=/etc/features/arm7
within /usr/lib/systemd/system/spotify.service to get Spotify connect running. /etc/features/arm7 doesn't exist on the Pi2. Therefore I assume
FEATURES="$FEATURES arm7"
is not correct for the Pi2.
-
HiFiBerry team Try removing /etc/hifiberry.state and reboot
-
Olsen Ok, I reverted /usr/lib/systemd/system/spotify.service to the original version, deleted /etc/hifiberry.state and rebooted. Spotify is neither available through the web gui nor via an official Spotify client within the same network.
/etc/hifiberry.state looks like this:
# cat /etc/hifiberry.state
CURRENT_PIMODEL=unknown
CURRENT_MIXER_CONTROL="Digital"
CURRENT_CARD="DAC+ Pro"
CURRENT_HW="card 0"
CURRENT_HW_SHORT=0
CURRENT_SYSNAME="HiFiBerry"
CURRENT_PLAYERS=""
CURRENT_HATINFO="HiFiBerry DAC+"
CURRENT_FEATURES="pi bluetooth bin boot data dev etc home lib lib32 libexec library library.bak linuxrc lost+found lost_found media mnt opt proc root run sbin srv sys tmp usr var"
CURRENT_DSPTYPE=""
PIVERSION=
#I think it doesn't work because my Pi model string is "Raspberry Pi 2 Model B Rev 1.1" which doesn't match on [[ $modelname == *"Pi 2 Model B" ]]. And even if it would match, arm7 seems to be wrong for this revision of the Pi2 (there is no /etc/features/arm7).
I'm on 20200908 with a direct installation (no update).
-
HiFiBerry team Ok, I see. This is a Pi that doesn't feature an ARM7 command set. It's interesting to see that spotifyd is running at all as it should not. As it is not supposed to work at all, we won't include a patch to enable this on this Pi model. It might just break with the next release.
You can create a file /etc/hifiberry/arm7.feature to enable it.
However, as I said it might just break in any new release and we won't guarantee that it will will on a non-ARM7 Pi in future releases. -
Olsen All Pi2 models are at least arm7 ! According to Wikipedia the first version (this is what i have) contains a Cortex-A7 (arm7). Newer models of the Pi2 contain a Cortex-A53 (arm 8). See https://en.wikipedia.org/wiki/Raspberry_Pi#Specifications
The error is the missing '*' at the end of the [[ $modelname == *"Pi 2 Model B" ]] -> it doesn't match on "Raspberry Pi 2 Model B Rev 1.1" -> no arm7 feature -> no Spotify connect.
I added the '*' at the end: [[ $modelname == *"4 Model B"* ]], removed /etc/hifiberry.state and rebooted. Afterwards HifiBerry is available as a Spotify connect player. I think you can safely enable this for the Pi2.
The only flaw is that Spotify is not available in the HifiBerry web gui. I don't know why...
/etc/hifiberry.state looks good now:
CURRENT_PIMODEL=2
CURRENT_MIXER_CONTROL="Digital"
CURRENT_CARD="DAC+ Pro"
CURRENT_HW="card 0"
CURRENT_HW_SHORT=0
CURRENT_SYSNAME="HiFiBerry"
CURRENT_PLAYERS=""
CURRENT_HATINFO="HiFiBerry DAC+"
CURRENT_FEATURES="pi arm7 bluetooth bin boot data dev etc home lib lib32 libexec library library.bak linuxrc lost+found lost_found media mnt opt proc root run sbin srv sys tmp usr var"
CURRENT_DSPTYPE=""
PIVERSION=2
# -
HiFiBerry team You're right. I misread this. We'll add this fix in the next release.
-
Olsen Thanx! :)
-
Olsen The Pi 2 still isn't recognized correctly with 20201022. There is a Typo in reconfigure-players:
actual: *"
if [[ $modelname == *"Pi 2 Model*" ]]; then
should be: "*
if [[ $modelname == *"Pi 2 Model"* ]]; then
-
HiFiBerry team Just a few more releases and we'll get it working ;-)
-
Olsen ... which causes Spotify to be disabled
-
Olsen yes, it's getting really close to perfect for the Pi 2 now! ;-)