From patchwork Thu Jul 27 10:43:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Lu X-Patchwork-Id: 126608 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp806515vqo; Wed, 26 Jul 2023 19:59:33 -0700 (PDT) X-Google-Smtp-Source: APBJJlHhNxOkMOvNmLVt73D4SNDwUS+BJ/wATuC6VJH2CJFvPoREYIWtbAPbWsC6b+NcDOdT+Vbr X-Received: by 2002:a17:907:77d1:b0:99b:4fff:6bb with SMTP id kz17-20020a17090777d100b0099b4fff06bbmr737705ejc.4.1690426772869; Wed, 26 Jul 2023 19:59:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690426772; cv=none; d=google.com; s=arc-20160816; b=h5NsXWObLTKwC9nTowVK/4M/hJmW1S2zahub2IEH3kUIEiIudHfLvt57Nv+vM3hflt Pt44mqtLi/ODD7it3BbeQ+Iq3SGjEb9QwjvxQ8PIE9TXVdn5AeUDTcUm7KcGcRUM0FV2 i23jReJVO9DYDQ2sADxkeFBtWMOBW3cd8OqxbTMtlQv2u1I6d4aw7QEjX2XO9ZePJ52D sJRyOFBWkgh1ffQytbvEnAGdZ6e9iaapbV/qAXs5pzK7E07oPSji6hm24sOS13BB6BIH KquS0ZIde/BcE6rzRpLH34On5NPuj6ORc3zynNYUTAZW1gdQNMv547IhK63VXq6/rMep BRLQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ahNGscup+5sSx8FJh1kPE2YHPiTvOtozNjuLgxj8g08=; fh=Lz5/hqROUpcBQKAp9YzBGY+SBeOpUnHmW51VPPw0uQw=; b=YtfkDhRk09T4ScSJmuKf1zkIoKRmshVdiA+5h5glwHVIyd2lvaMThYl6QQqc1/++fQ dt6lp/HYaox6x38/RaDWMLlw+0Qi7oLH1PKJrThLN8HdpFB+UQwC3Rk2EJryDtTLy93J i6EIJEvx6ivlf2BqT4qEM2gBx7Q/EeEHP/Kb9hdY/H9SPjKtieJDXbFrEgQTusfjGqnI YrkH/TrbTuZwFKa5OzLfSN/kmy+fRQvX5jmOgBz+Pa2yIYf1N+4ogGPE5CGrht3nUjD1 DbCLSAaYqzxfW8lhILTSvtvZsDnPE9mUwYOpk4LDCnJDISjPjP28zU2msw56FNJsbN8R yxOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LSiDnR8q; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i18-20020a170906115200b0099bcb3ad52dsi251722eja.805.2023.07.26.19.59.09; Wed, 26 Jul 2023 19:59:32 -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=@intel.com header.s=Intel header.b=LSiDnR8q; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbjG0Cu0 (ORCPT + 99 others); Wed, 26 Jul 2023 22:50:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231163AbjG0CuU (ORCPT ); Wed, 26 Jul 2023 22:50:20 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C95EF1FC4 for ; Wed, 26 Jul 2023 19:50:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690426217; x=1721962217; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aLgSkmaRyiwQtegvOvvVB//aYblKPYYlYhlq9fTWEB8=; b=LSiDnR8qCzSqi06o10gkKHJyYBLNkkV+XSZew3PjinNF2eYP7psEKuTY 2Vt0SgOlVpZoV9+bHI+5P6ZXzPIFLAXXd102hvQI3AqPZr8D2WChIpSH7 g5NcEA00aey8x4E3pv3gMMeazPGGomGNr4Gkoa0tosE5iZNqEcg5Q8rLE BNEEpA1UYEai9IM2BauCJ9dPVyCkbUarf5LZpUeFp05akjb51oYOUSkkJ 1nFytuhsMxqEP8TjsAD8Sdk2F3YOW65F3ypO8oWkTnNQqNgTvzNk/ct20 BnxRwwkIiHLkcRFHyD8KPx2Xbe8mUrsFqbP6Ei0RFicoAArbp6pw4nxpU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10783"; a="358187895" X-IronPort-AV: E=Sophos;i="6.01,233,1684825200"; d="scan'208";a="358187895" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2023 19:50:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10783"; a="1057488664" X-IronPort-AV: E=Sophos;i="6.01,233,1684825200"; d="scan'208";a="1057488664" Received: from brentlu-desktop.itwn.intel.com ([10.5.252.92]) by fmsmga005.fm.intel.com with ESMTP; 26 Jul 2023 19:50:13 -0700 From: Brent Lu To: alsa-devel@alsa-project.org Cc: Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , Bard Liao , Ranjani Sridharan , Kai Vehmanen , Mark Brown , Jaroslav Kysela , Takashi Iwai , Brent Lu , linux-kernel@vger.kernel.org, Ajye Huang , Yong Zhi , Terry Cheong , Uday M Bhat , Mac Chiang , "Dharageswari . R" , Kuninori Morimoto , ye xingchen , Andy Shevchenko Subject: [PATCH v3 2/2] ASoC: Intel: sof_rt5682: remove SOF_MAX98390_TWEETER_SPEAKER_PRESENT flag Date: Thu, 27 Jul 2023 18:43:54 +0800 Message-Id: <20230727104354.2344418-3-brent.lu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230727104354.2344418-1-brent.lu@intel.com> References: <20230727104354.2344418-1-brent.lu@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772540943772629950 X-GMAIL-MSGID: 1772540943772629950 Remove the SOF_MAX98390_TWEETER_SPEAKER_PRESENT flag from driver since the number of amplifiers could be queried from ACPI by counting the device instance. Signed-off-by: Brent Lu --- sound/soc/intel/boards/sof_rt5682.c | 37 ++--------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index b4f07bdcf8b4..0af1e0c3a9db 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -59,7 +59,6 @@ #define SOF_SSP_BT_OFFLOAD_PRESENT BIT(22) #define SOF_RT5682S_HEADPHONE_CODEC_PRESENT BIT(23) #define SOF_MAX98390_SPEAKER_AMP_PRESENT BIT(24) -#define SOF_MAX98390_TWEETER_SPEAKER_PRESENT BIT(25) #define SOF_RT1019_SPEAKER_AMP_PRESENT BIT(26) #define SOF_RT5650_HEADPHONE_CODEC_PRESENT BIT(27) @@ -195,23 +194,6 @@ static const struct dmi_system_id sof_rt5682_quirk_table[] = { SOF_RT5682_SSP_AMP(2) | SOF_RT5682_NUM_HDMIDEV(4)), }, - { - .callback = sof_rt5682_quirk_cb, - .matches = { - DMI_MATCH(DMI_PRODUCT_FAMILY, "Google_Brya"), - DMI_MATCH(DMI_OEM_STRING, "AUDIO-MAX98390_ALC5682I_I2S_4SPK"), - }, - .driver_data = (void *)(SOF_RT5682_MCLK_EN | - SOF_RT5682_SSP_CODEC(0) | - SOF_SPEAKER_AMP_PRESENT | - SOF_MAX98390_SPEAKER_AMP_PRESENT | - SOF_MAX98390_TWEETER_SPEAKER_PRESENT | - SOF_RT5682_SSP_AMP(1) | - SOF_RT5682_NUM_HDMIDEV(4) | - SOF_BT_OFFLOAD_SSP(2) | - SOF_SSP_BT_OFFLOAD_PRESENT), - - }, { .callback = sof_rt5682_quirk_cb, .matches = { @@ -850,17 +832,7 @@ static struct snd_soc_dai_link *sof_card_dai_links_create(struct device *dev, sof_rt1011_dai_link(&links[id]); } else if (sof_rt5682_quirk & SOF_MAX98390_SPEAKER_AMP_PRESENT) { - if (sof_rt5682_quirk & - SOF_MAX98390_TWEETER_SPEAKER_PRESENT) { - links[id].codecs = max_98390_4spk_components; - links[id].num_codecs = ARRAY_SIZE(max_98390_4spk_components); - } else { - links[id].codecs = max_98390_components; - links[id].num_codecs = ARRAY_SIZE(max_98390_components); - } - links[id].init = max_98390_spk_codec_init; - links[id].ops = &max_98390_ops; - + max_98390_dai_link(dev, &links[id]); } else if (sof_rt5682_quirk & SOF_RT5650_HEADPHONE_CODEC_PRESENT) { links[id].codecs = &rt5650_components[1]; links[id].num_codecs = 1; @@ -1019,12 +991,7 @@ static int sof_audio_probe(struct platform_device *pdev) else if (sof_rt5682_quirk & SOF_RT1015P_SPEAKER_AMP_PRESENT) sof_rt1015p_codec_conf(&sof_audio_card_rt5682); else if (sof_rt5682_quirk & SOF_MAX98390_SPEAKER_AMP_PRESENT) { - if (sof_rt5682_quirk & SOF_MAX98390_TWEETER_SPEAKER_PRESENT) - max_98390_set_codec_conf(&sof_audio_card_rt5682, - ARRAY_SIZE(max_98390_4spk_components)); - else - max_98390_set_codec_conf(&sof_audio_card_rt5682, - ARRAY_SIZE(max_98390_components)); + max_98390_set_codec_conf(&pdev->dev, &sof_audio_card_rt5682); } if (sof_rt5682_quirk & SOF_SSP_BT_OFFLOAD_PRESENT)