ASoC: SOF: OF: Add shutdown callback for SOF OF device
authorYC Hung <yc.hung@mediatek.com>
Wed, 6 Apr 2022 19:40:45 +0000 (14:40 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 7 Apr 2022 17:29:44 +0000 (18:29 +0100)
Add shutdown callback function for SOF OF device and call
snd_sof_device_shutdown in sof_of_shutdown callback for DSP
shutdown sequence.

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-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/sof-of-dev.c
sound/soc/sof/sof-of-dev.h

index e371863..18c0f3c 100644 (file)
@@ -95,4 +95,10 @@ int sof_of_remove(struct platform_device *pdev)
 }
 EXPORT_SYMBOL(sof_of_remove);
 
+void sof_of_shutdown(struct platform_device *pdev)
+{
+       snd_sof_device_shutdown(&pdev->dev);
+}
+EXPORT_SYMBOL(sof_of_shutdown);
+
 MODULE_LICENSE("Dual BSD/GPL");
index 4e0f658..fd950a2 100644 (file)
@@ -13,5 +13,6 @@ extern const struct dev_pm_ops sof_of_pm;
 
 int sof_of_probe(struct platform_device *pdev);
 int sof_of_remove(struct platform_device *pdev);
+void sof_of_shutdown(struct platform_device *pdev);
 
 #endif