ASoC: wm8741: Convert to params_width()
authorMark Brown <broonie@linaro.org>
Thu, 31 Jul 2014 11:51:45 +0000 (12:51 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 31 Jul 2014 17:47:07 +0000 (18:47 +0100)
The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8741.c

index b33542a046073504a5ee5d16af4ca4a6698b5e86..a237f1627f614d07a40c61f50d7a561e7a87b17f 100644 (file)
@@ -241,26 +241,26 @@ static int wm8741_hw_params(struct snd_pcm_substream *substream,
        }
 
        /* bit size */
-       switch (params_format(params)) {
-       case SNDRV_PCM_FORMAT_S16_LE:
+       switch (params_width(params)) {
+       case 16:
                break;
-       case SNDRV_PCM_FORMAT_S20_3LE:
+       case 20:
                iface |= 0x0001;
                break;
-       case SNDRV_PCM_FORMAT_S24_LE:
+       case 24:
                iface |= 0x0002;
                break;
-       case SNDRV_PCM_FORMAT_S32_LE:
+       case 32:
                iface |= 0x0003;
                break;
        default:
                dev_dbg(codec->dev, "wm8741_hw_params:    Unsupported bit size param = %d",
-                       params_format(params));
+                       params_width(params));
                return -EINVAL;
        }
 
        dev_dbg(codec->dev, "wm8741_hw_params:    bit size param = %d",
-               params_format(params));
+               params_width(params));
 
        snd_soc_write(codec, WM8741_FORMAT_CONTROL, iface);
        return 0;