From nobody Mon Feb 07 20:05:09 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 72DF719A2017 for ; Mon, 7 Feb 2022 20:05:13 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4JsxvX3R5Fz3tsw for ; Mon, 7 Feb 2022 20:05:12 +0000 (UTC) (envelope-from ronald-lists@klop.ws) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=klop.ws; s=mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References: To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5K7DThdV5LGsVGtz73prNzPkMLAYnIQkjMBAs2lkHb4=; b=pBllir3Kdat2JrIffyvCFM2uqv uz66G2nosAKTAHTPi4RWLQwj7X+XTIDy43RWW3JWgs93GOMfM5yxQWk4QlvFGlvrffk4lpHrCQAfR 3iDrk6KqRYQ0ET+ODseuPtvJ2rCV1NkoWCE0QWoetLjWe4dGLTnZG4a4cAw6xgZbukFw=; Message-ID: <48190d6a-fc5d-7da9-ddfd-fded48d429db@klop.ws> Date: Mon, 7 Feb 2022 21:05:09 +0100 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/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Subject: Re: [PATCH] Experimental vchiq and bcm2835_audio support for arm64 Content-Language: en-US To: Marco Devesas Campos , freebsd-arm@freebsd.org References: <8EC05647-00D9-455B-98A9-B83A33DDFC5D@gmail.com> From: Ronald Klop In-Reply-To: <8EC05647-00D9-455B-98A9-B83A33DDFC5D@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.greenhost.nl X-Spam-Level: - X-Spam-Score: -1.2 X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,BAYES_40,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.2 X-Scan-Signature: 6c56b5a68734eff3bb82063186e8a5cf X-Rspamd-Queue-Id: 4JsxvX3R5Fz3tsw X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=klop.ws header.s=mail header.b=pBllir3K; dmarc=pass (policy=quarantine) header.from=klop.ws; spf=pass (mx1.freebsd.org: domain of ronald-lists@klop.ws designates 195.190.28.88 as permitted sender) smtp.mailfrom=ronald-lists@klop.ws X-Spamd-Result: default: False [-4.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[klop.ws:s=mail]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:195.190.28.64/27]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[klop.ws:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[195.190.28.88:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[klop.ws,quarantine]; MLMMJ_DEST(0.00)[freebsd-arm]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:47172, ipnet:195.190.28.0/24, country:NL]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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 difference 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 obliged. > >> >> 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 simplebus0 > 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 > … > > 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=1`) > > Best, > Marco Hi, Booted the patched 14-CURRENT on the RPI3B+. dmesg diff: +vchiq0: mem 0x7e00b840-0x7e00b87b irq 54 on simplebus0 +vchiq: local ver 8 (min 3), remote ver 8. +pcm0: on vchiq0 [root@rpi3 ~]# cat /dev/sndstat Installed devices: pcm0: (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.