From patchwork Fri May 12 17:33:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 681228 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 E7F90C77B7F for ; Fri, 12 May 2023 17:35:59 +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 8A565E81; Fri, 12 May 2023 19:35:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8A565E81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1683912957; bh=3+ENBWJJwRIB+YeRrVOd+zv9JAeiVCuw9vbT2Cu3s1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=FcidhRYfaOMChwD/8JHYOv1CDSKgA04+bDI06ARl63835RqSvIfxr2ZZzubXFTuAe qfDkD9Mvf0KOooZvwld/+yZCuPUa972yDW3DgDUXYc2wnpP3uubckdPBBfuXBz/vMG S16Lx54vmm8CNM9W6/Fsx/qGF5tRDYozYxvQpNI8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BABD3F8057B; Fri, 12 May 2023 19:33:56 +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 6067CF80579; Fri, 12 May 2023 19:33:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 57E94F80553; Fri, 12 May 2023 19:33:53 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 7675EF8032D for ; Fri, 12 May 2023 19:33:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7675EF8032D 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=CGOqcRK7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683912825; x=1715448825; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3+ENBWJJwRIB+YeRrVOd+zv9JAeiVCuw9vbT2Cu3s1o=; b=CGOqcRK7+uQmqzl33Z8Ys53G+63LkWYry1iGTzECoNbdVsFLI9729LnF Peb2/sVduF7iCHwxRDQ6c8uubByzyMW2Ely+ycCJihuz5k+V3Q7VkIyPJ QVAA36bu6jXvM23c8myrnCrCDOqH5nGqSGRj+odup51bKhvMoTdZL3+nW 0tWJhkLzIgV8eb4v3vqykCqqLR00zet/NDKz9YQ4NCS5IRyKMjQNw59ZD UbEpc0VvcSMZLa6JPv+4iIKFHs5cCiSMdL6OnKVgIUad/awPbl0HVZXWr Bpm16UGHaHkVhM0uF5B3qF1nsi0tDouadsEgMvkxE9Q7Zr+9WteA9zNm2 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="340164718" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="340164718" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 10:33:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10708"; a="1030160310" X-IronPort-AV: E=Sophos;i="5.99,269,1677571200"; d="scan'208";a="1030160310" Received: from winkelru-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.144.249]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2023 10:33:15 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, Chao Song , Pierre-Louis Bossart , Bard Liao , Ranjani Sridharan Subject: [PATCH 4/8] ASoC: Intel: soc-acpi: add support for MTL SDCA boards Date: Fri, 12 May 2023 12:33:01 -0500 Message-Id: <20230512173305.65399-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230512173305.65399-1-pierre-louis.bossart@linux.intel.com> References: <20230512173305.65399-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: CQJVBZBRJMIAE4HHFRWK6DJ6RACM44WL X-Message-ID-Hash: CQJVBZBRJMIAE4HHFRWK6DJ6RACM44WL X-MailFrom: pierre-louis.bossart@linux.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: From: Chao Song The description and board layout is changed and different from previous ones for CometLake and Tigerlake. The new codec layout for MTL is: SDW0: RT711 Headphone SDW1: RT714 DMIC SDW2: RT1316 Speaker SDW3: RT1316 Speaker The previous codec layout for CML and TGL is: SDW0: RT711 Headphone SDW1: RT1316 Speaker SDW2: RT1316 Speaker SDW3: RT714 DMIC Signed-off-by: Chao Song Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan --- .../intel/common/soc-acpi-intel-mtl-match.c | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c index 7911c3af8071..8fd4d0db201e 100644 --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c @@ -98,6 +98,33 @@ static const struct snd_soc_acpi_adr_device rt5682_2_adr[] = { } }; +static const struct snd_soc_acpi_adr_device rt1316_2_group1_adr[] = { + { + .adr = 0x000230025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_l_endpoint, + .name_prefix = "rt1316-1" + } +}; + +static const struct snd_soc_acpi_adr_device rt1316_3_group1_adr[] = { + { + .adr = 0x000331025D131601ull, + .num_endpoints = 1, + .endpoints = &spk_r_endpoint, + .name_prefix = "rt1316-2" + } +}; + +static const struct snd_soc_acpi_adr_device rt714_1_adr[] = { + { + .adr = 0x000130025D071401ull, + .num_endpoints = 1, + .endpoints = &single_endpoint, + .name_prefix = "rt714" + } +}; + static const struct snd_soc_acpi_link_adr rt5682_link2_max98373_link0[] = { /* Expected order: jack -> amp */ { @@ -122,6 +149,30 @@ static const struct snd_soc_acpi_link_adr mtl_rvp[] = { {} }; +static const struct snd_soc_acpi_link_adr mtl_3_in_1_sdca[] = { + { + .mask = BIT(0), + .num_adr = ARRAY_SIZE(rt711_sdca_0_adr), + .adr_d = rt711_sdca_0_adr, + }, + { + .mask = BIT(2), + .num_adr = ARRAY_SIZE(rt1316_2_group1_adr), + .adr_d = rt1316_2_group1_adr, + }, + { + .mask = BIT(3), + .num_adr = ARRAY_SIZE(rt1316_3_group1_adr), + .adr_d = rt1316_3_group1_adr, + }, + { + .mask = BIT(1), + .num_adr = ARRAY_SIZE(rt714_1_adr), + .adr_d = rt714_1_adr, + }, + {} +}; + /* this table is used when there is no I2S codec present */ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = { /* mockup tests need to be first */ @@ -143,6 +194,12 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_sdw_machines[] = { .drv_name = "sof_sdw", .sof_tplg_filename = "sof-mtl-rt715-rt711-rt1308-mono.tplg", }, + { + .link_mask = GENMASK(3, 0), + .links = mtl_3_in_1_sdca, + .drv_name = "sof_sdw", + .sof_tplg_filename = "sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg", + }, { .link_mask = BIT(0), .links = mtl_rvp,