提交 d0b35a41 编写于 作者: M Martin Povišer 提交者: Zheng Zengkai

ASoC: tas2770: Fix setting of high sample rates

stable inclusion
from stable-v5.10.89
commit 94caab5af19a295cbec1d7fa6e8b7310f058317f
bugzilla: 186140 https://gitee.com/openeuler/kernel/issues/I4S8HA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=94caab5af19a295cbec1d7fa6e8b7310f058317f

--------------------------------

commit 80d5be1a upstream.

Although the codec advertises support for 176.4 and 192 ksps, without
this fix setting those sample rates fails with EINVAL at hw_params time.
Signed-off-by: NMartin Povišer <povik@protonmail.com>
Link: https://lore.kernel.org/r/20211206224529.74656-1-povik@protonmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 5a355852
...@@ -291,11 +291,11 @@ static int tas2770_set_samplerate(struct tas2770_priv *tas2770, int samplerate) ...@@ -291,11 +291,11 @@ static int tas2770_set_samplerate(struct tas2770_priv *tas2770, int samplerate)
ramp_rate_val = TAS2770_TDM_CFG_REG0_SMP_44_1KHZ | ramp_rate_val = TAS2770_TDM_CFG_REG0_SMP_44_1KHZ |
TAS2770_TDM_CFG_REG0_31_88_2_96KHZ; TAS2770_TDM_CFG_REG0_31_88_2_96KHZ;
break; break;
case 19200: case 192000:
ramp_rate_val = TAS2770_TDM_CFG_REG0_SMP_48KHZ | ramp_rate_val = TAS2770_TDM_CFG_REG0_SMP_48KHZ |
TAS2770_TDM_CFG_REG0_31_176_4_192KHZ; TAS2770_TDM_CFG_REG0_31_176_4_192KHZ;
break; break;
case 17640: case 176400:
ramp_rate_val = TAS2770_TDM_CFG_REG0_SMP_44_1KHZ | ramp_rate_val = TAS2770_TDM_CFG_REG0_SMP_44_1KHZ |
TAS2770_TDM_CFG_REG0_31_176_4_192KHZ; TAS2770_TDM_CFG_REG0_31_176_4_192KHZ;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册