From patchwork Thu Nov 2 16:48:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mac Chiang X-Patchwork-Id: 741088 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 BEC5DC4332F for ; Thu, 2 Nov 2023 17:11:17 +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 EEF7D829; Thu, 2 Nov 2023 18:10:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EEF7D829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698945075; bh=CXIPzvC3FUKsfm3RbFiCNlRA6j0Y9/yLAH2lP0YZf/M=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=qbcLCUsacm2sdfNcxx4a+ofukjwb8jyveSYXQclnrag9OYwQFqJEsr4OXZ9iSoBcb oBNaRiRYe/UjyCCVbvOffYHivtCJXTJWKahKnBLkwVf265MxFZJFfNXzxAyg5q+08I FHDXv/XoCw3Nsvw4xFs7fYlpexSBsGZmn07bKBL4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 71B23F80558; Thu, 2 Nov 2023 18:10:02 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BCA30F8003C; Thu, 2 Nov 2023 18:10:01 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9456DF80290; Thu, 2 Nov 2023 18:09:56 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (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 F30BFF8003C for ; Thu, 2 Nov 2023 18:09:47 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F30BFF8003C 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=LiTKNYjx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698944990; x=1730480990; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CXIPzvC3FUKsfm3RbFiCNlRA6j0Y9/yLAH2lP0YZf/M=; b=LiTKNYjxfIa92J/hLEhpUPx74tE7xt4oShy/0kNOzOQK12aa4RaMDke9 k5p5idv/ld1XWzfo6rQsI9Sk4UqOV1fLGe+rG1bmYnT96k1419ddoZc/R bYNRlVcXMv4bscyXjNy0aRX4a9zQx/0okK45Uztk1LEFM76M1lawXhvej hMAQQbNibwyGwiK7VgnesMujwpMtkixbFv1lUtK/rHH6Qvtq6vQ7R3ECB xSu1ExiypucYFhZU+pPqAMd7QYjnVMp55cWHfygSHvjjHD769+U1u1rIE +XzXZqyleTOMWGZKrV7pAWDqH9bANTTTJxSUqiCUXnaV0GCOmegSvFUL6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10882"; a="455245388" X-IronPort-AV: E=Sophos;i="6.03,272,1694761200"; d="scan'208";a="455245388" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2023 10:09:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,272,1694761200"; d="scan'208";a="2613430" Received: from macchian-builder.itwn.intel.com ([10.5.253.188]) by fmviesa002.fm.intel.com with ESMTP; 02 Nov 2023 10:09:42 -0700 From: Mac Chiang To: alsa-devel@alsa-project.org Cc: cezary.rojewski@intel.com, pierre-louis.bossart@linux.intel.com, liam.r.girdwood@linux.intel.com, peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, mac.chiang@intel.com Subject: [PATCH v2] ASoC: Intel: sof_rt5682: add mtl_rt5650 support Date: Thu, 2 Nov 2023 12:48:44 -0400 Message-Id: <20231102164844.6930-1-mac.chiang@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Message-ID-Hash: N47RRHO4G3WBKYLDLA6UTCEGTP4SZ7QF X-Message-ID-Hash: N47RRHO4G3WBKYLDLA6UTCEGTP4SZ7QF X-MailFrom: mac.chiang@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: RT5650 is I2S codec integrated with HP and SPK. The HW board connects SoC I2S to RT5650 codec as below: I2S0: ALC5650 aif1 for Speaker I2S2: ALC5650 aif2 for Headphone Signed-off-by: Mac Chiang --- pick up from Link: https://github.com/thesofproject/linux/pull/4661 for Chrome MTL projects. Changes v2: - regen format patch due to v1 from github remote --- sound/soc/intel/boards/sof_rt5682.c | 9 +++++++++ sound/soc/intel/common/soc-acpi-intel-mtl-match.c | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index 06ad15af46de..9723479f43da 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -1147,6 +1147,15 @@ static const struct platform_device_id board_ids[] = { SOF_RT5682_SSP_AMP(0) | SOF_RT5682_NUM_HDMIDEV(3)), }, + { + .name = "mtl_rt5650", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | + SOF_RT5682_SSP_CODEC(2) | + SOF_RT5682_SSP_AMP(0) | + SOF_RT5682_NUM_HDMIDEV(3) | + SOF_BT_OFFLOAD_SSP(1) | + SOF_SSP_BT_OFFLOAD_PRESENT), + }, { } }; MODULE_DEVICE_TABLE(platform, board_ids); 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 301b8142d554..af4224bff718 100644 --- a/sound/soc/intel/common/soc-acpi-intel-mtl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-mtl-match.c @@ -40,6 +40,11 @@ static const struct snd_soc_acpi_codecs mtl_lt6911_hdmi = { .codecs = {"INTC10B0"} }; +static const struct snd_soc_acpi_codecs mtl_rt5650_amp = { + .num_codecs = 1, + .codecs = {"10EC5650"} +}; + struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { { .comp_ids = &mtl_rt5682_rt5682s_hp, @@ -77,6 +82,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_mtl_machines[] = { SND_SOC_ACPI_TPLG_INTEL_SSP_MSB | SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, }, + { + .id = "10EC5650", + .drv_name = "mtl_rt5650", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &mtl_rt5650_amp, + .sof_tplg_filename = "sof-mtl-rt5650.tplg", + }, /* place amp-only boards in the end of table */ { .id = "INTC10B0",