ASoC: cs42l51: Use params_width() rather than memory format
authorMark Brown <broonie@linaro.org>
Wed, 8 Jan 2014 19:48:20 +0000 (19:48 +0000)
committerMark Brown <broonie@linaro.org>
Mon, 13 Jan 2014 11:45:50 +0000 (11:45 +0000)
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/cs42l51.c

index 1e0fa3b..6e9ea83 100644 (file)
@@ -423,21 +423,17 @@ static int cs42l51_hw_params(struct snd_pcm_substream *substream,
                intf_ctl |= CS42L51_INTF_CTL_DAC_FORMAT(CS42L51_DAC_DIF_LJ24);
                break;
        case SND_SOC_DAIFMT_RIGHT_J:
-               switch (params_format(params)) {
-               case SNDRV_PCM_FORMAT_S16_LE:
-               case SNDRV_PCM_FORMAT_S16_BE:
+               switch (params_width(params)) {
+               case 16:
                        fmt = CS42L51_DAC_DIF_RJ16;
                        break;
-               case SNDRV_PCM_FORMAT_S18_3LE:
-               case SNDRV_PCM_FORMAT_S18_3BE:
+               case 18:
                        fmt = CS42L51_DAC_DIF_RJ18;
                        break;
-               case SNDRV_PCM_FORMAT_S20_3LE:
-               case SNDRV_PCM_FORMAT_S20_3BE:
+               case 20:
                        fmt = CS42L51_DAC_DIF_RJ20;
                        break;
-               case SNDRV_PCM_FORMAT_S24_LE:
-               case SNDRV_PCM_FORMAT_S24_BE:
+               case 24:
                        fmt = CS42L51_DAC_DIF_RJ24;
                        break;
                default: