[Sound-open-firmware] [PATCH v2] SOF:FIX: During XRUN recover process, host dma should be stopped first.

Wu Zhigang zhigang.wu at linux.intel.com
Mon Jun 4 04:44:56 CEST 2018


During XRUN recover process (in pipeline_xrun_recover() function),
"COMP_TRIGGER_XRUN" command will be processed first,
then "COMP_TRIGGER_START" command will be processed.
If the host dma is not stopped in the first command process,
we will hit "eS0" error in the hda_dma_start() function during
"COMP_TRIGGER_START" command process.
The XRUN recover process will fail.

Signed-off-by: Wu Zhigang <zhigang.wu at linux.intel.com>

---
v2: correct the typo error.

---
Test With:
APL-GPMRB with TDF8532 Codec
LINUX topic/sof-v4.14: 3ffd39334cb53aced88b8aba17cae3df9ee2736f
SOF master: 65ddcddfcc9a20f5b622cf3ba93dc326387a9d5d
TOOL master: 07d290c8ac6026af28bada021ac2215e3453fa88

For the known issue(module reload fail),
did not pass all sanity tests.
---
 src/audio/host.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/audio/host.c b/src/audio/host.c
index a0956b3..c0f4e1b 100644
--- a/src/audio/host.c
+++ b/src/audio/host.c
@@ -463,8 +463,10 @@ static int host_trigger(struct comp_dev *dev, int cmd)
 
 	switch (cmd) {
 	case COMP_TRIGGER_STOP:
-		ret = dma_stop(hd->dma, hd->chan);
 		ret = host_stop(dev);
+		/* fall through */
+	case COMP_TRIGGER_XRUN:
+		ret = dma_stop(hd->dma, hd->chan);
 		break;
 	case COMP_TRIGGER_START:
 		ret = dma_start(hd->dma, hd->chan);
-- 
2.14.1



More information about the Sound-open-firmware mailing list