Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2025 07:18:35 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        Marco Devesas Campos <devesas.campos@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: D43399 FreeBSD Review, enable VCHIQ HDMI Audio subsystem for BCM2711 Raspberry Pi 4B, 400 adding 3 patch files.
Message-ID:  <CAJ-VmonaL5W07VmYVvQO-4Tf3uamSmqEOX%2Bn_u=ZVSX_5O5E0w@mail.gmail.com>
In-Reply-To: <9B9849F2-285C-4D1B-8ACC-BAA0016ED60F@gmail.com>
References:  <50ea8813-2fb5-4c4f-81b6-7457fc3ca10d@thegalacticzoo.com> <CAJ-Vmokd1YihyU=q13YgEwDFtvu4J2PU34gUC6=AiMT02WF2Jw@mail.gmail.com> <CAJ-Vmok58UMbNjDBbSH0yQtGdkU6mPLjtwD8eF0VP9DifOh%2B4g@mail.gmail.com> <9B9849F2-285C-4D1B-8ACC-BAA0016ED60F@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Mon, 20 Oct 2025 at 05:06, Marco Devesas Campos <devesas.campos@gmail.com>
wrote:

> Hi Adrian,
>

Thanks for replying!



> on a pi4, not much, just sound, possibly that hdmi, edid info you want. on
> earlier boards, with the vc4 platform, you can use a 32bit jail and the
> very old, very deprecated userland libraries, to get opengl and video
> acceleration.
>
>
Yeah I remember the original work to port the video stuff for the RPI/RPI2.
It was .. pretty hilarious. :-)


> video stuff on the 4 and up on linux uses a completely different stack
> based on v4l and mesa drivers, and vchiq is only used for sound, iirc.
>
> people have been applying some (mechanical?) changes to the vchiq and
> bcm2385_audio code. so to your question as to whether D36431 can be applied
> to HEAD, it’s possible that some changes might be required to the patch.
>
>
I've grabbed your diffs, updated them to compile (but not tested, that's
today's task) and whacked them into a local github repo/fork so I can get
them cleaned up for landing.
There's a bunch of stuff in the second diff that looks like formatting
changes, so I'm going to look at pulling them into the first diff just for
cleanliness.
Then there's a bunch of formatting/indenting that need addressing, but I
can take care of that too.


> (I’ve adjusted the code to some of those change but haven’t been very
> systematic, so I don’t have a patch ready that can be shared.)
>
> also,  andrew turner raised some possible licensing change issues, so you
> might want to have a look at that and to my response at the time, first.
>
> https://reviews.freebsd.org/D36431#844206
> https://reviews.freebsd.org/D36431#844242
>
>
I took a look. The code is dual licenced BSD/GPL, so you would think that
the submitters would have had to have known/agreed to that when they
landed. Since they LOOK like they've been landed in the linux kernel, I
think we can assume that. There's also three committers in those diffs, so
I can also just fire off an email to all three of them (and CC you) asking
explicitly clarifying if they're BSD licenced diffs.

That all being said, happy to answer questions (off list probs better) and
> gen some diffs if you think it’s worthwhile to get it over the line. just
> please bear with me since it’s been ages since I looked into this and my
> notes and code are all over the place.
>

Thanks! I'll try running what I have and then I'll reach out!



-adrian


