On 3/15/2018 13:32, Jie, Yang wrote:
-----Original Message----- From: sound-open-firmware-bounces@alsa-project.org [mailto:sound-open- firmware-bounces@alsa-project.org] On Behalf Of Xiuli Pan Sent: Thursday, March 15, 2018 1:20 PM To: sound-open-firmware@alsa-project.org Cc: Pan Xiuli xiuli.pan@linux.intel.com; Pan, Xiuli xiuli.pan@intel.com Subject: [Sound-open-firmware] [PATCH] host: Stop dma when pause
From: Pan Xiuli xiuli.pan@linux.intel.com
For gw-dma host, we need to stop the dma to make sure status are correct for resume.
What happen if we don't stop for pause, that is what we do for gpdma on BYT.
We will random fail by the check of dma status in fucntion hda_dma_start static int hda_dma_start(struct dma *dma, int channel) { ... dgcs = host_dma_reg_read(dma, channel, DGCS); if (p->chan[channel].status != COMP_STATE_PREPARE || (dgcs & DGCS_GEN)) { ... }
The DGCS_GEN may not be in stop status when we resume the PCM.
Thanks Xiuli
Thanks, ~Keyon
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
Test with: Mininow max rt5651 and GP-MRB nocodec SOF 1.1-stable: aa09938fd330232b201f5683faf8e32975ffcfac SOF-Tool 1.1-stable: 8d9b8d51f9c60e1c1725e9ccd3da22c0b523d0cf https://github.com/plbossart/sound/tree/topic/sof-v4.14: 84ed2d3ba0220424dd441f3a28ed2fe83967ad3a
src/audio/host.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/audio/host.c b/src/audio/host.c index 287c886..744ca02 100644 --- a/src/audio/host.c +++ b/src/audio/host.c @@ -465,6 +465,9 @@ static int host_cmd(struct comp_dev *dev, int cmd, void *data) return ret;
switch (cmd) {
- case COMP_CMD_PAUSE:
dma_stop(hd->dma, hd->chan);
case COMP_CMD_STOP: ret = host_stop(dev); break;break;
-- 2.7.4
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware