Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3252746rwb; Mon, 15 Aug 2022 22:22:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR5tylDxgF61MXrcnDVonoss1oWsafc9B090GU3ybbPn8hggPYtzJ0B96Moq58iwDqehRTau X-Received: by 2002:a17:90b:180f:b0:1f5:160c:a656 with SMTP id lw15-20020a17090b180f00b001f5160ca656mr32730417pjb.193.1660627346125; Mon, 15 Aug 2022 22:22:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660627346; cv=none; d=google.com; s=arc-20160816; b=DWZoiOTZO/LQqRKbljJNIFP9zy5fU/whwUpu8+qVobH2Bgk0BUk+/yTMeLcI6xBbNJ 8JWdBBNkHr7lbtG40CyacMiV22gXmhMBhMyXJCZ3OglAS3hb7Z9mWQSWEiMOiD+vZOaf qSKWJ75ypga+1kPzbzmP47e6KblupnB+yvj+AbbCtzEH1xO8XNhWoZPmeeI9rEmK4HT3 h8eHtPks9nR7+Z6FS6GzNBvf/YIaSLlmvt/su/YN1Kdh9xLzieqnAUW+/RZ7nTzRvPip iiSYzXLZpLnYTYpgPMms13Hax7f/oPo7St0XETYgcOrxCcoJRxUkD2aWDfKJmEzPaW+5 /fNA== 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=uVEevpuN0TBokgOPRfm502i7Sjb6UT9WYAmFfrpwHdo=; b=ruTL6iahxD8vszPL/QtN00gQaptY7fEnss97OgWuaPrBrN0dPY3a3UkOWgrVrbl0+2 HSQ/pNKrUFBDMy7SZOZak/U+HA1utT7ssIsG86b3Pm+/+5WsD+9YVupAmD1+b2SRdAvf OcmMgR5DRj5F/6ADpvsp6io4hhkxTok3ctHodKZwvEvfmJX8zzwZGNOAKbhzOJOP9fJp L2ul80KZOe5jtNkckGPsrgYJHsyA3g1xJA64+4czPceg2hU3JtXPfpZ3k5j/ZGQR8iWH whRS4m/OP/2yhwJt45TItu4ca43f4ETRu+0JdSKEiwfhgJjCmNpAkTMsFLzuUbEfTbj5 xawg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CDFSw+wF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h69-20020a636c48000000b004206ecd8fabsi12763050pgc.781.2022.08.15.22.22.15; Mon, 15 Aug 2022 22:22:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CDFSw+wF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232830AbiHPEs3 (ORCPT + 99 others); Tue, 16 Aug 2022 00:48:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232619AbiHPEpn (ORCPT ); Tue, 16 Aug 2022 00:45:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC1CEAEDA9; Mon, 15 Aug 2022 13:42:31 -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 ams.source.kernel.org (Postfix) with ESMTPS id A4E10B8113E; Mon, 15 Aug 2022 20:42:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D69D1C433D6; Mon, 15 Aug 2022 20:42:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596149; bh=J6FEC9kriy1L6doGPl8+SMZ9B8cqhkWYOnUZd3hzDx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CDFSw+wFk+ZmVKSHqfH1rEJ5+h+GPPazEo4/9C6cdboYi93AlZEFVydE1DAAMQ+qa LH/AwB0Qq+5KidCbs8cyJ6WUCUf754SGsC63mf0BE3sOoIVXk/YkiFl+m0z+EBKcCe ezvCxcrbz3B5XJscrxIxz+ayhuOT3NgWUl/IauGc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ranjani Sridharan , Yong Zhi , Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 5.19 0989/1157] ASoC: Intel: sof_rt5682: Perform quirk check first in card late probe Date: Mon, 15 Aug 2022 20:05:45 +0200 Message-Id: <20220815180519.290927889@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: Yong Zhi [ Upstream commit 371a3f01fc1862c23fae35cb2c98ffb2eec143f1 ] The check of sof_rt5682_quirk should not be skipped unless the HDMI handling code exits with error, fix by moving the quirk check to the front. Fixes: 94d2d0897474 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function") Reviewed-by: Ranjani Sridharan Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220725194909.145418-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/sof_rt5682.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index 4a90a0a5d831..cf4d3f059b40 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -434,6 +434,15 @@ static int sof_card_late_probe(struct snd_soc_card *card) struct sof_hdmi_pcm *pcm; int err; + if (sof_rt5682_quirk & SOF_MAX98373_SPEAKER_AMP_PRESENT) { + /* Disable Left and Right Spk pin after boot */ + snd_soc_dapm_disable_pin(dapm, "Left Spk"); + snd_soc_dapm_disable_pin(dapm, "Right Spk"); + err = snd_soc_dapm_sync(dapm); + if (err < 0) + return err; + } + /* HDMI is not supported by SOF on Baytrail/CherryTrail */ if (is_legacy_cpu || !ctx->idisp_codec) return 0; @@ -464,15 +473,6 @@ static int sof_card_late_probe(struct snd_soc_card *card) return err; } - if (sof_rt5682_quirk & SOF_MAX98373_SPEAKER_AMP_PRESENT) { - /* Disable Left and Right Spk pin after boot */ - snd_soc_dapm_disable_pin(dapm, "Left Spk"); - snd_soc_dapm_disable_pin(dapm, "Right Spk"); - err = snd_soc_dapm_sync(dapm); - if (err < 0) - return err; - } - return hdac_hdmi_jack_port_init(component, &card->dapm); } -- 2.35.1