>
> Best,
> Marco
>
>
>
> On Sun, 19 Oct 2025 at 17:04, Adrian Chadd <adrian@freebsd.org> wrote:
>
>> hi!
>>
>> i have a rpi4 up and going now, so now I'd like to go through and start
>> addressing each of these!
>>
>>
>>
>> -adrian
>>
>>
>> On Thu, 11 Sept 2025 at 23:11, Fred Finster <fred@thegalacticzoo.com>
>> wrote:
>>
>>> Hello fellow FreeBSD Arm users,
>>>
>>> To be complete,  I usually place too many URLs in a short email. But
>>> then "Too Long Didn't Read"  TLDR  symptom shows up unannounced.  If you
>>> are interested in videos and audios playing out on your own Television
>>> Speakers, please read the following few paragraphs.
>>>
>>>   I wish to see the 14.3-RELEASE and 15.0-CURRENT supported RPI binary
>>> images on the https://FreeBSD.org <https://freebsd.org/>; website, to
>>> actually support HDMI
>>> audio out through the TV speakers, out of the box (OOTB).     Review
>>> D43399 was my attempt to show how to use Marcos Devesas Campos 3 patch
>>> files in  reviews D36431, D37878, D37879 to patch the FreeBSD Kernel
>>> source /usr/src and support the VCHIQ subsystem of the Broadcom BCM2711
>>> Raspberry Pi 4B, 400
>>> and (BCM2835) Raspberry Pi 3B+  SOCs, running 32 bit armv7 software. (
>>> yes, I know armv7 was moved to Tier 2 in FreeBSD support.)
>>>
>>> URLS to view:
>>> FreeBSD RPI image. downloaded here is without the VCHIQ subsystem HDMI
>>> Audio Sound device driver.
>>> https://www.freebsd.org/where/
>>> https://download.freebsd.org/releases/ISO-IMAGES/14.3/
>>>
>>> https://download.freebsd.org/releases/ISO-IMAGES/14.3/FreeBSD-14.3-RELEASE-arm64-aarch64-RPI.img.xz
>>>
>>> https://download.freebsd.org/releases/ISO-IMAGES/14.3/CHECKSUM.SHA512-FreeBSD-14.3-RELEASE-arm64-aarch64-RPI
>>>
>>> https://download.freebsd.org/releases/ISO-IMAGES/15.0/
>>>
>>> https://download.freebsd.org/releases/ISO-IMAGES/15.0/FreeBSD-15.0-ALPHA1-arm64-aarch64-RPI-20250906-0b3d82579a01-280099.img.xz
>>>
>>> https://download.freebsd.org/releases/ISO-IMAGES/15.0/CHECKSUM.SHA512-FreeBSD-15.0-ALPHA1-arm64-aarch64-RPI-20250906-0b3d82579a01-280099
>>>
>>> How can that binary RPI image be improved?  Who can or what update of
>>> this build process can be modified to include HDMI audio support from
>>> the BCM2711  VCHIQ subsystem hardware?  Yes, having the SDIO Cy43455
>>> wifi driver written will help out, to use a WIFI connection from the
>>> raspberry Pi to the local WIFI WAN network.
>>>
>>> https://reviews.freebsd.org/D43399  This is the 3 patch files to add
>>> the
>>> VCHIQ HDMI Audio subsystem device driver to the kernel /usr/src
>>> codehttps://
>>>
>>> https://reviews.freebsd.org/D36431   vchiq: update printf-s to more
>>> architecture-independent format specifiers
>>> https://reviews.freebsd.org/D37878   arm64: Add support to vchiq and
>>> bcm2835_audio (plus some fixes)
>>> https://reviews.freebsd.org/D37879   vchiq: add compat_freebsd32 ioctls
>>> and respective datatypes Authored by devesas.campos_gmail.com on Dec 26
>>> 2022, 8:15 PM.
>>>
>>> Fred Finsters tested set of written steps to follow for using the 3
>>> patch files:     https://reviews.freebsd.org/F75131370
>>> or  https://reviews.freebsd.org/F75131370#30
>>>
>>> Can someone with a Raspberry Pi 4B, or 400 Keyboard run through these
>>> steps and prove that VCHIQ subsystem HDMI Audio output works on the TV
>>> Speakers? or work on the Raspberry Pi 4B 3.5mm output jack analog sound.
>>>
>>> Then can we include this VCHIQ HDMI Audio source code in the FreeBSD
>>> kernel source code and also in the created 14.3 or 15.0 RPI Images?
>>>
>>> Mike Karels, a strong Arm64 FreeBSD supporter, has passed on.  He might
>>> have competed this work.  Can we incorporate this tested, useful source
>>> code in the FreeBSD Kernel and in the created binary image to download
>>> and burn into a MicroSD card or into a USB Flash drive stick to boot
>>> FreeBSD.  I prefer to have a supported Raspberry Pi binary image that
>>> includes HDMI Audio available for others to download and use.
>>>
>>> Is there a different method to support the Raspberry Pi 5, 500 BCM2712
>>> and RP1 chip hardware with updated VCHIQ device driver?
>>> https://x.com/i/grok/share/z5megTW93mZt9B5fioCz7Zzzv  Grok notes
>>> differences between BCM2711 and BCM2712 in the VCHIQ driver software.
>>>
>>> Your thoughts, suggestions, comments are welcome about supporting VCHIQ
>>> subsystem HDMI Audio for Raspberry Pi (BCM2711) 4B, 400, RPI (BCM2712)
>>> 5, 500,  (BCM2835) RPI3 RPI3+ 64 bit hardware ?
>>>
>>> pss:    RUSPIPRO is Rust supported VCHIQ hardware device driver
>>> software.  URL link here:   https://github.com/RusPiRo  There was a
>>> VCHIQ bare metal driver here somewhere.
>>>
>>>
>>>
>

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 20 Oct 2025 at 05:06, Marco Devesas Campos &lt;<a href="mailto:devesas.campos@gmail.com">devesas.campos@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Hi Adrian,</div></div></blockquote><div><br></div><div>Thanks for replying!</div><div> </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><div><div>on a pi4, not much, just sound, possibly that hdmi, edid info you want. on earlier boards, with the vc4 platform, you can use a 32bit jail and the very old, very deprecated userland libraries, to get opengl and video acceleration.</div><div><br></div></div></div></div></div></blockquote><div><br></div><div>Yeah I remember the original work to port the video stuff for the RPI/RPI2. It was .. pretty hilarious. :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><div><div></div><div>video stuff on the 4 and up on linux uses a completely different stack based on v4l and mesa drivers, and vchiq is only used for sound, iirc.</div><div><br></div><div><div>people have been applying some (mechanical?) changes to the vchiq and bcm2385_audio code. so to your question as to whether D36431 can be applied to HEAD, it’s possible that some changes might be required to the patch.</div><div><br></div></div></div></div></div></div></blockquote><div><br></div><div>I&#39;ve grabbed your diffs, updated them to compile (but not tested, that&#39;s today&#39;s task) and whacked them into a local github repo/fork so I can get them cleaned up for landing.</div><div>There&#39;s a bunch of stuff in the second diff that looks like formatting changes, so I&#39;m going to look at pulling them into the first diff just for cleanliness.</div><div>Then there&#39;s a bunch of formatting/indenting that need addressing, but I can take care of that too.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><div><div><div></div><div>(I’ve adjusted the code to some of those change but haven’t been very systematic, so I don’t have a patch ready that can be shared.)</div><div><br></div><div>also,  andrew turner raised some possible licensing change issues, so you might want to have a look at that and to my response at the time, first.</div><div><br></div><div><a href="https://reviews.freebsd.org/D36431#844206" target="_blank">https://reviews.freebsd.org/D36431#844206</a></div><div><span style="color:rgb(0,104,218);text-decoration:underline"><a href="https://reviews.freebsd.org/D36431#844242" target="_blank">https://reviews.freebsd.org/D36431#844242</a></span></div><div><br></div></div></div></div></div></div></blockquote><div><br></div><div>I took a look. The code is dual licenced BSD/GPL, so you would think that the submitters would have had to have known/agreed to that when they landed. Since they LOOK like they&#39;ve been landed in the linux kernel, I think we can assume that. There&#39;s also three committers in those diffs, so I can also just fire off an email to all three of them (and CC you) asking explicitly clarifying if they&#39;re BSD licenced diffs.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><div><div><div></div></div><div>That all being said, happy to answer questions (off list probs better) and gen some diffs if you think it’s worthwhile to get it over the line. just please bear with me since it’s been ages since I looked into this and my notes and code are all over the place.</div></div></div></div></div></blockquote><div><br></div><div>Thanks! I&#39;ll try running what I have and then I&#39;ll reach out!</div><div><br></div><div><br></div><div><br></div><div>-adrian</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><div><div><br></div><div></div><div>Best,</div><div>Marco </div></div></div></div><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 19 Oct 2025 at 17:04, Adrian Chadd &lt;<a href="mailto:adrian@freebsd.org" target="_blank">adrian@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">hi!<div><br></div><div>i have a rpi4 up and going now, so now I&#39;d like to go through and start addressing each of these!</div><div><br></div><div><br></div><div><br></div><div>-adrian</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 11 Sept 2025 at 23:11, Fred Finster &lt;<a href="mailto:fred@thegalacticzoo.com" target="_blank">fred@thegalacticzoo.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello fellow FreeBSD Arm users,<br>
<br>
To be complete,  I usually place too many URLs in a short email. But <br>
then &quot;Too Long Didn&#39;t Read&quot;  TLDR  symptom shows up unannounced.  If you <br>
are interested in videos and audios playing out on your own Television <br>
Speakers, please read the following few paragraphs.<br>
<br>
  I wish to see the 14.3-RELEASE and 15.0-CURRENT supported RPI binary <br>
