From 07dbb4735c68e59c03a6783b82bb22d72d2cf28e Mon Sep 17 00:00:00 2001 From: Shunhua Lan Date: Fri, 11 Oct 2024 10:41:11 +0800 Subject: [PATCH] ASoC: codecs: rk730: do soft reset in rk730_reset The patch fix no sound when hot rebooting because of registers value mismatch Change-Id: I6c9b040b3cd025c4e27c391e0f539505e747aaa7 Signed-off-by: Shunhua Lan --- sound/soc/codecs/rk730.c | 6 ++++++ sound/soc/codecs/rk730.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/sound/soc/codecs/rk730.c b/sound/soc/codecs/rk730.c index d36ab6fd7b57..f7471413d4af 100644 --- a/sound/soc/codecs/rk730.c +++ b/sound/soc/codecs/rk730.c @@ -845,6 +845,12 @@ static int rk730_reset(struct snd_soc_component *component) clk_prepare_enable(rk730->mclk); udelay(10); + snd_soc_component_update_bits(component, RK730_DTOP_SRT, + RK730_DTOP_SRST_MASK, + RK730_DTOP_SRST_EN); + snd_soc_component_update_bits(component, RK730_DTOP_SRT, + RK730_DTOP_SRST_MASK, + RK730_DTOP_SRST_DIS); /* WA: Initial micbias default, ADC stopped with micbias(>2.5v) */ snd_soc_component_update_bits(component, RK730_MIC_BIAS, RK730_MIC_BIAS_VOLT_MASK, diff --git a/sound/soc/codecs/rk730.h b/sound/soc/codecs/rk730.h index b9ad4857e20f..a6bbe047e4eb 100644 --- a/sound/soc/codecs/rk730.h +++ b/sound/soc/codecs/rk730.h @@ -247,6 +247,9 @@ #define RK730_DTOP_DIGEN_CLKE_I2SRX_DIS 0 /* RK730_DTOP_SRT */ +#define RK730_DTOP_SRST_MASK BIT(7) +#define RK730_DTOP_SRST_EN BIT(7) +#define RK730_DTOP_SRST_DIS 0 #define RK730_DTOP_DACSRT_MASK GENMASK(6, 4) #define RK730_DTOP_DACSRT(x) ((x) << 4) #define RK730_DTOP_ADCSRT_MASK GENMASK(2, 0)