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

Richard Fitzgerald rf at opensource.cirrus.com
Thu Oct 8 03:47:20 PDT 2026


On 08/10/2026 11:38 am, phucduc.bui at gmail.com wrote:
> From: bui duc phuc <phucduc.bui at gmail.com>
> 
> 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);
}



More information about the Linux-rockchip mailing list