[alsa-devel] [PATCH v2 2/2] ASoC: DMI long name - avoid to add board name if matches with product name
Jaroslav Kysela
perex at perex.cz
Wed Nov 20 18:44:35 CET 2019
Current code:
LENOVO-20QE000VMC-ThinkPadX1Carbon7th-20QE000VMC
With the patch:
LENOVO-20QE000VMC-ThinkPadX1Carbon7th
Signed-off-by: Jaroslav Kysela <perex at perex.cz>
Cc: Mark Brown <broonie at kernel.org>
---
sound/soc/soc-core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index db56507174bd..ace7e518bc5a 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1835,7 +1835,8 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
board = dmi_get_system_info(DMI_BOARD_NAME);
if (board && is_dmi_valid(board)) {
- append_dmi_string(card, board);
+ if (!product || strcasecmp(board, product))
+ append_dmi_string(card, board);
} else if (!product) {
/* fall back to using legacy name */
dev_warn(card->dev, "ASoC: no DMI board/product name!\n");
--
2.20.1
More information about the Alsa-devel
mailing list