mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
ASoC: rockchip: Explain DAI link startup return value handling
Add comments explaining why the .startup() callbacks must return 0 on success to ensure the DAI link is correctly marked as started and prevent future changes from reintroducing the issue. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20261016040946.521195-12-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
a0b64de6ea
commit
48ed45aa30
|
|
@ -266,6 +266,11 @@ static int rockchip_sound_startup(struct snd_pcm_substream *substream)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* ASoC only marks the DAI link as started when .startup() returns 0.
|
||||
* Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
|
||||
* return 0 to ensure the DAI link is correctly marked as started.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -202,6 +202,11 @@ static int rk_aif1_startup(struct snd_pcm_substream *substream)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* ASoC only marks the DAI link as started when .startup() returns 0.
|
||||
* Since snd_pcm_hw_constraint_minmax() may return 1, explicitly
|
||||
* return 0 to ensure the DAI link is correctly marked as started.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user