summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2017-04-20 18:27:42 +0300
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:26:22 +0800
commit714d0c9b17bd15d3fcafd97c22b28f7be2b0b91b (patch)
tree7d829513dca3ca3075cdffa95a807b1e85d1c8aa
parentd73ab49251483eb177e772ebb1c0d385dd3dd70e (diff)
MLK-14536: ASoC: wm8960: Fix playback in CPU DAI master mode
With the current rates for MCLK is not possible to derive bitclk for all files in S20_3LE format and also for files with S24_LE sampled at 48000Hz. In order to fix this, we need to find a better MCLK value. We did this in two steps: 1) Use params_physical_width to get rid of S20_3LE burden. 2) Brute force into all available rates which can pass fsl_sai_set_bclk algorithm. Thus we found 36864000 to be the smallest acceptable rate for MCLK. Reviewed-by: Mihai Serban <mihai.serban@nxp.com> Suggested-by: Shengjiu Wang <shengjiu.wang@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
-rw-r--r--arch/arm/boot/dts/imx6ul-14x14-evk.dts4
-rw-r--r--sound/soc/fsl/imx-wm8960.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/boot/dts/imx6ul-14x14-evk.dts b/arch/arm/boot/dts/imx6ul-14x14-evk.dts
index b8331a7bb198..f75930583ebb 100644
--- a/arch/arm/boot/dts/imx6ul-14x14-evk.dts
+++ b/arch/arm/boot/dts/imx6ul-14x14-evk.dts
@@ -160,7 +160,7 @@
&clks {
assigned-clocks = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
- assigned-clock-rates = <786432000>;
+ assigned-clock-rates = <1179648000>;
};
&cpu0 {
@@ -338,7 +338,7 @@
assigned-clocks = <&clks IMX6UL_CLK_SAI2_SEL>,
<&clks IMX6UL_CLK_SAI2>;
assigned-clock-parents = <&clks IMX6UL_CLK_PLL4_AUDIO_DIV>;
- assigned-clock-rates = <0>, <12288000>;
+ assigned-clock-rates = <0>, <36864000>;
fsl,sai-mclk-direction-output;
status = "okay";
};
diff --git a/sound/soc/fsl/imx-wm8960.c b/sound/soc/fsl/imx-wm8960.c
index 591bcf3c793d..d50db3801796 100644
--- a/sound/soc/fsl/imx-wm8960.c
+++ b/sound/soc/fsl/imx-wm8960.c
@@ -225,7 +225,8 @@ static int imx_hifi_hw_params(struct snd_pcm_substream *substream,
}
if (!data->is_codec_master) {
- ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0, 0, 2, params_width(params));
+ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0, 0, 2,
+ params_physical_width(params));
if (ret) {
dev_err(dev, "failed to set cpu dai tdm slot: %d\n", ret);
return ret;