]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: mediatek: mt8195 suspend check dsp idle
authorYC Hung <yc.hung@mediatek.com>
Mon, 6 Jun 2022 21:02:12 +0000 (16:02 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 6 Jun 2022 21:08:25 +0000 (22:08 +0100)
commit5f698a5501fe49207b5883767191397f85323a80
treeb7cebb1f68e510b2eb597c30aa380d7785948819
parent0bcbbca0cb6f3b192ad8d9ad7732b05a1f1ce788
ASoC: SOF: mediatek: mt8195 suspend check dsp idle

During suspend flow, sof_suspend will be called and the pm_ops->ctx_save
callback notifies DSP of the upcoming power down.

Upon receipt of the ctx_save IPC, the DSP will start the D3 transition.
Before the DSP enter idle, an interrupt is generated to notify the host of
the power state change.

Since the host and DSP are two different processors, there could be a
race condition, which can be avoided by polling with 1s timeout and 500us
intervals

Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220606210212.146626-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/mediatek/mt8195/mt8195.c
sound/soc/sof/mediatek/mt8195/mt8195.h