diff options
author | Jarkko Nikula <jarkko.nikula@linux.intel.com> | 2014-02-25 08:17:28 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-25 18:49:08 -0500 |
commit | 95c40d4b0eb47d82a8841364627a35ad6fad720b (patch) | |
tree | 9d84ffb02c4093d32bce697fa967f7e1e3a7d337 | |
parent | 52be4776cace06bf3d3df85fa490e61421824051 (diff) |
ASoC: Intel: byt-rt5640: Use init time DAI format
Setting static DAI format has been supported in the soc-core quite some time
now so there is no need to set it runtime in machine driver.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Liam Girdwoood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/intel/byt-rt5640.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c index 672fedbfa680..eff97c8e5218 100644 --- a/sound/soc/intel/byt-rt5640.c +++ b/sound/soc/intel/byt-rt5640.c | |||
@@ -57,19 +57,8 @@ static int byt_rt5640_hw_params(struct snd_pcm_substream *substream, | |||
57 | { | 57 | { |
58 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 58 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
59 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 59 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
60 | unsigned int fmt; | ||
61 | int ret; | 60 | int ret; |
62 | 61 | ||
63 | fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
64 | SND_SOC_DAIFMT_CBS_CFS; | ||
65 | |||
66 | ret = snd_soc_dai_set_fmt(codec_dai, fmt); | ||
67 | if (ret < 0) { | ||
68 | dev_err(codec_dai->dev, | ||
69 | "can't set codec DAI configuration %d\n", ret); | ||
70 | return ret; | ||
71 | } | ||
72 | |||
73 | ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_PLL1, | 62 | ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_PLL1, |
74 | params_rate(params) * 256, | 63 | params_rate(params) * 256, |
75 | SND_SOC_CLOCK_IN); | 64 | SND_SOC_CLOCK_IN); |
@@ -132,6 +121,8 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { | |||
132 | .codec_dai_name = "rt5640-aif1", | 121 | .codec_dai_name = "rt5640-aif1", |
133 | .codec_name = "i2c-10EC5640:00", | 122 | .codec_name = "i2c-10EC5640:00", |
134 | .platform_name = "baytrail-pcm-audio", | 123 | .platform_name = "baytrail-pcm-audio", |
124 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
125 | SND_SOC_DAIFMT_CBS_CFS, | ||
135 | .init = byt_rt5640_init, | 126 | .init = byt_rt5640_init, |
136 | .ignore_suspend = 1, | 127 | .ignore_suspend = 1, |
137 | .ops = &byt_rt5640_ops, | 128 | .ops = &byt_rt5640_ops, |
@@ -143,6 +134,8 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = { | |||
143 | .codec_dai_name = "rt5640-aif1", | 134 | .codec_dai_name = "rt5640-aif1", |
144 | .codec_name = "i2c-10EC5640:00", | 135 | .codec_name = "i2c-10EC5640:00", |
145 | .platform_name = "baytrail-pcm-audio", | 136 | .platform_name = "baytrail-pcm-audio", |
137 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
138 | SND_SOC_DAIFMT_CBS_CFS, | ||
146 | .init = NULL, | 139 | .init = NULL, |
147 | .ignore_suspend = 1, | 140 | .ignore_suspend = 1, |
148 | .ops = &byt_rt5640_ops, | 141 | .ops = &byt_rt5640_ops, |