* [PATCH] ASoc: SOF: topology: Clear SOF link platform name upon unload
@ 2024-08-21 4:10 Chen-Yu Tsai
2024-08-28 16:30 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Chen-Yu Tsai @ 2024-08-21 4:10 UTC (permalink / raw)
To: Pierre-Louis Bossart, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Daniel Baluta, Kai Vehmanen, Mark Brown,
Jaroslav Kysela, Takashi Iwai
Cc: Chen-Yu Tsai, sound-open-firmware, linux-sound, linux-kernel
The SOF topology loading function sets the device name for the platform
component link. This should be unset when unloading the topology,
otherwise a machine driver unbind/bind or reprobe would complain about
an invalid component as having both its component name and of_node set:
mt8186_mt6366 sound: ASoC: Both Component name/of_node are set for AFE_SOF_DL1
mt8186_mt6366 sound: error -EINVAL: Cannot register card
mt8186_mt6366 sound: probe with driver mt8186_mt6366 failed with error -22
This happens with machine drivers that set the of_node separately.
Clear the SOF link platform name in the topology unload callback.
Fixes: 311ce4fe7637 ("ASoC: SOF: Add support for loading topologies")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
sound/soc/sof/topology.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index b54382131991..496162df5270 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -2050,6 +2050,8 @@ static int sof_link_unload(struct snd_soc_component *scomp, struct snd_soc_dobj
if (!slink)
return 0;
+ slink->link->platforms->name = NULL;
+
kfree(slink->tuples);
list_del(&slink->list);
kfree(slink->hw_configs);
--
2.46.0.184.g6999bdac58-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoc: SOF: topology: Clear SOF link platform name upon unload
2024-08-21 4:10 [PATCH] ASoc: SOF: topology: Clear SOF link platform name upon unload Chen-Yu Tsai
@ 2024-08-28 16:30 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-08-28 16:30 UTC (permalink / raw)
To: Pierre-Louis Bossart, Liam Girdwood, Peter Ujfalusi, Bard Liao,
Ranjani Sridharan, Daniel Baluta, Kai Vehmanen, Jaroslav Kysela,
Takashi Iwai, Chen-Yu Tsai
Cc: sound-open-firmware, linux-sound, linux-kernel
On Wed, 21 Aug 2024 12:10:04 +0800, Chen-Yu Tsai wrote:
> The SOF topology loading function sets the device name for the platform
> component link. This should be unset when unloading the topology,
> otherwise a machine driver unbind/bind or reprobe would complain about
> an invalid component as having both its component name and of_node set:
>
> mt8186_mt6366 sound: ASoC: Both Component name/of_node are set for AFE_SOF_DL1
> mt8186_mt6366 sound: error -EINVAL: Cannot register card
> mt8186_mt6366 sound: probe with driver mt8186_mt6366 failed with error -22
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoc: SOF: topology: Clear SOF link platform name upon unload
commit: e0be875c5bf03a9676a6bfed9e0f1766922a7dbd
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-28 16:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-21 4:10 [PATCH] ASoc: SOF: topology: Clear SOF link platform name upon unload Chen-Yu Tsai
2024-08-28 16:30 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®