ASoC: Use dai_fmt in afeb9260 machine driver
authorAxel Lin <axel.lin@gmail.com>
Sun, 29 Jan 2012 08:52:02 +0000 (16:52 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 1 Feb 2012 21:52:54 +0000 (21:52 +0000)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/atmel/snd-soc-afeb9260.c

index 4ca667d477f9f332e77a9ab60b0ce3805f4418ce..cb0130cf8f1339ff556d1fd7bc5f8b6a071ad3b0 100644 (file)
@@ -46,29 +46,8 @@ static int afeb9260_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 err;
 
-       /* Set codec DAI configuration */
-       err = snd_soc_dai_set_fmt(codec_dai,
-                                 SND_SOC_DAIFMT_I2S|
-                                 SND_SOC_DAIFMT_NB_IF |
-                                 SND_SOC_DAIFMT_CBM_CFM);
-       if (err < 0) {
-               printk(KERN_ERR "can't set codec DAI configuration\n");
-               return err;
-       }
-
-       /* Set cpu DAI configuration */
-       err = snd_soc_dai_set_fmt(cpu_dai,
-                                 SND_SOC_DAIFMT_I2S |
-                                 SND_SOC_DAIFMT_NB_IF |
-                                 SND_SOC_DAIFMT_CBM_CFM);
-       if (err < 0) {
-               printk(KERN_ERR "can't set cpu DAI configuration\n");
-               return err;
-       }
-
        /* Set the codec system clock for DAC and ADC */
        err =
            snd_soc_dai_set_sysclk(codec_dai, 0, CODEC_CLOCK, SND_SOC_CLOCK_IN);
@@ -129,6 +108,8 @@ static struct snd_soc_dai_link afeb9260_dai = {
        .platform_name = "atmel_pcm-audio",
        .codec_name = "tlv320aic23-codec.0-001a",
        .init = afeb9260_tlv320aic23_init,
+       .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
+                  SND_SOC_DAIFMT_CBM_CFM,
        .ops = &afeb9260_ops,
 };
 
This page took 0.025603 seconds and 5 git commands to generate.