* [PATCH] ASoC: SOF: mediatek: add shutdown callback
@ 2022-11-27 20:04 Ricardo Ribalda
2022-11-30 11:06 ` AngeloGioacchino Del Regno
2022-11-30 12:47 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo Ribalda @ 2022-11-27 20:04 UTC (permalink / raw)
To: Takashi Iwai, Pierre-Louis Bossart, Jaroslav Kysela,
Peter Ujfalusi, Matthias Brugger, Liam Girdwood, Kai Vehmanen,
Mark Brown, Ranjani Sridharan, Daniel Baluta, Bard Liao
Cc: linux-arm-kernel, linux-mediatek, sound-open-firmware,
linux-kernel, Ricardo Ribalda, alsa-devel
If we do not shutdown the peripheral properly at shutdown, the whole system
crashes after kexec() on the first io access.
Let's implement the appropriate callback.
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Liam Girdwood <lgirdwood@gmail.com>
To: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To: Bard Liao <yung-chuan.liao@linux.intel.com>
To: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: Daniel Baluta <daniel.baluta@nxp.com>
To: Mark Brown <broonie@kernel.org>
To: Jaroslav Kysela <perex@perex.cz>
To: Takashi Iwai <tiwai@suse.com>
To: Matthias Brugger <matthias.bgg@gmail.com>
Cc: sound-open-firmware@alsa-project.org
Cc: alsa-devel@alsa-project.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
sound/soc/sof/mediatek/mt8186/mt8186.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/sof/mediatek/mt8186/mt8186.c b/sound/soc/sof/mediatek/mt8186/mt8186.c
index 181189e00e02..79da25725987 100644
--- a/sound/soc/sof/mediatek/mt8186/mt8186.c
+++ b/sound/soc/sof/mediatek/mt8186/mt8186.c
@@ -430,6 +430,11 @@ static int mt8186_dsp_remove(struct snd_sof_dev *sdev)
return 0;
}
+static int mt8186_dsp_shutdown(struct snd_sof_dev *sdev)
+{
+ return snd_sof_suspend(sdev->dev);
+}
+
static int mt8186_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
{
mt8186_sof_hifixdsp_shutdown(sdev);
@@ -538,6 +543,7 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = {
/* probe and remove */
.probe = mt8186_dsp_probe,
.remove = mt8186_dsp_remove,
+ .shutdown = mt8186_dsp_shutdown,
/* DSP core boot */
.run = mt8186_run,
@@ -629,6 +635,7 @@ MODULE_DEVICE_TABLE(of, sof_of_mt8186_ids);
static struct platform_driver snd_sof_of_mt8186_driver = {
.probe = sof_of_probe,
.remove = sof_of_remove,
+ .shutdown = sof_of_shutdown,
.driver = {
.name = "sof-audio-of-mt8186",
.pm = &sof_of_pm,
---
base-commit: 4312098baf37ee17a8350725e6e0d0e8590252d4
change-id: 20221127-mtk-snd-e0abf36be4c0
Best regards,
--
Ricardo Ribalda <ribalda@chromium.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: SOF: mediatek: add shutdown callback
2022-11-27 20:04 [PATCH] ASoC: SOF: mediatek: add shutdown callback Ricardo Ribalda
@ 2022-11-30 11:06 ` AngeloGioacchino Del Regno
2022-11-30 12:47 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-11-30 11:06 UTC (permalink / raw)
To: Ricardo Ribalda, Takashi Iwai, Pierre-Louis Bossart,
Jaroslav Kysela, Peter Ujfalusi, Matthias Brugger, Liam Girdwood,
Kai Vehmanen, Mark Brown, Ranjani Sridharan, Daniel Baluta,
Bard Liao
Cc: linux-arm-kernel, linux-mediatek, sound-open-firmware,
linux-kernel, alsa-devel
Il 27/11/22 21:04, Ricardo Ribalda ha scritto:
> If we do not shutdown the peripheral properly at shutdown, the whole system
> crashes after kexec() on the first io access.
>
> Let's implement the appropriate callback.
>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: SOF: mediatek: add shutdown callback
2022-11-27 20:04 [PATCH] ASoC: SOF: mediatek: add shutdown callback Ricardo Ribalda
2022-11-30 11:06 ` AngeloGioacchino Del Regno
@ 2022-11-30 12:47 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-11-30 12:47 UTC (permalink / raw)
To: Daniel Baluta, Peter Ujfalusi, Liam Girdwood, Ricardo Ribalda,
Kai Vehmanen, Matthias Brugger, Ranjani Sridharan,
Jaroslav Kysela, Pierre-Louis Bossart, Takashi Iwai, Bard Liao
Cc: alsa-devel, linux-kernel, linux-arm-kernel, sound-open-firmware,
linux-mediatek
On Sun, 27 Nov 2022 21:04:15 +0100, Ricardo Ribalda wrote:
> If we do not shutdown the peripheral properly at shutdown, the whole system
> crashes after kexec() on the first io access.
>
> Let's implement the appropriate callback.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SOF: mediatek: add shutdown callback
commit: e063330a77edbdc57a142a27a82e51dc1361ab9d
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-30 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-27 20:04 [PATCH] ASoC: SOF: mediatek: add shutdown callback Ricardo Ribalda
2022-11-30 11:06 ` AngeloGioacchino Del Regno
2022-11-30 12:47 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).