From nobody Mon Aug 26 17:18:41 2024 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wsy7n6V5sz5THc0 for ; Mon, 26 Aug 2024 17:18:45 +0000 (UTC) (envelope-from fred@thegalacticzoo.com) Received: from nmtao102.oxsus-vadesecure.net (mta-132a.oxsus-vadesecure.net [135.148.117.230]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wsy7m6bkyz41bn for ; Mon, 26 Aug 2024 17:18:44 +0000 (UTC) (envelope-from fred@thegalacticzoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=webcom.xion.oxcs.net header.s=mail1 header.b=bRBdIUr6; dmarc=pass (policy=quarantine) header.from=thegalacticzoo.com; spf=pass (mx1.freebsd.org: domain of fred@thegalacticzoo.com designates 135.148.117.230 as permitted sender) smtp.mailfrom=fred@thegalacticzoo.com; arc=pass ("oxsus-vadesecure.net:s=arc-202309-rsa2048:i=1") ARC-Seal: i=1; a=rsa-sha256; d=oxsus-vadesecure.net; s=arc-202309-rsa2048; t=1724692723; cv=none; b=HplX4sHV1nrnLSIA2/RnUOMMsy9y8UNZbTd+p1ZYkLJ61pCzlRUK3wmRQSzVDxgxZkThwH939XUlGqtN9PZgg2pbfPuFAUqnzNfJ9MqpXD5MBOv1tSbaQKMCIJ8XySlnK3hj5wBkC9o2wIKXOWO+q7kQYGYLjsiaEGBhNao1R1N0Tz0Gu6oQoMHygsWcpvI9Qb7MHohquDN60ryT61h8koqPgyUjCuyiJ1a2gEdl/aJqnGvpVeBdohbnjz7gM79pP7GJMBc4g47WgnNbzWp2bhgu8aykY0DZRGazLlqGv6e4c62G3dr5Gr6HK3nMX1b7OTnWxyqlJqK8gcDR/A1ToQ== ARC-Message-Signature: i=1; a=rsa-sha256; d=oxsus-vadesecure.net; s=arc-202309-rsa2048; t=1724692723; c=relaxed/relaxed; h=from:reply-to:subject:date:to:cc:resent-date:resent-from:resent-to:resent-cc:in-reply-to:references:list-id:list-help:list-unsubscribe:list-unsubscribe-post:list-subscribe:list-post:list-owner:list-archive; bh=ExQxcsiiUTxvZO2ehosEb7Hd7kwYiOMDkd/Do5Oey90=; b=UFIOKCuPUvTO8PsYMoTG69hmmGEWnjzTB2x0Z9W0DL8uaLwjF0HmlxsXPyRSRTkuTjpnIPw+6bxKE4h7aPO+ZClCC+NYk2pqAYZQQcxeLKyJ+Hy9AUHDwkESVR2jYOjMguysqcv2tMiI3uLCaid9DkqTxdjKUX2AyJRNPGfxbSfDX2+4S8pZGWH/L2rspf8mn5MBKpJ6vhQUTjSAz3sVOH7WgVKb/nJOJ5XlAMPDFfG9dL8skbEB9Nh8DUwWNGm+mHNS2ctK71B1aMnTAtJnPKYLUofDA0QbQOvIq+T6Tcw2O/QYlaUV37U3PnQmSK7ahdKl7Nlio53joDURft/wlw== ARC-Authentication-Results: i=1; DKIM-Signature: v=1; a=rsa-sha256; bh=ExQxcsiiUTxvZO2ehosEb7Hd7kwYiOMDkd/Do5 Oey90=; c=relaxed/relaxed; d=webcom.xion.oxcs.net; h=from:reply-to: subject:date:to:cc:resent-date:resent-from:resent-to:resent-cc: in-reply-to:references:list-id:list-help:list-unsubscribe: list-unsubscribe-post:list-subscribe:list-post:list-owner:list-archive; q=dns/txt; s=mail1; t=1724692723; x=1725297523; b=bRBdIUr6Qejrbf4ReKPKE MdMXqC8ywUMq07nImk6lmIfqGYExKVdW+DTkADYDm3pzMXMWIIX8+WX+QlbS+NRSk7eaEG3 JXnObNgUXBnRVtR/X7TiHLvTdzX3i4GBVaLjwQvAFKvjme8PjUvF+AqxX7IX+kfuBvtNmUQ dz1rK0ONiW+ruBhbD+KnwnNBVZt9f4zfuf8zFQah5Zk6Hv13ayGZFMjXtiBCaDlx/uaTtT5 HGkz9+dtE4mqa4ltDVPcUO077dh983A2IueSMvNVhg6Rjv8UOo2HharvMMOUn2dI/5MFg6I dfi0uYFpzYnkuP/6L58rfgICZJCEcalxxQXFg== Received: from proxy-8.proxy.cloudus.ewr.xion.oxcs.net ([172.56.168.253]) by oxsus1nmtao02p.internal.vadesecure.com with ngmta id 9ddb81dc-17ef56e4dba131ac; Mon, 26 Aug 2024 17:18:43 +0000 Content-Type: multipart/alternative; boundary="------------7VBsJi6dsDME2aom9WCw3PqI" Message-ID: <18663703-ec53-4d87-b035-1eadd5f803d2@thegalacticzoo.com> Date: Mon, 26 Aug 2024 13:18:41 -0400 List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: freebsd-arm@freebsd.org From: Fred Finster Subject: Audio out from TV speakers using VCHIQ on Raspberry Pi 4B, 400, or 3B , 3B+ [SOLVED] Organization: Kliktel.biz X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.88 / 15.00]; ARC_ALLOW(-1.00)[oxsus-vadesecure.net:s=arc-202309-rsa2048:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.987]; DMARC_POLICY_ALLOW(-0.50)[thegalacticzoo.com,quarantine]; R_SPF_ALLOW(-0.20)[+ip4:135.148.117.228/30]; R_DKIM_ALLOW(-0.20)[webcom.xion.oxcs.net:s=mail1]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; ONCE_RECEIVED(0.10)[]; XM_UA_NO_VERSION(0.01)[]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:16276, ipnet:135.148.0.0/17, country:FR]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[135.148.117.230:from]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[webcom.xion.oxcs.net:+] X-Rspamd-Queue-Id: 4Wsy7m6bkyz41bn This is a multi-part message in MIME format. --------------7VBsJi6dsDME2aom9WCw3PqI Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Here is my solution for patching FreeBSD kernel source code and also patching GhostBSD kernel source code with exact same 3 patches from Marcos Devesas-Campos My review is here D43399 review.freebsd.org https://reviews.freebsd.org/D37878 https://reviews.freebsd.org/D37879 https://reviews.freebsd.org/D36431 https://reviews.freebsd.org/D43399 I am looking for confirmation from your testing that these patches do work or DO NOT WORK.   They did work for me on both standard FREEBSD kernel source code at  /usr//src  and also on GhostBSD kernel source code at my selected directory location of /usr/ghost14/src Questons:  Does the audio come out your HDMI Television speakers?  YES, NO, SOMETIMES ?? Why? Can you change from HDMI audio only, to analog 3.5MM headphones, or both at the sametime? Does using these patch files, work also on the Raspberry Pi 3B and Raspberry 3B+,  Raspberry Pi 400 keyboard model SBC, Raspberry Pi 4 compute module. Anybody get a BlueTooth USB dongle working on Arm64 Raspberry Pi hardware or other Arm64 SBC? Raspberry Pi 5 users will have to test their different HDMI audio setup (not VCHIQ internal subsystem in the BCM2712 SOC) and let others know about their findings of playing Videos with sound coming out the HDMI Television speakers or out Bluetooth connected audio (I do not know if Bluetooth is supported on Raspberry Pi 5 or you have to add a USB dongle). https://forums.freebsd.org/threads/raspberry-pi-5-status.91406/page-3 Here is RPI 5 Status Forums page https://ghostbsd-arm64.blogspot.com  search on word  HDMI or Audio to find the relevant blog post. Review D43399 has instructions and URL links to other bits and pieces.  I posted a detailed write up on a Fxxxxxx image where I wrote a reply to Chinese developer.] https://reviews.freebsd.org/D43399 https://reviews.freebsd.org/F75131370   Here is an explicit write up how to download and use 3 patches for enabling HDMI Audio through the VCHIQ sub system inside the SOC BCM2711. ~~~~~~~~~ sysctl dev.pcm.0.dest sysctl dev.pcm.0.dest=0   plays audio on analog 3.5mm jack and HDMI Audio at the same time. Marcos FreeBSD-arm maillist post on Raspberry Pi VCHIQ audio sound usage. From: Marco Devesas Campos Date: Tue, 06 Sep 2022 11:23:08 UTC Hi On 7 Sep 2022, at 06:04, Fred Finster wrote: VCHIQ sound on Raspi4B HDMI audio. Which DTB to include on config.txt file, Any other missing pieces? stock confit.txt and dtb-s. dmesg should then show vchiq0: mem 0x7e00b840-0x7e00b87b irq 72 on simplebus0 vchiq: local ver 8 (min 3), remote ver 8. pcm0: 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 ** ~~~~~~~~~ ps.  Anybody test and verify drivers for the extra serial ports on the raspberry Pi 4B hardware. Uart0, Uart1 ttys work, but Uart2, Uart3, Uart4, Uart5  do not work and are not tested.  How about testing the I2C and other serial interfaces (i2S??)? on the Raspberry Pi 4B hardware ( 3B, 3B+ hardware too) Slowly but surely progress in using FreeBSD on Arm64 hardware is improving.  Thank you FreeBSD Foundation and developers. pss.  Anybody working on porting the OpenBSD and/or NetBSD device driver for the cy445 internal wifi subsystem on the Raspberry Pi 4B, 400 hardware SBC?  I have looked at the OpenBSD bwfm driver source code.  The realtek chipset in a USB dongle does work for internet connectivity via wifi from raspberry pi SBCs.  8188eu (TP-Link mfg), 8192cu (Edimax mfg) psss. Once HDMI Audio VCHIQ is working, would be nice to compile or download ORCA screen reader and make this operational on the Raspberry Pi hardware for Low Vision users to have an inexpensive desktop computer connected to a HDMI television with working TV speakers operational. Best of luck in your use of FreeBSD Arm64 on other existing SBC hardware.  I was really impressed with all the software that just worked OOTB (out of the box) with a simple  pkg search  and pkg install geany falkon xfce xfce4-goodies for Arm64.  We all benefit by sharing information , even when not on a High Powered Arm64 Server. Yes,  I ran Poudriere 24hours a day (for 30 days) building packages on my Raspberry Pi 4B, 8Gigs dram, 1 Terabyte USB SSD. Ugreen Case with realtek interface chip inside to connect USB to a M.2 NVME stick inside a metal case.  Poudriere did build the packages and the NGINX web server served the packages to the world using a NO-IP.com URL for a dynamic-IP connection at my home. ( I recently moved so am not setup again with the Raspberry Pi online and not working presently http://ghostbsdarm64.hopto.org) Leaving here as a future reference. psss.   What is your JTAG debug setup for ddb or gdb with your Arm64 hardware?.  I was looking at BMP Black Magic Probe hardware, but looks like it support 32 bit ARM debug and not 64 bit ARM debug.  The other JTAG hardware with 1.8 - 3.3V ttl serial interface is the "JEFF Probe" by FLIRC.  What do you suggest as a good JTAG interface tool?  What works for you? https://forums.freebsd.org/threads/debugging-arm64-booting-of-freebsd-ghostbsd-kernel-for-raspberry-pi-4-what-tool-do-you-use-any-jtag-hardware-kernel-debug.90436/#post-623625 Thank you for reading.  Yes, I asked many related questions.  I hope you answer a few questions over on a post at https://forums.freebsd.org Fred Finster (temp phone 503-949-oh-seven-six-six) -- Fred Finster 971-718-9144 https://ghostbsd-arm64.blogspot.com --------------7VBsJi6dsDME2aom9WCw3PqI Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Here is my solution for patching FreeBSD kernel source code and also patching GhostBSD kernel source code with exact same 3 patches from Marcos Devesas-Campos  

