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 X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07227C3A5A7 for ; Wed, 4 Sep 2019 09:27:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A5DD021670 for ; Wed, 4 Sep 2019 09:27:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Om8Lq5NK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729068AbfIDJ1z (ORCPT ); Wed, 4 Sep 2019 05:27:55 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:55174 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbfIDJ1z (ORCPT ); Wed, 4 Sep 2019 05:27:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XKThuSbZFfZ7pl95l1VPO0wQKRiG+nLbFF9OeGTjtYM=; b=Om8Lq5NKTbiEdTpux26a7qCk5 dZ5tJGlG6PK6Luh2tvZO7cMaOJLPmYev9eKKaC+piAWTYRoP3tQBsAX1v0z0Rmmf6HCqVQAkuV80k f9MovrDB/BdqRql6wDTRmwUw4C0xwquaK5wQ98nhINmsPydabgyv424kYP72LLxUYR/NFlWMA+5VY p9ygB+RVjjh9ozvrDrk/c83hko1T+Krs2RxUAUfeFFukYaxNLm/NHyAnrKbfhgsLJkyFZ4pfG+ZxA EzXEF67V3Av318bsLe0fW/7CVPA0qtAMOVbSUl4lU4N80WT/8hmoVpi0tao6OabLx64hmsNOLxnj7 cqhKedPvQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:39512) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1i5RZb-0003Yi-2F; Wed, 04 Sep 2019 10:27:31 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1i5RZP-0004Q3-GU; Wed, 04 Sep 2019 10:27:19 +0100 Date: Wed, 4 Sep 2019 10:27:19 +0100 From: Russell King - ARM Linux admin To: Cheng-yi Chiang Cc: Neil Armstrong , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , tzungbi@chromium.org, kuninori.morimoto.gx@renesas.com, Xing Zheng , cain.cai@rock-chips.com, David Airlie , sam@ravnborg.org, Jeffy Chen , linux-kernel , dri-devel@lists.freedesktop.org, Doug Anderson , Andrzej Hajda , =?utf-8?B?6JSh5p6r?= , Laurent Pinchart , Daniel Vetter , Yakir Yang , Enric Balletbo i Serra , linux-rockchip@lists.infradead.org, Dylan Reid , kuankuan.y@gmail.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] drm: bridge/dw_hdmi: add audio sample channel status setting Message-ID: <20190904092719.GJ13294@shell.armlinux.org.uk> References: <20190903055103.134764-1-cychiang@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 04, 2019 at 05:09:29PM +0800, Cheng-yi Chiang wrote: > Hi, > > On Tue, Sep 3, 2019 at 5:53 PM Neil Armstrong wrote: > > > > Hi, > > > > On 03/09/2019 07:51, Cheng-Yi Chiang wrote: > > > From: Yakir Yang > > > > > > When transmitting IEC60985 linear PCM audio, we configure the > > > Audio Sample Channel Status information of all the channel > > > status bits in the IEC60958 frame. > > > Refer to 60958-3 page 10 for frequency, original frequency, and > > > wordlength setting. > > > > > > This fix the issue that audio does not come out on some monitors > > > (e.g. LG 22CV241) > > > > > > Signed-off-by: Yakir Yang > > > Signed-off-by: Cheng-Yi Chiang > > > --- > > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 59 +++++++++++++++++++++++ > > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 20 ++++++++ > > > 2 files changed, 79 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > index bd65d0479683..34d46e25d610 100644 > > > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > @@ -582,6 +582,63 @@ static unsigned int hdmi_compute_n(unsigned int freq, unsigned long pixel_clk) > > > return n; > > > } > > > > > > +static void hdmi_set_schnl(struct dw_hdmi *hdmi) > > > +{ > > > + u8 aud_schnl_samplerate; > > > + u8 aud_schnl_8; > > > + > > > + /* These registers are on RK3288 using version 2.0a. */ > > > + if (hdmi->version != 0x200a) > > > + return; > > > > Are these limited to the 2.0a version *in* RK3288, or 2.0a version on all > > SoCs ? > > > > In the original patch by Yakir, > > https://lore.kernel.org/patchwork/patch/539653/ (sorry, I should > have added this link in the "after the cut" note) > > The fix is limited to version 2.0. > Since I am only testing on RK3288 with 2.0a, I change the check to 2.0a only. > I can not test 2.0a version on other SoCs. > The databook I have at hand is 2.0a (not specific to RK3288) so I > think all 2.0a should have this register. > > As for other version like version 1.3 on iMX6, there is no such > register, as stated by Russell > > http://lkml.iu.edu/hypermail/linux/kernel/1501.3/06268.html. It's likely more to do with how the IP is configured rather than the version. The big difference between dw-hdmi used in iMX6 and elsewhere is that iMX6 uses a built-in AHB audio interface and not I2S. Elsewhere uses I2S. I2S does not have the capability to convey channel status information (which is required by HDMI). With AHB, it is encoded into the data in memory. So, I think this setup should be done in the I2S driver and not in the core driver. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up 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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A46F1C3A5A7 for ; Wed, 4 Sep 2019 09:28:45 +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 289FA233A1 for ; Wed, 4 Sep 2019 09:28:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="HWAyumBG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Om8Lq5NK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 289FA233A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@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 194F0169A; Wed, 4 Sep 2019 11:27:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 194F0169A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1567589323; bh=pq8Jd1lIEUvSHhPuQtNWPz8JCB7TTDA009rwSLcjxV0=; h=Date:From:To:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HWAyumBGGIXklIkXc26TWjZpCZUmTTowJt/zPlNamSktLACpTi7meIP1bHc1CD4gL 5RmWXm3S7+zCf39VWZYm1bYZ5s4Wq9fzHj9U3uXckH227n48ZaIZj6tYwj9pcZmy4d 3z0pcgTDoYidRZYTPPzkVrM8MasCMDU2rPIkiPiM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 45C17F80171; Wed, 4 Sep 2019 11:27:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A3A8BF80171; Wed, 4 Sep 2019 11:27:50 +0200 (CEST) Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:3201:214:fdff:fe10:1be6]) (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 5F1E0F80171 for ; Wed, 4 Sep 2019 11:27:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5F1E0F80171 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Om8Lq5NK" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XKThuSbZFfZ7pl95l1VPO0wQKRiG+nLbFF9OeGTjtYM=; b=Om8Lq5NKTbiEdTpux26a7qCk5 dZ5tJGlG6PK6Luh2tvZO7cMaOJLPmYev9eKKaC+piAWTYRoP3tQBsAX1v0z0Rmmf6HCqVQAkuV80k f9MovrDB/BdqRql6wDTRmwUw4C0xwquaK5wQ98nhINmsPydabgyv424kYP72LLxUYR/NFlWMA+5VY p9ygB+RVjjh9ozvrDrk/c83hko1T+Krs2RxUAUfeFFukYaxNLm/NHyAnrKbfhgsLJkyFZ4pfG+ZxA EzXEF67V3Av318bsLe0fW/7CVPA0qtAMOVbSUl4lU4N80WT/8hmoVpi0tao6OabLx64hmsNOLxnj7 cqhKedPvQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:39512) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1i5RZb-0003Yi-2F; Wed, 04 Sep 2019 10:27:31 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1i5RZP-0004Q3-GU; Wed, 04 Sep 2019 10:27:19 +0100 Date: Wed, 4 Sep 2019 10:27:19 +0100 From: Russell King - ARM Linux admin To: Cheng-yi Chiang Message-ID: <20190904092719.GJ13294@shell.armlinux.org.uk> References: <20190903055103.134764-1-cychiang@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , kuninori.morimoto.gx@renesas.com, Neil Armstrong , David Airlie , dri-devel@lists.freedesktop.org, cain.cai@rock-chips.com, Andrzej Hajda , Laurent Pinchart , Yakir Yang , sam@ravnborg.org, Xing Zheng , linux-rockchip@lists.infradead.org, Dylan Reid , tzungbi@chromium.org, Jeffy Chen , =?utf-8?B?6JSh5p6r?= , linux-arm-kernel@lists.infradead.org, Doug Anderson , linux-kernel , Daniel Vetter , Enric Balletbo i Serra , kuankuan.y@gmail.com Subject: Re: [alsa-devel] [PATCH] drm: bridge/dw_hdmi: add audio sample channel status setting 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed, Sep 04, 2019 at 05:09:29PM +0800, Cheng-yi Chiang wrote: > Hi, > > On Tue, Sep 3, 2019 at 5:53 PM Neil Armstrong wrote: > > > > Hi, > > > > On 03/09/2019 07:51, Cheng-Yi Chiang wrote: > > > From: Yakir Yang > > > > > > When transmitting IEC60985 linear PCM audio, we configure the > > > Audio Sample Channel Status information of all the channel > > > status bits in the IEC60958 frame. > > > Refer to 60958-3 page 10 for frequency, original frequency, and > > > wordlength setting. > > > > > > This fix the issue that audio does not come out on some monitors > > > (e.g. LG 22CV241) > > > > > > Signed-off-by: Yakir Yang > > > Signed-off-by: Cheng-Yi Chiang > > > --- > > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 59 +++++++++++++++++++++++ > > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 20 ++++++++ > > > 2 files changed, 79 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > index bd65d0479683..34d46e25d610 100644 > > > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > @@ -582,6 +582,63 @@ static unsigned int hdmi_compute_n(unsigned int freq, unsigned long pixel_clk) > > > return n; > > > } > > > > > > +static void hdmi_set_schnl(struct dw_hdmi *hdmi) > > > +{ > > > + u8 aud_schnl_samplerate; > > > + u8 aud_schnl_8; > > > + > > > + /* These registers are on RK3288 using version 2.0a. */ > > > + if (hdmi->version != 0x200a) > > > + return; > > > > Are these limited to the 2.0a version *in* RK3288, or 2.0a version on all > > SoCs ? > > > > In the original patch by Yakir, > > https://lore.kernel.org/patchwork/patch/539653/ (sorry, I should > have added this link in the "after the cut" note) > > The fix is limited to version 2.0. > Since I am only testing on RK3288 with 2.0a, I change the check to 2.0a only. > I can not test 2.0a version on other SoCs. > The databook I have at hand is 2.0a (not specific to RK3288) so I > think all 2.0a should have this register. > > As for other version like version 1.3 on iMX6, there is no such > register, as stated by Russell > > http://lkml.iu.edu/hypermail/linux/kernel/1501.3/06268.html. It's likely more to do with how the IP is configured rather than the version. The big difference between dw-hdmi used in iMX6 and elsewhere is that iMX6 uses a built-in AHB audio interface and not I2S. Elsewhere uses I2S. I2S does not have the capability to convey channel status information (which is required by HDMI). With AHB, it is encoded into the data in memory. So, I think this setup should be done in the I2S driver and not in the core driver. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux admin Subject: Re: [PATCH] drm: bridge/dw_hdmi: add audio sample channel status setting Date: Wed, 4 Sep 2019 10:27:19 +0100 Message-ID: <20190904092719.GJ13294@shell.armlinux.org.uk> References: <20190903055103.134764-1-cychiang@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Cheng-yi Chiang Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , kuninori.morimoto.gx@renesas.com, Neil Armstrong , David Airlie , dri-devel@lists.freedesktop.org, cain.cai@rock-chips.com, Laurent Pinchart , Yakir Yang , sam@ravnborg.org, Xing Zheng , linux-rockchip@lists.infradead.org, Dylan Reid , tzungbi@chromium.org, Jeffy Chen , =?utf-8?B?6JSh5p6r?= , linux-arm-kernel@lists.infradead.org, Doug Anderson , linux-kernel , Enric Balletbo i Serra , kuankuan.y@gmail.com List-Id: linux-rockchip.vger.kernel.org T24gV2VkLCBTZXAgMDQsIDIwMTkgYXQgMDU6MDk6MjlQTSArMDgwMCwgQ2hlbmcteWkgQ2hpYW5n IHdyb3RlOgo+IEhpLAo+IAo+IE9uIFR1ZSwgU2VwIDMsIDIwMTkgYXQgNTo1MyBQTSBOZWlsIEFy bXN0cm9uZyA8bmFybXN0cm9uZ0BiYXlsaWJyZS5jb20+IHdyb3RlOgo+ID4KPiA+IEhpLAo+ID4K PiA+IE9uIDAzLzA5LzIwMTkgMDc6NTEsIENoZW5nLVlpIENoaWFuZyB3cm90ZToKPiA+ID4gRnJv bTogWWFraXIgWWFuZyA8eWtrQHJvY2stY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lbCBzdGF0dXMg aW5mb3JtYXRpb24KKHdoaWNoIGlzIHJlcXVpcmVkIGJ5IEhETUkpLiAgV2l0aCBBSEIsIGl0IGlz IGVuY29kZWQgaW50byB0aGUgZGF0YSBpbgptZW1vcnkuCgpTbywgSSB0aGluayB0aGlzIHNldHVw IHNob3VsZCBiZSBkb25lIGluIHRoZSBJMlMgZHJpdmVyIGFuZCBub3QgaW4gdGhlCmNvcmUgZHJp dmVyLgoKLS0gClJNSydzIFBhdGNoIHN5c3RlbTogaHR0cHM6Ly93d3cuYXJtbGludXgub3JnLnVr L2RldmVsb3Blci9wYXRjaGVzLwpGVFRDIGJyb2FkYmFuZCBmb3IgMC44bWlsZSBsaW5lIGluIHN1 YnVyYmlhOiBzeW5jIGF0IDEyLjFNYnBzIGRvd24gNjIya2JwcyB1cApBY2NvcmRpbmcgdG8gc3Bl ZWR0ZXN0Lm5ldDogMTEuOU1icHMgZG93biA1MDBrYnBzIHVwCl9fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fCmRyaS1kZXZlbCBtYWlsaW5nIGxpc3QKZHJpLWRl dmVsQGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpodHRwczovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9t YWlsbWFuL2xpc3RpbmZvL2RyaS1kZXZlbA== 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 X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37020C3A5A7 for ; Wed, 4 Sep 2019 09:28:37 +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 047A921670 for ; Wed, 4 Sep 2019 09:28:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SnS4eNH5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="Om8Lq5NK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 047A921670 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=biGMc/abyuQGGttDgLFblUET44WvMK6kurONFWXbDkI=; b=SnS4eNH50MWATQ 8niQ70Qs4B3KyS5yq834YpOjtsjp9NXo0wDAI/4LXwf9OMeXrwJ6Vv8WO+uEKnCV2tCj0od1pb1sQ HY3v81POjHZ3j8zHfRJ1nAxU0hnfwzWHkEGF3Yt4sIzf5hZ3DpLNyGp49faJHSFyAK6j6JondLtm9 fojOv+HgEABgLJTDRzoN71iTxm5ub0aRipiW115k1U7N/hQhg+kZGIxgbjE2jrIFalShqEwfpiLdO p5xSZV7Nrfo67yt0ccez3WOjPmNxbiRe3wF2VplZcWHpRWYm0tjsUP+M9RPzx2Jj+e5w7rx7KvyLK AzMBQrl/+Dogkc1tOJHQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i5RaY-0004X7-DT; Wed, 04 Sep 2019 09:28:30 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i5RaS-0004W0-Qs; Wed, 04 Sep 2019 09:28:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=XKThuSbZFfZ7pl95l1VPO0wQKRiG+nLbFF9OeGTjtYM=; b=Om8Lq5NKTbiEdTpux26a7qCk5 dZ5tJGlG6PK6Luh2tvZO7cMaOJLPmYev9eKKaC+piAWTYRoP3tQBsAX1v0z0Rmmf6HCqVQAkuV80k f9MovrDB/BdqRql6wDTRmwUw4C0xwquaK5wQ98nhINmsPydabgyv424kYP72LLxUYR/NFlWMA+5VY p9ygB+RVjjh9ozvrDrk/c83hko1T+Krs2RxUAUfeFFukYaxNLm/NHyAnrKbfhgsLJkyFZ4pfG+ZxA EzXEF67V3Av318bsLe0fW/7CVPA0qtAMOVbSUl4lU4N80WT/8hmoVpi0tao6OabLx64hmsNOLxnj7 cqhKedPvQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:39512) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1i5RZb-0003Yi-2F; Wed, 04 Sep 2019 10:27:31 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1i5RZP-0004Q3-GU; Wed, 04 Sep 2019 10:27:19 +0100 Date: Wed, 4 Sep 2019 10:27:19 +0100 From: Russell King - ARM Linux admin To: Cheng-yi Chiang Subject: Re: [PATCH] drm: bridge/dw_hdmi: add audio sample channel status setting Message-ID: <20190904092719.GJ13294@shell.armlinux.org.uk> References: <20190903055103.134764-1-cychiang@chromium.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190904_022824_869173_EE4D374A X-CRM114-Status: GOOD ( 24.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , kuninori.morimoto.gx@renesas.com, Neil Armstrong , David Airlie , dri-devel@lists.freedesktop.org, cain.cai@rock-chips.com, Andrzej Hajda , Laurent Pinchart , Yakir Yang , sam@ravnborg.org, Xing Zheng , linux-rockchip@lists.infradead.org, Dylan Reid , tzungbi@chromium.org, Jeffy Chen , =?utf-8?B?6JSh5p6r?= , linux-arm-kernel@lists.infradead.org, Doug Anderson , linux-kernel , Daniel Vetter , Enric Balletbo i Serra , kuankuan.y@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 04, 2019 at 05:09:29PM +0800, Cheng-yi Chiang wrote: > Hi, > > On Tue, Sep 3, 2019 at 5:53 PM Neil Armstrong wrote: > > > > Hi, > > > > On 03/09/2019 07:51, Cheng-Yi Chiang wrote: > > > From: Yakir Yang > > > > > > When transmitting IEC60985 linear PCM audio, we configure the > > > Audio Sample Channel Status information of all the channel > > > status bits in the IEC60958 frame. > > > Refer to 60958-3 page 10 for frequency, original frequency, and > > > wordlength setting. > > > > > > This fix the issue that audio does not come out on some monitors > > > (e.g. LG 22CV241) > > > > > > Signed-off-by: Yakir Yang > > > Signed-off-by: Cheng-Yi Chiang > > > --- > > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 59 +++++++++++++++++++++++ > > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 20 ++++++++ > > > 2 files changed, 79 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > index bd65d0479683..34d46e25d610 100644 > > > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > > > @@ -582,6 +582,63 @@ static unsigned int hdmi_compute_n(unsigned int freq, unsigned long pixel_clk) > > > return n; > > > } > > > > > > +static void hdmi_set_schnl(struct dw_hdmi *hdmi) > > > +{ > > > + u8 aud_schnl_samplerate; > > > + u8 aud_schnl_8; > > > + > > > + /* These registers are on RK3288 using version 2.0a. */ > > > + if (hdmi->version != 0x200a) > > > + return; > > > > Are these limited to the 2.0a version *in* RK3288, or 2.0a version on all > > SoCs ? > > > > In the original patch by Yakir, > > https://lore.kernel.org/patchwork/patch/539653/ (sorry, I should > have added this link in the "after the cut" note) > > The fix is limited to version 2.0. > Since I am only testing on RK3288 with 2.0a, I change the check to 2.0a only. > I can not test 2.0a version on other SoCs. > The databook I have at hand is 2.0a (not specific to RK3288) so I > think all 2.0a should have this register. > > As for other version like version 1.3 on iMX6, there is no such > register, as stated by Russell > > http://lkml.iu.edu/hypermail/linux/kernel/1501.3/06268.html. It's likely more to do with how the IP is configured rather than the version. The big difference between dw-hdmi used in iMX6 and elsewhere is that iMX6 uses a built-in AHB audio interface and not I2S. Elsewhere uses I2S. I2S does not have the capability to convey channel status information (which is required by HDMI). With AHB, it is encoded into the data in memory. So, I think this setup should be done in the I2S driver and not in the core driver. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel