ASoC: mop500_ab8500: Use snd_soc_runtime_set_dai_fmt()
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 6 Jan 2015 14:17:22 +0000 (15:17 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 7 Jan 2015 18:02:11 +0000 (18:02 +0000)
Use snd_soc_runtime_set_dai_fmt() to configure the format for the DAI link
rather than configuring each DAI individually.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/ux500/mop500_ab8500.c

index be4f1ac7cd5ec74afe25f4b1126751790183afef..aa65370db82aa52fb480871eb06bd5dfed667d3b 100644 (file)
@@ -290,21 +290,9 @@ static int mop500_ab8500_hw_params(struct snd_pcm_substream *substream,
                        SND_SOC_DAIFMT_GATED;
        }
 
-       ret = snd_soc_dai_set_fmt(codec_dai, fmt);
-       if (ret < 0) {
-               dev_err(dev,
-                       "%s: ERROR: snd_soc_dai_set_fmt failed for codec_dai (ret = %d)!\n",
-                       __func__, ret);
-               return ret;
-       }
-
-       ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
-       if (ret < 0) {
-               dev_err(dev,
-                       "%s: ERROR: snd_soc_dai_set_fmt failed for cpu_dai (ret = %d)!\n",
-                       __func__, ret);
+       ret = snd_soc_runtime_set_dai_fmt(rtd, fmt);
+       if (ret)
                return ret;
-       }
 
        /* Setup TDM-slots */