[PATCH v2 14/14] ASoC: mediatek: mt8195: Fix clock parent error handling

Ajay Kumar Nandam ajay.nandam at oss.qualcomm.com
Thu Oct 8 05:03:47 PDT 2026



On 10/5/2026 4:32 PM, phucduc.bui at gmail.com wrote:
> From: bui duc phuc <phucduc.bui at gmail.com>
> 
> 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 at gmail.com>
> ---
>   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,




More information about the Linux-mediatek mailing list