summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-11-11 16:31:22 +0800
committerNicolin Chen <b42378@freescale.com>2013-11-13 10:25:18 +0800
commitafad905b249ba9a2d0d10d4ba190f80bb3ccc593 (patch)
tree280d9e60e816451f226296884c313e77f626ff20 /sound
parentd32c5e5592d0f100f85731ce98cd31757cda9fb0 (diff)
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 <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/imx-si476x.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/fsl/imx-si476x.c b/sound/soc/fsl/imx-si476x.c
index 3d56912ed5f4..621fd1823a55 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");