Message ID | 20231018235944.1860717-1-markhas@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp66570vqb; Wed, 18 Oct 2023 17:00:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFZZFOJQxSmUOJHaM6k+WI0pVqxXDd09r2capQeWVSRC0XiOaL9FBcI88KDJzdPPtMsXdR0 X-Received: by 2002:a05:6a00:228f:b0:6be:e54e:a540 with SMTP id f15-20020a056a00228f00b006bee54ea540mr617187pfe.30.1697673649270; Wed, 18 Oct 2023 17:00:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697673649; cv=none; d=google.com; s=arc-20160816; b=G4kkjCO91ufH2+sDvA56YZxQNsxjoh6+pFBORz2m7n7fOQ/vN2ZEuumZZew89LFkKx Upk7UK3b36LAJ1jjv/cLXNAa9u+1ODBgl6ghj/Bkxs3clOJqtWDzeN4lx2UxjiUh31B3 yjtnKl5DReRqdlFEVjN3gIG43aOxqSz4DU90C1OyaB2WjN3t3JiGDey3uvooF9KVrzE9 Ek6ydnjOjVDuFCoRPXH3lm1HH551m6oRxivB7HxuHNBeIoUqKUt61OlMAjLC/XN4ppD+ LSl/HwEHRYcUrI91Z51PPjWK/RsO/C9K9+eIO1UPdq2b85GWOnEd+PZ20ElvZWsKVgyP uRNQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Z1HJODpBcMbzB2tUXUZxawzk68qAf00Djnx9IKBN0d8=; fh=eFw4VdwAU5daEGyQw1E/pZ1LwSPSHRo9fe1o5yZ92AI=; b=PaR7+bPCtxY5P0SC7o/RE0GVLgok3VHbHFcWT17HQWIeGz/sgzziMn6vdcsWwVy8LL qj+CJ9N2oHehkcLuNd+KQTfGfSKsQvHG3+p4grayCOP+bW/7JIhC+KsNQ7W78nGvDvTM 45BQGtCRZRzSmefYcX4bh3MhUJtqbyne3w51rmKA396pSrJvjUUkP7lHpQXsl6QgwtiF 0LTLv+9nRfvRYztjeRNQjqufx3FkzA0GxKuvHzXdaPzEsTLH97OSwvaczMyacs2czEfM dFT1dHOMyVq2LKinSFengxLg1bGB+o2eQHiKCfpP89hS30wnokjDvDVu+vlCt8ucm1ku JhLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=X2gC2r7U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id fj19-20020a056a003a1300b00690d55d630dsi5250900pfb.274.2023.10.18.17.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 17:00:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=X2gC2r7U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id EEC49824E53D; Wed, 18 Oct 2023 17:00:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231578AbjJSAAU (ORCPT <rfc822;zwp10758@gmail.com> + 24 others); Wed, 18 Oct 2023 20:00:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjJSAAR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Oct 2023 20:00:17 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFE67FA for <linux-kernel@vger.kernel.org>; Wed, 18 Oct 2023 17:00:15 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7a66bbb6c1dso54199739f.0 for <linux-kernel@vger.kernel.org>; Wed, 18 Oct 2023 17:00:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1697673615; x=1698278415; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Z1HJODpBcMbzB2tUXUZxawzk68qAf00Djnx9IKBN0d8=; b=X2gC2r7UGG5y4Sc+EB+khOWcAme3Evcmh7hybtMMjds4baAKWqOTuGYOxkwMyo6YuV X1+FoNnzIuP7LbNcRsdDKJUMUpYuznFYROGwsXaLO6nkLpKU8KXJxa1A4kbrOtTwvv7o HK+weMKR4tTmMG+x90lG9C0nbAhxYSYvmhVys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697673615; x=1698278415; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Z1HJODpBcMbzB2tUXUZxawzk68qAf00Djnx9IKBN0d8=; b=P8jnMV50oYwQz7hE9VApO/rRAnvtf3dR85PPX+oWbEU7x3B1l742SKZqKpryzZro2Z 0dVKWzWOvDknBwpSS1cAcxcycVyDvND2cAsnuZd7fbK1F3jvb4gSays/QEz72RTuBeBQ i+bp9eMbPmZtX+LnhhBiXG/GKmiN5WHJi58MQm6frPAx6S2o1wFc06QfwC8mHdOzlfSF Y8KWUm/ivTqoxIWH+AzibdRqPaCv38xrFkgamXQqAR9Rz8SDbYu/rUQQWIpnjaYaZh5l b9HfC37eCKsqot5I58kqo2Ap13wdMwtR2PG7RHFDrAsrU3AdQt7Y+I9qDAN7pvBny6xM Bbog== X-Gm-Message-State: AOJu0YyrBFQWsX1Ur9ImkeFlgtR7JiXmG1ypCjHsMUCD6q1r9bQw+uxg K6jIflkchEz8/0TaxNC9Q2lzoiXx8suCwvN1BDQ= X-Received: by 2002:a05:6e02:2146:b0:351:e6e:7723 with SMTP id d6-20020a056e02214600b003510e6e7723mr1072598ilv.25.1697673614869; Wed, 18 Oct 2023 17:00:14 -0700 (PDT) Received: from markhas1.lan (71-218-45-6.hlrn.qwest.net. [71.218.45.6]) by smtp.gmail.com with ESMTPSA id z15-20020a92da0f000000b003512c3e8809sm1425870ilm.71.2023.10.18.17.00.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 17:00:08 -0700 (PDT) From: Mark Hasemeyer <markhas@chromium.org> To: LKML <linux-kernel@vger.kernel.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>, Guenter Roeck <linux@roeck-us.net>, stable@vger.kernel.org, Mark Hasemeyer <markhas@chromium.org>, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84s?= =?utf-8?q?ki?= <amadeuszx.slawinski@linux.intel.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Bard Liao <yung-chuan.liao@linux.intel.com>, Brady Norander <bradynorander@gmail.com>, Jaroslav Kysela <perex@perex.cz>, Mark Brown <broonie@kernel.org>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Takashi Iwai <tiwai@suse.com>, alsa-devel@alsa-project.org Subject: [PATCH v1] ALSA: hda: intel-dsp-config: Fix JSL Chromebook quirk detection Date: Wed, 18 Oct 2023 17:59:31 -0600 Message-ID: <20231018235944.1860717-1-markhas@chromium.org> X-Mailer: git-send-email 2.42.0.655.g421f12c284-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 18 Oct 2023 17:00:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780139843532021864 X-GMAIL-MSGID: 1780139843532021864 |
Series |
[v1] ALSA: hda: intel-dsp-config: Fix JSL Chromebook quirk detection
|
|
Commit Message
Mark Hasemeyer
Oct. 18, 2023, 11:59 p.m. UTC
Some Jasperlake Chromebooks overwrite the system vendor DMI value to the
name of the OEM that manufactured the device. This breaks Chromebook
quirk detection as it expects the system vendor to be "Google".
Add another quirk detection entry that looks for "Google" in the BIOS
version.
Cc: stable@vger.kernel.org
Signed-off-by: Mark Hasemeyer <markhas@chromium.org>
---
sound/hda/intel-dsp-config.c | 6 ++++++
1 file changed, 6 insertions(+)
Comments
On 10/19/2023 1:59 AM, Mark Hasemeyer wrote: > Some Jasperlake Chromebooks overwrite the system vendor DMI value to the > name of the OEM that manufactured the device. This breaks Chromebook > quirk detection as it expects the system vendor to be "Google". > > Add another quirk detection entry that looks for "Google" in the BIOS > version. > > Cc: stable@vger.kernel.org > Signed-off-by: Mark Hasemeyer <markhas@chromium.org> > --- > > sound/hda/intel-dsp-config.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c > index 24a948baf1bc..756fa0aa69bb 100644 > --- a/sound/hda/intel-dsp-config.c > +++ b/sound/hda/intel-dsp-config.c > @@ -336,6 +336,12 @@ static const struct config_entry config_table[] = { > DMI_MATCH(DMI_SYS_VENDOR, "Google"), > } > }, > + { > + .ident = "Google firmware", > + .matches = { > + DMI_MATCH(DMI_BIOS_VERSION, "Google"), > + } > + }, > {} > } > }, I would assume that platform that has DMI_SYS_VENDOR set to "Google", also has DMI_BIOS_VERSION set to "Google", so perhaps just replace DMI_SYS_VENDOR match with DMI_BIOS_VERSION, to keep table small? Or is that not a case?
> I would assume that platform that has DMI_SYS_VENDOR set to "Google", > also has DMI_BIOS_VERSION set to "Google", so perhaps just replace > DMI_SYS_VENDOR match with DMI_BIOS_VERSION, to keep table small? Or is > that not a case? That is the case. But I'm inclined to keep it for two reasons: 1. There is precedent in the kernel to use DMI_SYS_VENDOR=="Google" for Chromebook detection. 2. If the coreboot version schema for Chromebooks were to change, this check would fail for all JSL Chromebooks instead of just a few models.
On 10/19/23 11:43, Mark Hasemeyer wrote: >> I would assume that platform that has DMI_SYS_VENDOR set to "Google", >> also has DMI_BIOS_VERSION set to "Google", so perhaps just replace >> DMI_SYS_VENDOR match with DMI_BIOS_VERSION, to keep table small? Or is >> that not a case? > > That is the case. But I'm inclined to keep it for two reasons: > 1. There is precedent in the kernel to use DMI_SYS_VENDOR=="Google" > for Chromebook detection. > 2. If the coreboot version schema for Chromebooks were to change, this > check would fail for all JSL Chromebooks instead of just a few models. I also prefer a low-risk addition to a higher-risk change. It's not like we really care about the size of the table at this point. Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> FWIW we use this other quirk: DMI_MATCH(DMI_PRODUCT_FAMILY, "Google"), How many engineers does it take to identify a Chromebook, eh?
> FWIW we use this other quirk: > DMI_MATCH(DMI_PRODUCT_FAMILY, "Google"), Unfortunately DMI_PRODUCT_FAMILY is empty on these particular devices. The coreboot version field is the only entry that has "Google" in it. > How many engineers does it take to identify a Chromebook, eh? Ha! There has been some discussion about this: to come up with a canonical way for Chromebook identification throughout the kernel. But nothing has been settled on AFAIK.
On Thu, 19 Oct 2023 01:59:31 +0200, Mark Hasemeyer wrote: > > Some Jasperlake Chromebooks overwrite the system vendor DMI value to the > name of the OEM that manufactured the device. This breaks Chromebook > quirk detection as it expects the system vendor to be "Google". > > Add another quirk detection entry that looks for "Google" in the BIOS > version. > > Cc: stable@vger.kernel.org > Signed-off-by: Mark Hasemeyer <markhas@chromium.org> Applied now. Thanks. Takashi
On 10/20/23 10:36, Mark Hasemeyer wrote: >> FWIW we use this other quirk: >> DMI_MATCH(DMI_PRODUCT_FAMILY, "Google"), > > Unfortunately DMI_PRODUCT_FAMILY is empty on these particular devices. > The coreboot version field is the only entry that has "Google" in it. well then you have additional issues with the DMI quirk for the firmware selection in sound/soc/sof/sof-pci-dev.c, { .ident = "Google Chromebooks", .callback = chromebook_use_community_key, .matches = { DMI_MATCH(DMI_PRODUCT_FAMILY, "Google"), } }, which means you need additional kernel parameters to provide the location of the firmware.... >> How many engineers does it take to identify a Chromebook, eh? > > Ha! There has been some discussion about this: to come up with a > canonical way for Chromebook identification throughout the kernel. But > nothing has been settled on AFAIK. There's been multiple rounds of discussions with Curtis, we introduced DMI_OEM_STRING but it's still not good enough, and now the previous conventions are not being followed on what is a relatively old platform already...
> There's been multiple rounds of discussions with Curtis, we introduced > DMI_OEM_STRING but it's still not good enough, and now the previous > conventions are not being followed on what is a relatively old platform > already... Thanks for pointing that out. ChromeOS uses the fw_path module parameter for JSL boards so I missed this. The DMI_BIOS_VERSION should be consistent across all Chromebooks assuming 3rd party firmware wasn't installed. I'll throw up another patch addressing this.
diff --git a/sound/hda/intel-dsp-config.c b/sound/hda/intel-dsp-config.c index 24a948baf1bc..756fa0aa69bb 100644 --- a/sound/hda/intel-dsp-config.c +++ b/sound/hda/intel-dsp-config.c @@ -336,6 +336,12 @@ static const struct config_entry config_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Google"), } }, + { + .ident = "Google firmware", + .matches = { + DMI_MATCH(DMI_BIOS_VERSION, "Google"), + } + }, {} } },