[PATCH 06/11] ASoC: intel: atom: Explain DAI startup return value handling

From: phucduc . bui

Date: Fri Oct 16 2026 - 00:12:50 EST


From: bui duc phuc <phucduc.bui@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
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