Commit 8bb01489 authored by Mark Brown's avatar Mark Brown

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 9b95b166
...@@ -67,6 +67,8 @@ ...@@ -67,6 +67,8 @@
#define S3C2412_IISMOD_BCLK_MASK (3 << 1) #define S3C2412_IISMOD_BCLK_MASK (3 << 1)
#define S3C2412_IISMOD_8BIT (1 << 0) #define S3C2412_IISMOD_8BIT (1 << 0)
#define S3C64XX_IISMOD_CDCLKCON (1 << 12)
#define S3C2412_IISPSR_PSREN (1 << 15) #define S3C2412_IISPSR_PSREN (1 << 15)
#define S3C2412_IISFIC_TXFLUSH (1 << 15) #define S3C2412_IISFIC_TXFLUSH (1 << 15)
......
...@@ -99,6 +99,19 @@ static int s3c64xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai, ...@@ -99,6 +99,19 @@ static int s3c64xx_i2s_set_sysclk(struct snd_soc_dai *cpu_dai,
iismod |= S3C64XX_IISMOD_IMS_SYSMUX; iismod |= S3C64XX_IISMOD_IMS_SYSMUX;
break; break;
case S3C64XX_CLKSRC_CDCLK:
switch (dir) {
case SND_SOC_CLOCK_IN:
iismod |= S3C64XX_IISMOD_CDCLKCON;
break;
case SND_SOC_CLOCK_OUT:
iismod &= ~S3C64XX_IISMOD_CDCLKCON;
break;
default:
return -EINVAL;
}
break;
default: default:
return -EINVAL; return -EINVAL;
} }
......
...@@ -25,6 +25,7 @@ struct clk; ...@@ -25,6 +25,7 @@ struct clk;
#define S3C64XX_CLKSRC_PCLK (0) #define S3C64XX_CLKSRC_PCLK (0)
#define S3C64XX_CLKSRC_MUX (1) #define S3C64XX_CLKSRC_MUX (1)
#define S3C64XX_CLKSRC_CDCLK (2)
extern struct snd_soc_dai s3c64xx_i2s_dai[]; extern struct snd_soc_dai s3c64xx_i2s_dai[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment