Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp128142pxf; Wed, 10 Mar 2021 23:11:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVLpdrhJN7sMPXEUjFP7/b4iIzk0Dcp7StcJZQfaLB2hbn2MPqfRRxnJ7W8OP6G442NHTu X-Received: by 2002:a17:906:66cf:: with SMTP id k15mr1673405ejp.296.1615446714837; Wed, 10 Mar 2021 23:11:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615446714; cv=none; d=google.com; s=arc-20160816; b=zvUBQeD9f0juNHaiAd8HVYt+JOG2cSyJe3Z1fVITCp7FQTVX9v3wpDuRGjrlxidsrE vFPtNddi/hkGzgF1TSSIWiDLqS9FfCEt+8yX4kNZc47p0ixNMXRjETrzX18nsELS2Ktg dXw0kQt7U1kGrAOe+It9n+wrQ/CTR2YN+njicunj7LWkAcydKtYLqFtrMGNlRq28rj9b kfYlsIo6DQRo7WADbGhVdBomXOU8hdeeMtpUbJCWXlWpOsldv7YvnJRhsKWAY1RJGp29 vx5tw5bpduuzSXFeB1wXgPuRdBGZF9Ew/8Y6u63X2apQAt8hMVUNv6/uxG36Cma2/GDM 2lbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=d2p+TZKIklv5yCmIMuDWdgX+AP8BtlgJbGOspsAqUro=; b=iF6M/IhYtL3zyYCMYMgcpKHchvoWKN364OBCTbdkJ7oonjBp9eySLA2vxywmWawemn NyXcHObYKV8VtHf/9OF4eql9IKchuYcEcZk7zYz3D98aJapnphv46bezOt9FjZSkiGuU eqL/lfCecXJtjYihZlpI63D7BCChbnUmnBLkTabF9OwLmkPB5uhTjk42RLrYr3Yu3uBm a+LdpNYlxulsEoCUK5lCG/WSMUV5EqMNeg58qu/EikNfDx9mpayXapmRAz2O3PbaFsCF VQP308GDk9dRODBMNlZcj1IoVzGuulpuMAxPQSAeHJsv+uktrDu75btEbIj35aoTXbq0 9VJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt20si1324354edb.201.2021.03.10.23.11.32; Wed, 10 Mar 2021 23:11:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231871AbhCKHJ2 (ORCPT + 99 others); Thu, 11 Mar 2021 02:09:28 -0500 Received: from mx2.suse.de ([195.135.220.15]:49600 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231651AbhCKHI4 (ORCPT ); Thu, 11 Mar 2021 02:08:56 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 31AC3AC17; Thu, 11 Mar 2021 07:08:55 +0000 (UTC) Date: Thu, 11 Mar 2021 08:08:55 +0100 Message-ID: From: Takashi Iwai To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, broonie@kernel.org, linux-kernel@vger.kernel.org, Jon Hunter , Jean Delvare , Liam Girdwood , Jaroslav Kysela , Takashi Iwai Subject: Re: [PATCH] ASoC: soc-core: fix DMI handling In-Reply-To: <20210310193928.108850-1-pierre-louis.bossart@linux.intel.com> References: <20210310193928.108850-1-pierre-louis.bossart@linux.intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Mar 2021 20:39:27 +0100, Pierre-Louis Bossart wrote: > > When DMI information is not present, trying to assign the card long > name results in the following warning. > > WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name! > > The initial solution suggested was to test if the card device is an > ACPI one. This causes a regression visible to userspace on all Intel > platforms, with UCM unable to load card profiles based on DMI > information: the card devices are not necessarily ACPI ones, e.g. when > the parent creates platform devices on Intel devices. > > To fix this problem, this patch exports the existing dmi_available > variable and tests it in the ASoC core. > > Fixes: c014170408bc ("ASoC: soc-core: Prevent warning if no DMI table is present") > Signed-off-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Takashi > --- > drivers/firmware/dmi_scan.c | 1 + > sound/soc/soc-core.c | 2 +- > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c > index d51ca0428bb8..f191a1f901ac 100644 > --- a/drivers/firmware/dmi_scan.c > +++ b/drivers/firmware/dmi_scan.c > @@ -166,6 +166,7 @@ static int __init dmi_checksum(const u8 *buf, u8 len) > static const char *dmi_ident[DMI_STRING_MAX]; > static LIST_HEAD(dmi_devices); > int dmi_available; > +EXPORT_SYMBOL_GPL(dmi_available); > > /* > * Save a DMI string > diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c > index 16ba54eb8164..c7e4600b2dd4 100644 > --- a/sound/soc/soc-core.c > +++ b/sound/soc/soc-core.c > @@ -1574,7 +1574,7 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour) > if (card->long_name) > return 0; /* long name already set by driver or from DMI */ > > - if (!is_acpi_device_node(card->dev->fwnode)) > + if (!dmi_available) > return 0; > > /* make up dmi long name as: vendor-product-version-board */ > -- > 2.25.1 >