My review is here D43399 review.freebsd.org

https://reviews.freebsd.org/D37878

https://reviews.freebsd.org/D37879

https://reviews.freebsd.org/D36431

https://reviews.freebsd.org/D43399


I am looking for confirmation from your testing that these patches do work or DO NOT WORK.   They did work for me on both standard FREEBSD kernel source code at  /usr//src  and also on GhostBSD kernel source code at my selected directory location of /usr/ghost14/src 

Questons:  Does the audio come out your HDMI Television speakers?  YES, NO, SOMETIMES ?? Why?

Can you change from HDMI audio only, to analog 3.5MM headphones,  or both at the sametime?

Does using these patch files, work also on the Raspberry Pi 3B and Raspberry 3B+,  Raspberry Pi 400 keyboard model SBC, Raspberry Pi 4 compute module.

Anybody get a BlueTooth USB dongle working on Arm64 Raspberry Pi hardware or other Arm64 SBC?


Raspberry Pi 5 users will have to test their different HDMI audio setup (not VCHIQ internal subsystem in the BCM2712 SOC) and let others know about their findings of playing Videos with sound coming out the HDMI Television speakers or out Bluetooth connected audio (I do not know if Bluetooth is supported on Raspberry Pi 5 or you have to add a USB dongle).

https://forums.freebsd.org/threads/raspberry-pi-5-status.91406/page-3   Here is RPI 5 Status Forums page

