Skip to contentSkip to conversation

ASoC: meson: implement driver_name for snd_soc_card in meson-card-utils

PATCH In review Christian Hewitt 3 participants 3 messages Oct 17, 2021 – Oct 20, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: meson: implement driver_name for snd_soc_card in meson-card-utils

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

---
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(+)
sound/soc/meson/meson-card-utils.c +1 -0
index 415cc0046e4b..29b0174f4b5c 100644
@@ -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");
Signature · 1 line
2.17.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines · Christian Hewitt

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

---
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(+)
sound/soc/meson/meson-card-utils.c +0 -0
index 415cc0046e4b..29b0174f4b5c 100644

sound/soc/meson/meson-card-utils.c int meson_card_probe(struct platform_device *pdev) · line 306

Quoted 5 lines
sound/soc/meson/meson-card-utils.c +1 -0
@@ -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;

I was preparing something similar to help with alsa-ucm so

Quoted 2 lines
sound/soc/meson/meson-card-utils.c +0 -0
 	ret = snd_soc_of_parse_card_name(&priv->card, "model");
maintainer
#2 lore raw
In reply to Christian Hewitt
Quoted 4 lines · Christian Hewitt

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

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

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

      commit: bc387887ae22d6ed6439e83968b5be3443a8e57d

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