diff options
Diffstat (limited to 'sound/soc/s3c24xx/s3c-i2s-v2.c')
-rw-r--r-- | sound/soc/s3c24xx/s3c-i2s-v2.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sound/soc/s3c24xx/s3c-i2s-v2.c b/sound/soc/s3c24xx/s3c-i2s-v2.c index 1a283170ca92..aa7af0b8d421 100644 --- a/sound/soc/s3c24xx/s3c-i2s-v2.c +++ b/sound/soc/s3c24xx/s3c-i2s-v2.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <mach/dma.h> | 36 | #include <mach/dma.h> |
37 | 37 | ||
38 | #include "s3c-i2s-v2.h" | 38 | #include "s3c-i2s-v2.h" |
39 | #include "s3c24xx-pcm.h" | ||
39 | 40 | ||
40 | #undef S3C_IIS_V2_SUPPORTED | 41 | #undef S3C_IIS_V2_SUPPORTED |
41 | 42 | ||
@@ -357,19 +358,19 @@ static int s3c2412_i2s_hw_params(struct snd_pcm_substream *substream, | |||
357 | #endif | 358 | #endif |
358 | 359 | ||
359 | #ifdef CONFIG_PLAT_S3C64XX | 360 | #ifdef CONFIG_PLAT_S3C64XX |
360 | iismod &= ~0x606; | 361 | iismod &= ~(S3C64XX_IISMOD_BLC_MASK | S3C2412_IISMOD_BCLK_MASK); |
361 | /* Sample size */ | 362 | /* Sample size */ |
362 | switch (params_format(params)) { | 363 | switch (params_format(params)) { |
363 | case SNDRV_PCM_FORMAT_S8: | 364 | case SNDRV_PCM_FORMAT_S8: |
364 | /* 8 bit sample, 16fs BCLK */ | 365 | /* 8 bit sample, 16fs BCLK */ |
365 | iismod |= 0x2004; | 366 | iismod |= (S3C64XX_IISMOD_BLC_8BIT | S3C2412_IISMOD_BCLK_16FS); |
366 | break; | 367 | break; |
367 | case SNDRV_PCM_FORMAT_S16_LE: | 368 | case SNDRV_PCM_FORMAT_S16_LE: |
368 | /* 16 bit sample, 32fs BCLK */ | 369 | /* 16 bit sample, 32fs BCLK */ |
369 | break; | 370 | break; |
370 | case SNDRV_PCM_FORMAT_S24_LE: | 371 | case SNDRV_PCM_FORMAT_S24_LE: |
371 | /* 24 bit sample, 48fs BCLK */ | 372 | /* 24 bit sample, 48fs BCLK */ |
372 | iismod |= 0x4002; | 373 | iismod |= (S3C64XX_IISMOD_BLC_24BIT | S3C2412_IISMOD_BCLK_48FS); |
373 | break; | 374 | break; |
374 | } | 375 | } |
375 | #endif | 376 | #endif |
@@ -387,6 +388,8 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | |||
387 | int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); | 388 | int capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE); |
388 | unsigned long irqs; | 389 | unsigned long irqs; |
389 | int ret = 0; | 390 | int ret = 0; |
391 | int channel = ((struct s3c24xx_pcm_dma_params *) | ||
392 | rtd->dai->cpu_dai->dma_data)->channel; | ||
390 | 393 | ||
391 | pr_debug("Entered %s\n", __func__); | 394 | pr_debug("Entered %s\n", __func__); |
392 | 395 | ||
@@ -416,6 +419,14 @@ static int s3c2412_i2s_trigger(struct snd_pcm_substream *substream, int cmd, | |||
416 | s3c2412_snd_txctrl(i2s, 1); | 419 | s3c2412_snd_txctrl(i2s, 1); |
417 | 420 | ||
418 | local_irq_restore(irqs); | 421 | local_irq_restore(irqs); |
422 | |||
423 | /* | ||
424 | * Load the next buffer to DMA to meet the reqirement | ||
425 | * of the auto reload mechanism of S3C24XX. | ||
426 | * This call won't bother S3C64XX. | ||
427 | */ | ||
428 | s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STARTED); | ||
429 | |||
419 | break; | 430 | break; |
420 | 431 | ||
421 | case SNDRV_PCM_TRIGGER_STOP: | 432 | case SNDRV_PCM_TRIGGER_STOP: |