From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3278C433E0 for ; Thu, 11 Mar 2021 09:37:15 +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 AB01D64EB6 for ; Thu, 11 Mar 2021 09:37:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AB01D64EB6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de 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 0A1B217E3; Thu, 11 Mar 2021 10:36:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0A1B217E3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1615455433; bh=CPJ7Z92u4tB3WRFBfpndqD8CxYVAWhvBbb+3dU0HClA=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EvbPDlZGkYg4TpzLc3VgfkaRHMWozgrtAdI0t7vOlDmz1a+FqHMUj2RpVp1uCs9YW Tx+QuzbgWXHMzn0EiWiE8GAGHXcVSoGGT68789yhbL4OKB26FlLneXW2ZTOyoSWqQ1 8qMqp+SIZ4yyrkEyvarRNcFtW8OebQYbZcufUUeg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 63042F800BF; Thu, 11 Mar 2021 10:36:22 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B08B4F80227; Thu, 11 Mar 2021 10:36:20 +0100 (CET) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AE864F8010D for ; Thu, 11 Mar 2021 10:36:05 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AE864F8010D 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 4BBF4AB8C; Thu, 11 Mar 2021 09:36:05 +0000 (UTC) Date: Thu, 11 Mar 2021 10:36:03 +0100 From: Jean Delvare To: Pierre-Louis Bossart Subject: Re: [PATCH] ASoC: soc-core: fix DMI handling Message-ID: <20210311103603.0bc952b6@endymion> In-Reply-To: <20210310193928.108850-1-pierre-louis.bossart@linux.intel.com> References: <20210310193928.108850-1-pierre-louis.bossart@linux.intel.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: alsa-devel@alsa-project.org, tiwai@suse.de, Takashi Iwai , Liam Girdwood , linux-kernel@vger.kernel.org, broonie@kernel.org, Jon Hunter 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" On Wed, 10 Mar 2021 13:39:27 -0600, 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 > --- > 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 */ Fine with me. Acked-by: Jean Delvare -- Jean Delvare SUSE L3 Support From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E87ECC433DB for ; Thu, 11 Mar 2021 09:36:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90AFE64F4D for ; Thu, 11 Mar 2021 09:36:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231882AbhCKJgS (ORCPT ); Thu, 11 Mar 2021 04:36:18 -0500 Received: from mx2.suse.de ([195.135.220.15]:56036 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231960AbhCKJgG (ORCPT ); Thu, 11 Mar 2021 04:36:06 -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 4BBF4AB8C; Thu, 11 Mar 2021 09:36:05 +0000 (UTC) Date: Thu, 11 Mar 2021 10:36:03 +0100 From: Jean Delvare To: Pierre-Louis Bossart Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org, Jon Hunter , Liam Girdwood , Jaroslav Kysela , Takashi Iwai Subject: Re: [PATCH] ASoC: soc-core: fix DMI handling Message-ID: <20210311103603.0bc952b6@endymion> In-Reply-To: <20210310193928.108850-1-pierre-louis.bossart@linux.intel.com> References: <20210310193928.108850-1-pierre-louis.bossart@linux.intel.com> Organization: SUSE Linux X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.32; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Mar 2021 13:39:27 -0600, 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 > --- > 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 */ Fine with me. Acked-by: Jean Delvare -- Jean Delvare SUSE L3 Support