]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00286961-5 ASoC: fsl: set tdm slot number for imx-si476x
authorNicolin Chen <b42378@freescale.com>
Mon, 11 Nov 2013 08:31:22 +0000 (16:31 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 20 Aug 2014 08:06:42 +0000 (10:06 +0200)
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>
sound/soc/fsl/imx-si476x.c

index d3febf80af59ebf43fd3a3bff8e915dd01b482ba..fbdc5877fe4db82d997f1caa395b50f4164a1240 100644 (file)
@@ -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");