summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2019-07-29 15:02:46 +0800
committerShengjiu Wang <shengjiu.wang@nxp.com>2019-08-07 11:10:53 +0800
commitf83787f252adb7cb0280c43ab0d428c66f9c63f9 (patch)
tree2f1525f8db1a211ab053f2da4e7fd72e5bd6a877 /sound
parent6de0ce94dd9fe0010f71c508cd0b73bb8f0a51b0 (diff)
MLK-22340-5: ASoC: imx-pcm-rpmsg: enable ignore_suspend for LPA
In LPA drain state, if runtime->status->state is SUSPEND, after resume, ALSA would exit drain mode directly, that cause some data in end of song is missed. This patch is to enable ignore_suspend flags that the runtime->status->state will be not in SUSPEND always. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/imx-pcm-rpmsg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-pcm-rpmsg.c b/sound/soc/fsl/imx-pcm-rpmsg.c
index 62246548f59d..d0c0a96371ff 100644
--- a/sound/soc/fsl/imx-pcm-rpmsg.c
+++ b/sound/soc/fsl/imx-pcm-rpmsg.c
@@ -239,6 +239,8 @@ static int imx_rpmsg_pcm_close(struct snd_pcm_substream *substream)
kfree(prtd);
+ rtd->dai_link->ignore_suspend = 0;
+
if (i2s_info->msg_drop_count[substream->stream])
dev_warn(rtd->dev, "Msg is dropped!, number is %d\n",
i2s_info->msg_drop_count[substream->stream]);
@@ -259,9 +261,10 @@ static int imx_rpmsg_pcm_prepare(struct snd_pcm_substream *substream)
if ((runtime->access == SNDRV_PCM_ACCESS_RW_INTERLEAVED ||
runtime->access == SNDRV_PCM_ACCESS_RW_NONINTERLEAVED) &&
rpmsg_i2s->version == 2 &&
- rpmsg_i2s->enable_lpa)
+ rpmsg_i2s->enable_lpa) {
+ rtd->dai_link->ignore_suspend = 1;
rpmsg_i2s->force_lpa = 1;
- else
+ } else
rpmsg_i2s->force_lpa = 0;
return 0;