From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE6CEC433EF for ; Tue, 5 Oct 2021 21:31:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A77DE6101B for ; Tue, 5 Oct 2021 21:31:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236662AbhJEVdg (ORCPT ); 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-Google-Smtp-Source: ABdhPJwKILTM9G/OOo7WWONLMHq2ef2R6ySw+NYb6dhPKjGQkfzxEG/W1fih0HC2WwHMp8T9yaPB74McG7c/6kHtQQ0= 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-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66346C433F5 for ; Tue, 5 Oct 2021 21:31:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 235D1611C0 for ; Tue, 5 Oct 2021 21:31:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 235D1611C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=K6XGzAioA+rqj83hBSPNnfG9BLKrkqDOw18+bxV/xxA=; b=ZRUTvz6BI4jh1UfUvOhlbpwc8a Qkt5bI05JfExKn/3W5xuBvNHNYsuCMJiMLY82VDNd9IC4DGPMAPy6z6et+DICFaDKaGKjny/f1r76 tH67lQZLwPmxD0YbtO/dG3IPtOYS7RKiJI8o4UCdZ1I0VNyi2NqLPxI8gaUmJDqX7xeU/Lx9AFDHi DWsEFL15WgjDKuZ6Ek2RG46brCgSWGFkM5hAiL08ZPLX/1FWu8JJ+I1BvztAwZRXteQinMC4KgE3J XBDfMVMdtdayqX9zBcLS9lQpyJANamYe95vUh8QU+YyMGiRDYhKvbJBSS4uZy2/BwhfT0IJAGZS+U d+7ALqEw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXs2N-00Bx5K-I1; Tue, 05 Oct 2021 21:31:47 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXs2L-00Bx4J-Mh; Tue, 05 Oct 2021 21:31:47 +0000 Received: by mail-ed1-x52f.google.com with SMTP id z1so1857439edb.8; 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=lpq0MzG5fkRje+bDa/p8xgr2nEZPqxk3gTMSVJBTWmn6xppWMGQv1Q0/g3H7nKWKDy /DFBI8sj3LqsEzkxqfrbT3UZ9mzCn1boxjrBYldlmtjV2xMWcWtk+VaqF4L+dqqJUF51 cKCV3LKR064SKZwdr9NMHbDqoZ7Pqjt3oDgRjWZo3jAGHgHwYJRGIDRFWnQhgajsdN+q nIsY1MilRzAk3B6xTRtQ0kpTLUpAd1EIOVlhQsAUhXXY/63fM/gJjU2RD8jo5HVrcxG9 d+AutK3XPk+1GqLI1/GnsUrZXaGBdHtqXKXtTG/bws801qcNoAirMlu2RrWoZ6nWmxVm hCng== X-Gm-Message-State: AOAM531SO11NvWg7KQ9HgR0ptyQAkwy/IU1+zoX2cIzVOX2EOn9DSYbQ pGmLpPzbooDVEQBY7q5meA3Ud5Wo72QWYZXHg4pMvKj2CKc= X-Google-Smtp-Source: ABdhPJwKILTM9G/OOo7WWONLMHq2ef2R6ySw+NYb6dhPKjGQkfzxEG/W1fih0HC2WwHMp8T9yaPB74McG7c/6kHtQQ0= 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" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_143145_799392_8566753A X-CRM114-Status: GOOD ( 21.28 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.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 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic --00000000000076acda05cda1c165-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B47DC433F5 for ; Tue, 5 Oct 2021 21:32:50 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C17BB615E1 for ; Tue, 5 Oct 2021 21:32:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C17BB615E1 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A90D11657; Tue, 5 Oct 2021 23:31:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A90D11657 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1633469566; bh=DS5hpdNDg+9guBTzpyXJCVGLyFM1XQTHvFfTJP1Qsz4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=PJGDvBd2V32flBByo4Z+2LnJ/N/bKf68fqmnCJTz370Qn6r/a7UoQK8ESF9cE3d5y EdZjNWHPh3A3y9NjGZsXVDUPlz47Y/NQJOn9SyYFAMDjkkXmGwwNoxxe3FskLtu9jp +iuEw+qcLhilc4rhnwYHw01ZJexdf+lYBwWsXKwg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 25675F80259; Tue, 5 Oct 2021 23:31:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F32D9F8027D; Tue, 5 Oct 2021 23:31:53 +0200 (CEST) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 35563F8020D for ; Tue, 5 Oct 2021 23:31:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 35563F8020D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="EFN/Evkc" Received: by mail-ed1-x533.google.com with SMTP id p13so2114035edw.0 for ; Tue, 05 Oct 2021 14:31:43 -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=bOuAOCSaUOdAA7peBHFfs/B4C883UwJl8re4I9lxfYjkEgMJ8QNrGKjMcbWIKwcHKh +V5lhagDPdaLC9gQbX9Qvp3MKkkBhoi0O0c2MW+YgeY1ST7w2nR4eRjom5jRmZNnFZG1 7W6CRimX6mzAkQLPNM65Ci8Y8MV5492Puifygt9u/bk/7K0y8P73oe2IlRkE+Hehh+uu Vd9jjWviYyp+Teu1EiHuIGGwmC05hqbyToNv5qtETpPfC3lJ75CTSRVMmBbcytZvx5Pz qJPTb0/RdJMIQ1ykDQVE7yAdv/cin6AWVAoooauIEDZDzlqD51vckDSF4VVnLjx2fK9L JjtQ== X-Gm-Message-State: AOAM533r6tsXgOXaBHS8Jg+I3vebKn2nEKecrfAc07F/FLbgT8OW6Y+N M+WxaddS6jZORspiqsdF72rZ22iGSiX3G+QiSxo= X-Google-Smtp-Source: ABdhPJwKILTM9G/OOo7WWONLMHq2ef2R6ySw+NYb6dhPKjGQkfzxEG/W1fih0HC2WwHMp8T9yaPB74McG7c/6kHtQQ0= 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 Content-Type: multipart/mixed; boundary="00000000000076acda05cda1c165" Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" --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-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5D18C433F5 for ; Tue, 5 Oct 2021 21:33:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 86A7B615A3 for ; Tue, 5 Oct 2021 21:33:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 86A7B615A3 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=AqP32YsVrqtfSoZvzv93BXwVPeXCXjPR8y5YXbD4+wM=; b=bPswc7M6G+OBvupY28VR0pVxKW mCmnOBqGpQ0GD3YOndVbeB4fKuc7ZQJnBeEu43m9SabRGL99DOCFsEvM0n9Ovl8QBj25kzwglswrx rEEoz4aH8obMuth6KrYa69O0FooLiS+Drhjccfe1wdx70D5Ezwe1wWb8N4TF1ff761xPl/tJoChl7 AvOeXNENyDwuwfDqXK9aU1Z4GwK38I/sXTQQxIRzWDeoeDX6zLy8IAis1LAjqgLv9lpuWd8JyxU7L ywnvCVOnVPxNZhMmZbaCssA5OPiVynISEeELoxUeBz0mV1KB64b7AfP2n0ogWKkBt2Mp+BxmQ6ztr JIjdit7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXs2Q-00Bx5X-8L; Tue, 05 Oct 2021 21:31:50 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXs2L-00Bx4J-Mh; Tue, 05 Oct 2021 21:31:47 +0000 Received: by mail-ed1-x52f.google.com with SMTP id z1so1857439edb.8; 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=lpq0MzG5fkRje+bDa/p8xgr2nEZPqxk3gTMSVJBTWmn6xppWMGQv1Q0/g3H7nKWKDy /DFBI8sj3LqsEzkxqfrbT3UZ9mzCn1boxjrBYldlmtjV2xMWcWtk+VaqF4L+dqqJUF51 cKCV3LKR064SKZwdr9NMHbDqoZ7Pqjt3oDgRjWZo3jAGHgHwYJRGIDRFWnQhgajsdN+q nIsY1MilRzAk3B6xTRtQ0kpTLUpAd1EIOVlhQsAUhXXY/63fM/gJjU2RD8jo5HVrcxG9 d+AutK3XPk+1GqLI1/GnsUrZXaGBdHtqXKXtTG/bws801qcNoAirMlu2RrWoZ6nWmxVm hCng== X-Gm-Message-State: AOAM531SO11NvWg7KQ9HgR0ptyQAkwy/IU1+zoX2cIzVOX2EOn9DSYbQ pGmLpPzbooDVEQBY7q5meA3Ud5Wo72QWYZXHg4pMvKj2CKc= X-Google-Smtp-Source: ABdhPJwKILTM9G/OOo7WWONLMHq2ef2R6ySw+NYb6dhPKjGQkfzxEG/W1fih0HC2WwHMp8T9yaPB74McG7c/6kHtQQ0= 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" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211005_143145_799392_8566753A X-CRM114-Status: GOOD ( 21.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --00000000000076acda05cda1c165--