Skip to contentSkip to conversation

ASoC: core - allow ASoC more flexible machine name

PATCH Applied Liam Girdwood 2 participants 2 messages May 12, 2011

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

PATCH 1/1 ASoC: core - allow ASoC more flexible machine name

Allow ASoC machine drivers to register a driver name and a longname. This allows user space to determine the flavour of machine driver.

---
 include/sound/soc.h  |    2 ++
 sound/soc/soc-core.c |    6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
include/sound/soc.h +2 -0
index b27c7a2..f1de3e0 100644
@@ -702,6 +702,8 @@ struct snd_soc_aux_dev {
 /* SoC card */
 struct snd_soc_card {
 	const char *name;
+	const char *long_name;
+	const char *driver_name;
 	struct device *dev;
 	struct snd_card *snd_card;
 	struct module *owner;
sound/soc/soc-core.c +4 -2
index a477e21..c1a4cf4 100644
@@ -1926,9 +1926,11 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
 					card->num_dapm_routes);
 
 	snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname),
-		 "%s",  card->name);
-	snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
 		 "%s", card->name);
+	snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
+		 "%s", card->long_name ? card->long_name : card->name);
+	snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
+		 "%s", card->driver_name);
 
 	if (card->late_probe) {
 		ret = card->late_probe(card);
Signature · 1 line
1.7.4.1
Applied
#1 lore raw
Quoted 5 lines · Liam Girdwood

Allow ASoC machine drivers to register a driver name and a longname. This allows user space to determine the flavour of machine driver.

Applied, thanks.