Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2103387iof; Tue, 7 Jun 2022 19:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+1L7ESBLA7FbCFQ9fAQZAL4K+MHyBIi8PpapYaYceB12H3WXXMlYtB9GUXrjqOmlTLLsy X-Received: by 2002:a17:903:41d1:b0:166:3c6:f055 with SMTP id u17-20020a17090341d100b0016603c6f055mr32185759ple.112.1654656716191; Tue, 07 Jun 2022 19:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654656716; cv=none; d=google.com; s=arc-20160816; b=Nu4SdHoopUqj1oBUhqZADAKQ9Z9PsX0nh0pliRlOh7h3bDnXzz0FC/DO4vQxhJS2Gg kMilf9EDnf5WQQt2ZBjxnpg5aq19UeSHnP0xQFfUABaIsOQIaTUPHygZw2ilBXccUZtQ WsjPeUUe3PtWMhkjI6s5+O3QLUhSDkaziEucb1B/VwzMXRAsPnMzPy6JA/cO58VDyDoS XFyqcdtO0upbCYLZLJyMhyCQBC01HrFaJKXTyDjRbH5WuIUk9t503wKB/fmVQhfKTpar GLNkRK3pohgXilt5M2O0Yw8XKYRYbJOAg2QN+8jO06NBFd/G0R4jhekJeKRZyg0F9e5E bT0A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=aDkw5kXBBzmd/MQC6Xvb3F3hjRfMBJ03ZW1H/oZDlNQ=; b=AKqbx9+quWDbGCUal/nZ7zv3jWAKuWvpIP0JGrpWIdn0N76164xlFSpDI7P/KKEL3N BeIlzz7SMuRD4IeBp5AUKZxaKrt2fZw/FQkIrawICOR2Kpiax7XotX8FIIfeBtVmtxmE yhTMVsEA61z9sIqghzUSypU0iTG00aS4f9iErAhUt29bD7IxQMIZQvlsnv/62j7+aZgI Dp7P/ujoTzXgCcWoLm8h32vXlIoVBhkA+wNaJHaqknXKtB+UMsVREZ6x5KvfguO8nBIC Q/4Pl9HoTN5os9UcvN7qIlI5GjLYv9CCcgx4Xu+mQOn/GKWuEr/7GZWE1+dGIAzFOSTw Hc6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nlxCumJ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f10-20020a056a001aca00b004fa8f4f2d6dsi8529766pfv.144.2022.06.07.19.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:51:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nlxCumJ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B40F62AA984; Tue, 7 Jun 2022 18:26:06 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383730AbiFGWNS (ORCPT + 99 others); Tue, 7 Jun 2022 18:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379775AbiFGVK7 (ORCPT ); Tue, 7 Jun 2022 17:10:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 864B0215E55; Tue, 7 Jun 2022 11:52:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BB0FB61787; Tue, 7 Jun 2022 18:52:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBC36C385A2; Tue, 7 Jun 2022 18:52:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627923; bh=yWcmRdVyi+FWys7GZ9HWj6oxRlxBcBG6kQKuSmRN7nY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nlxCumJ7KfDghPj03b5R3q+PCe0sbPpqXFcHnfFJQr5M+97/Zy3LRfwnBZV2OAfEs CFT+jdwDkOcEWTZZixHVem4BVUkO6BGpbb7DtzV0G/wHesbCmt+B0BBm3YOUyq/2RB 2ojD3SOMDlexAQ+b2EksFUJ4jDWnDp02eAaxk/xo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bard Liao , Brent Lu , Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 5.18 141/879] ASoC: Intel: sof_ssp_amp: fix no DMIC BE Link on Chromebooks Date: Tue, 7 Jun 2022 18:54:19 +0200 Message-Id: <20220607165006.798317953@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brent Lu [ Upstream commit d1c808765deb2bcd35d827402ed4d75d068aae18 ] The SOF topology supports 2 BE Links(dmic01 and dmic16k) and each link supports up to four DMICs. However, Chromebook does not implement ACPI NHLT table so the mach->mach_params.dmic_num is always zero. We add a quirk so machine driver knows it's running on a Chromebook and need to create BE Links for DMIC. Reviewed-by: Bard Liao Signed-off-by: Brent Lu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220509170922.54868-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/sof_ssp_amp.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/sof_ssp_amp.c b/sound/soc/intel/boards/sof_ssp_amp.c index 88530e9de543..ef70c6f27fe1 100644 --- a/sound/soc/intel/boards/sof_ssp_amp.c +++ b/sound/soc/intel/boards/sof_ssp_amp.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -78,6 +79,16 @@ struct sof_card_private { bool idisp_codec; }; +static const struct dmi_system_id chromebook_platforms[] = { + { + .ident = "Google Chromebooks", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Google"), + } + }, + {}, +}; + static const struct snd_soc_dapm_widget sof_ssp_amp_dapm_widgets[] = { SND_SOC_DAPM_MIC("SoC DMIC", NULL), }; @@ -371,7 +382,7 @@ static int sof_ssp_amp_probe(struct platform_device *pdev) struct snd_soc_dai_link *dai_links; struct snd_soc_acpi_mach *mach; struct sof_card_private *ctx; - int dmic_be_num, hdmi_num = 0; + int dmic_be_num = 0, hdmi_num = 0; int ret, ssp_codec; ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); @@ -383,7 +394,8 @@ static int sof_ssp_amp_probe(struct platform_device *pdev) mach = pdev->dev.platform_data; - dmic_be_num = mach->mach_params.dmic_num; + if (dmi_check_system(chromebook_platforms) || mach->mach_params.dmic_num > 0) + dmic_be_num = 2; ssp_codec = sof_ssp_amp_quirk & SOF_AMPLIFIER_SSP_MASK; -- 2.35.1