Forum

Full Version: hifiberry-digi on pi4 not working.....
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just did my first upgrade in a while. Smile
... and I cannot get the digi recognised on pi4 (01.01.21) Sad

aplay -l gives no available devices. The device was working on pi3 before I moved it across.

I managed to install alsa-utils fine, but get an error when trying to install alsa-base (no available candidate) = Also get the same trying to install yarc, but that's another thing I thinkHuh

So what's changed with pi4 and how should I proceed from here?
I even reinstalled pulseaudio to see if that was an issue, but problem persists Angry

DMESG gives the following clues......
Terminal

[ 5.711461] snd-rpi-wm8804 soc:sound: ASoC: failed to init link HifiBerry Dig i: -517
[ 5.743959] videodev: Linux video capture interface: v2.00
[ 5.781492] bcm2835_mmal_vchiq: module is from the staging directory, the qua lity is unknown, you have been warned.
[ 5.806581] bcm2835_mmal_vchiq: module is from the staging directory, the qua lity is unknown, you have been warned.
[ 5.806758] snd-rpi-wm8804 soc:sound: ASoC: failed to init link HifiBerry Dig i: -517
[ 5.812081] bcm2835_v4l2: module is from the staging directory, the quality i s unknown, you have been warned.
[ 5.813362] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.822480] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[ 5.841297] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 5.841324] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 6.036516] cfg80211: Loading compiled-in X.509 certificates for regulatory d atabase
[ 6.096355] [drm] Initialized v3d 1.0.0 20180419 for fec00000.v3d on minor 0
[ 6.099756] snd-rpi-wm8804 soc:sound: ASoC: failed to init link HifiBerry Dig i: -517
[ 6.182882] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 6.186320] platform regulatory.0: Direct firmware load for regulatory.db fai led with error -2
[ 6.186333] cfg80211: failed to load regulatory.db
[ 6.276984] snd-rpi-wm8804 soc:sound: ASoC: failed to init link HifiBerry Dig i: -517
[ 6.277779] brcmfmac: F1 signature read @0x18000000=0x15264345
[ 6.284459] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio f or chip BCM4345/6
[ 6.288641] usbcore: registered new interface driver brcmfmac
[ 6.288958] snd-rpi-wm8804 soc:sound: ASoC: failed to init link HifiBerry Dig i: -517
[ 6.297367] wm8804 1-003b: Failed to read device ID: -121
[ 6.297672] wm8804: probe of 1-003b failed with error -121
[ 6.297876] snd-rpi-wm8804 soc:sound: ASoC: failed to init link HifiBerry Dig i: -517

wm8804 is being reported so I checked with lsmod | grep wm8804

Terminal

xbian@Cinema4Film ~ $ sudo lsmod | grep wm8804
snd_soc_wm8804_i2c 16384 0
snd_soc_wm8804 16384 1 snd_soc_wm8804_i2c
regmap_i2c 16384 1 snd_soc_wm8804_i2c
snd_soc_rpi_wm8804_soundcard 20480 0
snd_soc_core 172032 4 snd_soc_rpi_wm8804_soundcard,snd_soc_wm8804,vc4,snd_soc_bcm2835_i2s
snd_pcm 86016 6 snd_soc_wm8804,vc4,snd_pcm_dmaengine,snd_soc_bcm2835_i2s,snd_bcm2835,snd_soc_cor​e


Not sure how this is happening as etc/modules has the following....

Terminal

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

uinput
#snd-bcm2835
#snd_soc_pcm5102a
snd_soc_hifiberry_dac
snd_soc_bcm2708
snd_soc_bcm2708_i2s
bcm2708_dmaengine
#snd_soc_pcm5102a <---This one must be commented out.
snd_soc_hifiberry_digi
#snd-soc-wm8804
i2c-bcm2708
i2c-dev


and etc/modules.xbian has the following...

Terminal

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

#snd_bcm2835


lsmod
Terminal

