Use the 3 other patch file reviews, to add patch files to /usr/src source code tree
D36431, D37878, D37879 Recompile source code with the 3 patch files included, create a new image or FreeBSD ARM64 kernel to test on the Raspberry Pi 4B, or 400 Keyboard model.
pkg install mpg123 to test playing a .MP3 file and check for sound to come out the TV Monitor speakers.
wget -c https://freetestdata.com/wp-content/uploads/2021/09/Free_Test_Data_100KB_MP3.mp3
mpg123 Free_Test_Data_100KB_MP3.mp3
one problem, I experienced with compile of FreeBSD source code before using patch files. was the display formatting of variable number, lld% to uld%:
change %lld -----> to %uld to comply with clang --warning checking errors. change long long decimal to unsigned long decimal
I was working to get files to compile with these commands:
"make buildkernel KERNCONF=GENERIC-VCHIQ -DNO_CLEAN" but the clang --warning_cast_int_to_unsigned errors would appear. I have not been able to physically get sound out from the HDMI Audio speakers on the HDMI TV input, at this point. So just corrected errors for compile to complete and build a working FreeBSD ARM64 kernel, with sound out from the HDMI monitor Audio Speakers on the HDMI TV input cable. Also on the Raspberry Pi 4B, test for headphones out the 5/16 audio analog plug.
If nothing’s playing, flipping the sysctl dev.pcm.0.dest through
0: both hdmi and headphones 1: headphones 2: hdmi
usually brings the audio back to life. Should create a FreeBSD test program tool to read the VCHIQ registers and interrupt information out, to see why VCHIQ is locked up with buffer full. What is locked and what interrupt is registering?
sysctl hw.snd.default_unit
sysctl dev.pcm.0.dest
sysctl dev.pcm.0.dest=1
sysctl dev.pcm.0.dest=2
sysctl dev.pcm.0.dest=0
sysctl dev.pcm.0.dest=1
Read step by step patch install and compile make buildworld, make buildkernel, make installkernel instructions at F13700 step by step instructions, more than a PNG image. please read
Looking forward to enable Raspberry Pi 64bit HDMI Audio to function correctly on Raspberry Pi 3B,4B BCM2711,400 Keyboard, and the new Raspberry Pi 5 BCM2712 which uses a different Audio Subsystem than the Ras Pi 4 Hardware BCM2711. Maybe someone will create an Audio Device Driver.
sysctl dev.pcm.0.dest
Marcos FreeBSD-arm maillist post on Raspberry Pi VCHIQ audio sound usage.
From: Marco Devesas Campos <devesas.campos_at_gmail.com>
Date: Tue, 06 Sep 2022 11:23:08 UTC
Hi
On 7 Sep 2022, at 06:04, Fred Finster <fred@thegalacticzoo.com> wrote: VCHIQ sound on Raspi4B HDMI audio. Which DTB to include on config.txt file, Any other missing pieces?
stock config[[ URL | name ]].txt and dtb-s.
dmesg should then show
vchiq0: <BCM2835 VCHIQ> mem 0x7e00b840-0x7e00b87b irq 72 on simplebus0
vchiq: local ver 8 (min 3), remote ver 8.
pcm0: <VCHIQ audio> on vchiq0
and
cat /dev/random > /dev/dsp
should play static
If nothing’s playing, flipping the sysctl dev.pcm.0.dest through
0: both hdmi and headphones 1: headphones 2: hdmi
usually brings the audio back to life.
Best,
Marco
Wish you a **SOUND** fun time using this **VCHIQ** Audio patch for FreeBSD on the**Raspberry Pi 4B,400 !**