aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/s3c-i2s-v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/s3c24xx/s3c-i2s-v2.c')
-rw-r--r--sound/soc/s3c24xx/s3c-i2s-v2.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c
index 3b9201cfe43c..54f4119e6098 100644
--- a/sound/soc/s3c24xx/s3c-i2s-v2.c
+++ b/sound/soc/s3c24xx/s3c-i2s-v2.c
@@ -280,7 +280,7 @@ static int s3c2412_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
280 */ 280 */
281#define IISMOD_MASTER_MASK (1 << 11) 281#define IISMOD_MASTER_MASK (1 << 11)
282#define IISMOD_SLAVE (1 << 11) 282#define IISMOD_SLAVE (1 << 11)
283#define IISMOD_MASTER (0x0) 283#define IISMOD_MASTER (0 << 11)
284#endif 284#endif
285 285
286 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { 286 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
@@ -341,6 +341,7 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
341 iismod = readl(i2s->regs + S3C2412_IISMOD); 341 iismod = readl(i2s->regs + S3C2412_IISMOD);
342 pr_debug("%s: r: IISMOD: %x\n", __func__, iismod); 342 pr_debug("%s: r: IISMOD: %x\n", __func__, iismod);
343 343
344#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413)
344 switch (params_format(params)) { 345 switch (params_format(params)) {
345 case SNDRV_PCM_FORMAT_S8: 346 case SNDRV_PCM_FORMAT_S8:
346 iismod |= S3C2412_IISMOD_8BIT; 347 iismod |= S3C2412_IISMOD_8BIT;
@@ -349,6 +350,25 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream,
349 iismod &= ~S3C2412_IISMOD_8BIT; 350 iismod &= ~S3C2412_IISMOD_8BIT;
350 break; 351 break;
351 } 352 }
353#endif
354
355#ifdef CONFIG_PLAT_S3C64XX
356 iismod &= ~0x606;
357 /* Sample size */
358 switch (params_format(params)) {
359 case SNDRV_PCM_FORMAT_S8:
360 /* 8 bit sample, 16fs BCLK */
361 iismod |= 0x2004;
362 break;
363 case SNDRV_PCM_FORMAT_S16_LE:
364 /* 16 bit sample, 32fs BCLK */
365 break;
366 case SNDRV_PCM_FORMAT_S24_LE:
367 /* 24 bit sample, 48fs BCLK */
368 iismod |= 0x4002;
369 break;
370 }
371#endif
352 372
353 writel(iismod, i2s->regs + S3C2412_IISMOD); 373 writel(iismod, i2s->regs + S3C2412_IISMOD);
354 pr_debug("%s: w: IISMOD: %x\n", __func__, iismod); 374 pr_debug("%s: w: IISMOD: %x\n", __func__, iismod);