Re: [PATCH v2 14/14] ASoC: mediatek: mt8195: Fix clock parent error handling
From: Ajay Kumar Nandam
Date: Thu Oct 08 2026 - 08:05:10 EST
On 10/5/2026 4:32 PM, phucduc.bui@xxxxxxxxx wrote:
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
Propagate the error returned by mt8195_afe_set_clk_parent() instead of
ignoring it.
This allows clock parent configuration failures to be properly handled
by the caller.
Fixes: 3de3eba588bb ("ASoC: mediatek: mt8195: support adda in platform driver")
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/mediatek/mt8195/mt8195-dai-adda.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/mediatek/mt8195/mt8195-dai-adda.c b/sound/soc/mediatek/mt8195/mt8195-dai-adda.c
index 94abde15ea09..8a58a142064d 100644
--- a/sound/soc/mediatek/mt8195/mt8195-dai-adda.c
+++ b/sound/soc/mediatek/mt8195/mt8195-dai-adda.c
@@ -262,9 +262,8 @@ static int mtk_audio_hires_event(struct snd_soc_dapm_widget *w,
default:
return 0;
}
- mt8195_afe_set_clk_parent(afe, clk, clk_parent);
- return 0;
+ return mt8195_afe_set_clk_parent(afe, clk, clk_parent);
The commit message says this allows clock parent configuration failures
to be properly handled by the caller, but I don't think the current DAPM
event path propagates this error back to the operation that triggered the power change.
mtk_audio_hires_event() now returns the error from mt8195_afe_set_clk_parent(), but the caller in the DAPM core is
dapm_seq_check_event(), which is a void helper. It logs a negative event
return with "event failed", but it does not return that error up through
the DAPM sequencing path.
So this looks like it improves error reporting, but not actual failure
handling/propagation. Was the intent only to get the DAPM error log here, or should the commit message/code be adjusted so the behavior matches the "properly handled by the caller" wording?
Thanks
Ajay Kumar Nandam
}
static struct mtk_dai_adda_priv *get_adda_priv_by_name(struct mtk_base_afe *afe,