]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: Intel: byt-rt5640: Use init time DAI format
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Tue, 25 Feb 2014 13:17:28 +0000 (15:17 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 25 Feb 2014 23:49:08 +0000 (08:49 +0900)
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>
sound/soc/intel/byt-rt5640.c

index 672fedbfa680bb281767ce81048d8360369da586..eff97c8e52184ac25ad1cea57a3a7b2f57327730 100644 (file)
@@ -57,19 +57,8 @@ static int byt_rt5640_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;
-       unsigned int fmt;
        int ret;
 
-       fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
-             SND_SOC_DAIFMT_CBS_CFS;
-
-       ret = snd_soc_dai_set_fmt(codec_dai, fmt);
-       if (ret < 0) {
-               dev_err(codec_dai->dev,
-                       "can't set codec DAI configuration %d\n", ret);
-               return ret;
-       }
-
        ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_PLL1,
                                     params_rate(params) * 256,
                                     SND_SOC_CLOCK_IN);
@@ -132,6 +121,8 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {
                .codec_dai_name = "rt5640-aif1",
                .codec_name = "i2c-10EC5640:00",
                .platform_name = "baytrail-pcm-audio",
+               .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+                          SND_SOC_DAIFMT_CBS_CFS,
                .init = byt_rt5640_init,
                .ignore_suspend = 1,
                .ops = &byt_rt5640_ops,
@@ -143,6 +134,8 @@ static struct snd_soc_dai_link byt_rt5640_dais[] = {
                .codec_dai_name = "rt5640-aif1",
                .codec_name = "i2c-10EC5640:00",
                .platform_name = "baytrail-pcm-audio",
+               .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+                          SND_SOC_DAIFMT_CBS_CFS,
                .init = NULL,
                .ignore_suspend = 1,
                .ops = &byt_rt5640_ops,