From: bui duc phuc <[email protected]>

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 <[email protected]>
Signed-off-by: bui duc phuc <[email protected]>
---
 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


Reply via email to