Re: [PATCH 06/14] ASoC: mediatek: mt8195: Fix FE startup error handling
From: Bui Duc Phuc
Date: Mon Oct 05 2026 - 05:40:58 EST
Hi Mark,
Thank you for your feedback.
>
> > > This will return 1 if a new constraint is installed which is not a
> > > failure.
>
> > Do you mean snd_pcm_hw_constraint_integer() rather than
> > snd_pcm_hw_constraint_step()?
>
> Sorry, yes - Noticed it in the _fe_startup() that was called just
> before as you say and didn't specifically check that function.
Some MediaTek *_fe_startup() functions (mt8195, mt2701, mt8188) can
return a positive value on success, e.g. because they return the result
of snd_pcm_hw_constraint_integer(), which is 1 when it sets the integer
flag. Others, such as mt8186, return 0 on success. This looks
inconsistent.
On the core side, snd_soc_dai_startup() only treats ret == 0 as success:
it calls soc_dai_mark_push() only in that case.
Is a positive return from startup intentional/allowed?
If not, I can send a patch making the MediaTek startup functions return 0
on success.
If it is allowed, I can instead change snd_soc_dai_startup() to call
soc_dai_mark_push() when ret >= 0.
Best regards,
Phuc