summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/mediatek/mt8195
diff options
context:
space:
mode:
authorYC Hung <yc.hung@mediatek.com>2022-04-06 14:40:46 -0500
committerMark Brown <broonie@kernel.org>2022-04-07 18:29:45 +0100
commit5cfe477f6a3f9a4d9b2906d442964f2115b0403f (patch)
treeacd5a44b0b8cf05d3b4a5a4dd1822bdae06df62a /sound/soc/sof/mediatek/mt8195
parentfe70300c70baa82fd3024af9a1d2838610a35005 (diff)
downloadlinux-stable-5cfe477f6a3f9a4d9b2906d442964f2115b0403f.tar.gz
linux-stable-5cfe477f6a3f9a4d9b2906d442964f2115b0403f.tar.bz2
linux-stable-5cfe477f6a3f9a4d9b2906d442964f2115b0403f.zip
ASoC: SOF: mediatek: mt8195 add shutdown callback
Add mt8195 shutdown callback function implementation to ensure that shutdown flow is called to shutdown dsp core, disable adsp clock, and power off dsp sram correctly during reboot flow. Signed-off-by: YC Hung <yc.hung@mediatek.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220406194048.289787-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/mediatek/mt8195')
-rw-r--r--sound/soc/sof/mediatek/mt8195/mt8195.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/sof/mediatek/mt8195/mt8195.c b/sound/soc/sof/mediatek/mt8195/mt8195.c
index 3ab12f352935..b5e2fd72acfb 100644
--- a/sound/soc/sof/mediatek/mt8195/mt8195.c
+++ b/sound/soc/sof/mediatek/mt8195/mt8195.c
@@ -302,6 +302,11 @@ exit_clk_disable:
return ret;
}
+static int mt8195_dsp_shutdown(struct snd_sof_dev *sdev)
+{
+ return snd_sof_suspend(sdev->dev);
+}
+
static int mt8195_dsp_remove(struct snd_sof_dev *sdev)
{
struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev);
@@ -392,6 +397,7 @@ static const struct snd_sof_dsp_ops sof_mt8195_ops = {
/* probe and remove */
.probe = mt8195_dsp_probe,
.remove = mt8195_dsp_remove,
+ .shutdown = mt8195_dsp_shutdown,
/* DSP core boot */
.run = mt8195_run,
@@ -451,6 +457,7 @@ MODULE_DEVICE_TABLE(of, sof_of_mt8195_ids);
static struct platform_driver snd_sof_of_mt8195_driver = {
.probe = sof_of_probe,
.remove = sof_of_remove,
+ .shutdown = sof_of_shutdown,
.driver = {
.name = "sof-audio-of-mt8195",
.pm = &sof_of_pm,