ASoC: es8316: Enable support for MCLK div by 2
authorMarian Postevca <posteuca@mutex.one>
Tue, 29 Aug 2023 22:01:14 +0000 (01:01 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 11 Sep 2023 00:24:09 +0000 (01:24 +0100)
commit869f30782cdad0a86598a700a864e4a2bf44f8cc
treee6d739d3988fc88a1644fee88ffbb9dd98b5ebea
parenta43c0dc1004cbe2edbae9b6e6793db71f6896449
ASoC: es8316: Enable support for MCLK div by 2

To properly support a line of Huawei laptops with an AMD CPU
and an ES8336 codec connected to the ACP3X module, we need
to enable the codec option to divide the MCLK by 2.
This is needed because for at least one SKU that has a 48Mhz
MCLK the sound is distorted unless the MCLK div by 2 option
is enabled.

The option to divide the MCLK will first be tried. If no suitable
clocking can be generated from this frequency, then the normal
non-halved MCLK frequency will be tried.

Signed-off-by: Marian Postevca <posteuca@mutex.one>
Link: https://lore.kernel.org/r/20230829220116.1159-4-posteuca@mutex.one
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/es8316.c
sound/soc/codecs/es8316.h