From patchwork Wed Nov 20 17:44:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaroslav Kysela X-Patchwork-Id: 11254577 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B5FF1390 for ; Wed, 20 Nov 2019 17:55:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AEBF8208C0 for ; Wed, 20 Nov 2019 17:55:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rA8K13Ag"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=perex.cz header.i=@perex.cz header.b="NM+rjlzI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEBF8208C0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=perex.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DFA821738; Wed, 20 Nov 2019 18:45:58 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DFA821738 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1574272009; bh=QfwvipcOmKcO1zjB40kwpIN/8C0Sk04FzPPUkXle9ho=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rA8K13Agfv5PMTq3D7ZxFf2v6S3esfdDb7qk2JWGP74y31VsC7ADKGRM4fkMVpfqp c3ogg6GC9CPDDybwsaOjZpWgwnPj6oIlS9gKe4h7iuzaTIVZja7Wo9GB+URZb/oHOi j3rQENAVaQQ/FraJrAJuIno+lU7jslJ9z7YmD2Lg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5842AF800FF; Wed, 20 Nov 2019 18:45:07 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20D3FF8014B; Wed, 20 Nov 2019 18:45:05 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_HELO_PASS,SPF_PASS,SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7694EF800FF for ; Wed, 20 Nov 2019 18:45:02 +0100 (CET) Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 72B00A0042; Wed, 20 Nov 2019 18:45:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 72B00A0042 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1574271901; bh=/Op/eDl9SjR42eUDBnq8HeUc3yn6/2eBRVvStZ2Jjw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NM+rjlzIe+M+Sptn4dkYK7vItzUC/ksu7kCgOydjqa3xKaiH8jo1W0mEoYI7JGnyb 4V+wN2B6/NX3dlI7w9p3b1K36iLDK0REYWZx1YIkKbE6wsdwRAVXQDskwEBTsdKu30 +epdTCjzLdD5+S8ZDN/yD7FfwGLI02tipf5EYAOs= Received: from p50.perex-int.cz (unknown [192.168.100.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Wed, 20 Nov 2019 18:44:57 +0100 (CET) From: Jaroslav Kysela To: ALSA development Date: Wed, 20 Nov 2019 18:44:35 +0100 Message-Id: <20191120174435.30920-2-perex@perex.cz> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191120174435.30920-1-perex@perex.cz> References: <20191120174435.30920-1-perex@perex.cz> MIME-Version: 1.0 Cc: Takashi Iwai , Mark Brown Subject: [alsa-devel] [PATCH v2 2/2] ASoC: DMI long name - avoid to add board name if matches with product name X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Current code: LENOVO-20QE000VMC-ThinkPadX1Carbon7th-20QE000VMC With the patch: LENOVO-20QE000VMC-ThinkPadX1Carbon7th Signed-off-by: Jaroslav Kysela Cc: Mark Brown --- 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");