Re: [PATCH] platform/raspberrypi: vchiq: register bus at subsys_initcall
From: Martin Wetterwald
Date: Mon Oct 19 2026 - 08:32:08 EST
On Sun, Oct 18, 2026 at 9:53 PM Gaston Gonzalez <gascoar@xxxxxxxxx> wrote:
> Running 'speaker-test -t wav -D plughw:1,0 -c 2' crash the system, so
> thinks seem not to be working with that interface.
>
> Im trying to debug what happens in that condition; I will need a couple
> of days I guess. So far, this is what I could check.
>
> Any feedback on the test or debugging would be appreciated.
Hi Gaston,
Thanks for digging into this.
The patch only changes when the VCHIQ bus and driver are registered during
boot. So it's enough to check these two cases to validate the patch:
- without my patch: dmesg shows the "unable to register with bus_type
'vchiq-bus'" error, and bcm2835_hdmi is absent from /proc/asound/cards.
- with my patch: the error is gone and bcm2835_hdmi is present in
/proc/asound/cards.
(Since the Pi Zero has no Headphones jack, you need to test both cases with
snd_bcm2835.enable_hdmi=1 in the command line. Otherwise the card never shows
up, even when everything works.)
Could you check these two cases?
Testing that you can hear the sound going through bcm2835-audio is a full
functional test that goes even further than the patch: it does not only test
bus registration but also that the audio driver is working.
On my side, without vc4-drm, I can successfully hear sound through both bcm2835
Headphones and bcm2835 HDMI:
# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [bcm2835 HDMI], device 0: bcm2835 HDMI [bcm2835 HDMI]
[...]
card 0: HDMI [bcm2835 HDMI], device 1: IEC958 [IEC958]
[...]
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835
Headphones [bcm2835 Headphones]
[...]
# speaker-test -D plughw:0,0 # (HDMI)
# speaker-test -D plughw:1,0 # (Headphones, not on the Pi Zero)
If you still want to output sound through bcm2835_hdmi (optional):
There can only be one owner of the HDMI port: either the firmware or the
kernel.
When the Raspberry Pi boots, the firmware first owns the HDMI and displays a
rainbow splash. Then it launches Linux.
There are 2 ways for the kernel to deal with the video output:
1) With vc4-drm (CONFIG_DRM_VC4), the kernel takes over the HDMI controller
from the firmware and handles everything itself (this is your case).
2) With simple-framebuffer (CONFIG_DRM_SIMPLEDRM or CONFIG_FB_SIMPLE), the
kernel leaves the HDMI to the firmware and just writes pixels to a
memory area
(the framebuffer) set up by the firmware.
I get a similar problem on my side when sending sound through bcm2835_hdmi with
vc4-drm loaded: my screen shuts down (but the kernel is still alive).
It most likely comes from the firmware and the kernel both trying to drive the
same HDMI port: with vc4-drm, the kernel owns the HDMI controller, and the
firmware (which bcm2835-audio talks to through VCHIQ) is not supposed to touch
it.
A simple way to output sound through bcm2835_hdmi is to not use the vc4-drm
driver at all, and use simple-framebuffer if you still want a display.
To remove vc4-drm:
- Do not compile the driver into the kernel (CONFIG_DRM_VC4=n) or blacklist the
module.
- Remove any vc4 overlay in config.txt file (e.g. remove dtoverlay=vc4-kms-v3d).
To enable simple-framebuffer, use one of the two configs:
CONFIG_DRM=y
CONFIG_DRM_SIMPLEDRM=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_FRAMEBUFFER_CONSOLE=y
or, the older way:
CONFIG_FB=y
CONFIG_FB_SIMPLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
(FRAMEBUFFER_CONSOLE=y, and DRM_FBDEV_EMULATION in the DRM case, are only
needed to see the boot messages on the screen, with console=tty1 on the command
line.)
If you have remote access to your Pi Zero (either through network+SSH or
through serial console), you actually don't even need the simple-framebuffer:
you can just remove vc4-drm, and let the firmware display its rainbow splash on
the HDMI port.
Then you can login to your Pi Zero through SSH for example and launch
speaker-test.
As long as the HDMI video output is active, it's enough for the sound to be
able to go through, even if the image was not drawn by Linux.
But again, this full functional test is optional.
Regards,
Martin