Topics

#yocto #raspberrypi SND_BCM2835 doesn't load if vc4-kms-v3d-overlay set #yocto #raspberrypi


Bastien0530 <bastien.gallet-pesenti@...>
 

Hi,
I was struggling for days about playing a simple wav file with aplay on a raspberry 3b+ jack 3.5mm output.

I had built-in snd_bcm2835 and all the required modules and when booting the raspberry, I couldn't play any song :
------------------------------------------------------------------

root@raspberrypi3:~# aplay /usr/share/sounds/alsa/Noise.wav
aplay: main:828: audio open error: No such file or directory
------------------------------------------------------------------

Also, there was only VC4 HDMI playback devices :
------------------------------------------------------------------
root@raspberrypi3:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: vc4hdmi [vc4-hdmi], device 0: MAI PCM vc4-hdmi-hifi-0 [MAI PCM vc4-hdmi-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
------------------------------------------------------------------

And can't find SND_BCM2835 with the command "lsmod | grep snd_bcm2835".

However, I finally figured out that this error was brought by the vc4-kms-v3d-overlay. (Thanks to this topic : https://github.com/raspberrypi/linux/issues/3181).
If I comment the "dtoverlay=vc4-kms-v3d" line in config.txt, then all is fine and I can see the SND_BCM2835 as Alsa playback device :
------------------------------------------------------------------
root@raspberrypi3:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  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
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
------------------------------------------------------------------

So, I would like to know if there is any recipe or image config to disable vc4-kms-v3d-overlay?

As it is set in the meta-raspberry/conf/machine/include/rpi-base.inc, I cannot make any bbappend recipe to modify this behavior.

What would be the better solution?

Best regards,
Bastien