summaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-ad193x.c
diff options
context:
space:
mode:
authorLars-Peter Clausen2012-02-01 19:24:21 +0100
committerMark Brown2012-02-01 19:29:19 +0100
commit980b0bc69270a9650ffb94f08dc87740ee1fb9b4 (patch)
tree0447c25b4df67cb0681ec5bfaca82a380dd57628 /sound/soc/blackfin/bf5xx-ad193x.c
parentASoC: wm9712: Add TLV information for microphone input (diff)
downloadkernel-qcow2-linux-980b0bc69270a9650ffb94f08dc87740ee1fb9b4.tar.gz
kernel-qcow2-linux-980b0bc69270a9650ffb94f08dc87740ee1fb9b4.tar.xz
kernel-qcow2-linux-980b0bc69270a9650ffb94f08dc87740ee1fb9b4.zip
ASoC: blackfin: Use dai_fmt
Use the dai_link's dai_fmt attribute to setup the DAI format instead of doing this manually. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ad193x.c')
-rw-r--r--sound/soc/blackfin/bf5xx-ad193x.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad193x.c b/sound/soc/blackfin/bf5xx-ad193x.c
index 2d8d82dbc159..0e55e9f2a514 100644
--- a/sound/soc/blackfin/bf5xx-ad193x.c
+++ b/sound/soc/blackfin/bf5xx-ad193x.c
@@ -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,
},
};