All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Vinod Koul <vinod.koul@intel.com>,
	alsa-devel@alsa-project.org, Jie Yang <yang.jie@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 2/2] ASoC: Call snd_soc_set_dmi_name() unconditionally
Date: Fri, 21 Apr 2017 17:55:25 +0200	[thread overview]
Message-ID: <20170421155525.15012-2-tiwai@suse.de> (raw)
In-Reply-To: <20170421155525.15012-1-tiwai@suse.de>

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>
---
 sound/soc/intel/boards/broadwell.c | 3 ---
 sound/soc/soc-core.c               | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/broadwell.c b/sound/soc/intel/boards/broadwell.c
index faf865bb1765..6dcbbcefc25b 100644
--- a/sound/soc/intel/boards/broadwell.c
+++ b/sound/soc/intel/boards/broadwell.c
@@ -269,9 +269,6 @@ static struct snd_soc_card broadwell_rt286 = {
 static int broadwell_audio_probe(struct platform_device *pdev)
 {
 	broadwell_rt286.dev = &pdev->dev;
-
-	snd_soc_set_dmi_name(&broadwell_rt286, NULL);
-
 	return devm_snd_soc_register_card(&pdev->dev, &broadwell_rt286);
 }
 
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index aac73ff8a92a..6536eccdafae 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);
+
 	snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname),
 		 "%s", card->name);
 	snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
-- 
2.11.1

  reply	other threads:[~2017-04-21 15:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-21 15:55 [PATCH 1/2] ASoC: Provide a dummy wrapper of snd_soc_set_dmi_name() Takashi Iwai
2017-04-21 15:55 ` Takashi Iwai [this message]
2017-04-22  5:49   ` [PATCH 2/2] ASoC: Call snd_soc_set_dmi_name() unconditionally kbuild test robot
2017-04-24  4:47   ` Vinod Koul
2017-04-24  6:44     ` Takashi Iwai
2017-04-21 19:43 ` [PATCH 1/2] ASoC: Provide a dummy wrapper of snd_soc_set_dmi_name() Liam Girdwood
2017-04-24 18:20 ` Applied "ASoC: Provide a dummy wrapper of snd_soc_set_dmi_name()" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170421155525.15012-2-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=vinod.koul@intel.com \
    --cc=yang.jie@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.