Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3220826pxx; Mon, 2 Nov 2020 03:22:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwBwHaFiJYOQxu1BcpRuQs1kMl9sTCMARMM4SVkKNaNzeBFAWVXtz9rXKzbxeHy5FzcqY+F X-Received: by 2002:a17:906:d8b0:: with SMTP id qc16mr14494895ejb.268.1604316162020; Mon, 02 Nov 2020 03:22:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604316162; cv=none; d=google.com; s=arc-20160816; b=kWCm6MKDWRpUfprTM3i5Bsnhy7VRzV7NRwk104cjCYtgq9S/0LzORp761UPpRYskgy /3bJSR5HffOl0tvjPFY8LF+a8Chta+pgOHzSnYFohGRS9UsEB3H/bDVkTLT0MarOdz/A GZxIIkeXFSf4HKj5xL/ZFi1szUB9aPUFeEIdOi1iF63tHS23p0VI106LgaNhuZI7xUIj AU/hef15EDbA3Lae0igPk86pYziPuRlu4WLez17qxPI3wrTLZAE3AI1+NzJUAcUQ/f1q oARz/mLx+MLrfia6WDIllvuWxOvJvwEnGByUrRCpkorPkGbP0jPOBLt/npwr4XAHXTmI 1KTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=6jGIEcHWVxAn3fg0VUHHhYb4aY1F4L9zbPIcUYHsHdk=; b=malnFWY1sfW6XtOZg1D1GUbxMgh5VCUbyD5ZfBIH8VFR0OsDBw+ptUVqZ/h4ZoL8Ue B455msYsisVorm3iWdSTAPBrTo2xlPMFkYAqeWc6/NUewsaR33BnFsuqqvijgokwVx6V 9DgZAFuofGd7DieSXm1Y9prKjJcQpxxhFBBgkIBsmJ2nriRdacRiULb4GJ1hUQBkl0xI SA4s9LRj/pphp1quYL/DJcXGaEnZzvu5f4DJN6YQsioWRwr2uZ5a7W8OMS5dq0p/B2td mB18DoD+SzBz+V6fDwCKtqbbsZ0Z+Ry707z1oC8CVnByLwodsy0t7rAXtca26pKjkrIN 1ipw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rBX5rTWO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r8si7682665edm.62.2020.11.02.03.22.19; Mon, 02 Nov 2020 03:22:42 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=rBX5rTWO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728555AbgKBLT5 (ORCPT + 99 others); Mon, 2 Nov 2020 06:19:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728253AbgKBLT5 (ORCPT ); Mon, 2 Nov 2020 06:19:57 -0500 Received: from mail-io1-xd43.google.com (mail-io1-xd43.google.com [IPv6:2607:f8b0:4864:20::d43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE3FEC0617A6; Mon, 2 Nov 2020 03:19:55 -0800 (PST) Received: by mail-io1-xd43.google.com with SMTP id o11so3258984ioo.11; Mon, 02 Nov 2020 03:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=6jGIEcHWVxAn3fg0VUHHhYb4aY1F4L9zbPIcUYHsHdk=; b=rBX5rTWOyGpQ2QFTArzJXmF9gLj+2qHhpHtq5IccV7K+4i7zEXERiFzL57WJY+4iQX 5w0fUre1grj24vaBMH4+zK7WtUSE8xQPv4kQQ4ei/rRCO4LldWrvf/9hKf42vlAGlXh1 S6rGwf6r7WPzLzC69ZwHgXnKZcLHvQZ4G6qYWpkNYPNRzPt/Ydho3dPSUhMcYe66Yvos GRyLWQhkTcYclNim1YmzvP6WdrUg5vLj8RXCXeaDuKrMbcSbECG9iMPKJ8Y950kSDDeS 4jzMIKZLYmwqonUIn4A+5TMDkyxlRfD/Kq7j7k7iNGtH7nQ9mJKXt4IuKLpdAzDGkIAk tNEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=6jGIEcHWVxAn3fg0VUHHhYb4aY1F4L9zbPIcUYHsHdk=; b=a3On//kst+1WTSBntiJRg3Cap9qazcudokWEqkRjBM4Ajp3joQYAYYblo8pvesk8xj qMkKaxVEZGHFNGMUYRTKGiu8rMqMMTQV1HJzWul7CSSKIJ1aYaQDT1CYz4/HMUUu+w25 g9AtjvXtzn0xkOd69O88xXkdVjef9R9z/jjAPCnz5b56xuzhYgmRbXERoTUx6l6HrOmo U8xex6HAZYrVIlS4Jewt4WjKwmwysbEW9+U6/k+Oyqw18nXyH3PYw0ujxYQF3cw+oey0 DoExWSN94iwHg9klfZr3pLPoyBxihmVCtrCa3Nxse1iTxnepssHL0VNwnTlz17zWlNln BmqA== X-Gm-Message-State: AOAM5334uIxvF8ryfkfvsyiyyqigtjrG7SsCwFy58eUY3Y/KoTWbka23 lempcfsB0AQTjoVQRoJbJiIHgLBivGAl5J1GrcRhQyeXRxFLzg== X-Received: by 2002:a05:6602:164b:: with SMTP id y11mr3299604iow.36.1604315995103; Mon, 02 Nov 2020 03:19:55 -0800 (PST) MIME-Version: 1.0 References: <20200921102731.747736-1-peron.clem@gmail.com> <20200921135925.q7mde2cnt5jtzkb5@gilmour.lan> <59286578.E0qSRroNqr@kista> <20200928084308.eipnvlfqe3c5lfmg@gilmour.lan> <20200930101915.sultshdvxgu5u2rs@gilmour.lan> <20201102102117.hp6v5nnkhzp3bful@gilmour.lan> In-Reply-To: <20201102102117.hp6v5nnkhzp3bful@gilmour.lan> From: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= Date: Mon, 2 Nov 2020 12:19:44 +0100 Message-ID: Subject: Re: [PATCH v4 09/22] arm64: dts: allwinner: h6: Add HDMI audio node To: Maxime Ripard Cc: Mark Brown , =?UTF-8?Q?Jernej_=C5=A0krabec?= , Chen-Yu Tsai , Rob Herring , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Marcus Cooper , Linux-ALSA , devicetree , linux-arm-kernel , linux-kernel , linux-sunxi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime, On Mon, 2 Nov 2020 at 11:21, Maxime Ripard wrote: > > On Sun, Nov 01, 2020 at 04:27:05PM +0100, Cl=C3=A9ment P=C3=A9ron wrote: > > On Wed, 30 Sep 2020 at 12:19, Maxime Ripard wrote: > > > > > > On Mon, Sep 28, 2020 at 04:27:42PM +0200, Cl=C3=A9ment P=C3=A9ron wro= te: > > > > On Mon, 28 Sep 2020 at 10:43, Maxime Ripard wro= te: > > > > > > > > > > On Mon, Sep 21, 2020 at 08:37:09PM +0200, Jernej =C5=A0krabec wro= te: > > > > > > Dne ponedeljek, 21. september 2020 ob 19:23:49 CEST je Cl=C3=A9= ment P=C3=A9ron > > > > > > napisal(a): > > > > > > > Hi Maxime, > > > > > > > > > > > > > > On Mon, 21 Sep 2020 at 15:59, Maxime Ripard wrote: > > > > > > > > > > > > > > > > On Mon, Sep 21, 2020 at 12:27:18PM +0200, Cl=C3=A9ment P=C3= =A9ron wrote: > > > > > > > > > From: Jernej Skrabec > > > > > > > > > > > > > > > > > > Add a simple-soundcard to link audio between HDMI and I2S= . > > > > > > > > > > > > > > > > > > Signed-off-by: Jernej Skrabec > > > > > > > > > Signed-off-by: Marcus Cooper > > > > > > > > > Signed-off-by: Cl=C3=A9ment P=C3=A9ron > > > > > > > > > --- > > > > > > > > > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 33 ++++++= ++++++++++++++ > > > > > > > > > 1 file changed, 33 insertions(+) > > > > > > > > > > > > > > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi= b/arch/arm64/ > > > > > > boot/dts/allwinner/sun50i-h6.dtsi > > > > > > > > > index 28c77d6872f6..a8853ee7885a 100644 > > > > > > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > > > > > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi > > > > > > > > > @@ -67,6 +67,25 @@ de: display-engine { > > > > > > > > > status =3D "disabled"; > > > > > > > > > }; > > > > > > > > > > > > > > > > > > + hdmi_sound: hdmi-sound { > > > > > > > > > + compatible =3D "simple-audio-card"; > > > > > > > > > + simple-audio-card,format =3D "i2s"; > > > > > > > > > + simple-audio-card,name =3D "sun50i-h6-hdmi"= ; > > > > > > > > > + simple-audio-card,mclk-fs =3D <128>; > > > > > > > > > + simple-audio-card,frame-inversion; > > > > > > > > > + status =3D "disabled"; > > > > > > > > > + > > > > > > > > > + simple-audio-card,codec { > > > > > > > > > + sound-dai =3D <&hdmi>; > > > > > > > > > + }; > > > > > > > > > + > > > > > > > > > + simple-audio-card,cpu { > > > > > > > > > + sound-dai =3D <&i2s1>; > > > > > > > > > + dai-tdm-slot-num =3D <2>; > > > > > > > > > + dai-tdm-slot-width =3D <32>; > > > > > > > > > > > > > > > > It looks weird to have both some TDM setup here, and yet th= e format in > > > > > > > > i2s? > > > > > > I was looking at sound documentation regarding how I can properly > > write the multi-lane I2S support. > > And I think we made a wrong interpretation here. > > > > TDM slot-num and slot-width are not referencing the format called PCM > > or DSP_A / DSP_B. > > But really the physical time division representation of a format. > > > > For example Amlogic do the following representation for Multi-lane I2S: > > > > dai-link-7 { > > sound-dai =3D <&tdmif_b>; > > dai-format =3D "i2s"; > > dai-tdm-slot-tx-mask-0 =3D <1 1>; > > dai-tdm-slot-tx-mask-1 =3D <1 1>; > > dai-tdm-slot-tx-mask-2 =3D <1 1>; > > dai-tdm-slot-tx-mask-3 =3D <1 1>; > > mclk-fs =3D <256>; > > > > codec { > > sound-dai =3D <&tohdmitx TOHDMITX_I2S_IN_B>; > > }; > > }; > > > > So i think for 2 channels HDMI using the simple sound card with TDM > > property is not a hack but the correct way to represent it. > > > > Do you agree ? > > > > If so, can I resend the simple sound card for HDMI audio ? > > I mean, it's not less weird :) > > And like I said before we still have the option to write a card driver > ourselves that doesn't take anything from the DT beside the phandle of > the i2s controller and the HDMI controller. > > If it's a fixed configuration, I'm not sure why we bother trying to make > it dynamic in the DT. Ok I see what you mean here, as the link is hardcoded in the SoC it's a better representation to hardcode it in the sound card driver than having it dynamically represented in each board device-tree. Sounds correct for me, Thanks :) > > Maxime