[PATCH 06/11] ASoC: intel: atom: Explain DAI startup return value handling
phucduc.bui at gmail.com
phucduc.bui at gmail.com
Thu Oct 15 21:09:41 PDT 2026
From: bui duc phuc <phucduc.bui at gmail.com>
Add a comment explaining why .startup() must return 0 on success
to ensure proper rollback handling and prevent future changes
from reintroducing the issue.
Acked-by: Cezary Rojewski <cezary.rojewski at intel.com>
Signed-off-by: bui duc phuc <phucduc.bui at gmail.com>
---
sound/soc/intel/atom/sst-mfld-platform-pcm.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index db1fb3b26909..58681e007abf 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -341,6 +341,11 @@ static int sst_media_open(struct snd_pcm_substream *substream,
stream = NULL;
+ /*
+ * ASoC only marks the DAI as started when .startup() returns 0.
+ * Since snd_pcm_hw_constraint_integer() may return 1, explicitly
+ * return 0 to ensure .shutdown() is not skipped on rollback.
+ */
return 0;
}
--
2.43.0
More information about the Linux-rockchip
mailing list