images on the <a href="https://freebsd.org/" rel="noreferrer" target="_blank">https://FreeBSD.org</a>; website, to actually support HDMI <br>
audio out through the TV speakers, out of the box (OOTB).     Review <br>
D43399 was my attempt to show how to use Marcos Devesas Campos 3 patch <br>
files in  reviews D36431, D37878, D37879 to patch the FreeBSD Kernel <br>
source /usr/src and support the VCHIQ subsystem of the Broadcom BCM2711 <br>
Raspberry Pi 4B, 400<br>
and (BCM2835) Raspberry Pi 3B+  SOCs, running 32 bit armv7 software. ( <br>
yes, I know armv7 was moved to Tier 2 in FreeBSD support.)<br>
<br>
URLS to view:<br>
FreeBSD RPI image. downloaded here is without the VCHIQ subsystem HDMI <br>
Audio Sound device driver.<br>
<a href="https://www.freebsd.org/where/" rel="noreferrer" target="_blank">https://www.freebsd.org/where/</a><br>;
<a href="https://download.freebsd.org/releases/ISO-IMAGES/14.3/" rel="noreferrer" target="_blank">https://download.freebsd.org/releases/ISO-IMAGES/14.3/</a><br>;
<a href="https://download.freebsd.org/releases/ISO-IMAGES/14.3/FreeBSD-14.3-RELEASE-arm64-aarch64-RPI.img.xz" rel="noreferrer" target="_blank">https://download.freebsd.org/releases/ISO-IMAGES/14.3/FreeBSD-14.3-RELEASE-arm64-aarch64-RPI.img.xz</a><br>;
<a href="https://download.freebsd.org/releases/ISO-IMAGES/14.3/CHECKSUM.SHA512-FreeBSD-14.3-RELEASE-arm64-aarch64-RPI" rel="noreferrer" target="_blank">https://download.freebsd.org/releases/ISO-IMAGES/14.3/CHECKSUM.SHA512-FreeBSD-14.3-RELEASE-arm64-aarch64-RPI</a><br>;
<br>
<a href="https://download.freebsd.org/releases/ISO-IMAGES/15.0/" rel="noreferrer" target="_blank">https://download.freebsd.org/releases/ISO-IMAGES/15.0/</a><br>;
<a href="https://download.freebsd.org/releases/ISO-IMAGES/15.0/FreeBSD-15.0-ALPHA1-arm64-aarch64-RPI-20250906-0b3d82579a01-280099.img.xz" rel="noreferrer" target="_blank">https://download.freebsd.org/releases/ISO-IMAGES/15.0/FreeBSD-15.0-ALPHA1-arm64-aarch64-RPI-20250906-0b3d82579a01-280099.img.xz</a><br>;
<a href="https://download.freebsd.org/releases/ISO-IMAGES/15.0/CHECKSUM.SHA512-FreeBSD-15.0-ALPHA1-arm64-aarch64-RPI-20250906-0b3d82579a01-280099" rel="noreferrer" target="_blank">https://download.freebsd.org/releases/ISO-IMAGES/15.0/CHECKSUM.SHA512-FreeBSD-15.0-ALPHA1-arm64-aarch64-RPI-20250906-0b3d82579a01-280099</a><br>;
<br>
How can that binary RPI image be improved?  Who can or what update of <br>
this build process can be modified to include HDMI audio support from <br>
the BCM2711  VCHIQ subsystem hardware?  Yes, having the SDIO Cy43455 <br>
wifi driver written will help out, to use a WIFI connection from the <br>
raspberry Pi to the local WIFI WAN network.<br>
<br>
<a href="https://reviews.freebsd.org/D43399" rel="noreferrer" target="_blank">https://reviews.freebsd.org/D43399</a>  This is the 3 patch files to add the <br>
VCHIQ HDMI Audio subsystem device driver to the kernel /usr/src codehttps://<br>;
<br>
<a href="https://reviews.freebsd.org/D36431" rel="noreferrer" target="_blank">https://reviews.freebsd.org/D36431</a>   vchiq: update printf-s to more <br>
architecture-independent format specifiers<br>
<a href="https://reviews.freebsd.org/D37878" rel="noreferrer" target="_blank">https://reviews.freebsd.org/D37878</a>   arm64: Add support to vchiq and <br>
bcm2835_audio (plus some fixes)<br>
<a href="https://reviews.freebsd.org/D37879" rel="noreferrer" target="_blank">https://reviews.freebsd.org/D37879</a>   vchiq: add compat_freebsd32 ioctls <br>
and respective datatypes Authored by <a href="http://devesas.campos_gmail.com/" rel="noreferrer" target="_blank">devesas.campos_gmail.com</a> on Dec 26 <br>
2022, 8:15 PM.<br>
<br>
Fred Finsters tested set of written steps to follow for using the 3 <br>
patch files:     <a href="https://reviews.freebsd.org/F75131370" rel="noreferrer" target="_blank">https://reviews.freebsd.org/F75131370</a><br>;
or  <a href="https://reviews.freebsd.org/F75131370#30" rel="noreferrer" target="_blank">https://reviews.freebsd.org/F75131370#30</a><br>;
<br>
Can someone with a Raspberry Pi 4B, or 400 Keyboard run through these <br>
steps and prove that VCHIQ subsystem HDMI Audio output works on the TV <br>
Speakers? or work on the Raspberry Pi 4B 3.5mm output jack analog sound.<br>
<br>
Then can we include this VCHIQ HDMI Audio source code in the FreeBSD <br>
kernel source code and also in the created 14.3 or 15.0 RPI Images?<br>
<br>
Mike Karels, a strong Arm64 FreeBSD supporter, has passed on.  He might <br>
have competed this work.  Can we incorporate this tested, useful source <br>
code in the FreeBSD Kernel and in the created binary image to download <br>
and burn into a MicroSD card or into a USB Flash drive stick to boot <br>
FreeBSD.  I prefer to have a supported Raspberry Pi binary image that <br>
includes HDMI Audio available for others to download and use.<br>
<br>
Is there a different method to support the Raspberry Pi 5, 500 BCM2712 <br>
and RP1 chip hardware with updated VCHIQ device driver?<br>
<a href="https://x.com/i/grok/share/z5megTW93mZt9B5fioCz7Zzzv" rel="noreferrer" target="_blank">https://x.com/i/grok/share/z5megTW93mZt9B5fioCz7Zzzv</a>  Grok notes <br>
differences between BCM2711 and BCM2712 in the VCHIQ driver software.<br>
<br>
Your thoughts, suggestions, comments are welcome about supporting VCHIQ <br>
subsystem HDMI Audio for Raspberry Pi (BCM2711) 4B, 400, RPI (BCM2712) <br>
5, 500,  (BCM2835) RPI3 RPI3+ 64 bit hardware ?<br>
<br>
pss:    RUSPIPRO is Rust supported VCHIQ hardware device driver <br>
software.  URL link here:   <a href="https://github.com/RusPiRo" rel="noreferrer" target="_blank">https://github.com/RusPiRo</a>  There was a <br>
VCHIQ bare metal driver here somewhere.<br>
<br>
<br>
</blockquote></div>
</blockquote></div>
</div></blockquote></div><br></div></blockquote></div></div>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonaL5W07VmYVvQO-4Tf3uamSmqEOX%2Bn_u=ZVSX_5O5E0w>