ASoC: Use dai_fmt in kirkwood-t5325 machine driver
authorAxel Lin <axel.lin@gmail.com>
Wed, 28 Dec 2011 10:59:30 +0000 (18:59 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 28 Dec 2011 11:37:37 +0000 (11:37 +0000)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/kirkwood/kirkwood-t5325.c

index a8930c7c9d1ece1433cf52edf89c6457de4ac7ca..6e992307c252d04e61dcd8a77e7552981ec4db8a 100644 (file)
@@ -25,18 +25,7 @@ static int t5325_hw_params(struct snd_pcm_substream *substream,
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       int ret;
-       unsigned int freq, fmt;
-
-       fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS;
-       ret = snd_soc_dai_set_fmt(cpu_dai, fmt);
-       if (ret < 0)
-               return ret;
-
-       ret = snd_soc_dai_set_fmt(codec_dai, fmt);
-       if (ret < 0)
-               return ret;
+       unsigned int freq;
 
        freq = params_rate(params) * 256;
 
@@ -90,6 +79,7 @@ static struct snd_soc_dai_link t5325_dai[] = {
        .platform_name = "kirkwood-pcm-audio",
        .codec_dai_name = "alc5621-hifi",
        .codec_name = "alc562x-codec.0-001a",
+       .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
        .ops = &t5325_ops,
        .init = t5325_dai_init,
 },