]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ASoC: s3c24xx 8 bit sound fix
authorChristian Pellegrin <chripell@gmail.com>
Sat, 8 Nov 2008 07:44:16 +0000 (08:44 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 10 Nov 2008 11:40:57 +0000 (11:40 +0000)
fixes playing/recording of 8 bit audio files.

Generated on  20081108  against v2.6.27

Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/s3c24xx/s3c24xx-i2s.c

index ba4476b55fbcc1f0e67f1311418fd015b1f3bef4..c18977bceaf2892739a978758f1708c70e83a3af 100644 (file)
@@ -261,10 +261,17 @@ static int s3c24xx_i2s_hw_params(struct snd_pcm_substream *substream,
 
        switch (params_format(params)) {
        case SNDRV_PCM_FORMAT_S8:
+               iismod &= ~S3C2410_IISMOD_16BIT;
+               ((struct s3c24xx_pcm_dma_params *)
+                 rtd->dai->cpu_dai->dma_data)->dma_size = 1;
                break;
        case SNDRV_PCM_FORMAT_S16_LE:
                iismod |= S3C2410_IISMOD_16BIT;
+               ((struct s3c24xx_pcm_dma_params *)
+                 rtd->dai->cpu_dai->dma_data)->dma_size = 2;
                break;
+       default:
+               return -EINVAL;
        }
 
        writel(iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);