MLK-17428-6: ASoC: imx-ak4497: support 768KHz sample rate
authorShengjiu Wang <shengjiu.wang@nxp.com>
Fri, 19 Jan 2018 07:45:06 +0000 (15:45 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:53:20 +0000 (14:53 -0500)
For 768kHz sample rate, the codec can't support 64fs mclk, only
can support 32fs mclk, so we can't fix the slot_width to 32, which
is for S32_LE, use params_physical_width(params) to instead of
hard code.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
sound/soc/fsl/imx-ak4497.c

index 627f057..de3c35e 100644 (file)
@@ -59,7 +59,7 @@ static int imx_aif_hw_params(struct snd_pcm_substream *substream,
 
        ret = snd_soc_dai_set_tdm_slot(cpu_dai,
                                       BIT(channels) - 1, BIT(channels) - 1,
-                                      2, 32);
+                                      2, params_physical_width(params));
        if (ret) {
                dev_err(dev, "failed to set cpu dai tdm slot: %d\n", ret);
                return ret;