0

Digi+ on PRI2 with Raspbian

I have Digi+ on RPI2 with Raspbian. It used to work but stopped a while back. Now here putting all steps together to get it working again. Instructions on the website and other forum posts are not complete. So here we go.

I have this kernel:

# uname -a
Linux woonkamer 4.4.13-v7+ #894 SMP Mon Jun 13 13:13:27 BST 2016 armv7l GNU/Linux

I left the audio config in raspi-config set to auto.

In /boot/config.txt I added the line:

dtoverlay=hifiberry-digi

and commented out the line:

#dtparam=audio=on

In /etc I added this file:

# cat /etc/asound.conf
pcm.!default  {
    type hw card 0
}
ctl.!default {
    type hw card 0
}

After a rebooted it reported:

# lsmod|grep hifiberry
snd_soc_hifiberry_digi     3255  0
snd_soc_core          125885  3 snd_soc_wm8804,snd_soc_bcm2835_i2s,snd_soc_hifiberry_digi

and:

# 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

# aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default
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

However, I also see this:

# dmesg | grep digi
[    4.845470] snd-hifiberry-digi soc:sound: ASoC: CODEC DAI wm8804-spdif not registered
[    4.845506] snd-hifiberry-digi soc:sound: snd_soc_register_card() failed: -517
[    5.128467] snd-hifiberry-digi soc:sound: wm8804-spdif <-> 3f203000.i2s mapping ok

In earlier tests I got:

# dmesg | grep digi
[    4.955586] snd-hifiberry-digi soc:sound: ASoC: CPU DAI (null) not registered
[    4.955624] snd-hifiberry-digi soc:sound: snd_soc_register_card() failed: -517
[    4.957336] snd-hifiberry-digi soc:sound: ASoC: CODEC DAI wm8804-spdif not registered
[    4.957369] snd-hifiberry-digi soc:sound: snd_soc_register_card() failed: -517
[    5.152842] snd-hifiberry-digi soc:sound: wm8804-spdif <-> 3f203000.i2s mapping ok

Question 2: Is that a problem?

It is also available when running:

# alsamixer -c 0

or simply

# alsamixer

I do not hear any audio with:

# aplay /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1303: Channels count non available
i# aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1303: Channels count non available

When Mopidy was playing, I got:

# aplay /usr/share/sounds/alsa/Front_Center.wav
aplay: main:786: audio open error: Device or resource busy

Question 3: How do I play a test sound on this device?

For Mopidy I did:

# apt-get install mopidy-alsamixer

and with:

# amixer scontrols
Simple mixer control 'PCM',0

I added to mopidy.conf:

[alsmixer]
card = 0
mixer = PCM

Question 4: How do I set up Mopidy to use this device? Because I don't hear any audio from that either.

6 comments

Please sign in to leave a comment.