summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-04-24 08:54:42 +0200
committerMark Brown <broonie@kernel.org>2017-04-24 18:47:17 +0100
commit861886d338f7dd802be972e770a695bba62f397a (patch)
tree2f4c6ec7d2d48c8a44296458b26c98dae6d58c9d /sound/soc/soc-core.c
parent1f5a4535db41bd2bb8d1a15f098cb2921d6c1317 (diff)
ASoC: Call snd_soc_set_dmi_name() unconditionally
Since recently UCM can pick up a configuration specific to the board via card longname field, and we introduced a helper function snd_soc_set_dmi_name() for that. So far, it was used only in one place (sound/soc/intel/boards/broadwell.c), but it should be more widely applied. This patch puts a big hammer for that: it lets snd_soc_register_card() calling snd_soc_set_dmi_name() unconditionally, so that all x86 devices get the better longname string. This would have no impact for other systems without DMI support, as snd_soc_set_dmi_name() is no-op on them. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 52f6d9c28df9..05c4d9564b0b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2192,6 +2192,9 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
card->num_of_dapm_routes);
+ /* try to set some sane longname if DMI is available */
+ snd_soc_set_dmi_name(card, NULL);
+
snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname),
"%s", card->name);
snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),