soc: reduce the auto suspend timeout when swr event finished
the APSS would suspend within ~120ms after audio off, if system suspend swrm_suspend() is called before swrm_runtime_suspend. The clock stop sequence require writing IPC and expect interrupt, which would stop the APSS to be suspended. Reduce the auto suspend time specifically when swr event is done can call the swrm_runtime_suspend Change-Id: Iee0c9143d65e5a8e68a8e20ab73bea9def1920bd Signed-off-by: Junkai Cai <junkai@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
165cf0933e
commit
30fbd08bca
@@ -1767,6 +1767,8 @@ static int swrm_slvdev_datapath_control(struct swr_master *master, bool enable)
|
|||||||
dev_dbg(&master->dev, "%s: pm_runtime auto suspend triggered\n",
|
dev_dbg(&master->dev, "%s: pm_runtime auto suspend triggered\n",
|
||||||
__func__);
|
__func__);
|
||||||
pm_runtime_mark_last_busy(swrm->dev);
|
pm_runtime_mark_last_busy(swrm->dev);
|
||||||
|
if (!enable)
|
||||||
|
pm_runtime_set_autosuspend_delay(swrm->dev, 80);
|
||||||
pm_runtime_put_autosuspend(swrm->dev);
|
pm_runtime_put_autosuspend(swrm->dev);
|
||||||
}
|
}
|
||||||
exit:
|
exit:
|
||||||
@@ -3411,6 +3413,9 @@ exit:
|
|||||||
mutex_unlock(&swrm->runtime_lock);
|
mutex_unlock(&swrm->runtime_lock);
|
||||||
trace_printk("%s: pm_runtime: suspend done state: %d\n",
|
trace_printk("%s: pm_runtime: suspend done state: %d\n",
|
||||||
__func__, swrm->state);
|
__func__, swrm->state);
|
||||||
|
dev_dbg(dev, "%s: pm_runtime: suspend done state: %d\n",
|
||||||
|
__func__, swrm->state);
|
||||||
|
pm_runtime_set_autosuspend_delay(dev, auto_suspend_timer);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
Reference in New Issue
Block a user