ASoC: Use params_width() at appropriate places
authorAxel Lin <axel.lin@ingics.com>
Fri, 24 Jul 2015 08:11:25 +0000 (16:11 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 24 Jul 2015 17:31:31 +0000 (18:31 +0100)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98925.c
sound/soc/codecs/pcm512x.c
sound/soc/codecs/wm2200.c
sound/soc/codecs/wm5100.c
sound/soc/codecs/wm8776.c
sound/soc/codecs/wm8996.c

index aad664225dc3a4d0142a89bf37a51f4743a0969e..a29e499d2f6525304087d402d9283023a3f00ffe 100644 (file)
@@ -432,7 +432,7 @@ static int max98925_dai_hw_params(struct snd_pcm_substream *substream,
        struct snd_soc_codec *codec = dai->codec;
        struct max98925_priv *max98925 = snd_soc_codec_get_drvdata(codec);
 
-       switch (snd_pcm_format_width(params_format(params))) {
+       switch (params_width(params)) {
        case 16:
                regmap_update_bits(max98925->regmap,
                                MAX98925_FORMAT,
index de16429f0a43114ef9c96cdf3932f3abd32c1d5f..047c48953a20cd4075000ac294a17fe59baedcde 100644 (file)
@@ -1117,7 +1117,7 @@ static int pcm512x_hw_params(struct snd_pcm_substream *substream,
                params_rate(params),
                params_channels(params));
 
-       switch (snd_pcm_format_width(params_format(params))) {
+       switch (params_width(params)) {
        case 16:
                alen = PCM512x_ALEN_16;
                break;
@@ -1132,7 +1132,7 @@ static int pcm512x_hw_params(struct snd_pcm_substream *substream,
                break;
        default:
                dev_err(codec->dev, "Bad frame size: %d\n",
-                       snd_pcm_format_width(params_format(params)));
+                       params_width(params));
                return -EINVAL;
        }
 
index c83083285e532711406422b2f8e1619f6f4de7fa..c51bc18b22ea8173beecbcd159316b0cde10910b 100644 (file)
@@ -1702,7 +1702,7 @@ static int wm2200_hw_params(struct snd_pcm_substream *substream,
        int *bclk_rates;
 
        /* Data sizes if not using TDM */
-       wl = snd_pcm_format_width(params_format(params));
+       wl = params_width(params);
        if (wl < 0)
                return wl;
        fl = snd_soc_params_to_frame_size(params);
index 4c10cd88c1af66a1a54b168c34844c190e077b9d..05d25a62e2673924aaa1e33e94b0f87f2372e737 100644 (file)
@@ -1408,7 +1408,7 @@ static int wm5100_hw_params(struct snd_pcm_substream *substream,
        base = dai->driver->base;
 
        /* Data sizes if not using TDM */
-       wl = snd_pcm_format_width(params_format(params));
+       wl = params_width(params);
        if (wl < 0)
                return wl;
        fl = snd_soc_params_to_frame_size(params);
index ece9b44567676612564058557d496649be5a2265..501c3349c34d4b3e348c66999cdfc23eda0c8b0e 100644 (file)
@@ -265,7 +265,7 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream,
        }
 
        /* Set word length */
-       switch (snd_pcm_format_width(params_format(params))) {
+       switch (params_width(params)) {
        case 16:
                iface = 0;
                break;
@@ -280,7 +280,7 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream,
                break;
        default:
                dev_err(codec->dev, "Unsupported sample size: %i\n",
-                       snd_pcm_format_width(params_format(params)));
+                       params_width(params));
                return -EINVAL;
        }
 
index 3dd063f682b29f6fa4e1bb1dbdda1a3305c750bc..04b25cbdc6a6b7e88337194ad3cbed20b98723be 100644 (file)
@@ -1780,7 +1780,7 @@ static int wm8996_hw_params(struct snd_pcm_substream *substream,
        wm8996->rx_rate[dai->id] = params_rate(params);
 
        /* Needs looking at for TDM */
-       bits = snd_pcm_format_width(params_format(params));
+       bits = params_width(params);
        if (bits < 0)
                return bits;
        aifdata |= (bits << WM8996_AIF1TX_WL_SHIFT) | bits;