Commits

Shengjiu Wang committed ff62968ea8c
MLK-12366: ASoC: dmaengine: fix sai underrun issue after suspend/resume We use the devm_snd_dmaengine_pcm_register() for platform, don't use devm_snd_soc_register_platform(), their close funtion is different. One will release the dma channel, but another one won't release channel. When system enter suspend mode, alsa library is in draining state, it will not resume alsa driver in system resume, just call close directly. But the alsa driver is in state SNDRV_PCM_STATE_SUSPENDED, which is not a running state, so the trigger stop is not called, and dmaengine_terminate_all() is not called, then dma resource is not released. Which cause that in the next playback the sdma driver will not be started. Then there is a lot of SAI underrun error. If we use the devm_snd_soc_register_platform() for platfrom driver, there will be no issue, because it will release dma channel, release dma resource. But we use the devm_snd_dmaengine_pcm_register() for platform driver. So this patch is to add dmaengine_terminate_all() in the snd_dmaengine_pcm_close() to fix this issue. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>