Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp534138ybz; Wed, 29 Apr 2020 04:57:36 -0700 (PDT) X-Google-Smtp-Source: APiQypLIha+B0VoBX3Q7lqlB0Ui1z63vGTNgqfB4EkKG1H6coerz5+mTlaAxUDDPIq/HESZ7Pb+S X-Received: by 2002:a05:6402:30ae:: with SMTP id df14mr1942794edb.86.1588161456118; Wed, 29 Apr 2020 04:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588161456; cv=none; d=google.com; s=arc-20160816; b=uWsFGNStJSkFloVkLvXQ87XCxrXCgBSEDLqzXq8kkv/bLt26K3aSqWGKf6Qtc9qKJU IDZx4Rax66flcQ8YgVchcF7zR5ds4yw4yXYgbtjacVRV7WuoxTkq1gx+X79QV6sdukEO jHyOKFIgGySTkoVG1CWp68Y1v07TQ1RYmvPoIwwj5ZYzS1ujTWPsaXOWhCk+wTYF7ouF H4IQrqk0NlEeSgVLMAZkJc+S4bZlnILBK4V1kga4SwzVMr4CWpNGa7BBM++XtHn5IHgt wdgw4OjePV76I7+RqZ3PfWfBc7/M0QrDpQlHHyx/ggVPEygz0IyBgj4Lml22euLQpBHl zaKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=dqO1uMCWqJFLsR0cV26+3IQsPpVVDS6CVMvpUDRc208=; b=yw8QRxrrKmNGuukfEoO5vBkKRzZ6Sp6fRY2JODb3NWb7OLPc/feCtkOIWur7DGQxpS jdtf2515RBilt2EFV/0//mhMupI2GNi5MYPTutqRzdo7luTqs/+djURKq2CR/+Yy83BW +L7AVLGEB9wlNixaDPAYKJoNdvY7sHtdKtyioyrCJdcKIXHV/NHwgbCFJN9HIpUfjT0d uF1jcgYR1jfdnG0Zdb4ouTh3KgxW5vAVWWEFOIkGxXkch1noed18bJQ0arySX6cpG5cs fTZ8l1prWnWLbLGaL8ilV9DMJxkDivJvtMlQcyKGLVmOGNvbqDsgJggq6NYGhcL52etb YCOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=bmjsFp6S; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=WtKGPx9p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx18si3207513edb.73.2020.04.29.04.57.11; Wed, 29 Apr 2020 04:57:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=bmjsFp6S; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=WtKGPx9p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726822AbgD2Lzj (ORCPT + 99 others); Wed, 29 Apr 2020 07:55:39 -0400 Received: from new4-smtp.messagingengine.com ([66.111.4.230]:46189 "EHLO new4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726519AbgD2Lzj (ORCPT ); Wed, 29 Apr 2020 07:55:39 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 649D7580314; Wed, 29 Apr 2020 07:55:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 29 Apr 2020 07:55:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=dqO1uMCWqJFLsR0cV26+3IQsPpV VDS6CVMvpUDRc208=; b=bmjsFp6SLenvJjotaHCkBfZ5KkQVF6god3HnO/E8SWF denZ2w9oYPVsDrUxPtE0ykYE2U4x4Fi9DTrvaM750MQx5bX3N6QkidDmk4ZlxXeX IeVE/2XppTx5KcE8FI6OZGG3DSk5yPjHKB2k8f+WmcQpS8iXOiSsVFl+PSO92bVT VAQlq7bRZD5L6eA4P+Tbnbr4dNLrLtp2WH6XWwRlEhtDpDFAuv9x2ZK48bsXv2zV zkxZfAkKbaSHh8jqmoS8yDHvOp29IjPGlD0XIX0cxEvFWlpcL0wugOf7bBUwjOcf TuwE7P3+9ZIGNIvKDaayeBs6mo1U9O4934vDKuca7UQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=dqO1uM CWqJFLsR0cV26+3IQsPpVVDS6CVMvpUDRc208=; b=WtKGPx9pWPJ4sB95s2CwXl IyNCe+j3wiRK4Cqsv6vyKNi0RySUn2gXSolClyVV6Q5rwX9x3ZKlTJ6sTV4M9X5b R81Wq6z+io2FgBmpNhO2jZsRtOnfElTWmCkyEEr4ZpWiCBlJkcq3+fYjdlOz3vgI /tdsTukuvF8at82bjrSAEA2/0W/ymr3IQKiFaxVYFWQATAoFfSA0ujNbIsn16tLf wd3YnmscQnm2+AMHXGoaem1ICRjuAyJL31eU8E1poa/zUGlZC/wGrNDfLaAqLUiG KIUSxPjNZEK88yhhgf/jH2EBv/4V7NpBneZFfB2HcYsCovozxwdb6Zsc9WAIA91Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieefgdegiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucfkphepledtrd ekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 41088328005E; Wed, 29 Apr 2020 07:55:34 -0400 (EDT) Date: Wed, 29 Apr 2020 13:55:32 +0200 From: Maxime Ripard To: Robin Murphy Cc: Chen-Yu Tsai , =?utf-8?B?Q2zDqW1lbnQgUMOpcm9u?= , Mark Brown , devicetree , Linux-ALSA , Liam Girdwood , linux-kernel , linux-sunxi , Jernej Skrabec , Takashi Iwai , Jaroslav Kysela , Marcus Cooper , Rob Herring , linux-arm-kernel Subject: Re: [linux-sunxi] Re: Audio sound card name [was [PATCH 4/7] arm64: dts: allwinner: a64: Add HDMI audio] Message-ID: <20200429115532.bdidkbvg5ckybwl5@gilmour.lan> References: <20200426120442.11560-1-peron.clem@gmail.com> <20200426120442.11560-5-peron.clem@gmail.com> <20200428080020.35qcuylwq2ylmubu@gilmour.lan> <20200428160417.6q5oab2guaumhhwi@gilmour.lan> <031ee5d3-8a30-82ee-76db-c0e8a1073046@arm.com> <20200429081729.qa3gqtl5sof2jhem@gilmour.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5ybrpr7cgddwqn5w" Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --5ybrpr7cgddwqn5w Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi (Sorry for ignoring a couple of mails from you, for some reason your mails didn't end up in my Inbox) On Wed, Apr 29, 2020 at 11:43:06AM +0100, Robin Murphy wrote: > On 2020-04-29 9:17 am, Maxime Ripard wrote: > > On Wed, Apr 29, 2020 at 02:24:00PM +0800, Chen-Yu Tsai wrote: > > > On Wed, Apr 29, 2020 at 1:11 AM Robin Murphy w= rote: > > > >=20 > > > > On 2020-04-28 5:49 pm, Cl=E9ment P=E9ron wrote: > > > > > Hi Mark, Rob, > > > > >=20 > > > > > On Tue, 28 Apr 2020 at 18:04, Maxime Ripard w= rote: > > > > > >=20 > > > > > > On Tue, Apr 28, 2020 at 10:54:00AM +0200, Cl=E9ment P=E9ron wro= te: > > > > > > > Hi Maxime, > > > > > > >=20 > > > > > > > On Tue, 28 Apr 2020 at 10:00, Maxime Ripard wrote: > > > > > > > >=20 > > > > > > > > On Sun, Apr 26, 2020 at 02:04:39PM +0200, Cl=E9ment P=E9ron= wrote: > > > > > > > > > From: Marcus Cooper > > > > > > > > >=20 > > > > > > > > > Add a simple-soundcard to link audio between HDMI and I2S. > > > > > > > > >=20 > > > > > > > > > Signed-off-by: Jernej Skrabec > > > > > > > > > Signed-off-by: Marcus Cooper > > > > > > > > > Signed-off-by: Cl=E9ment P=E9ron > > > > > > > > > --- > > > > > > > > > arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 21 +++= ++++++++++++++++ > > > > > > > > > 1 file changed, 21 insertions(+) > > > > > > > > >=20 > > > > > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dts= i b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > > > > > > > index e56e1e3d4b73..08ab6b5e72a5 100644 > > > > > > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > > > > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > > > > > > > @@ -102,6 +102,25 @@ > > > > > > > > > status =3D "disabled"; > > > > > > > > > }; > > > > > > > > >=20 > > > > > > > > > + hdmi_sound: hdmi-sound { > > > > > > > > > + compatible =3D "simple-audio-card"; > > > > > > > > > + simple-audio-card,format =3D "i2s"; > > > > > > > > > + simple-audio-card,name =3D "allwinner,hdmi"; > > > > > > > >=20 > > > > > > > > I'm not sure what the usual card name should be like though= =2E I would assume that > > > > > > > > this should be something specific enough so that you're abl= e to differentiate > > > > > > > > between boards / SoC so that the userspace can choose a dif= ferent configuration > > > > > > > > based on it? > > > > > > >=20 > > > > > > > I really don't know what we should use here, > > > > > > > I just have a look at other SoC: > > > > > > > rk3328: "HDMI" > > > > > > > rk3399: "hdmi-sound" > > > > > > > r8a774c0-cat874: "CAT874 HDMI sound" > > > > > > >=20 > > > > > > > But maybe it's time to introduce proper name: > > > > > > > What about : > > > > > > > pat > > > > > > > sun50i-h6-hdmi > > > > > >=20 > > > > > > It's pretty much what we've been using for the other sound card= s we have, so it > > > > > > makes sense to me. > > > > >=20 > > > > > I have a question regarding the simple-audio-card,name. > > > > > In this patch, I would like to introduce a simple-audio-card for = the > > > > > Allwinner A64 HDMI. > > > > >=20 > > > > > What should be the preferred name for this sound card? > > > > > "sun50i-a64-hdmi" ? "allwinner, sun50i-a64-hdmi" ? > > > >=20 > > > > I can at least speak for RK3328, and the reasoning there was that a= s the > > > > user looking at what `aplay -l` says, I don't give a hoot about wha= t the > > > > SoC may be called, I see two cards and I want to know, with the lea= st > > > > amount of uncertainty, which one will make the sound come out of the > > > > port that's labelled "HDMI" on the box ;) > > >=20 > > > I agree. The user really doesn't care what SoC the system uses. The o= nly > > > real requirement is to be able to tell which output the card is relat= ed > > > to, i.e. is it onboard or an external DAC, is it analog or HDMI, etc.. > >=20 > > Yeah, but it's exactly the point. > >=20 > > If we also end up with "HDMI" as our card name, then the userspace has = no way to > > tell anymore if it's running from an rk3328 or an allwinner SoC, or som= ething > > else entirely. And therefore it cannot really configure anything to wor= k out of > > the box anymore. >=20 > OK, you're a userspace audio application - enlighten me as to what exact > chip you're running on here, and why you need to know: >=20 > card 0: HDMI [HDA ATI HDMI] >=20 > or how about here? >=20 > card 0: Intel [HDA Intel] >=20 >=20 > Furthermore, your argument works both ways - if the equivalent (or in com= mon > cases like DesignWare IP blocks, exact same) thing across 3 different SoCs > has 3 different names, then it's that much harder for userspace that wants > to present a consistent behaviour. I don't know exactly why LibreELEC have > downstream patches that standardise all the Rockchip ones to "HDMI", but I > can't help noting that they do. >=20 > With simple-audio-card we're talking about trivial interfaces that often > don't expose any controls at all, so there's unlikely to be much > 'configuration' for userspace to do beyond choosing which card to output = to. That's not really true though. simple-audio-card is used when the connection between the DAIs is simple. It doesn't mean that the configuration of the C= PU DAI (i2s controller in that case) or the configuration of the codec are sim= ple, and with pretty featureful codecs, between the various muxes and amps, it c= an actually be quite difficult to get the combination of controls you need to change to output something on the output you expected. Maxime --5ybrpr7cgddwqn5w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXqlrNAAKCRDj7w1vZxhR xeCzAP41z2Rn5Qp0+rELbXDd5d1uWOihXOwFJ1v2SyU5PkqVigEAjOqVA3ewWwoA SR1flkEYAUZC1Ld8z7VJczJ12vkh5QQ= =Tshz -----END PGP SIGNATURE----- --5ybrpr7cgddwqn5w--