From e27115aa169c394cad3accac12465122e286f4fd Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Mon, 28 Oct 2024 19:23:52 +0800 Subject: [PATCH] ASoC: codecs: rk_dsm: fix audio aliasing Set the dsm registers default value so that they can not be changed as zero with regmap interface. Change-Id: I1788fe2cabcb65ba09964a79d2fe20c057924839 Signed-off-by: Jason Zhu --- sound/soc/codecs/rk_dsm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/codecs/rk_dsm.c b/sound/soc/codecs/rk_dsm.c index 23ad1db45380..15cb7f89e1e9 100644 --- a/sound/soc/codecs/rk_dsm.c +++ b/sound/soc/codecs/rk_dsm.c @@ -454,11 +454,19 @@ static const struct snd_soc_component_driver soc_codec_dev_rd = { .num_controls = ARRAY_SIZE(rk_dsm_snd_controls), }; +static const struct reg_default rd_reg_defaults[] = { + { DACVUCTL, 0x1 }, + { DACINT_DIV, 0x7 }, + { DACDSM_DIV, 0x3 }, +}; + static const struct regmap_config rd_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, .max_register = VERSION, + .reg_defaults = rd_reg_defaults, + .num_reg_defaults = ARRAY_SIZE(rd_reg_defaults), .cache_type = REGCACHE_FLAT, };