All of lore.kernel.org
 help / color / mirror / Atom feed
From: mengdong.lin@linux.intel.com
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: tiwai@suse.de, liam.r.girdwood@linux.intel.com,
	Mengdong Lin <mengdong.lin@linux.intel.com>,
	mengdong.lin@intel.com, pierre-louis.bossart@intel.com
Subject: [PATCH] ASoC: snd_soc_set_dmi_name will use DMI_SYS_VENDOR if available
Date: Sat, 29 Apr 2017 00:19:47 +0800	[thread overview]
Message-ID: <1493396387-15884-1-git-send-email-mengdong.lin@linux.intel.com> (raw)

From: Mengdong Lin <mengdong.lin@linux.intel.com>

This fix is based on Daniel Drake's suggestion: most x86 machines have a
meaningfull DMI_SYS_VENDOR rather than DMI_BOARD_VENDOR.

So snd_soc_set_dmi_name will try to get vendor name from DMI_SYS_VENDOR
at first, and if that's null, then use DMI_BOARD_VENDOR.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 525f2f3..45f0a34 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1974,7 +1974,9 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
 		return 0; /* long name already set by driver or from DMI */
 
 	/* make up dmi long name as: vendor.product.version.board */
-	vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
+	vendor = dmi_get_system_info(DMI_SYS_VENDOR);
+	if (!vendor)
+		vendor = dmi_get_system_info(DMI_BOARD_VENDOR);
 	if (!vendor) {
 		dev_warn(card->dev, "ASoC: no DMI vendor name!\n");
 		return 0;
-- 
2.5.0

             reply	other threads:[~2017-04-28 16:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 16:19 mengdong.lin [this message]
2017-04-28 16:40 ` [PATCH] ASoC: snd_soc_set_dmi_name will use DMI_SYS_VENDOR if available Pierre-Louis Bossart
2017-05-02 10:42   ` Mengdong Lin
2017-05-02 10:41     ` Takashi Iwai

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=1493396387-15884-1-git-send-email-mengdong.lin@linux.intel.com \
    --to=mengdong.lin@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=mengdong.lin@intel.com \
    --cc=pierre-louis.bossart@intel.com \
    --cc=tiwai@suse.de \
    /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.