All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gaston Gonzalez" <gascoar@gmail.com>
To: "Martin Wetterwald" <martin@wetterwald.eu>
Cc: "Florian Fainelli" <florian.fainelli@broadcom.com>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom.com>,
	"Jai Luthra" <jai.luthra@ideasonboard.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Stefan Wahren" <wahrenst@gmx.net>,
	"Phil Elwell" <phil@raspberrypi.com>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Umang Jain" <uajain@igalia.com>, "Kees Cook" <kees@kernel.org>,
	<linux-rpi-kernel@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-staging@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<regressions@lists.linux.dev>
Subject: Re: [PATCH] platform/raspberrypi: vchiq: register bus at subsys_initcall
Date: Tue, 20 Oct 2026 16:16:58 -0300	[thread overview]
Message-ID: <DM9WNTXQM9N8.2G10WSI71TL88@gmail.com> (raw)
In-Reply-To: <CAFERDQ3DWBnkSok_SiVZGx+GTmYKP=Q46yFYkNt9YQkKxxQxyw@mail.gmail.com>

On Mon Oct 19, 2026 at 9:26 AM -03, Martin Wetterwald wrote:
> On Sun, Oct 18, 2026 at 9:53 PM Gaston Gonzalez <gascoar@gmail.com> 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.
>

Hi Martin,


> 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.
>

Understood. Of the two cases, the second one is already tested if I'm not
mistaken. I will check the 'without your patch' case first, and then
I'll rerun the test with your patch.

> (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?
>

Yes, will do.

>
> 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.
>

Ah ok, I did not know that. Thank you for the explanation.

> 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.
>

Ok, I’ll test the patch first with the current configuration, then
with simple-framebuffer enabled in a second step.

Regards,

Gaston

> Regards,
> Martin


      reply	other threads:[~2026-10-20 19:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 10:07 [REGRESSION] bcm2835-audio fails to register on vchiq-bus in monolithic kernels since 6.19 (VCHIQ destaging?) Martin Wetterwald
2026-10-12 13:23 ` Thorsten Leemhuis
2026-10-13  4:57   ` Jai Luthra
2026-10-13  7:28     ` Martin Wetterwald
2026-10-13  7:38       ` Martin Wetterwald
2026-10-13 13:14 ` [PATCH] platform/raspberrypi: vchiq: register bus at subsys_initcall Martin Wetterwald
2026-10-13 16:27   ` Jai Luthra
2026-10-15 21:25   ` Gaston Gonzalez
2026-10-16  9:00     ` Martin Wetterwald
2026-10-18 19:52       ` Gaston Gonzalez
2026-10-19 12:26         ` Martin Wetterwald
2026-10-20 19:16           ` Gaston Gonzalez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM9WNTXQM9N8.2G10WSI71TL88@gmail.com \
    --to=gascoar@gmail.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jai.luthra@ideasonboard.com \
    --cc=kees@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=martin@wetterwald.eu \
    --cc=phil@raspberrypi.com \
    --cc=regressions@lists.linux.dev \
    --cc=uajain@igalia.com \
    --cc=wahrenst@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.