diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2012-02-01 13:24:21 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-01 13:29:19 -0500 |
commit | 980b0bc69270a9650ffb94f08dc87740ee1fb9b4 (patch) | |
tree | 0447c25b4df67cb0681ec5bfaca82a380dd57628 /sound/soc/blackfin/bfin-eval-adav80x.c | |
parent | 471280b715769be8d368f9d6bbd28558d7661f5f (diff) |
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/bfin-eval-adav80x.c')
-rw-r--r-- | sound/soc/blackfin/bfin-eval-adav80x.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/sound/soc/blackfin/bfin-eval-adav80x.c b/sound/soc/blackfin/bfin-eval-adav80x.c index 4ef079f95e2e..84b09987b7f3 100644 --- a/sound/soc/blackfin/bfin-eval-adav80x.c +++ b/sound/soc/blackfin/bfin-eval-adav80x.c | |||
@@ -34,20 +34,9 @@ static int bfin_eval_adav80x_hw_params(struct snd_pcm_substream *substream, | |||
34 | struct snd_pcm_hw_params *params) | 34 | struct snd_pcm_hw_params *params) |
35 | { | 35 | { |
36 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 36 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
37 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
38 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 37 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
39 | int ret; | 38 | int ret; |
40 | 39 | ||
41 | ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | | ||
42 | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); | ||
43 | if (ret) | ||
44 | return ret; | ||
45 | |||
46 | ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | | ||
47 | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); | ||
48 | if (ret) | ||
49 | return ret; | ||
50 | |||
51 | ret = snd_soc_dai_set_pll(codec_dai, ADAV80X_PLL1, ADAV80X_PLL_SRC_XTAL, | 40 | ret = snd_soc_dai_set_pll(codec_dai, ADAV80X_PLL1, ADAV80X_PLL_SRC_XTAL, |
52 | 27000000, params_rate(params) * 256); | 41 | 27000000, params_rate(params) * 256); |
53 | if (ret) | 42 | if (ret) |
@@ -88,6 +77,8 @@ static struct snd_soc_dai_link bfin_eval_adav80x_dais[] = { | |||
88 | .platform_name = "bfin-i2s-pcm-audio", | 77 | .platform_name = "bfin-i2s-pcm-audio", |
89 | .init = bfin_eval_adav80x_codec_init, | 78 | .init = bfin_eval_adav80x_codec_init, |
90 | .ops = &bfin_eval_adav80x_ops, | 79 | .ops = &bfin_eval_adav80x_ops, |
80 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
81 | SND_SOC_DAIFMT_CBM_CFM, | ||
91 | }, | 82 | }, |
92 | }; | 83 | }; |
93 | 84 | ||