From patchwork Wed Jul 26 14:08:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brent Lu X-Patchwork-Id: 707032 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EABAAC001E0 for ; Wed, 26 Jul 2023 06:19:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4C0C8820; Wed, 26 Jul 2023 08:18:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4C0C8820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1690352349; bh=js5eLjuH8dKH2vHgVoNL1hwwICaDvEgaMk24LXytU+c=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=nIeWzG5w1/r3UUvnPwvE1ayfPMW7NIhGvnhX7ddCBdbNzFJLT/YFbwSgCcfEhZ3yO 2BDA72itGw7FoCX2lwNYl+j5pci730kTNybwyF5yPqj3PGlo17oNgKQX+Az0Se54+y NT1+pczdxoF8oIiS+fW1puH/TNgDImMVsoKf3uFw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C7C97F80535; Wed, 26 Jul 2023 08:17:51 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5B3D1F8019B; Wed, 26 Jul 2023 08:17:51 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 65C20F800C7; Wed, 26 Jul 2023 08:15:16 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 36106F800C7 for ; Wed, 26 Jul 2023 08:15:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 36106F800C7 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hoq/8oKx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690352106; x=1721888106; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=js5eLjuH8dKH2vHgVoNL1hwwICaDvEgaMk24LXytU+c=; b=hoq/8oKx15GooU8PdZsL8CCSZ1MZhjmrK+IN33MY107YjLsmi4qaM8dn Cm1SP+pVneG+L5gws7WNeIS3emo4SNO773n/9qKGop/oOzvsuBUqHy/6n wAlRV8BmW2FIZmldDtS/QW5eClURVyCC8vE9xVMQxuJgmSZ6P/NDujPWe ZT9lwINYqs1QDjdVolcOsT8OL/fBPWbTRGaw90QBTJ6CTJTpAwSCf0Ms6 jVwkEY7bHdV3J7S6Qh4LaYsMNxpBO6WV/bA/K3LoZ/pKOVJY7zDyfbDCx phhfi7NhXcq2PGclQxpzyPZBhnYPgWzCG4MZBwrVIlTvr9Hl+6lxVkoxq w==; X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="367950241" X-IronPort-AV: E=Sophos;i="6.01,231,1684825200"; d="scan'208";a="367950241" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2023 23:14:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10782"; a="703606278" X-IronPort-AV: E=Sophos;i="6.01,231,1684825200"; d="scan'208";a="703606278" Received: from brentlu-desktop.itwn.intel.com ([10.5.252.92]) by orsmga006.jf.intel.com with ESMTP; 25 Jul 2023 23:14:54 -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 v2 0/2] Intel: sof_rt5682: remove quirk flag Date: Wed, 26 Jul 2023 22:08:46 +0800 Message-Id: <20230726140848.2267568-1-brent.lu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Message-ID-Hash: NIJRFCYUS4NB3S5G23R53RVGHAJBEO34 X-Message-ID-Hash: NIJRFCYUS4NB3S5G23R53RVGHAJBEO34 X-MailFrom: brent.lu@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: We add a helper function to detect amplifier number according to device instance in ACPI table so the SOF_MAX98390_TWEETER_SPEAKER_PRESENT flag and a dmi quirk for 4-amplifier configuration could be safely removed. Also refactor the max_98390_hw_params() function to use an array to handle the TDM parameter. Amplifier number detection and TDM parameter are tested on two Chromebooks. One with 2 MAX98390 and one with 4 MAX98390 amplifier. V2 Changes: - fix some typos in cover letter - use for_each_acpi_dev_match() macro to simplify the codec - use 'unsign int' for codec number variable Brent Lu (2): ASoC: Intel: maxim-common: get codec number from ACPI ASoC: Intel: sof_rt5682: remove SOF_MAX98390_TWEETER_SPEAKER_PRESENT flag sound/soc/intel/boards/sof_maxim_common.c | 171 +++++++++++++--------- sound/soc/intel/boards/sof_maxim_common.h | 21 ++- sound/soc/intel/boards/sof_rt5682.c | 37 +---- 3 files changed, 112 insertions(+), 117 deletions(-)