From: Nicolin Chen Date: Mon, 11 Nov 2013 08:31:22 +0000 (+0800) Subject: ENGR00286961-5 ASoC: fsl: set tdm slot number for imx-si476x X-Git-Tag: KARO-TX6-2014-08-21~1^2~155 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=commitdiff_plain;h=d991e6091dd859436481e5911ccb458c2cd9f244 ENGR00286961-5 ASoC: fsl: set tdm slot number for imx-si476x When using SSI I2S master mode, we need to decide the time slot number. Because we use SSI normal mode to trick I2S signal, we here need to set time slot number to two (left/right). Acked-by: Wang Shengjiu Signed-off-by: Nicolin Chen --- diff --git a/sound/soc/fsl/imx-si476x.c b/sound/soc/fsl/imx-si476x.c index d3febf80af59..fbdc5877fe4d 100644 --- a/sound/soc/fsl/imx-si476x.c +++ b/sound/soc/fsl/imx-si476x.c @@ -56,6 +56,15 @@ static int imx_si476x_hw_params(struct snd_pcm_substream *substream, return ret; } + ret = snd_soc_dai_set_tdm_slot(cpu_dai, + channels == 1 ? 0xfffffffe : 0xfffffffc, + channels == 1 ? 0xfffffffe : 0xfffffffc, + 2, 32); + if (ret) { + dev_err(cpu_dai->dev, "failed to set dai tdm slot\n"); + return ret; + } + ret = snd_soc_dai_set_sysclk(cpu_dai, 0, bclk, SND_SOC_CLOCK_OUT); if (ret) dev_err(cpu_dai->dev, "failed to set sysclk\n");