mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yakir Yang <ykk@rock-chips.com>
To: Yakir Yang <ykk@rock-chips.com>
Cc: "Philipp Zabel" <p.zabel@pengutronix.de>,
	Zubair.Kakakhel@imgtec.com,
	"Fabio Estevam" <fabio.estevam@freescale.com>,
	"Shawn Guo" <shawn.guo@linaro.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Daniel Kurtz" <djkurtz@chromium.org>,
	"Sonny Rao" <sonnyrao@chromium.org>,
	"Dylan Reid" <dgreid@chromium.org>,
	"Xu Jianqun" <jay.xu@rock-chips.com>,
	"Stéphane Marchesin" <marcheu@chromium.org>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Brian Austin" <brian.austin@cirrus.com>,
	"Bard Liao" <bardliao@realtek.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Oder Chiou" <oder_chiou@realtek.com>,
	"David Airlie" <airlied@linux.ie>,
	"Russell King" <rmk+kernel@arm.linux.org.uk>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Subject: [PATCH 2/6] drm: bridge/bridge: add support for rk3288 hdmi-audio
Date: Mon, 15 Dec 2014 10:11:30 +0800	[thread overview]
Message-ID: <1418609494-15820-3-git-send-email-ykk@rock-chips.com> (raw)
In-Reply-To: <1418609494-15820-1-git-send-email-ykk@rock-chips.com>

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 <ykk@rock-chips.com>
---

 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



  parent reply	other threads:[~2014-12-15  2:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15  2:11 [RFC PATCH 0/6] Those patches is used for dw_hdmi audio Yakir Yang
2014-12-15  2:11 ` [PATCH 1/6] drm: bridge/dw_hdmi: add hdmi audio config interfaces Yakir Yang
2014-12-15  2:11 ` Yakir Yang [this message]
2014-12-15  2:11 ` [PATCH 3/6] ASoC: dw-hdmi-audio: add codec driver for dw hdmi audio Yakir Yang
2014-12-15  2:11 ` [PATCH 4/6] ASoC: rockchip-hdmi-audio: add sound driver for " Yakir Yang
2014-12-15  2:55 ` [PATCH 5/6] dt-bindings: Add documentation for Rockchip hdmi-audio Yakir Yang
2014-12-15  9:02   ` Lars-Peter Clausen
2014-12-15  9:46     ` Kuankuan.Yang
2014-12-15 10:40   ` Russell King - ARM Linux
2014-12-15 12:02     ` Mark Brown
2014-12-15 13:10       ` Kuankuan.Yang
2014-12-15 16:18         ` Mark Brown
2014-12-16  2:14           ` Kuankuan.Yang
2014-12-16  2:38           ` Kuankuan.Yang
2014-12-16  6:17           ` Kuankuan.Yang
2014-12-16  9:34             ` Russell King - ARM Linux
2014-12-16  9:48               ` Kuankuan.Yang
2014-12-15  2:56 ` [PATCH 6/6] ARM: dts: rockchip: add hdmi audio nodes Yakir Yang
2014-12-15 10:38 ` [RFC PATCH 0/6] Those patches is used for dw_hdmi audio Russell King - ARM Linux
     [not found]   ` <548EC9E1.5040206@rock-chips.com>
2014-12-15 11:52     ` Kuankuan.Yang
2014-12-15 12:00       ` Russell King - ARM Linux
2014-12-15 12:46         ` Kuankuan.Yang
2014-12-15 15:48         ` Jean-Francois Moine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418609494-15820-3-git-send-email-ykk@rock-chips.com \
    --to=ykk@rock-chips.com \
    --cc=Zubair.Kakakhel@imgtec.com \
    --cc=airlied@linux.ie \
    --cc=bardliao@realtek.com \
    --cc=brian.austin@cirrus.com \
    --cc=dgreid@chromium.org \
    --cc=djkurtz@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabio.estevam@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=jay.xu@rock-chips.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcheu@chromium.org \
    --cc=oder_chiou@realtek.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=shawn.guo@linaro.org \
    --cc=sonnyrao@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®