Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp203209pxf; Thu, 11 Mar 2021 01:37:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCES58iAW9PLWqWMDcYDV/THB2olHAtBiMjR73V+HT3Xn4dNo0zEWXeW2PmAYtg1o7irKK X-Received: by 2002:a05:6402:3115:: with SMTP id dc21mr2842556edb.173.1615455468565; Thu, 11 Mar 2021 01:37:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615455468; cv=none; d=google.com; s=arc-20160816; b=rbdUJJ3O5DfhQBtFlenyejGoEnc5bLi4LQQ4NU62iLjgMRP2ea5R3vlOsu7y+N+86U 6TIX4La/mOO8NfKhdLpouiqd0F+v8jCG+Jj5eYA7m3Xgl3wDAIWnZdQmEJ64zVkGgmca 0oNcNE+eF3toeW5a56SuhMqahnk/92jQXA/12oO0OJ81m0N6rrFkZ3pwfvr9SxkaZ5vz ByPZll0XeSC/QZIpEnUeQowA8VGLLfDIhlphW9AVttyUeb4MmqwfTGB0NMrSFuiopBUH +peZCiMxSo0r5IO0+X54ymNkZqnAUE128yPx+z3T1t3z3fmfJs/nIrzidbzVVmLpF01B smVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=1i9+S6qwaMMZE2mGE/nLF1Reyv0fftuiCPh1CWJbCdw=; b=csyliqjp7aTfIsgHS83eF3pnEMoUVyqdieXDHcSWPPf3D0wNDoOITTB88uJ8hTpJO1 WU7pJ3OmND2Fg2rRDapvdK198H94mqQjGATsMtM3yLRc0n5aSBWEtpVgijM5+205Wtmx vt53XM+SjmQ3+76YxTMhZhRGEDFIlmUSnKVym9sHyTt/ArIuWK7+5RN3yWpK5tyCPotX 4johr+ZeU+kGXLWhptTkyL6J1sQ81sUzQf/T/KtELKYASTc18BfxAhRgpoRdpiJUslbv GKrUOTqAZDPBVTmjgErPSkp0lLHUcvcJz9kzcZ/4Rv5mls33Xmqf+zJro4baopAKzpAA Bjsg== 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 t12si1356777ejc.21.2021.03.11.01.37.25; Thu, 11 Mar 2021 01:37:48 -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 S231759AbhCKJgR (ORCPT + 99 others); Thu, 11 Mar 2021 04:36:17 -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