All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: sh: fsi: clean up SPDIF defines
@ 2010-12-03  8:36 Kuninori Morimoto
  2010-12-03 11:59 ` Liam Girdwood
  2010-12-03 12:24 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2010-12-03  8:36 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Liam Girdwood

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/fsi.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 507e709..76ef3f3 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -50,13 +50,20 @@
 
 /* DO_FMT */
 /* DI_FMT */
+#define CR_BWS_24	(0x0 << 20) /* FSI2 */
+#define CR_BWS_16	(0x1 << 20) /* FSI2 */
+#define CR_BWS_20	(0x2 << 20) /* FSI2 */
+
+#define CR_DTMD_PCM		(0x0 << 8) /* FSI2 */
+#define CR_DTMD_SPDIF_PCM	(0x1 << 8) /* FSI2 */
+#define CR_DTMD_SPDIF_STREAM	(0x2 << 8) /* FSI2 */
+
 #define CR_MONO		(0x0 << 4)
 #define CR_MONO_D	(0x1 << 4)
 #define CR_PCM		(0x2 << 4)
 #define CR_I2S		(0x3 << 4)
 #define CR_TDM		(0x4 << 4)
 #define CR_TDM_D	(0x5 << 4)
-#define CR_SPDIF	0x00100120
 
 /* DOFF_CTL */
 /* DIFF_CTL */
@@ -93,6 +100,10 @@
 #define IR		(1 <<  4) /* Interrupt Reset */
 #define FSISR		(1 <<  0) /* Software Reset */
 
+/* OUT_SEL (FSI2) */
+#define DMMD		(1 << 4) /* SPDIF output timing 0: Biphase only */
+				 /*			1: Biphase and serial */
+
 /* FIFO_SZ */
 #define FIFO_SZ_MASK	0x7
 
@@ -828,10 +839,10 @@ static int fsi_dai_startup(struct snd_pcm_substream *substream,
 			dev_err(dai->dev, "This FSI can not use SPDIF\n");
 			return -EINVAL;
 		}
-		data = CR_SPDIF;
+		data = CR_BWS_16 | CR_DTMD_SPDIF_PCM | CR_PCM;
 		io->chan_num = 2;
 		fsi_spdif_clk_ctrl(fsi, 1);
-		fsi_reg_mask_set(fsi, OUT_SEL, 0x0010, 0x0010);
+		fsi_reg_mask_set(fsi, OUT_SEL, DMMD, DMMD);
 		break;
 	default:
 		dev_err(dai->dev, "unknown format.\n");
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: sh: fsi: clean up SPDIF defines
  2010-12-03  8:36 [PATCH] ASoC: sh: fsi: clean up SPDIF defines Kuninori Morimoto
@ 2010-12-03 11:59 ` Liam Girdwood
  2010-12-03 12:24 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2010-12-03 11:59 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Mark Brown

On Fri, 2010-12-03 at 17:36 +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  sound/soc/sh/fsi.c |   17 ++++++++++++++---
>  1 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
> index 507e709..76ef3f3 100644
> --- a/sound/soc/sh/fsi.c
> +++ b/sound/soc/sh/fsi.c
> @@ -50,13 +50,20 @@

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: sh: fsi: clean up SPDIF defines
  2010-12-03  8:36 [PATCH] ASoC: sh: fsi: clean up SPDIF defines Kuninori Morimoto
  2010-12-03 11:59 ` Liam Girdwood
@ 2010-12-03 12:24 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2010-12-03 12:24 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Liam Girdwood

On Fri, Dec 03, 2010 at 05:36:24PM +0900, Kuninori Morimoto wrote:
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-03 12:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-03  8:36 [PATCH] ASoC: sh: fsi: clean up SPDIF defines Kuninori Morimoto
2010-12-03 11:59 ` Liam Girdwood
2010-12-03 12:24 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.