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 5DFEEC433EF for ; Sun, 3 Oct 2021 23:12:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D3F1611C7 for ; Sun, 3 Oct 2021 23:12:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231964AbhJCXNu (ORCPT ); Sun, 3 Oct 2021 19:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231947AbhJCXNs (ORCPT ); Sun, 3 Oct 2021 19:13:48 -0400 Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99E8CC0613EC for ; Sun, 3 Oct 2021 16:12:00 -0700 (PDT) Received: by mail-vs1-xe2e.google.com with SMTP id y28so3711843vsd.3 for ; Sun, 03 Oct 2021 16:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mMQIV6iy/YcB5GjonDB7HSdfPpKfOSD7BW3xn+YP/DU=; b=QkXTiIR3+QNbtk78cJbJtsNqnJQf1vPk3ReN5Z/IsCuN+ld/6Y8+SyjR/sSNObHrvy LuwIIfiTgyLmDaVPkhz88u8/lmQxA27XGwZcsb0S0nOHIx8h1yFrgLaurz5EJtxUxH+Z kDtuPH/tB7mrtMZB0/2saB1PT3ODQNBwlUAyfdI6Rbi5qDdWhK59KNV8ElrjleNny4aL JYefwlQ2doHpniLrfKl03S/vFCtOPJfxz/pUOw/bPcXaXIIxh4wGelE/u0M90x8qXTYU YGnandWgE7gO/FTbroftj6bhHtNiQiqlPCWQY7DaczTEDmgAeWhzWNkQdQNjclseSgA3 Cv1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mMQIV6iy/YcB5GjonDB7HSdfPpKfOSD7BW3xn+YP/DU=; b=qscXBWfzb+ZgiXJHMZk7JVrr538pHqzgHk4uaogUf08VCjA8vxugUXRVd/vtsugTu1 r6LXcgVFNU5YL8om3/l56WAexR6CP48q5MMI4fszJNuX88uq2i8I4yJUXNTJ8Q6NWZzR F5uQow7dPOisoceYrjob/V8mC8WViR4qv2Poae+FouAJ3sHGl5TDDo1388S4vd4YbRR/ 8oHRS5IR9rMkcUi+Y2Mc3Qqej8Pn0W6HKVlxxgeTKFwGpj6QaiVK5HdnF4O3QM574Xps U9JMH8vjuJ82Md3uVm1TH1npf6lj2whtLBcqeSekq2KI2GGZgoBaq6S+js21YSAy6fX4 Q/jA== X-Gm-Message-State: AOAM531oPMt5YIL2erueW7WxSlis9tMHRw5CelBLM7zK+6uh4FFkh5Lr Lf/C+kPnHZaeDbjHpH0D7fU= X-Google-Smtp-Source: ABdhPJxZFZJ00cfx/JjWexY4Yi9Z65BWyW0WPxPc+6iP9/jByvYrihDArkBL5WNBLxsnACqlUzbi6g== X-Received: by 2002:a67:d00d:: with SMTP id r13mr10866961vsi.23.1633302719105; Sun, 03 Oct 2021 16:11:59 -0700 (PDT) Received: from geday ([2804:7f2:8280:9a0f:98f0:31ff:fe93:2dc7]) by smtp.gmail.com with ESMTPSA id t5sm6100912vsk.24.2021.10.03.16.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 16:11:58 -0700 (PDT) Date: Sun, 3 Oct 2021 20:11:54 -0300 From: Geraldo Nascimento To: Jerome Brunet Cc: Martin Blumenstingl , alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, tiwai@suse.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues Message-ID: References: <20211002234313.3209294-1-martin.blumenstingl@googlemail.com> <1j35pivzho.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1j35pivzho.fsf@starbuckisacylon.baylibre.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 03, 2021 at 05:57:34PM +0200, Jerome Brunet wrote: > > On Sun 03 Oct 2021 at 01:43, Martin Blumenstingl wrote: > > > Hello Jerome et al., > > > > on Amlogic Meson SoCs which use the AIU audio controller we have the > > so-called "machine gun noise" (MGN) issue, reproducible for example in > > Kodi. So far nobody was able to identify the cause of this issue. My > > idea was to at least narrow down the issue so we can categorize it. For > > that I wanted to get the SPDIF output from AIU to the HDMI controller > > working. > > Ok, I'll clarify (again) about this issue. > > This issue is on AIU only (not the AXG series), on the i2s encoder > regardless of the output (HDMI, internal and external codec) > > This encoder support either 2ch or 8ch mode, nothing else. > As long as only 2ch was supported, there was no problem. > In order to switch between 2ch and 8ch mode. AIU_RST_SOFT_I2S_FAST and > AIU_I2S_SYNC shall be "poked" (check iu-fifo-i2s.c and > aiu-encoder-i2c.c). Without this, the switch is not done. > > What these do, how and when it should be done is unclear. I tried > several combination. At the time I found something stable-ish but it was > not perfect. > > At the time, It was completely new driver. Even if was not rock solid, > it was still progress and I opted to upstream it with an imperfect 8ch > support so people could help debug it. This was mentioned in the > original submission. > > The other solution is to restrict to 2ch mode and remove > AIU_RST_SOFT_I2S_FAST and AIU_I2S_SYNC pokes. There will be no noise > anymore. > Hi, Jerome, Thanks for the extensive clarification. I have compiled 5.15-rc3 commenting out the pokes for 8ch as you have suggested, both for AIU_RST_SOFT_I2S_FAST and AIU_I2S_SYNC in both aiu-fifo-i2s.c and aiu-encoder-i2c.c. It works, the bug is gone just like you said it would be. My suggestion is that, for the time being, until someone can solve this properly, you restrict enablement of 8ch configuration under an EXPERIMENTAL kernel option, with a big fat warning in the help description, saying it will break 2ch. Last but no least, thanks for helping Martin out. Thank you, Geraldo Nascimento 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 C3310C433EF for ; Sun, 3 Oct 2021 23:12:11 +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 5204F611CE for ; Sun, 3 Oct 2021 23:12:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5204F611CE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d2CSLKK0i3qOznLQCuRoVkZ0FCMu1TR14cwSg8iwhD4=; b=LmwIBFDsYgIpzl WD/skmH43eGOu2Yfrj5aANGPjv6R7y1VgnzY0YZNMeRDjiB5l8Ri7vzOEMlAAM/r78ZFZxnh2vKGd qjPWobq9HrCmEeQFwxrO5dhhz9rZYuCAxg0A3n5PA4/sLvm012DRyXhnrhnunRd3rC7vW/R5G5h6R oVJhHwyBIE8rnJBmiSFQyoiXBuX5Z3rqPkOl7PFeAvxzAobYcnH4TC6rRSAZh7/eSM6Zub0qlVKvL SBL3whCq3E5gvFDZlPGFwZsWYaGaYWz/07PTLLufdVqa9rZR+grdfRK9bat4cHc/BYnwK0BgW0cOP XyuodRYO4KK5Zfl+NRKg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXAeJ-004gUg-Gg; Sun, 03 Oct 2021 23:12:03 +0000 Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXAeH-004gUI-Gw; Sun, 03 Oct 2021 23:12:02 +0000 Received: by mail-vs1-xe2a.google.com with SMTP id g10so31836vsb.8; Sun, 03 Oct 2021 16:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mMQIV6iy/YcB5GjonDB7HSdfPpKfOSD7BW3xn+YP/DU=; b=QkXTiIR3+QNbtk78cJbJtsNqnJQf1vPk3ReN5Z/IsCuN+ld/6Y8+SyjR/sSNObHrvy LuwIIfiTgyLmDaVPkhz88u8/lmQxA27XGwZcsb0S0nOHIx8h1yFrgLaurz5EJtxUxH+Z kDtuPH/tB7mrtMZB0/2saB1PT3ODQNBwlUAyfdI6Rbi5qDdWhK59KNV8ElrjleNny4aL JYefwlQ2doHpniLrfKl03S/vFCtOPJfxz/pUOw/bPcXaXIIxh4wGelE/u0M90x8qXTYU YGnandWgE7gO/FTbroftj6bhHtNiQiqlPCWQY7DaczTEDmgAeWhzWNkQdQNjclseSgA3 Cv1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mMQIV6iy/YcB5GjonDB7HSdfPpKfOSD7BW3xn+YP/DU=; b=LZVfv5bjzEFUiGQrjgAaELHGRRnznQfJXVtiFuf27Yskd/ElQ0fe0AgIJ3LJgvZ624 mzbomcQ0lzwvU47pqAYdQh3O2zv5rJpd4wHOktA4rUJsAPnSyT16XMD1F4zjm/QWHfmI KKsLYIvD+IfHPJ6RWSooFBo84uuNgYWyvppLAvw/f4YIJSJq6qUyd/1FWeZaCOd1maE1 0r+rD2Cn2c5HXrqDxuAZpYGEogoBsbRK24w44CkiD/bq8Nu/pfj9kDH9ctDnZOFWhWxz rkup630aI5iB0Vyvjnfq7d89x7H/jgS9H0vVPT+acskCX+g8f80GwpIXYtLtIK+MzJd3 O0Og== X-Gm-Message-State: AOAM531aRE5LXXNub5CtMU61iTZXr1Nmg1tblVJ8Z08BWNIqDGUA35wX 6UqehR2buuEekpa8ZGWSEoEtmfgq9YE5yg== X-Google-Smtp-Source: ABdhPJxZFZJ00cfx/JjWexY4Yi9Z65BWyW0WPxPc+6iP9/jByvYrihDArkBL5WNBLxsnACqlUzbi6g== X-Received: by 2002:a67:d00d:: with SMTP id r13mr10866961vsi.23.1633302719105; Sun, 03 Oct 2021 16:11:59 -0700 (PDT) Received: from geday ([2804:7f2:8280:9a0f:98f0:31ff:fe93:2dc7]) by smtp.gmail.com with ESMTPSA id t5sm6100912vsk.24.2021.10.03.16.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 16:11:58 -0700 (PDT) Date: Sun, 3 Oct 2021 20:11:54 -0300 From: Geraldo Nascimento To: Jerome Brunet Cc: Martin Blumenstingl , alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, tiwai@suse.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues Message-ID: References: <20211002234313.3209294-1-martin.blumenstingl@googlemail.com> <1j35pivzho.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1j35pivzho.fsf@starbuckisacylon.baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_161201_611404_4D865E31 X-CRM114-Status: GOOD ( 23.39 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On Sun, Oct 03, 2021 at 05:57:34PM +0200, Jerome Brunet wrote: > > On Sun 03 Oct 2021 at 01:43, Martin Blumenstingl wrote: > > > Hello Jerome et al., > > > > on Amlogic Meson SoCs which use the AIU audio controller we have the > > so-called "machine gun noise" (MGN) issue, reproducible for example in > > Kodi. So far nobody was able to identify the cause of this issue. My > > idea was to at least narrow down the issue so we can categorize it. For > > that I wanted to get the SPDIF output from AIU to the HDMI controller > > working. > > Ok, I'll clarify (again) about this issue. > > This issue is on AIU only (not the AXG series), on the i2s encoder > regardless of the output (HDMI, internal and external codec) > > This encoder support either 2ch or 8ch mode, nothing else. > As long as only 2ch was supported, there was no problem. > In order to switch between 2ch and 8ch mode. AIU_RST_SOFT_I2S_FAST and > AIU_I2S_SYNC shall be "poked" (check iu-fifo-i2s.c and > aiu-encoder-i2c.c). Without this, the switch is not done. > > What these do, how and when it should be done is unclear. I tried > several combination. At the time I found something stable-ish but it was > not perfect. > > At the time, It was completely new driver. Even if was not rock solid, > it was still progress and I opted to upstream it with an imperfect 8ch > support so people could help debug it. This was mentioned in the > original submission. > > The other solution is to restrict to 2ch mode and remove > AIU_RST_SOFT_I2S_FAST and AIU_I2S_SYNC pokes. There will be no noise > anymore. > Hi, Jerome, Thanks for the extensive clarification. I have compiled 5.15-rc3 commenting out the pokes for 8ch as you have suggested, both for AIU_RST_SOFT_I2S_FAST and AIU_I2S_SYNC in both aiu-fifo-i2s.c and aiu-encoder-i2c.c. It works, the bug is gone just like you said it would be. My suggestion is that, for the time being, until someone can solve this properly, you restrict enablement of 8ch configuration under an EXPERIMENTAL kernel option, with a big fat warning in the help description, saying it will break 2ch. Last but no least, thanks for helping Martin out. Thank you, Geraldo Nascimento _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic 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 A4B2EC433EF for ; Sun, 3 Oct 2021 23:13:05 +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 48EC061351 for ; Sun, 3 Oct 2021 23:13:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 48EC061351 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 864D0167A; Mon, 4 Oct 2021 01:12:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 864D0167A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1633302781; bh=r5gIKOLQunxxyYjlzMEAZHlr5RmpR5G5yh8n26QBLhk=; h=Date:From:To:Subject:References:In-Reply-To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=P7PBXKh5yRNeZE5u2ehZ3PBImEOH0iuP8HcY+4tbNhSNrgPeyQd/Ba9rWbJw54S0V am1YgP7kNZXSzzbjQPhH8y0u/6NHOshkHzmVxQGLMKQButB6DmgcTsVdzUOnUOb/w8 8uU160/W287/GuZB89YLkScPQzClYNLn6R5tRKtM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id DB42CF800ED; Mon, 4 Oct 2021 01:12:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5F2DFF8027D; Mon, 4 Oct 2021 01:12:09 +0200 (CEST) Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) (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 7A0B6F80171 for ; Mon, 4 Oct 2021 01:12:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7A0B6F80171 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QkXTiIR3" Received: by mail-vs1-xe29.google.com with SMTP id l19so17501689vst.7 for ; Sun, 03 Oct 2021 16:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mMQIV6iy/YcB5GjonDB7HSdfPpKfOSD7BW3xn+YP/DU=; b=QkXTiIR3+QNbtk78cJbJtsNqnJQf1vPk3ReN5Z/IsCuN+ld/6Y8+SyjR/sSNObHrvy LuwIIfiTgyLmDaVPkhz88u8/lmQxA27XGwZcsb0S0nOHIx8h1yFrgLaurz5EJtxUxH+Z kDtuPH/tB7mrtMZB0/2saB1PT3ODQNBwlUAyfdI6Rbi5qDdWhK59KNV8ElrjleNny4aL JYefwlQ2doHpniLrfKl03S/vFCtOPJfxz/pUOw/bPcXaXIIxh4wGelE/u0M90x8qXTYU YGnandWgE7gO/FTbroftj6bhHtNiQiqlPCWQY7DaczTEDmgAeWhzWNkQdQNjclseSgA3 Cv1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mMQIV6iy/YcB5GjonDB7HSdfPpKfOSD7BW3xn+YP/DU=; b=8L+YYV27PS1Ah9UQj8iRwJOFVAz+IpYDSBqPmMEAxV8mEOxRIm9DIwkEICPEIaD2Sm +prCRWR9xXwrRCf5nXB8KywID6ew0IMMky0KHUcJh1vnE7B9oahtNa6MPEAyGXfgyVO/ FOUwnM1VM20CqGW5anzeIngPiB2ufHKFT9Y8bkgWC2+mj8H9Lloz6dvYvnwEnLouPdz7 OB5vhgTMLAVcXk88uIgwjx+Z5Z2DrkXSF/B1CPAthczKF9wsG43Qr/DE0mxt9Rrq1EkW IcFd60VezMdSGRbTICOYYNHrX7k+O941/Rr2T1YGhaxKRGX2FvAMjDIBje7dTgYi5aKT q0Tg== X-Gm-Message-State: AOAM532iB+ClIF6MkoHi03mTjZxqUOnkEmJU49H+PjFH1u3JYzsCIfEl +9RC3hFgs9b2o7bWKvGSsuA= X-Google-Smtp-Source: ABdhPJxZFZJ00cfx/JjWexY4Yi9Z65BWyW0WPxPc+6iP9/jByvYrihDArkBL5WNBLxsnACqlUzbi6g== X-Received: by 2002:a67:d00d:: with SMTP id r13mr10866961vsi.23.1633302719105; Sun, 03 Oct 2021 16:11:59 -0700 (PDT) Received: from geday ([2804:7f2:8280:9a0f:98f0:31ff:fe93:2dc7]) by smtp.gmail.com with ESMTPSA id t5sm6100912vsk.24.2021.10.03.16.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 16:11:58 -0700 (PDT) Date: Sun, 3 Oct 2021 20:11:54 -0300 From: Geraldo Nascimento To: Jerome Brunet Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues Message-ID: References: <20211002234313.3209294-1-martin.blumenstingl@googlemail.com> <1j35pivzho.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1j35pivzho.fsf@starbuckisacylon.baylibre.com> Cc: alsa-devel@alsa-project.org, Martin Blumenstingl , 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" On Sun, Oct 03, 2021 at 05:57:34PM +0200, Jerome Brunet wrote: > > On Sun 03 Oct 2021 at 01:43, Martin Blumenstingl wrote: > > > Hello Jerome et al., > > > > on Amlogic Meson SoCs which use the AIU audio controller we have the > > so-called "machine gun noise" (MGN) issue, reproducible for example in > > Kodi. So far nobody was able to identify the cause of this issue. My > > idea was to at least narrow down the issue so we can categorize it. For > > that I wanted to get the SPDIF output from AIU to the HDMI controller > > working. > > Ok, I'll clarify (again) about this issue. > > This issue is on AIU only (not the AXG series), on the i2s encoder > regardless of the output (HDMI, internal and external codec) > > This encoder support either 2ch or 8ch mode, nothing else. > As long as only 2ch was supported, there was no problem. > In order to switch between 2ch and 8ch mode. AIU_RST_SOFT_I2S_FAST and > AIU_I2S_SYNC shall be "poked" (check iu-fifo-i2s.c and > aiu-encoder-i2c.c). Without this, the switch is not done. > > What these do, how and when it should be done is unclear. I tried > several combination. At the time I found something stable-ish but it was > not perfect. > > At the time, It was completely new driver. Even if was not rock solid, > it was still progress and I opted to upstream it with an imperfect 8ch > support so people could help debug it. This was mentioned in the > original submission. > > The other solution is to restrict to 2ch mode and remove > AIU_RST_SOFT_I2S_FAST and AIU_I2S_SYNC pokes. There will be no noise > anymore. > Hi, Jerome, Thanks for the extensive clarification. I have compiled 5.15-rc3 commenting out the pokes for 8ch as you have suggested, both for AIU_RST_SOFT_I2S_FAST and AIU_I2S_SYNC in both aiu-fifo-i2s.c and aiu-encoder-i2c.c. It works, the bug is gone just like you said it would be. My suggestion is that, for the time being, until someone can solve this properly, you restrict enablement of 8ch configuration under an EXPERIMENTAL kernel option, with a big fat warning in the help description, saying it will break 2ch. Last but no least, thanks for helping Martin out. Thank you, Geraldo Nascimento 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 D863FC433F5 for ; Sun, 3 Oct 2021 23:14:25 +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 9529C6113A for ; Sun, 3 Oct 2021 23:14:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9529C6113A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LwsE5dnDogXjGvkzH0H7rZU0ACPRoBY7pGlCiFpwBmY=; b=Lg3cjsmgHdxCuV sr5Z8+YvH1yB5K1uz/2allXRsXYNqtA0JTNafvF2QGMgZIs313f+sBptKiK85HC52U3nhuIjrB4HD 5Udt3x9o4DQd2fi/xxrgG9CsPd3DNvQk9O0FqoOaOwwIpBi2aockoYFpktVJ/RQp33yXC7NnzAj3a vNDipxPsgMlJKwfXi3WFlbmo0EaFQsT9MVr1lj8XGogV15ufu9xMYjXXA8n0Dyt2guQvDif1JjrCG r5PqpGf/sdNIBzsytpVtWUUTNu8R5PkY43JCUs04Xu32YL5dM888BbbdN06SkoU2bgrP0ZF+mE2H+ rUR7GHMGxtY5yjV8Xx4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXAeM-004gUp-3I; Sun, 03 Oct 2021 23:12:06 +0000 Received: from mail-vs1-xe2a.google.com ([2607:f8b0:4864:20::e2a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mXAeH-004gUI-Gw; Sun, 03 Oct 2021 23:12:02 +0000 Received: by mail-vs1-xe2a.google.com with SMTP id g10so31836vsb.8; Sun, 03 Oct 2021 16:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mMQIV6iy/YcB5GjonDB7HSdfPpKfOSD7BW3xn+YP/DU=; b=QkXTiIR3+QNbtk78cJbJtsNqnJQf1vPk3ReN5Z/IsCuN+ld/6Y8+SyjR/sSNObHrvy LuwIIfiTgyLmDaVPkhz88u8/lmQxA27XGwZcsb0S0nOHIx8h1yFrgLaurz5EJtxUxH+Z kDtuPH/tB7mrtMZB0/2saB1PT3ODQNBwlUAyfdI6Rbi5qDdWhK59KNV8ElrjleNny4aL JYefwlQ2doHpniLrfKl03S/vFCtOPJfxz/pUOw/bPcXaXIIxh4wGelE/u0M90x8qXTYU YGnandWgE7gO/FTbroftj6bhHtNiQiqlPCWQY7DaczTEDmgAeWhzWNkQdQNjclseSgA3 Cv1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mMQIV6iy/YcB5GjonDB7HSdfPpKfOSD7BW3xn+YP/DU=; b=LZVfv5bjzEFUiGQrjgAaELHGRRnznQfJXVtiFuf27Yskd/ElQ0fe0AgIJ3LJgvZ624 mzbomcQ0lzwvU47pqAYdQh3O2zv5rJpd4wHOktA4rUJsAPnSyT16XMD1F4zjm/QWHfmI KKsLYIvD+IfHPJ6RWSooFBo84uuNgYWyvppLAvw/f4YIJSJq6qUyd/1FWeZaCOd1maE1 0r+rD2Cn2c5HXrqDxuAZpYGEogoBsbRK24w44CkiD/bq8Nu/pfj9kDH9ctDnZOFWhWxz rkup630aI5iB0Vyvjnfq7d89x7H/jgS9H0vVPT+acskCX+g8f80GwpIXYtLtIK+MzJd3 O0Og== X-Gm-Message-State: AOAM531aRE5LXXNub5CtMU61iTZXr1Nmg1tblVJ8Z08BWNIqDGUA35wX 6UqehR2buuEekpa8ZGWSEoEtmfgq9YE5yg== X-Google-Smtp-Source: ABdhPJxZFZJ00cfx/JjWexY4Yi9Z65BWyW0WPxPc+6iP9/jByvYrihDArkBL5WNBLxsnACqlUzbi6g== X-Received: by 2002:a67:d00d:: with SMTP id r13mr10866961vsi.23.1633302719105; Sun, 03 Oct 2021 16:11:59 -0700 (PDT) Received: from geday ([2804:7f2:8280:9a0f:98f0:31ff:fe93:2dc7]) by smtp.gmail.com with ESMTPSA id t5sm6100912vsk.24.2021.10.03.16.11.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Oct 2021 16:11:58 -0700 (PDT) Date: Sun, 3 Oct 2021 20:11:54 -0300 From: Geraldo Nascimento To: Jerome Brunet Cc: Martin Blumenstingl , alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, tiwai@suse.com, broonie@kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH v1 0/1] ASoC: meson: aiu: HDMI codec control questions and issues Message-ID: References: <20211002234313.3209294-1-martin.blumenstingl@googlemail.com> <1j35pivzho.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1j35pivzho.fsf@starbuckisacylon.baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211003_161201_611404_4D865E31 X-CRM114-Status: GOOD ( 23.39 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Oct 03, 2021 at 05:57:34PM +0200, Jerome Brunet wrote: > > On Sun 03 Oct 2021 at 01:43, Martin Blumenstingl wrote: > > > Hello Jerome et al., > > > > on Amlogic Meson SoCs which use the AIU audio controller we have the > > so-called "machine gun noise" (MGN) issue, reproducible for example in > > Kodi. So far nobody was able to identify the cause of this issue. My > > idea was to at least narrow down the issue so we can categorize it. For > > that I wanted to get the SPDIF output from AIU to the HDMI controller > > working. > > Ok, I'll clarify (again) about this issue. > > This issue is on AIU only (not the AXG series), on the i2s encoder > regardless of the output (HDMI, internal and external codec) > > This encoder support either 2ch or 8ch mode, nothing else. > As long as only 2ch was supported, there was no problem. > In order to switch between 2ch and 8ch mode. AIU_RST_SOFT_I2S_FAST and > AIU_I2S_SYNC shall be "poked" (check iu-fifo-i2s.c and > aiu-encoder-i2c.c). Without this, the switch is not done. > > What these do, how and when it should be done is unclear. I tried > several combination. At the time I found something stable-ish but it was > not perfect. > > At the time, It was completely new driver. Even if was not rock solid, > it was still progress and I opted to upstream it with an imperfect 8ch > support so people could help debug it. This was mentioned in the > original submission. > > The other solution is to restrict to 2ch mode and remove > AIU_RST_SOFT_I2S_FAST and AIU_I2S_SYNC pokes. There will be no noise > anymore. > Hi, Jerome, Thanks for the extensive clarification. I have compiled 5.15-rc3 commenting out the pokes for 8ch as you have suggested, both for AIU_RST_SOFT_I2S_FAST and AIU_I2S_SYNC in both aiu-fifo-i2s.c and aiu-encoder-i2c.c. It works, the bug is gone just like you said it would be. My suggestion is that, for the time being, until someone can solve this properly, you restrict enablement of 8ch configuration under an EXPERIMENTAL kernel option, with a big fat warning in the help description, saying it will break 2ch. Last but no least, thanks for helping Martin out. Thank you, Geraldo Nascimento _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel