Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp458692ybe; Wed, 4 Sep 2019 02:29:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4QsjUduFKmFpckLo3VfCUdowHIpYNMAH+gNX2u2tY48WkYcZFOjBpfe2a/DQRADoen9VP X-Received: by 2002:aa7:9313:: with SMTP id 19mr14089354pfj.27.1567589340391; Wed, 04 Sep 2019 02:29:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567589340; cv=none; d=google.com; s=arc-20160816; b=hXcvmWWU3cZX0Nc1/cIkdiTIGRFddVfREwOdcHi9ORJKFecY0+RKRGHAM2+IZpxDVc BS/ayngqRSDMSeE+4PVmRoJ/XsAFODB6p7dEVMxl+BZGJfwzukHVRdXlf7kuvRZnm6vE 90rEskADAi295I/YCl7tBU8SyU6oxeBrPygdl91vS+l3xnEUO3nNbvfHEoUFi/iMnn6E e70zlUazCb+hjE9Vyx33C/irVVhyWcUH4KFxZq30XM0O9W3SvErkHAG0Wejr3IKG0vT2 zT0kvbOcfoS4kVIramxqkAbEIvWT0BcIdXmGlsNBVkHuRC4TbLXle2VU1mcF97q2XS8g V5Hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XKThuSbZFfZ7pl95l1VPO0wQKRiG+nLbFF9OeGTjtYM=; b=icfwFWrcVuIB7fHR8sp1pnNmm9kvnbPNTzdp38ezEkR3pmrbqCpgfWRD6QOLji5stp exQkUnhIPIYZlLahu/K8GoHtjxU/9fPxpWNRgph+UYXIvery6Dd1wDWknwpoAHBVyjO6 6bjeQ4OjYFZ/3mkCD1WbGiPDwH95J6rh0BKzwqrOvxs457pGUKkhbugzkdzmBIEyFe33 uavYO5LeA0kDXTHgc5TlsvnQgDrt4VNqxxYOvTlL+bG+cbepBIcRNu5nKYJjjhN1Fq/U PWB3z/xDJSxx/CxN3/IAnBIMhE7a2KiqgvCPOM4Oh744Vg709w5eDS3d4CemV9RgNJ4Z Gq5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Om8Lq5NK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u23si685179pfh.53.2019.09.04.02.28.44; Wed, 04 Sep 2019 02:29:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=Om8Lq5NK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727447AbfIDJ1z (ORCPT + 99 others); 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