From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Paul Mundt <lethal@linux-sh.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Linux-SH <linux-sh@vger.kernel.org>,
Linux-ALSA <alsa-devel@alsa-project.org>,
Liam Girdwood <lrg@slimlogic.co.uk>
Subject: [PATCH 1/4 v2] fbdev: sh-mobile: Add HDMI sound type selection
Date: Tue, 31 Aug 2010 05:46:41 +0000 [thread overview]
Message-ID: <w3p1v9f72rk.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <w3p39tv72sx.wl%kuninori.morimoto.gx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
no change
drivers/video/sh_mobile_hdmi.c | 21 ++++++++++++++++++++-
include/video/sh_mobile_hdmi.h | 16 ++++++++++++++++
2 files changed, 36 insertions(+), 1 deletions(-)
diff --git a/drivers/video/sh_mobile_hdmi.c b/drivers/video/sh_mobile_hdmi.c
index afebe80..d25e348 100644
--- a/drivers/video/sh_mobile_hdmi.c
+++ b/drivers/video/sh_mobile_hdmi.c
@@ -318,6 +318,9 @@ static void sh_hdmi_video_config(struct sh_hdmi *hdmi)
*/
static void sh_hdmi_audio_config(struct sh_hdmi *hdmi)
{
+ u8 data;
+ struct sh_mobile_hdmi_info *pdata = hdmi->dev->platform_data;
+
/*
* [7:4] L/R data swap control
* [3:0] appropriate N[19:16]
@@ -335,7 +338,23 @@ static void sh_hdmi_audio_config(struct sh_hdmi *hdmi)
* [6:5] set required down sampling rate if required
* [4:3] set required audio source
*/
- hdmi_write(hdmi, 0x00, HDMI_AUDIO_SETTING_1);
+ switch (pdata->flags & HDMI_SRC_MASK) {
+ default:
+ /* FALL THROUGH */
+ case HDMI_SRC_I2S:
+ data = (0x0 << 3);
+ break;
+ case HDMI_SRC_SPDIF:
+ data = (0x1 << 3);
+ break;
+ case HDMI_SRC_DSD:
+ data = (0x2 << 3);
+ break;
+ case HDMI_SRC_HBR:
+ data = (0x3 << 3);
+ break;
+ }
+ hdmi_write(hdmi, data, HDMI_AUDIO_SETTING_1);
/* [3:0] set sending channel number for channel status */
hdmi_write(hdmi, 0x40, HDMI_AUDIO_SETTING_2);
diff --git a/include/video/sh_mobile_hdmi.h b/include/video/sh_mobile_hdmi.h
index 577cf18..929c2d3 100644
--- a/include/video/sh_mobile_hdmi.h
+++ b/include/video/sh_mobile_hdmi.h
@@ -14,9 +14,25 @@
struct sh_mobile_lcdc_chan_cfg;
struct device;
+/*
+ * flags format
+ *
+ * 0x0000000A
+ *
+ * A: Audio source select
+ */
+
+/* Audio source select */
+#define HDMI_SRC_MASK (0xF << 0)
+#define HDMI_SRC_I2S (0 << 0) /* default */
+#define HDMI_SRC_SPDIF (1 << 0)
+#define HDMI_SRC_DSD (2 << 0)
+#define HDMI_SRC_HBR (3 << 0)
+
struct sh_mobile_hdmi_info {
struct sh_mobile_lcdc_chan_cfg *lcd_chan;
struct device *lcd_dev;
+ unsigned int flags;
};
#endif
--
1.7.0.4
next prev parent reply other threads:[~2010-08-31 5:46 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 5:45 [PATCH 0/4 v2] Add FSI - HDMI support V2 Kuninori Morimoto
2010-08-31 5:46 ` Kuninori Morimoto [this message]
2010-09-01 10:19 ` [PATCH 1/4 v2] fbdev: sh-mobile: Add HDMI sound type selection Mark Brown
2010-09-06 7:32 ` Guennadi Liakhovetski
2010-09-06 9:49 ` Kuninori Morimoto
2010-08-31 5:46 ` [PATCH 2/4 v2] ASoC: fsi-codec: Add FSI - HDMI support Kuninori Morimoto
2010-09-01 10:20 ` Mark Brown
2010-09-06 9:17 ` Guennadi Liakhovetski
2010-08-31 5:46 ` [PATCH 4/4 v2] ARM: mach-shmobile: ap4evb: Add HDMI sound support Kuninori Morimoto
2010-09-01 10:23 ` [PATCH 4/4 v2] ARM: mach-shmobile: ap4evb: Add HDMI sound Mark Brown
2010-09-06 10:07 ` [PATCH 4/4 v2] ARM: mach-shmobile: ap4evb: Add HDMI sound support Guennadi Liakhovetski
2010-09-09 3:56 ` Kuninori Morimoto
2010-09-09 21:04 ` Guennadi Liakhovetski
2010-08-31 5:47 ` [PATCH 2/4 v2] ASoC: Add sh_mobile_hdmi " Kuninori Morimoto
2010-09-01 10:20 ` Mark Brown
2010-09-06 8:27 ` Guennadi Liakhovetski
2010-09-06 10:25 ` Mark Brown
2010-09-07 7:11 ` Guennadi Liakhovetski
2010-09-07 9:40 ` Mark Brown
2010-09-07 9:56 ` Guennadi Liakhovetski
2010-09-07 10:02 ` Mark Brown
2010-09-07 3:56 ` Kuninori Morimoto
2010-08-31 9:57 ` [alsa-devel] [PATCH 0/4 v2] Add FSI - HDMI support V2 Liam Girdwood
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=w3p1v9f72rk.wl%kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lethal@linux-sh.org \
--cc=linux-sh@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/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;
as well as URLs for NNTP newsgroup(s).