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>
(cherry picked from commit f83787f252)
This commit is contained in:
@ -245,6 +245,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]);
|
||||
@ -265,9 +267,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;
|
||||
|
||||
Reference in New Issue
Block a user