[Sound-open-firmware] [PATCH] SOF:FIX: During XRUN recover process, host dma should be stopped first.
During XRUN recover process (in pipeline_xrun_recover() function), "COMP_TRIGGER_XRUN" cmd will be processed first, then "COMP_TRIGGER_START" cmd will be processed. If the host dma is not stopped in the first cmd process, we will hit "eS0" error in the hda_dma_start() function during "COMP_TRIGGER_START" cmd process. the XRUN recover process will fail.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
--- 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 pass all sanity test. --- 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);
On Mon, 2018-06-04 at 10:32 +0800, Wu Zhigang wrote:
During XRUN recover process (in pipeline_xrun_recover() function), "COMP_TRIGGER_XRUN" cmd will be processed first, then "COMP_TRIGGER_START" cmd will be processed. If the host dma is not stopped in the first cmd process, we will hit "eS0" error in the hda_dma_start() function during "COMP_TRIGGER_START" cmd process. the XRUN recover process will fail.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
Thanks, applied.
Liam
participants (2)
-
Liam Girdwood
-
Wu Zhigang