From nobody Tue Feb 08 08:49:10 2022 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 5015219B235F for ; Tue, 8 Feb 2022 08:49:19 +0000 (UTC) (envelope-from SRS0=O5G7=SX=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int.realworks.nl (smtp-relay-int.realworks.nl [194.109.157.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 4JtGsB348yz3s5M for ; Tue, 8 Feb 2022 08:49:18 +0000 (UTC) (envelope-from SRS0=O5G7=SX=klop.ws=ronald-lists@realworks.nl) Date: Tue, 8 Feb 2022 09:49:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1644310151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2yCPdD44X+yDMzrSySzYkRRSbbvePa6N9O9/BKMEY1Q=; b=N6+xdBzHB9kp7T/wa5U59kukuIKlCK9H2ViWfZCedFuzxcJILz0sgmTLgbXJQU2q4LP+Rh 8zgz8wMMK4C3lO3GmXxQIbV5eeawfRt4StD0suHMT/R1TGpo4+GD22YfZ9jKwfQiHNyjOs 6gGII7J4C7st1tpK9GOkcA5k0mh0MrAfCJyC1PoZX2ryMW5unA4+Tm0V6ykkz9Fi9yhBU6 UmI7Qq7opcOTgSurd4P5loCvEML+i2XqAcvRH/OBArdsd4B5yfpFMA7UudZSA/FptDHD66 CbXWQLs40U4IVWeF2TWYxwbgk+qCfT7L7RRFsSxQ4lNRxcpDv5FN1GGySnh/fA== From: Ronald Klop To: Ronald Klop Cc: Marco Devesas Campos , freebsd-arm@freebsd.org Message-ID: <106195874.50.1644310150579@localhost> In-Reply-To: <48190d6a-fc5d-7da9-ddfd-fded48d429db@klop.ws> References: <8EC05647-00D9-455B-98A9-B83A33DDFC5D@gmail.com> <48190d6a-fc5d-7da9-ddfd-fded48d429db@klop.ws> Subject: Re: [PATCH] Experimental vchiq and bcm2835_audio support for arm64 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 Content-Type: multipart/alternative; boundary="----=_Part_49_814679107.1644310150512" X-Mailer: Realworks (594.13.3083cc2) Importance: Normal X-Priority: 3 (Normal) X-Rspamd-Queue-Id: 4JtGsB348yz3s5M X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=rw2 header.b=N6+xdBzH; dmarc=pass (policy=quarantine) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of "SRS0=O5G7=SX=klop.ws=ronald-lists@realworks.nl" designates 194.109.157.24 as permitted sender) smtp.mailfrom="SRS0=O5G7=SX=klop.ws=ronald-lists@realworks.nl" X-Spamd-Result: default: False [-3.20 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[klop.ws:s=rw2]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:194.109.157.0/24]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[klop.ws:+]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; HAS_X_PRIO_THREE(0.00)[3]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-arm]; FORGED_SENDER(0.30)[ronald-lists@klop.ws,SRS0=O5G7=SX=klop.ws=ronald-lists@realworks.nl]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:3265, ipnet:194.109.0.0/16, country:NL]; FROM_NEQ_ENVFROM(0.00)[ronald-lists@klop.ws,SRS0=O5G7=SX=klop.ws=ronald-lists@realworks.nl]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] X-ThisMailContainsUnwantedMimeParts: N ------=_Part_49_814679107.1644310150512 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable =20 Van: Ronald Klop Datum: maandag, 7 februari 2022 21:05 Aan: Marco Devesas Campos , freebsd-arm@freebsd.o= rg Onderwerp: Re: [PATCH] Experimental vchiq and bcm2835_audio support for arm= 64 >=20 > On 2/6/22 14:46, Marco Devesas Campos wrote: > > Hi Ronald, > > > > Thanks so much for trying out the patch out. > > > >> On 6 Feb 2022, at 13:05, Ronald Klop wrote: > >> > >> Hi, > >> > >> I compiled this on a RPI4 + 14-CURRENT. It boots, but I see no differe= nce in available devices. > >> I can try to boot it on a RPI3B+ on another time. > > > > I *think* the GPU/VC in RPI-4 is a very different beast from the others= . I'll > > look into it, but if you could give it a try on the 3+ I'd be much obli= ged. > > > >> > >> What would be the expected outcome? Where should I look at (or listen = to)? > >> > > > > You should see something like > > > > vchiq0: mem 0x7e00b840-0x7e00b87b irq 54 on simplebu= s0 > > vchiq: local ver 8 (min 3), remote ver 8. > > pcm0: on vchiq0 > > > > in your dmesg output. > > > > The file /dev/vchiq should exist, as well as the following sysctl-s (I'= m > > assuming no other audio devices are attached) > > > > % sysctl dev.pcm > > dev.pcm.0.trace: 0 > > ... > > dev.pcm.0.dest: 0 > > ... > > dev.pcm.0.%parent: vchiq0 > > ... > > dev.pcm.0.%driver: pcm > > dev.pcm.0.%desc: VCHIQ audio > > =E2=80=A6 > > > > Then if you `cat < /dev/random > /dev/dsp` you should hear some static = coming > > out of whatever is connected to hdmi (maybe headphones too? otherwise t= ry > > setting `sysctl dev.pcm.0.dest=3D1`) > > > > Best, > > Marco >=20 >=20 > Hi, >=20 > Booted the patched 14-CURRENT on the RPI3B+. >=20 > dmesg diff: > +vchiq0: mem 0x7e00b840-0x7e00b87b irq 54 on simplebus0 > +vchiq: local ver 8 (min 3), remote ver 8. > +pcm0: on vchiq0 >=20 > [root@rpi3 ~]# cat /dev/sndstat > Installed devices: > pcm0: (play) default > No devices installed from userspace. >=20 > [root@rpi3 ~]# sysctl dev.pcm > dev.pcm.0.trace: 0 > dev.pcm.0.starved: 0 > dev.pcm.0.freebuffer: 40000 > dev.pcm.0.underruns: 0 > dev.pcm.0.retrieved: 0 > dev.pcm.0.submitted: 0 > dev.pcm.0.callbacks: 0 > dev.pcm.0.dest: 0 > dev.pcm.0.mode: 3 > dev.pcm.0.bitperfect: 0 > dev.pcm.0.buffersize: 0 > dev.pcm.0.play.vchanformat: s16le:2.0 > dev.pcm.0.play.vchanrate: 48000 > dev.pcm.0.play.vchanmode: fixed > dev.pcm.0.play.vchans: 1 > dev.pcm.0.%parent: vchiq0 > dev.pcm.0.%pnpinfo: > dev.pcm.0.%location: > dev.pcm.0.%driver: pcm > dev.pcm.0.%desc: VCHIQ audio > dev.pcm.%parent: >=20 >=20 > To play some audio I need to search some headphones first. :-) >=20 > Ronald. > =20 >=20 >=20 >=20 Good morning, Found headphones with a cable on the attic. Plugged it into the audio jack = and played an mp3. Amazing! Regards, Ronald. =20 ------=_Part_49_814679107.1644310150512 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable  

Van: Ronald Klop <ronald-lists@klop.ws>
Datum: maandag, 7 februari 2022 21:05
Aan: Marco Devesas Campos <devesas.campos@gmail.com>= , freebsd-arm@freebsd.org
Onderwerp: Re: [PATCH] Experimental vchiq and bcm2835_audi= o support for arm64

On 2/6/22 14:46, Marco Devesas Ca= mpos wrote:
> Hi Ronald,
>
> Thanks so much for trying out the patch out.
>
>> On 6 Feb 2022, at 13:05, Ronald Klop <ronald-lists@klop.ws> = wrote:
>>
>> Hi,
>>
>> I compiled this on a RPI4 + 14-CURRENT. It boots, but I see no dif= ference in available devices.
>> I can try to boot it on a RPI3B+ on another time.
>
> I *think* the GPU/VC in RPI-4 is a very different beast from the other= s. I'll
> look into it, but if you could give it a try on the 3+ I'd be much obl= iged.
>
>>
>> What would be the expected outcome? Where should I look at (or lis= ten to)?
>>
>
> You should see something like
>
>    vchiq0: <BCM2835 VCHIQ> mem 0x7e00b840-0x7e00b= 87b irq 54 on simplebus0
>    vchiq: local ver 8 (min 3), remote ver 8.
>    pcm0: <VCHIQ audio> on vchiq0
>
> in your dmesg output.
>
> The file /dev/vchiq should exist, as well as the following sysctl-s (I= 'm
> assuming no other audio devices are attached)
>
>    % sysctl dev.pcm
>    dev.pcm.0.trace: 0
>    ...
>    dev.pcm.0.dest: 0
>    ...
>    dev.pcm.0.%parent: vchiq0
>    ...
>    dev.pcm.0.%driver: pcm
>    dev.pcm.0.%desc: VCHIQ audio
>    =E2=80=A6
>
> Then if you `cat < /dev/random > /dev/dsp` you should hear some = static coming
> out of whatever is connected to hdmi (maybe headphones too? otherwise = try
> setting `sysctl dev.pcm.0.dest=3D1`)
>
> Best,
> Marco


Hi,

Booted the patched 14-CURRENT on the RPI3B+.

dmesg diff:
+vchiq0: <BCM2835 VCHIQ> mem 0x7e00b840-0x7e00b87b irq 54 on simplebu= s0
+vchiq: local ver 8 (min 3), remote ver 8.
+pcm0: <VCHIQ audio> on vchiq0

[root@rpi3 ~]# cat /dev/sndstat
Installed devices:
pcm0: <VCHIQ audio> (play) default
No devices installed from userspace.

[root@rpi3 ~]# sysctl dev.pcm
dev.pcm.0.trace: 0
dev.pcm.0.starved: 0
dev.pcm.0.freebuffer: 40000
dev.pcm.0.underruns: 0
dev.pcm.0.retrieved: 0
dev.pcm.0.submitted: 0
dev.pcm.0.callbacks: 0
dev.pcm.0.dest: 0
dev.pcm.0.mode: 3
dev.pcm.0.bitperfect: 0
dev.pcm.0.buffersize: 0
dev.pcm.0.play.vchanformat: s16le:2.0
dev.pcm.0.play.vchanrate: 48000
dev.pcm.0.play.vchanmode: fixed
dev.pcm.0.play.vchans: 1
dev.pcm.0.%parent: vchiq0
dev.pcm.0.%pnpinfo:
dev.pcm.0.%location:
dev.pcm.0.%driver: pcm
dev.pcm.0.%desc: VCHIQ audio
dev.pcm.%parent:


To play some audio I need to search some headphones first. :-)

Ronald.
 



Good morning,

Found headphones with a cable on the attic. Plugged it into the audio jack = and played an mp3. Amazing!

Regards,
Ronald.
  ------=_Part_49_814679107.1644310150512--