ASoC: uda134x: Convert to params_width()
authorMark Brown <broonie@linaro.org>
Thu, 31 Jul 2014 11:49:26 +0000 (12:49 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 31 Jul 2014 13:37:23 +0000 (14:37 +0100)
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/uda134x.c

index edf27acc1d77da6ba457cef5e8a403867e753fb2..ad145ba85cd5e99de99c92b483e5956947806c5b 100644 (file)
@@ -243,14 +243,14 @@ static int uda134x_hw_params(struct snd_pcm_substream *substream,
        case SND_SOC_DAIFMT_I2S:
                break;
        case SND_SOC_DAIFMT_RIGHT_J:
-               switch (params_format(params)) {
-               case SNDRV_PCM_FORMAT_S16_LE:
+               switch (params_width(params)) {
+               case 16:
                        hw_params |= (1<<1);
                        break;
-               case SNDRV_PCM_FORMAT_S18_3LE:
+               case 18:
                        hw_params |= (1<<2);
                        break;
-               case SNDRV_PCM_FORMAT_S20_3LE:
+               case 20:
                        hw_params |= ((1<<2) | (1<<1));
                        break;
                default: