ASoC: codecs: ES8389: Fix the issue about mclk_src

Fix the issue with incorrect modifications to mclk_src
When the system needs to be configured to use the MCLK from the SCLK pin,
the code still sets the relevant registers to use the MCLK from the MCLK pin

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20260630072311.8427-3-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Zhang Yi 2026-06-30 15:23:07 +08:00 committed by Mark Brown
parent 882e550311
commit cbc559dd8d
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
2 changed files with 6 additions and 4 deletions

View File

@ -609,7 +609,7 @@ static int es8389_pcm_hw_params(struct snd_pcm_substream *substream,
if (es8389->mclk_src == ES8389_SCLK_PIN) {
regmap_update_bits(es8389->regmap, ES8389_MASTER_CLK,
ES8389_MCLK_SOURCE, es8389->mclk_src);
ES8389_MCLK_MASK, ES8389_MCLK_FROM_SCLK);
es8389->sysclk = params_channels(params) * params_width(params) * params_rate(params);
}

View File

@ -116,9 +116,11 @@
#define ES8389_TDM_SLOT (0x70 << 0)
#define ES8389_TDM_SHIFT 4
#define ES8389_MCLK_SOURCE (1 << 6)
#define ES8389_MCLK_PIN (1 << 6)
#define ES8389_SCLK_PIN (0 << 6)
#define ES8389_MCLK_MASK (3 << 6)
#define ES8389_MCLK_FROM_SCLK (1 << 6)
#define ES8389_MCLK_SOURCE ES8389_MCLK_PIN
#define ES8389_MCLK_PIN 0
#define ES8389_SCLK_PIN 1
/* ES8389_FMT */
#define ES8389_S24_LE (0 << 5)