https://ghostbsd-arm64.blogspot.com  search on word  HDMI or Audio to find the relevant blog post.

Review D43399 has instructions and URL links to other bits and pieces.  I posted a detailed write up on a Fxxxxxx image where I wrote a reply to Chinese developer.]

https://reviews.freebsd.org/D43399

https://reviews.freebsd.org/F75131370   Here is an explicit write up how to download and use 3 patches for enabling HDMI Audio through the VCHIQ sub system inside the SOC BCM2711. 

~~~~~~~~~

sysctl dev.pcm.0.dest

sysctl dev.pcm.0.dest=0   plays audio on analog 3.5mm jack and HDMI Audio at the same time.

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

~~~~~~~~~

ps.  Anybody test and verify drivers for the extra serial ports on the raspberry Pi 4B hardware. Uart0, Uart1 ttys work, but Uart2, Uart3, Uart4, Uart5  do not work and are not tested.  How about testing the I2C and other serial interfaces (i2S??)? on the Raspberry Pi 4B hardware ( 3B, 3B+ hardware too)

Slowly but surely progress in using FreeBSD on Arm64 hardware is improving.  Thank you FreeBSD Foundation and developers.


pss.  Anybody working on porting the OpenBSD and/or NetBSD device driver for the cy445 internal wifi subsystem on the Raspberry Pi 4B, 400 hardware SBC?  I have looked at the OpenBSD bwfm driver source code.  The realtek chipset in a USB dongle does work for internet connectivity via wifi from raspberry pi SBCs.  8188eu (TP-Link mfg), 8192cu (Edimax mfg)

