]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
ASoC: SOF: Intel: BYT: add .remove op
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Tue, 26 May 2020 20:36:38 +0000 (15:36 -0500)
committerMark Brown <broonie@kernel.org>
Wed, 27 May 2020 13:06:58 +0000 (14:06 +0100)
Add .remove op that disables interrupts and reset the DSP
for BYT and CHT platforms.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200526203640.25980-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/byt.c

index 457da8fcc6a0b390dde49041c0cfaa2463cc0e11..8784c7319098885f284a3d678531cf316ee30161 100644 (file)
@@ -456,6 +456,13 @@ static int byt_resume(struct snd_sof_dev *sdev)
        return 0;
 }
 
+static int byt_remove(struct snd_sof_dev *sdev)
+{
+       byt_reset_dsp_disable_int(sdev);
+
+       return 0;
+}
+
 /* Baytrail DAIs */
 static struct snd_soc_dai_driver byt_dai[] = {
 {
@@ -811,6 +818,7 @@ irq:
 const struct snd_sof_dsp_ops sof_byt_ops = {
        /* device init */
        .probe          = byt_acpi_probe,
+       .remove         = byt_remove,
 
        /* DSP core boot / reset */
        .run            = byt_run,
@@ -889,6 +897,7 @@ EXPORT_SYMBOL_NS(byt_chip_info, SND_SOC_SOF_BAYTRAIL);
 const struct snd_sof_dsp_ops sof_cht_ops = {
        /* device init */
        .probe          = byt_acpi_probe,
+       .remove         = byt_remove,
 
        /* DSP core boot / reset */
        .run            = byt_run,