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

From: Richard Fitzgerald

Date: Thu Oct 08 2026 - 06:51:56 EST


On 08/10/2026 11:38 am, phucduc.bui@xxxxxxxxx wrote:
From: bui duc phuc <phucduc.bui@xxxxxxxxx>

snd_pcm_hw_constraint_minmax() may return 1, which is then returned
from cs42l42_dai_startup(). ASoC only marks the DAI as started when
.startup() returns 0.
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);
}