[ALSA] soc - fix S3C2410 i2s programming error
authorDavide Rizzo <davide@elpa.it>
Mon, 5 May 2008 12:59:39 +0000 (14:59 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 5 May 2008 12:12:08 +0000 (14:12 +0200)
S3C2410 i2s driver currently manages only i2s protocol (and not left
justified one) and slave mode.
With this small patch, other modes are possible.

Signed-off-by: Davide Rizzo <davide@elpa.it>
Acked-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/soc/s3c24xx/s3c24xx-i2s.c

index 4ebcd6a8bf2867d1963ba29deab52b98d2987e38..1ed6afd454591ac9c5cab7b82b13b4105681826e 100644 (file)
@@ -224,6 +224,7 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_cpu_dai *cpu_dai,
                iismod |= S3C2410_IISMOD_SLAVE;
                break;
        case SND_SOC_DAIFMT_CBS_CFS:
+               iismod &= ~S3C2410_IISMOD_SLAVE;
                break;
        default:
                return -EINVAL;
@@ -234,6 +235,7 @@ static int s3c24xx_i2s_set_fmt(struct snd_soc_cpu_dai *cpu_dai,
                iismod |= S3C2410_IISMOD_MSB;
                break;
        case SND_SOC_DAIFMT_I2S:
+               iismod &= ~S3C2410_IISMOD_MSB;
                break;
        default:
                return -EINVAL;