psss. Once HDMI Audio VCHIQ is working, would be nice to compile or download ORCA screen reader and make this operational on the Raspberry Pi hardware for Low Vision users to have an inexpensive desktop computer connected to a HDMI television with working TV speakers operational.

Best of luck in your use of FreeBSD Arm64 on other existing SBC hardware.  I was really impressed with all the software that just worked OOTB (out of the box) with a simple  pkg search  and pkg install geany falkon xfce xfce4-goodies for Arm64.  We all benefit by sharing information , even when not on a High Powered Arm64 Server.

Yes,  I ran Poudriere 24hours a day (for 30 days) building packages on my Raspberry Pi 4B, 8Gigs dram, 1 Terabyte USB SSD.  Ugreen Case with realtek interface chip inside to connect USB to a M.2 NVME stick inside a metal case.  Poudriere did build the packages and the NGINX web server served the packages to the world using a NO-IP.com URL for a dynamic-IP connection at my home. ( I recently moved so am not setup again with the Raspberry Pi online and not working presently  http://ghostbsdarm64.hopto.org)  Leaving here as a future reference.


psss.   What is your JTAG debug setup for ddb or gdb with your Arm64 hardware?.  I was looking at BMP Black Magic Probe hardware, but looks like it support 32 bit ARM debug and not 64 bit ARM debug.  The other JTAG hardware with 1.8 - 3.3V ttl serial interface is the "JEFF Probe" by FLIRC.  What do you suggest as a good JTAG interface tool?  What works for you?

https://forums.freebsd.org/threads/debugging-arm64-booting-of-freebsd-ghostbsd-kernel-for-raspberry-pi-4-what-tool-do-you-use-any-jtag-hardware-kernel-debug.90436/#post-623625


Thank you for reading.  Yes, I asked many related questions.  I hope you answer a few questions over on a post at  https://forums.freebsd.org

Fred Finster (temp phone 503-949-oh-seven-six-six)


-- 
Fred Finster  971-718-9144
https://ghostbsd-arm64.blogspot.com
--------------7VBsJi6dsDME2aom9WCw3PqI--