On 10/27/2023 12:57 PM, Srinivas Kandagatla wrote:
Click/Pop Noise was a long pending issue with WSA Codecs which are prone
to accumlate DC when ports are active but without any data streams.
There are multiple places in the current setup, where this could happen
in both startup as well as shutdown path.
This patchset adds a new flag mute_unmute_on_trigger to dai_ops to let
generic code do the mute/unmute on trigger.
This patches help fix those issues by making sure the PA is Muted/Unmuted
inline with the stream start/stop events.
Srinivas Kandagatla (2):
ASoC: soc-dai: add flag to mute and unmute stream during trigger
ASoC: codecs: wsa883x: make use of new mute_unmute_on_trigger flag
include/sound/soc-dai.h | 1 +
sound/soc/codecs/wsa883x.c | 7 +------
sound/soc/soc-dai.c | 7 +++++++
sound/soc/soc-pcm.c | 12 ++++++++----
4 files changed, 17 insertions(+), 10 deletions(-)
Have you tried something like:
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c
index e40d583a1ce6..f02362cf95dc 100644
--- a/sound/soc/codecs/wsa883x.c
+++ b/sound/soc/codecs/wsa883x.c
@@ -1229,6 +1229,8 @@ static int wsa883x_spkr_event(struct
snd_soc_dapm_widget *w,
snd_soc_component_write_field(component,
WSA883X_VBAT_ADC_FLT_CTL,
WSA883X_VBAT_ADC_COEF_SEL_MASK,
WSA883X_VBAT_ADC_COEF_F_1DIV2);
+ snd_soc_component_write_field(component, WSA883X_DRE_CTL_1,
+ WSA883X_DRE_GAIN_EN_MASK, 0);
snd_soc_component_write_field(component,
WSA883X_PA_FSM_CTL,
WSA883X_GLOBAL_PA_EN_MASK, 0);
snd_soc_component_write_field(component,
WSA883X_PDM_WD_CTL,
As it is one thing from wsa883x_digital_mute() which seems missing in
SND_SOC_DAPM_PRE_PMD switch case, so it seems to leave GAIN always enabled?
Anyway this seems like something that if possible should be fixed on
codec driver side instead of introducing global flag?