MLK-21107-1: ASoC: Fix timer wake up system after suspend
Fixes commit4028bd0f76("MLK-21002-2: ASoC: imx-pcm-rpmsg: don't remove timer at suspend") if the timer isn't removed at suspend, there will be interrupt from M4 side when the period size is small to wake up system quickly So we need to revert the previous fix and add timer in resume state Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commita23d1df081)
This commit is contained in:
committed by
Leonard Crestez
parent
eb422681ff
commit
7bf6d31318
@ -534,8 +534,14 @@ int imx_rpmsg_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
ret = imx_rpmsg_async_issue_pending(substream);
|
||||
break;
|
||||
case SNDRV_PCM_TRIGGER_RESUME:
|
||||
if (rpmsg_i2s->force_lpa)
|
||||
if (rpmsg_i2s->force_lpa) {
|
||||
int time_msec;
|
||||
|
||||
time_msec = (int)(runtime->period_size*1000/runtime->rate);
|
||||
mod_timer(&i2s_info->stream_timer[substream->stream],
|
||||
jiffies + msecs_to_jiffies(time_msec));
|
||||
break;
|
||||
}
|
||||
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
|
||||
ret = imx_rpmsg_restart(substream);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user