aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-09-16 14:38:53 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-09-16 16:07:50 -0400
commit8bb014895547eeeb9aa61a654f24e41e15919304 (patch)
tree0a2510d00ade805b7088cf33c65199ff106034e8
parent9b95b166789d3ec57cea8cca0d42e602b8643ab0 (diff)
ASoC: Add S3C64xx IIS CDCLK source selection
CDCLK can either be an output generated by the CPU, intended for use as the CODEC master clock, or an input (probably from the CODEC) providing a master clock for the IIS block. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h2
-rw-r--r--sound/soc/s3c24xx/s3c64xx-i2s.c13
-rw-r--r--sound/soc/s3c24xx/s3c64xx-i2s.h1
3 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
index 07659dad1748..abf2fbc2eb2f 100644
--- a/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
+++ b/arch/arm/plat-s3c/include/plat/regs-s3c2412-iis.h
@@ -67,6 +67,8 @@
67#define S3C2412_IISMOD_BCLK_MASK (3 << 1) 67#define S3C2412_IISMOD_BCLK_MASK (3 << 1)
68#define S3C2412_IISMOD_8BIT (1 << 0) 68#define S3C2412_IISMOD_8BIT (1 << 0)
69 69
70#define S3C64XX_IISMOD_CDCLKCON (1 << 12)
71
70#define S3C2412_IISPSR_PSREN (1 << 15) 72#define S3C2412_IISPSR_PSREN (1 << 15)
71 73
72#define S3C2412_IISFIC_TXFLUSH (1 << 15) 74#define S3C2412_IISFIC_TXFLUSH (1 << 15)
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c
index 3c06c401d0fb..aaf452096be2 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.c
@@ -99,6 +99,19 @@ static int s3c64xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
99 iismod |= S3C64XX_IISMOD_IMS_SYSMUX; 99 iismod |= S3C64XX_IISMOD_IMS_SYSMUX;
100 break; 100 break;
101 101
102 case S3C64XX_CLKSRC_CDCLK:
103 switch (dir) {
104 case SND_SOC_CLOCK_IN:
105 iismod |= S3C64XX_IISMOD_CDCLKCON;
106 break;
107 case SND_SOC_CLOCK_OUT:
108 iismod &= ~S3C64XX_IISMOD_CDCLKCON;
109 break;
110 default:
111 return -EINVAL;
112 }
113 break;
114
102 default: 115 default:
103 return -EINVAL; 116 return -EINVAL;
104 } 117 }
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.h b/sound/soc/s3c24xx/s3c64xx-i2s.h
index 02148cee2613..abe7253b55fc 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.h
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.h
@@ -25,6 +25,7 @@ struct clk;
25 25
26#define S3C64XX_CLKSRC_PCLK (0) 26#define S3C64XX_CLKSRC_PCLK (0)
27#define S3C64XX_CLKSRC_MUX (1) 27#define S3C64XX_CLKSRC_MUX (1)
28#define S3C64XX_CLKSRC_CDCLK (2)
28 29
29extern struct snd_soc_dai s3c64xx_i2s_dai[]; 30extern struct snd_soc_dai s3c64xx_i2s_dai[];
30 31