[Sound-open-firmware] [PATCH] FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in the host_trigger function.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
--- Test with: Apl-gpmrb with codec Linux sof-v4.14: 735b995d7b66 SOF master: 85ae8e74181f SOF-tools master: b327539e98f1 --- --- src/audio/host.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/audio/host.c b/src/audio/host.c index bee50ce..998c5ca 100644 --- a/src/audio/host.c +++ b/src/audio/host.c @@ -466,6 +466,7 @@ 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); break; case COMP_TRIGGER_START:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of Wu Zhigang Sent: Wednesday, May 2, 2018 5:34 PM To: sound-open-firmware@alsa-project.org Cc: Wu Zhigang zhigang.wu@linux.intel.com; Wu, Zhigang zhigang.wu@intel.com Subject: [Sound-open-firmware] [PATCH] FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in
Small typo. Should be 'hda_dma_start'.
Others looks good to me.
Thanks, ~Keyon
the host_trigger function.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
Test with: Apl-gpmrb with codec Linux sof-v4.14: 735b995d7b66 SOF master: 85ae8e74181f SOF-tools master: b327539e98f1
src/audio/host.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/audio/host.c b/src/audio/host.c index bee50ce..998c5ca 100644 --- a/src/audio/host.c +++ b/src/audio/host.c @@ -466,6 +466,7 @@ static int host_trigger(struct comp_dev *dev, int cmd)
switch (cmd) { case COMP_TRIGGER_STOP:
ret = host_stop(dev); break; case COMP_TRIGGER_START:ret = dma_stop(hd->dma, hd->chan);
-- 2.14.1
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
On Wed, 2018-05-02 at 09:56 +0000, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of Wu Zhigang Sent: Wednesday, May 2, 2018 5:34 PM To: sound-open-firmware@alsa-project.org Cc: Wu Zhigang zhigang.wu@linux.intel.com; Wu, Zhigang zhigang.wu@intel.com Subject: [Sound-open-firmware] [PATCH] FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in
Small typo. Should be 'hda_dma_start'.
Others looks good to me.
Can someone confirm on BYT too.
Thanks
Liam --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
On 5/2/2018 18:11, Liam Girdwood wrote:
On Wed, 2018-05-02 at 09:56 +0000, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of Wu Zhigang Sent: Wednesday, May 2, 2018 5:34 PM To: sound-open-firmware@alsa-project.org Cc: Wu Zhigang zhigang.wu@linux.intel.com; Wu, Zhigang zhigang.wu@intel.com Subject: [Sound-open-firmware] [PATCH] FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in
Small typo. Should be 'hda_dma_start'.
Others looks good to me.
Can someone confirm on BYT too.
BYT did not need this handler. The host dma for BYT is also GP-DMA and need to assign the DMA every host copy. When we trigger the host comp stop, there will no more host DMA. This problem is only shown on the APL/CNL platforms.
BTW, this bug is hit by the ALSA pcm lib xrun recovery. When ALSA trace the dma pointer position, it will wrongly though the DSP is in xrun and try to recover it by STOP/START pattern. Will the DSP be recovered from this kind of STOP/START?
Thanks Xiuli
Thanks
Liam
Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
On 2018年05月02日 21:09, Pan, Xiuli wrote:
On 5/2/2018 18:11, Liam Girdwood wrote:
On Wed, 2018-05-02 at 09:56 +0000, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of Wu Zhigang Sent: Wednesday, May 2, 2018 5:34 PM To: sound-open-firmware@alsa-project.org Cc: Wu Zhigang zhigang.wu@linux.intel.com; Wu, Zhigang zhigang.wu@intel.com Subject: [Sound-open-firmware] [PATCH] FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in
Small typo. Should be 'hda_dma_start'.
Others looks good to me.
Can someone confirm on BYT too.
BYT did not need this handler. The host dma for BYT is also GP-DMA and need to assign the DMA every host copy. When we trigger the host comp stop, there will no more host DMA. This problem is only shown on the APL/CNL platforms.
BTW, this bug is hit by the ALSA pcm lib xrun recovery. When ALSA trace the dma pointer position, it will wrongly though the DSP is in xrun and try to recover it by STOP/START pattern. Will the DSP be recovered from this kind of STOP/START?
Thanks Xiuli
Actually, It should be added. Because we cannot confirm the ALSA lib will not happen XRUN. In this situation, we have to recovered from this case. In the real environment, no one can confirm NO XRUN in ALSA. we have to make sure our DSP is rebust.
after fix this, there is still a xrun issue in the DSP. thanks ~zhigangw
Thanks
Liam
Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
On Thu, 2018-05-03 at 09:10 +0800, zhigangw wrote:
On 2018年05月02日 21:09, Pan, Xiuli wrote:
On 5/2/2018 18:11, Liam Girdwood wrote:
On Wed, 2018-05-02 at 09:56 +0000, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of Wu Zhigang Sent: Wednesday, May 2, 2018 5:34 PM To: sound-open-firmware@alsa-project.org Cc: Wu Zhigang zhigang.wu@linux.intel.com; Wu, Zhigang zhigang.wu@intel.com Subject: [Sound-open-firmware] [PATCH] FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in
Small typo. Should be 'hda_dma_start'.
Others looks good to me.
Can someone confirm on BYT too.
BYT did not need this handler. The host dma for BYT is also GP-DMA and need to assign the DMA every host copy. When we trigger the host comp stop, there will no more host DMA. This problem is only shown on the APL/CNL platforms.
BTW, this bug is hit by the ALSA pcm lib xrun recovery. When ALSA trace the dma pointer position, it will wrongly though the DSP is in xrun and try to recover it by STOP/START pattern. Will the DSP be recovered from this kind of STOP/START?
Thanks Xiuli
Actually, It should be added. Because we cannot confirm the ALSA lib will not happen XRUN. In this situation, we have to recovered from this case. In the real environment, no one can confirm NO XRUN in ALSA. we have to make sure our DSP is rebust.
after fix this, there is still a xrun issue in the DSP. thanks
Ok, does this mean I should apply or is there another fix coming ?
Thanks
Liam
On 5/3/2018 15:09, Liam Girdwood wrote:
On Thu, 2018-05-03 at 09:10 +0800, zhigangw wrote:
On 2018年05月02日 21:09, Pan, Xiuli wrote:
On 5/2/2018 18:11, Liam Girdwood wrote:
On Wed, 2018-05-02 at 09:56 +0000, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of Wu Zhigang Sent: Wednesday, May 2, 2018 5:34 PM To: sound-open-firmware@alsa-project.org Cc: Wu Zhigang zhigang.wu@linux.intel.com; Wu, Zhigang zhigang.wu@intel.com Subject: [Sound-open-firmware] [PATCH] FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in
Small typo. Should be 'hda_dma_start'.
Others looks good to me.
Can someone confirm on BYT too.
BYT did not need this handler. The host dma for BYT is also GP-DMA and need to assign the DMA every host copy. When we trigger the host comp stop, there will no more host DMA. This problem is only shown on the APL/CNL platforms.
BTW, this bug is hit by the ALSA pcm lib xrun recovery. When ALSA trace the dma pointer position, it will wrongly though the DSP is in xrun and try to recover it by STOP/START pattern. Will the DSP be recovered from this kind of STOP/START?
Thanks Xiuli
Actually, It should be added. Because we cannot confirm the ALSA lib will not happen XRUN. In this situation, we have to recovered from this case. In the real environment, no one can confirm NO XRUN in ALSA. we have to make sure our DSP is rebust.
after fix this, there is still a xrun issue in the DSP. thanks
Ok, does this mean I should apply or is there another fix coming ?
Test with BYT and rt5651. no critical regression happen. Could not reproduce to the same ASLA xrun recover stop/start
Thanks Xiuli
Thanks
Liam
On 5/3/2018 3:09 PM, Liam Girdwood wrote:
On Thu, 2018-05-03 at 09:10 +0800, zhigangw wrote:
On 2018年05月02日 21:09, Pan, Xiuli wrote:
On 5/2/2018 18:11, Liam Girdwood wrote:
On Wed, 2018-05-02 at 09:56 +0000, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of Wu Zhigang Sent: Wednesday, May 2, 2018 5:34 PM To: sound-open-firmware@alsa-project.org Cc: Wu Zhigang zhigang.wu@linux.intel.com; Wu, Zhigang zhigang.wu@intel.com Subject: [Sound-open-firmware] [PATCH] FIX: Add dma_stop when receive trigger stop cmd in host
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in
Small typo. Should be 'hda_dma_start'.
Others looks good to me.
Can someone confirm on BYT too.
BYT did not need this handler. The host dma for BYT is also GP-DMA and need to assign the DMA every host copy. When we trigger the host comp stop, there will no more host DMA. This problem is only shown on the APL/CNL platforms.
BTW, this bug is hit by the ALSA pcm lib xrun recovery. When ALSA trace the dma pointer position, it will wrongly though the DSP is in xrun and try to recover it by STOP/START pattern. Will the DSP be recovered from this kind of STOP/START?
Thanks Xiuli
Actually, It should be added. Because we cannot confirm the ALSA lib will not happen XRUN. In this situation, we have to recovered from this case. In the real environment, no one can confirm NO XRUN in ALSA. we have to make sure our DSP is rebust.
after fix this, there is still a xrun issue in the DSP. thanks
Ok, does this mean I should apply or is there another fix coming ?
Thanks
Liam
You can apply this patch. the XRUN issue in the DSP is another kind of issue. they are different. I just want to highlight this issue over here. Maybe somebody could have time on this. thanks BR ~zhigangw
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
Hello Liam:
could you apply this patch?
Thanks
Br
~zhigangw
On 2018年05月02日 17:33, Wu Zhigang wrote:
when ALSA lib detect xrun issue, it will send stop and start command to DSP without reset. it will hit error in hds_dma_start, if we did not add the dma_stop in the host_trigger function.
Signed-off-by: Wu Zhigang zhigang.wu@linux.intel.com
Test with: Apl-gpmrb with codec Linux sof-v4.14: 735b995d7b66 SOF master: 85ae8e74181f SOF-tools master: b327539e98f1
src/audio/host.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/audio/host.c b/src/audio/host.c index bee50ce..998c5ca 100644 --- a/src/audio/host.c +++ b/src/audio/host.c @@ -466,6 +466,7 @@ static int host_trigger(struct comp_dev *dev, int cmd)
switch (cmd) { case COMP_TRIGGER_STOP:
ret = host_stop(dev); break; case COMP_TRIGGER_START:ret = dma_stop(hd->dma, hd->chan);
participants (7)
-
Jie, Yang
-
Liam Girdwood
-
Liam Girdwood
-
Pan, Xiuli
-
Wu Zhigang
-
Wu, Zhigang
-
zhigangw