Thread (3 messages) 3 messages, 3 authors, 2021-10-20
STALE1706d LANDED

[PATCH] ASoC: meson: implement driver_name for snd_soc_card in meson-card-utils

From: Christian Hewitt <hidden>
Date: 2021-10-17 16:00:38
Also in: alsa-devel, linux-amlogic, lkml
Subsystem: arm/amlogic meson soc sound drivers, sound, sound - soc layer / dynamic audio power management (asoc), the rest · Maintainers: Jerome Brunet, Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown, Linus Torvalds

Implement driver_name to provide an alternative to card_name for userspace
configuration of Amlogic audio cards.

Suggested-by: Matthias Reichl <redacted>
Signed-off-by: Christian Hewitt <redacted>
---
The meson AIU/AXG drivers currently require alsa confs based on the board
model name which is unique to each board. This is very flexible for audio
use-cases, but not very maintainable for distros with a single use-case
that need to support a large number of different Amlogic boards. Using a
driver name to match the card conf instead of card/model name reduces the
number of confs needed in the LibreELEC (Kodi) distro from 41 to 2.

 sound/soc/meson/meson-card-utils.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c
index 415cc0046e4b..29b0174f4b5c 100644
--- a/sound/soc/meson/meson-card-utils.c
+++ b/sound/soc/meson/meson-card-utils.c
@@ -302,6 +302,7 @@ int meson_card_probe(struct platform_device *pdev)
 
 	priv->card.owner = THIS_MODULE;
 	priv->card.dev = dev;
+	priv->card.driver_name = dev->driver->name;
 	priv->match_data = data;
 
 	ret = snd_soc_of_parse_card_name(&priv->card, "model");
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help