Als neuer Audioplayer habe ich mir kürzlich ein Raspberry Pi B+ mit Hifiberry Digi+ und als Software Pi Musicbox gebastelt. Angeschlossen habe ich das ganze via SPDIF.
Am Anfang war ich frustriert, weil kein Sound zu hören war. Nach einiger Zeit Basteln und Recherchen habe ich einen Workaround gefunden: https://www.hifiberry.com/forums/topic/digi-and-pimusicbox-sync-error/
Im Script /opt/musicbox/setsound.sh muss die Identifikation für die Hifiberry Digi+ angepasst werden:

1
elif [[ ${dev[1]} == "snd-rpi-hifiberry-digi" ]]; then

ändern in

1
elif [[ ${dev[1]} == "snd-hifiberry-digi" ]]; then

danach rebooten und prüfen ob der richtige Ausgang gewählt wird:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sndrpihifiberry [snd_rpi_hifiberry_digi], device 0: HifiBerry Digi HiFi wm8804-spdif-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

bei mir ist die hifiberry die card 1, dies muss mit der Einstellung in /etc/asound.conf übereinstimmen

1
2
3
4
5
6
7
8
9
cat /etc/asound.conf
pcm.!default {
    type hw
    card 1
}
ctl.!default {
    type hw
    card 1
}