]> Pileus Git - ~andy/linux/blobdiff - sound/soc/blackfin/bf5xx-ad193x.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
[~andy/linux] / sound / soc / blackfin / bf5xx-ad193x.c
index 2d8d82dbc159ef6326b553e8ce2916fd0c1e771f..0e55e9f2a514df69473365a7222d93908ea1bdcd 100644 (file)
@@ -60,18 +60,6 @@ static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream,
                break;
        }
 
-       /* set cpu DAI configuration */
-       ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_DSP_A |
-               SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM);
-       if (ret < 0)
-               return ret;
-
-       /* set codec DAI configuration */
-       ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_DSP_A |
-               SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBM_CFM);
-       if (ret < 0)
-               return ret;
-
        /* set the codec system clock for DAC and ADC */
        ret = snd_soc_dai_set_sysclk(codec_dai, 0, clk,
                SND_SOC_CLOCK_IN);
@@ -92,6 +80,9 @@ static int bf5xx_ad193x_hw_params(struct snd_pcm_substream *substream,
        return 0;
 }
 
+#define BF5XX_AD193X_DAIFMT (SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_IF | \
+                               SND_SOC_DAIFMT_CBM_CFM)
+
 static struct snd_soc_ops bf5xx_ad193x_ops = {
        .hw_params = bf5xx_ad193x_hw_params,
 };
@@ -105,6 +96,7 @@ static struct snd_soc_dai_link bf5xx_ad193x_dai[] = {
                .platform_name = "bfin-tdm-pcm-audio",
                .codec_name = "spi0.5",
                .ops = &bf5xx_ad193x_ops,
+               .dai_fmt = BF5XX_AD193X_DAIFMT,
        },
        {
                .name = "ad193x",
@@ -114,6 +106,7 @@ static struct snd_soc_dai_link bf5xx_ad193x_dai[] = {
                .platform_name = "bfin-tdm-pcm-audio",
                .codec_name = "spi0.5",
                .ops = &bf5xx_ad193x_ops,
+               .dai_fmt = BF5XX_AD193X_DAIFMT,
        },
 };