linux-stable/sound/soc
Chancel Liu 755bb9a44f
ASoC: soc-core.c: Prefer to return dai->driver->name in snd_soc_dai_name_get()
ASoC machine driver can use snd_soc_{of_}get_dlc() (A) to get DAI name
for dlc (snd_soc_dai_link_component). In this function call
dlc->dai_name is parsed via snd_soc_dai_name_get() (B).

(A)	int snd_soc_get_dlc(...)
	{
		...
(B)		dlc->dai_name = snd_soc_dai_name_get(dai);
		...
	}

(B) has a priority to return dai->name as dlc->dai_name. In most cases
card can probe successfully. However it has an issue that ASoC tries to
rebind card. Here is a simplified flow for example:

 |	a) Card probes successfully at first
 |	b) One of the component bound to this card is removed for some
 |	   reason the component->dev is released
 |	c) That component is re-registered
 v	d) ASoC calls snd_soc_try_rebind_card()

a) points dlc->dai_name to dai->name. b) releases all resource of the
old DAI. c) creates new DAI structure. In result d) can not use
dlc->dai_name to add new created DAI.

So it's reasonable that prefer to return dai->driver->name in
snd_soc_dai_name_get() because dai->driver is a pre-defined global
variable. Also update snd_soc_is_matching_dai() for alignment.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://msgid.link/r/20240304072128.2845432-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-03-04 20:27:36 +00:00
..
adi
amd ASoC: amd: ps: modify ACP register end address macro 2024-02-22 19:49:40 +00:00
apple
atmel ASoC: atmel: use devm_snd_soc_register_card() 2024-01-22 00:06:03 +00:00
au1x
bcm
cirrus
codecs ASoC: cs-amp-lib: Add KUnit test for calibration helpers 2024-03-04 20:27:35 +00:00
dwc
fsl ASoC: use devm_snd_soc_register_card() 2024-01-22 21:08:17 +00:00
generic ASoC: audio-graph-card2: fix index check on graph_parse_node_multi_nm() 2024-01-12 14:13:53 +00:00
google
hisilicon
img
intel ASoC: Intel: avs: Fixes and new platforms support 2024-02-21 00:52:26 +00:00
jz4740
kirkwood
loongson
mediatek ASoC: Fixes for v6.8 2024-01-16 17:37:17 +01:00
meson ASoC: meson: axg-fifo: use FIELD helpers 2024-02-27 18:43:22 +00:00
mxs
pxa ASoC: pxa: remove duplicated CONFIG_SND_PXA2XX_AC97 entry 2024-02-05 14:32:29 +00:00
qcom ASoC: Intel: avs: Fixes and new platforms support 2024-02-21 00:52:26 +00:00
rockchip i2c: make i2c_bus_type const 2024-01-18 21:10:43 +01:00
samsung
sh ASoC: sh: rz-ssi: Fix error message print 2024-01-30 15:27:56 +00:00
sof ASoC: Intel: avs: Fixes and new platforms support 2024-02-21 00:52:26 +00:00
spear
sprd
starfive
sti
stm
sunxi ASoC: sunxi: sun4i-spdif: Add support for Allwinner H616 2024-01-29 16:55:18 +00:00
tegra
ti ASoC: use devm_snd_soc_register_card() 2024-01-22 21:08:17 +00:00
uniphier
ux500
xilinx
xtensa
Kconfig
Makefile
soc-ac97.c
soc-acpi.c
soc-card.c
soc-component.c
soc-compress.c
soc-core.c ASoC: soc-core.c: Prefer to return dai->driver->name in snd_soc_dai_name_get() 2024-03-04 20:27:36 +00:00
soc-dai.c
soc-dapm.c
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-jack.c
soc-link.c
soc-ops.c
soc-pcm.c ASoC: Updates for v6.8 2024-01-08 08:18:02 +01:00
soc-topology-test.c
soc-topology.c
soc-utils-test.c
soc-utils.c