Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 2025 13:05:58 +0100
From:      Marco Devesas Campos <devesas.campos@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
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:  <9B9849F2-285C-4D1B-8ACC-BAA0016ED60F@gmail.com>
In-Reply-To: <CAJ-Vmok58UMbNjDBbSH0yQtGdkU6mPLjtwD8eF0VP9DifOh%2B4g@mail.gmail.com>
References:  <50ea8813-2fb5-4c4f-81b6-7457fc3ca10d@thegalacticzoo.com> <CAJ-Vmokd1YihyU=q13YgEwDFtvu4J2PU34gUC6=AiMT02WF2Jw@mail.gmail.com> <CAJ-Vmok58UMbNjDBbSH0yQtGdkU6mPLjtwD8eF0VP9DifOh%2B4g@mail.gmail.com>

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

[-- Attachment #1 --]
Hi Adrian,

> On 20 Oct 2025, at 02:03, Adrian Chadd <adrian@freebsd.org> wrote:
> 
> Ok, I see why everyone's like "This is all over the place", sigh. :-)
> 
> So if I update and get these three diffs landed:
> 
> * D36431
> * D37838
> * D37839

D37878 and 79, right?

> What will that get me on a rpi 4b? What I'd like to do is treat those three as a checkpoint, get them cleaned up and landed, and then move onto whatever's next.
> (Including wanting whatever videocore is on this platform, figure out how to read the HDMI status/EDID, etc, etc.)
> 

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.

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

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.

Best,
Marco 

> 
> 
> On Sun, 19 Oct 2025 at 17:04, Adrian Chadd <adrian@freebsd.org <mailto: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 <mailto: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 <http://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 --]
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div>Hi Adrian,<div><br></div><div><div><blockquote type="cite"><div>On 20 Oct 2025, at 02:03, Adrian Chadd &lt;adrian@freebsd.org&gt; wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr"><div>Ok, I see why everyone's like "This is all over the place", sigh. :-)</div><div><br></div><div>So if I update and get these three diffs landed:</div><div><br></div><div>* D36431</div><div>* D37838</div><div>* D37839</div></div></div></blockquote><div><br></div><div>D37878 and 79, right?</div><div><br></div><blockquote type="cite"><div dir="ltr">What will that get me on a rpi 4b? What I'd like to do is treat those three as a checkpoint, get them cleaned up and landed, and then move onto whatever's next.</div></blockquote><blockquote type="cite"><div dir="ltr"><div>(Including wanting whatever videocore is on this platform, figure out how to read the HDMI status/EDID, etc, etc.)</div><div><br></div></div></blockquote><div><br></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>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>(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, &nbsp;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">https://reviews.freebsd.org/D36431#844206</a></div><div><span style="caret-color: rgb(0, 104, 218); color: rgb(0, 104, 218); text-decoration: underline;">https://reviews.freebsd.org/D36431#844242</span></div><div><br></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><br></div><div></div><div>Best,</div><div>Marco&nbsp;</div></div></div></div><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, 19 Oct 2025 at 17:04, Adrian Chadd &lt;<a href="mailto:adrian@freebsd.org">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'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,&nbsp; I usually place too many URLs in a short email. But <br>
then "Too Long Didn't Read"&nbsp; TLDR&nbsp; symptom shows up unannounced.&nbsp; 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>
&nbsp;&nbsp;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).&nbsp;&nbsp;&nbsp;&nbsp; Review <br>
D43399 was my attempt to show how to use Marcos Devesas Campos 3 patch <br>
files in&nbsp; 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+&nbsp; 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?&nbsp; Who can or what update of <br>
this build process can be modified to include HDMI audio support from <br>
the BCM2711&nbsp; VCHIQ subsystem hardware?&nbsp; 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>&nbsp; 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>&nbsp;&nbsp; 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>&nbsp;&nbsp; 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>&nbsp;&nbsp; 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:&nbsp;&nbsp;&nbsp;&nbsp; <a href="https://reviews.freebsd.org/F75131370" rel="noreferrer" target="_blank">https://reviews.freebsd.org/F75131370</a><br>;
or&nbsp; <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.&nbsp; He might <br>
have competed this work.&nbsp; 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.&nbsp; 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>&nbsp; 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,&nbsp; (BCM2835) RPI3 RPI3+ 64 bit hardware ?<br>
<br>
pss: &nbsp;&nbsp; RUSPIPRO is Rust supported VCHIQ hardware device driver <br>
software.&nbsp; URL link here:&nbsp;&nbsp; <a href="https://github.com/RusPiRo" rel="noreferrer" target="_blank">https://github.com/RusPiRo</a>&nbsp; There was a <br>
VCHIQ bare metal driver here somewhere.<br>
<br>
<br>
</blockquote></div>
</blockquote></div>
</div></blockquote></div><br></body></html>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9B9849F2-285C-4D1B-8ACC-BAA0016ED60F>