* [PATCH] ASoC: core - allow ASoC more flexible machine name
@ 2011-05-12 15:14 Liam Girdwood
2011-05-12 15:40 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Liam Girdwood @ 2011-05-12 15:14 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, 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.
Signed-off-by: Liam Girdwood <lrg@ti.com>
---
include/sound/soc.h | 2 ++
sound/soc/soc-core.c | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index b27c7a2..f1de3e0 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -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;
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a477e21..c1a4cf4 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-05-12 15:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12 15:14 [PATCH] ASoC: core - allow ASoC more flexible machine name Liam Girdwood
2011-05-12 15:40 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.