[Sound-open-firmware] [PATCH v2] SOF:FIX: During XRUN recover process, host dma should be stopped first.
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@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);
On Mon, 2018-06-04 at 10:44 +0800, Wu Zhigang wrote:
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@linux.intel.com
v2: correct the typo error.
I've applied V1, can you send this as an incremental fix.
btw, please reply to your earlier patches if you are going to send a V2 etc. That way I know not to apply.
Thanks
Liam
On 2018年06月04日 16:31, Liam Girdwood wrote:
On Mon, 2018-06-04 at 10:44 +0800, Wu Zhigang wrote:
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@linux.intel.com
v2: correct the typo error.
I've applied V1, can you send this as an incremental fix.
btw, please reply to your earlier patches if you are going to send a V2 etc. That way I know not to apply.
ok, I will pay attention this next time. thanks ~zhigang
Thanks
Liam _______________________________________________ Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
participants (3)
-
Liam Girdwood
-
Wu Zhigang
-
zhigangw