Re: [PATCH 10/24] ASoC: codecs: cs42l42: Ensure the DAI is marked as started on success

From: Bui Duc Phuc

Date: Thu Oct 08 2026 - 07:01:01 EST


Hi Richard,

Thank you for your review.

> Is there any reason why we can't change ASoC to mark the DAI as started
> if return is not an error?
>
>
> int snd_soc_dai_startup(struct snd_soc_dai *dai,
> struct snd_pcm_substream *substream)
> {
> <SNIP>
>
> if (ret < 0)
> soc_dai_ret(dai, ret);
>
> soc_dai_mark_push(dai, substream, startup);
>
> return soc_dai_ret(dai, 0);
> }

I confirmed this with the maintainer here:
https://lore.kernel.org/all/CAABR9nEXM1OSnV6L4=N1YCbtWn5yMNr+OMEZ4p8h3WMaQXbgmA@xxxxxxxxxxxxxx/

It seems that the other ASoC callbacks consistently use 0 to indicate
success. The other call sites also handle the return values correctly.
The issue is limited to callbacks that directly return the result of
snd_pcm_hw_constraint_minmax() or snd_pcm_hw_constraint_integer(),
where the positive return value was overlooked.

Best regards,
Phuc