Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751316AbaLOCMd (ORCPT ); Sun, 14 Dec 2014 21:12:33 -0500 Received: from regular2.263xmail.com ([211.157.152.4]:44865 "EHLO regular2.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbaLOCMS (ORCPT ); Sun, 14 Dec 2014 21:12:18 -0500 X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-RL-SENDER: ykk@rock-chips.com X-SENDER-IP: 104.167.231.7 X-LOGIN-NAME: ykk@rock-chips.com X-UNIQUE-TAG: <65b79f4a1650223acd81a9183a899539> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 From: Yakir Yang To: Yakir Yang Cc: Philipp Zabel , Zubair.Kakakhel@imgtec.com, Fabio Estevam , Shawn Guo , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Heiko Stuebner , Daniel Kurtz , Sonny Rao , Dylan Reid , Xu Jianqun , =?UTF-8?q?St=C3=A9phane=20Marchesin?= , Lars-Peter Clausen , Brian Austin , Bard Liao , Max Filippov , Oder Chiou , David Airlie , Russell King , Greg Kroah-Hartman Subject: [PATCH 2/6] drm: bridge/bridge: add support for rk3288 hdmi-audio Date: Mon, 15 Dec 2014 10:11:30 +0800 Message-Id: <1418609494-15820-3-git-send-email-ykk@rock-chips.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1418609494-15820-1-git-send-email-ykk@rock-chips.com> References: <1418609494-15820-1-git-send-email-ykk@rock-chips.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In rk3288 dw-hdmi, AUD_CTS3 register's BIT(4) is CTS_manual. If "CTS_manual" set to 0b, AUD_CTS3 contains “audCTS[19:0]” generated by the Cycle time counter according to specified timing. If “CTS_manual” bit equals 1b, AUD_CTS3 should be configured with the “audCTS[7:0]” value that should be outputted by the Audio Packetizer. Signed-off-by: Yakir Yang --- drivers/gpu/drm/bridge/dw_hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 9ba96de..0c19276 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -191,8 +191,10 @@ static void hdmi_set_clock_regenerator_n(struct dw_hdmi *hdmi, static void hdmi_regenerate_cts(struct dw_hdmi *hdmi, unsigned int cts) { + int val = (hdmi->dev_type == RK3288_HDMI) ? 0x10 : 0x00; + /* Must be set/cleared first */ - hdmi_modb(hdmi, 0, HDMI_AUD_CTS3_CTS_MANUAL, HDMI_AUD_CTS3); + hdmi_modb(hdmi, val, HDMI_AUD_CTS3_CTS_MANUAL, HDMI_AUD_CTS3); hdmi_writeb(hdmi, cts & 0xff, HDMI_AUD_CTS1); hdmi_writeb(hdmi, (cts >> 8) & 0xff, HDMI_AUD_CTS2); -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/