xbian@Cinema4Film /etc $ lsmod
Module Size Used by
cpufreq_conservative 16384 1
snd_bcm2835 28672 0
zram 24576 1
zsmalloc 24576 1 zram
bnep 28672 2
hci_uart 49152 1
btbcm 16384 1 hci_uart
serdev 20480 1 hci_uart
bluetooth 454656 24 hci_uart,bnep,btbcm
ecdh_generic 16384 1 bluetooth
ecc 32768 1 ecdh_generic
snd_soc_wm8804_i2c 16384 0
snd_soc_wm8804 16384 1 snd_soc_wm8804_i2c
regmap_i2c 16384 1 snd_soc_wm8804_i2c
brcmfmac 286720 0
brcmutil 20480 1 brcmfmac
sha256_generic 16384 0
libsha256 20480 1 sha256_generic
vc4 221184 3
evdev 24576 1
cec 40960 1 vc4
cfg80211 581632 1 brcmfmac
snd_soc_rpi_wm8804_soundcard 20480 0
v3d 53248 1
snd_soc_bcm2835_i2s 24576 0
drm_kms_helper 139264 3 vc4
gpu_sched 28672 1 v3d
snd_soc_core 172032 4 snd_soc_rpi_wm8804_soundcard,snd_soc_wm8804,vc4, snd_soc_bcm2835_i2s
rfkill 24576 3 bluetooth,cfg80211
raspberrypi_hwmon 16384 0
snd_compress 24576 1 snd_soc_core
snd_pcm_dmaengine 16384 1 snd_soc_core
drm 364544 7 v3d,vc4,gpu_sched,drm_kms_helper
snd_pcm 86016 6 snd_soc_wm8804,vc4,snd_pcm_dmaengine,snd_soc_bcm 2835_i2s,snd_bcm2835,snd_soc_core
snd_timer 32768 1 snd_pcm
bcm2835_isp 28672 0
drm_panel_orientation_quirks 16384 1 drm
bcm2835_v4l2 45056 0
bcm2835_codec 32768 0
i2c_bcm2835 16384 0
bcm2835_mmal_vchiq 32768 3 bcm2835_isp,bcm2835_codec,bcm2835_v4l2
snd 61440 5 snd_compress,snd_timer,snd_bcm2835,snd_soc_core, snd_pcm
v4l2_mem2mem 24576 1 bcm2835_codec
videobuf2_dma_contig 24576 2 bcm2835_isp,bcm2835_codec
videobuf2_vmalloc 20480 1 bcm2835_v4l2
videobuf2_memops 20480 2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2 24576 4 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2 mem
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
videobuf2_common 49152 5 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2 mem,videobuf2_v4l2
sysimgblt 16384 1 drm_kms_helper
videodev 200704 6 bcm2835_isp,bcm2835_codec,videobuf2_common,bcm28 35_v4l2,v4l2_mem2mem,videobuf2_v4l2
fb_sys_fops 16384 1 drm_kms_helper
vc_sm_cma 40960 2 bcm2835_isp,bcm2835_mmal_vchiq
mc 45056 6 bcm2835_isp,bcm2835_codec,videobuf2_common,video dev,v4l2_mem2mem,videobuf2_v4l2
rpivid_mem 16384 0
uio_pdrv_genirq 16384 0
uio 20480 1 uio_pdrv_genirq
i2c_dev 24576 0
i2c_bcm2708 16384 0
uinput 20480 0


But still aplay-l doesn't see any card....

Terminal

xbian@Cinema4Film ~ $ aplay -l
aplay: device_list:272: no soundcards found...

???
No idea!

What else did you do? Fresh install or just move the sc-card from Pi3 to Pi4?
Btw, you have to load the stuff via /boot/config.txt, see https://www.hifiberry.com/docs/software/configuring-linux-3-18-x/
Loading those modules via /etc/modules is obsolete since ages
Thanks.

It was a new uSD card with a fresh download install of Xbian for Pi4 dated 01.01.21

I coulnd't get to the wiki page so just did the usual and obviously things have changed.

Here is my boot/config.txt
Terminal

xbian@Cinema4Film ~ $ sudo cat /boot/config.txt
[sudo] password for xbian:
# ******************************************************************************
# * *
# * This file is part of XBian --- Kodi on the Raspberry Pi. *
# * Copyright © 2019 XBian Team -- http://www.xbian.org - info@xbian.org *
# * *
# * XBian is free software: you can redistribute it and/or modify it under the *
# * terms of the GNU General Public License as published by the Free Software *
# * Foundation, either version 3 of the License, or (at your option) any later *
# * version. *
# * *
# * XBian is distributed in the hope that it will be useful, but WITHOUT ANY *
# * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
# * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more *
# * details. *
# * *
# * You should have received a copy of the GNU General Public License along *
# * with XBian. If not, see <http://www.gnu.org/licenses/> *
# * *
# ******************************************************************************

# see /etc/default/xbian-initramfs
initramfs initramfs.gz followkernel


# ******************************************************************************
# * Memory (System/GPU configuration) *
# ******************************************************************************

# SDRAM size based GPU memory split
gpu_mem_1024=256
gpu_mem_512=144
gpu_mem_256=100

# Extra 16M memory on Pi2/Pi3/Pi3B+
# See also https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=180420
#total_mem=1024

[pi4]
gpu_mem_1024=320

[all]
# ******************************************************************************
# * Various settings see also: http://elinux.org/RPi_config.txt *
# * to obtain keys visit the shop at http://www.raspberrypi.com *
# ******************************************************************************

# Enables turbo mode from boot for the given value in seconds (up to 60) or
# until cpufreq sets a frequency. Default 0
initial_turbo=3

# Force HDMI even if unplugged or powered off
hdmi_force_hotplug=0

# Pretends HDMI hotplug signal is not asserted so it appears a HDMI display
# is not attached. Use composite mode even if HDMI monitor is detected
hdmi_ignore_hotplug=0

