MLK-21002-2: ASoC: imx-pcm-rpmsg: don't remove timer at suspend

If timer is deleted in suspend, when the suspend is resumed
by pressing the power key, there will be no timer until the buffer
empty, and the hw_ptr will not be updated.

So the timer should not be removed at suspend.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 9a17ce36ec)
This commit is contained in:
Shengjiu Wang
2019-02-28 18:43:55 +08:00
parent f26d4d2230
commit 4028bd0f76

View File

@ -494,7 +494,6 @@ int imx_rpmsg_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
struct fsl_rpmsg_i2s *rpmsg_i2s = dev_get_drvdata(cpu_dai->dev);
struct i2s_info *i2s_info = &rpmsg_i2s->i2s_info;
int ret;
switch (cmd) {
@ -516,8 +515,7 @@ int imx_rpmsg_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
imx_rpmsg_pause(substream);
else
imx_rpmsg_terminate_all(substream);
} else
del_timer(&i2s_info->stream_timer[substream->stream]);
}
break;
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
imx_rpmsg_pause(substream);