ASoC: Intel: Use .dai_fmt for setting Haswell BE format.
diff mbox

Message ID 1394117766-7242-2-git-send-email-liam.r.girdwood@linux.intel.com
State Accepted
Commit dd6646bcfa9c811518bfcdbd13e4f73b749646bb
Headers show

Commit Message

Liam Girdwood March 6, 2014, 2:56 p.m. UTC
Update the Haswell driver to use .dai_fmt in DAI link to set the
format.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
---
 sound/soc/intel/haswell.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Mark Brown March 7, 2014, 2:51 a.m. UTC | #1
On Thu, Mar 06, 2014 at 02:56:05PM +0000, Liam Girdwood wrote:
> Update the Haswell driver to use .dai_fmt in DAI link to set the
> format.

Applied, thanks.

Patch
diff mbox

diff --git a/sound/soc/intel/haswell.c b/sound/soc/intel/haswell.c
index 0d61197..54345a2 100644
--- a/sound/soc/intel/haswell.c
+++ b/sound/soc/intel/haswell.c
@@ -69,14 +69,6 @@  static int haswell_rt5640_hw_params(struct snd_pcm_substream *substream,
 	struct snd_soc_dai *codec_dai = rtd->codec_dai;
 	int ret;
 
-	/* Set codec DAI configuration */
-	ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
-			SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
-	if (ret < 0) {
-		dev_err(rtd->dev, "can't set codec DAI configuration\n");
-		return ret;
-	}
-
 	ret = snd_soc_dai_set_sysclk(codec_dai, RT5640_SCLK_S_MCLK, 12288000,
 		SND_SOC_CLOCK_IN);
 
@@ -188,6 +180,8 @@  static struct snd_soc_dai_link haswell_rt5640_dais[] = {
 		.no_pcm = 1,
 		.codec_name = "i2c-INT33CA:00",
 		.codec_dai_name = "rt5640-aif1",
+		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+			SND_SOC_DAIFMT_CBS_CFS,
 		.ignore_suspend = 1,
 		.ignore_pmdown_time = 1,
 		.be_hw_params_fixup = haswell_ssp0_fixup,