Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4974304pxb; Tue, 5 Oct 2021 14:36:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLDy67EwM5rCVgzMwgI6W1pBokm+QSGina41E1iBfAK+m0fw3dsm633Rum1asUmdoB+73P X-Received: by 2002:a05:6a00:234f:b0:3eb:3ffd:6da2 with SMTP id j15-20020a056a00234f00b003eb3ffd6da2mr32424565pfj.15.1633469766642; Tue, 05 Oct 2021 14:36:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633469766; cv=none; d=google.com; s=arc-20160816; b=NT+i3Yl6dL6poAg92/0/ZPx4hRIWJJkkIjU3LFZrBmBlhqpUNjsdDy9UT068RBywdG HQEMSAyFGLmb3oNO+L9wkcSFeaWXsI5YZAmL2hacwsPQ3F9lCdcuaqbiMleslEz2IwoW 4kPKzD9Yz/GHDbmYBczuCbTbVD2tp2GOlMI67nKEHlYTqADM/+FBrTdflDvdTwSt/kNu XaT/9CPwxcXAcvf8vo+Wlq2HSeqNUVWK0946BSIyiikkY2/fX2rx0Mxsnd3mfw5fVEhF /TDlBTR2VSZvZAD+L5lHugpeoNvnmiOpDq6hStFBd5hsstMhOtbYQYovALoB68Nmduvc uUJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dyVXlnP2EO7sin30ak6UOPtTEL7Y82rXmT1HaZJEwO8=; b=FDE0CmVKSiV4iv9pzHXuDcmCDxeQAHU+bzanA6BCUoCNM5q9uiQMIO3tNPq0BD38aT W8/uFHnr1GvUXdyTEhmlfD1vynqtzbi5o8b83Laj0ZKDLW9oysPlxYr0X1EV1kkSt5W7 DxW+dga5Ldl6XYMNU4W7sYH9274TnTgZKyQSKcPiWWtb5tefekROCmSQZzrjn8t+MBOO T76BwMXayK4hvXadJLGZgmiTz1bDK5h7BjUEG6o44hoWYYlT6ZUDbH8EYBu+83xh3Dak eVFehD3O2BzFTkEzQEIC7dsC3y0v5n34UQdYENVKJo1AtoKFfeOczpETTnVouaHxtwgS YwoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@googlemail.com header.s=20210112 header.b="EFN/Evkc"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si3278626pjp.61.2021.10.05.14.35.34; Tue, 05 Oct 2021 14:36:06 -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=@googlemail.com header.s=20210112 header.b="EFN/Evkc"; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236085AbhJEVdg (ORCPT + 99 others); Tue, 5 Oct 2021 17:33:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235845AbhJEVdf (ORCPT ); Tue, 5 Oct 2021 17:33:35 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50B23C061749 for ; Tue, 5 Oct 2021 14:31:44 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id dj4so1911557edb.5 for ; Tue, 05 Oct 2021 14:31:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dyVXlnP2EO7sin30ak6UOPtTEL7Y82rXmT1HaZJEwO8=; b=EFN/EvkcYsa4w188RyqHCgrfIifhUY80k3vng6CANfrvzyfsDaVjfDtTPGoR518LhV GD5oDuzos+B9/T9xu3L51B88VpK7ug1wdWoYUKxCIx5iYryNBRqmOK3f1s0NVN3zNmSx ik2H8dDm4T9B6uiATyk6B/1DooH4Mqlz0oMcA15tRRXuCYjA43xQqokHbVsoWkx5638U JjpXaSt8duZuGSYl3aAv73jpt0xE3eIMEnCrfjLShz4nsq98JtPv0HCuTUjPusvYOHhS wqyE1xXpysKBlZ38l2YPGNjL6L1GamN+Nt8+bjyG/KZ7AgLrfLwbW2aQdn2pBfCWRgpX cngg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dyVXlnP2EO7sin30ak6UOPtTEL7Y82rXmT1HaZJEwO8=; b=ziv+XmmZZIHx7cSF3Res1UfBBTn5XYMYF3JKWEm7Iu25/3Qq+nR0gP2kcGXjxzV5zg Ij02WQHK1EpC4HW8+41NuqsIEGJh1bnliWqSLJ+s6qyLVwYdgzlZGzhnM8gbHEDcejvM QMbG3Ti9CoNHJHgORZexI8EyYFWAJs7HIqzqsCAl5S+pAY+uN8CSpsIL5vMbl7arJpV6 Erhkv2abaa3niJQjN824RxUWY1OKNFrzZ6rvaJg+7+9Mm7y0LPE8Gpe23Fn4qDhW5wgE B5XNJ64M+EtjafTQTuu4bIVwWuRlv7xNHIOmixCtnNhAO+XaYeLcW6OAswf507GOWTHS ta4Q== X-Gm-Message-State: AOAM5303oBhh0p5ZsAkTopxupWWHYPFB1E47xPDsq3keciR88h/76gfc EarqAaRn2dIplTiHi8Ks0D2OSLcpzGiyJZX+wdc= X-Received: by 2002:a17:906:318f:: with SMTP id 15mr27839463ejy.206.1633469502753; Tue, 05 Oct 2021 14:31:42 -0700 (PDT) MIME-Version: 1.0 References: <20211002234313.3209294-1-martin.blumenstingl@googlemail.com> <1j35pivzho.fsf@starbuckisacylon.baylibre.com> <1jy279uprd.fsf@starbuckisacylon.baylibre.com> In-Reply-To: From: Martin Blumenstingl Date: Tue, 5 Oct 2021 23:31:31 +0200 Message-ID: Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues To: Jerome Brunet Cc: alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: multipart/mixed; boundary="00000000000076acda05cda1c165" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --00000000000076acda05cda1c165 Content-Type: text/plain; charset="UTF-8" Hi Jerome, On Mon, Oct 4, 2021 at 11:17 PM Martin Blumenstingl wrote: [...] > > This bit could also be a remain of an older design, not really connected > > to anything meaningful. It would not be the first time. > > > > The AIU looks like an IP that has evolved a lot over the years, not always > > in a coordinated fashion. Some scenario are well supported and easy, > > others seem to require a magic spell. > > > > Last (but not least), in AML vendor kernel, the only time this bit poked > > is around 8ch support (1 for 8ch, 0 otherwise) ... I have no idea why. > The 32-bit SoCs use SPDIF to feed 2-channel audio to the HDMI TX > controller and I2S to feed 8-channel audio to the HDMI TX controller. > It seems that Amlogic stopped this for (at least some) 64-bit SoCs. > > My testing results indicate that AIU_CLK_CTRL_MORE[6] is still relevant. > I can do another round of testing with various combinations of > AIU_CLK_CTRL_MORE[6] and AIU_HDMI_CLK_DATA_CTRL register values. > If you want me to test any specific combinations then please let me know. I have tested various combinations, see the attached result file (which can be viewed with "column -t /path/to/results.txt"). The short summary is that... ...I2S output requires: AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2 AIU_HDMI_CLK_DATA_CTRL[5:4] = 0x2 AIU_CLK_CTRL_MORE[6] = 0x1 ...SPDIF output requires: AIU_HDMI_CLK_DATA_CTRL[1:0] = 0x2 AIU_HDMI_CLK_DATA_CTRL[5:4] = (any) AIU_CLK_CTRL_MORE[6] = 0x1 My test consisted of running speaker-test -c2 and playing an mp3 with ffplay on an Odroid-C1. In other words: this confirms what we have suspected before. What is your suggestion on how to model these muxes in the driver? In the meantime I finally understood what #sound-dai-cells = <1>; does thanks to your previous hints. With that I can wire up the I2S and SPDIF inputs to the HDMI TX controller's "HDMI codec". Many thanks again for this hint! Best regards, Martin --00000000000076acda05cda1c165 Content-Type: text/plain; charset="US-ASCII"; name="results.txt" Content-Disposition: attachment; filename="results.txt" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kuekxzbb0 QUlVX0hETUlfQ0xLX0RBVEFfQ1RSTFsxOjBdIEFJVV9IRE1JX0NMS19EQVRBX0NUUkxbNTo0XSBB SVVfQ0xLX0NUUkxfTU9SRVs2XSBJMlMgU1BESUYKKENUUkxfQ0xLX1NFTCkgKENUUkxfREFUQV9T RUwpIChBTUNMSykgKEkyUykgKFNQRElGKQoweDAgMHgwIDB4MCBzaWxlbmNlIHNpbGVuY2UKMHgw IDB4MCAweDEgc2lsZW5jZSBzaWxlbmNlCjB4MiAweDAgMHgwIHNpbGVuY2UgcGxheWJhY2sKMHgy IDB4MCAweDEgc2lsZW5jZSBzaWxlbmNlCjB4MiAweDIgMHgxIHBsYXliYWNrIHNpbGVuY2UKMHgy IDB4MiAweDAgc2lsZW5jZSBwbGF5YmFjawo= --00000000000076acda05cda1c165--