# Doesn't sent initial active source message.
# Avoids bringing CEC (enabled TV) out of standby and channel switch when
# rebooting.
hdmi_ignore_cec_init=1

# Pretends CEC is not supported at all by TV. No CEC functions will
# be supported.
hdmi_ignore_cec=1

# Make display smaller to stop text spilling off the screen
# see also http://www.raspberrypi.org/phpBB3/viewto...67&t=15700
# overscan_scale=1
disable_overscan=1

# Avoids the rainbow splash screen on boot
disable_splash=1

# When adding this line the USB power manager will change its output current
# limit (for all 4 USB ports combined) from 600mA to double that, 1200mA.
# Obsolete and enabled per default on newer kernels
max_usb_current=1


# ******************************************************************************
# * License keys to enable GPU hardware decoding for various codecs *
# * to obtain keys visit the shop at http://www.raspberrypi.com *
# ******************************************************************************

decode_MPG2=0x00000000
decode_WVC1=0x00000000


# ******************************************************************************
# * Overlays. For more information please read *
# * /boot/README.overlays *
# ******************************************************************************

# This parameter enables onboard sound via module snd_bcm2835.
# Module will be loaded automatically, an entry in
# /etc/modules[.xbian] has no effect and is not longer needed/
# necessary with kernel 4.4 and above.
# Please note, this setting should be commented out or set to off
# if a Hifiberry or any other I2S based sound device is used
#dtparam=audio=on


# ******************************************************************************
# * GPIO LIRC *
# * Please note: *
# * GPIO input pin has to be remapped for working together *
# * with I2S sound cards, like Hifiberry. For example *
# * dtoverlay=lirc-rpi,gpio_in_pin=22,debug for kernels <= 4.14 or *
# * dtoverlay=gpio-ir,gpio_pin=22 for kernels >= 4.14 *
# ******************************************************************************

#dtoverlay=gpio-ir
dtoverlay=lirc-rpi,gpio_out_pin=16,gpio_in_pin=22,debug

# ******************************************************************************
# * Hifiberry and compatible sound cards (I2S interface) *
# * May conflict with LIRC. See note above *
# ******************************************************************************

#dtoverlay=hifiberry-amp
#dtoverlay=hifiberry-dac
#dtoverlay=hifiberry-dacplus
#dtoverlay=hifiberry-digi

dtoverlay=i2s=on

dtoverlay=hifiberry-digi

# ******************************************************************************
# * Raspberry Pi3/Pi3B+ onboard Bluetooth *
# ******************************************************************************

[pi3]
# This parameter enables usage of miniuart (ttyS0) for BT.
# Please note that BT may not work properly if CPUFREQ_GOVERNOR
# is set to something else than performance (see also
# /etc/default/xbian-module-init-tools).
#dtoverlay=pi3-miniuart-bt

# Disables onboard Bluetooth
#dtoverlay=pi3-disable-bt

# ******************************************************************************
# * Raspberry Pi4 *
# ******************************************************************************

[pi4]
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
dtoverlay=pi4-disable-bt
dtoverlay=pi4-disable-wifi




So I will try again with another fresh install.

Do I still need to download alsa-base? alsa-utils? Add info to alsa.conf in etc/alsa?

Terminal

xbian@Cinema4Film ~ $ sudo apt install alsa-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package alsa-base is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'alsa-base' has no installation candidate
???

Is there anything else I need to do apart from boot/config.txt? (to get the card recognised. I know what to do in Kodi, unless that too has changed but it looks the same to me).
alsa-utils may be useful, can't say if they are required. I assume not

alsa.conf may be useful

Don't think that there is anything else you have to do

Just give it a try Wink

And, btw, alsa-base is no longer present since debian stretch
Thanks and Happy New Year to you! Big Grin

I have reverted to pi3 and all is well, so not hardware issue in the digi.

I will try again with pi4 tomorrow I hope.

I have a few more things ro try and hopefully this time I'll get it right! Tongue
Fresh download and install.

I only commented out on board audio in config.txt ...
#dtparam=audio=on

Added dtparam=i2s=on and dtoverlay=hifiberry-digi

reboot

no sound card found

added alsa-utils and created etc/asound/conf

added to asound.conf

pcm.!default {
type hw card 0
}
ctl.!default {
type hw card 0
}

rebooted

no sound card found.... Angry
you could put this sd-card into your Pi3 and see what happens ...
(11th Jan, 2021 07:28 AM)Nachteule Wrote: [ -> ]you could put this sd-card into your Pi3 and see what happens ...

Did that, same results as on pi4 - no card found.

So we have eliminated hardware, it must be something in the pi4 image. Dodgy

So I tried the pi3 card in the pi 4 and ..... no card found.

So .....

pi 3 image works in pi 3 but not pi 4.
pi 4 image won't work in pi 3 or pi 4.

Confused Huh
Reference URL's