From patchwork Fri Sep 15 12:48:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liao, Bard" X-Patchwork-Id: 723962 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 4C19CEE6457 for ; Fri, 15 Sep 2023 12:45:25 +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 60475DEE; Fri, 15 Sep 2023 14:44:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 60475DEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694781923; bh=+nKJ/PSxOyzVc92SxY5hlQYodLmGBl0Juiujx8Gpw9Y=; 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=RBL6yWeXpdYxPm95vNv0yAQaFY5ca3BXpeiOkj0W5htSt+fi+u8nPWV1vWL0S1Wqu 90rYyTQnp+CLTvcBzVvcjdxdoq221nd7OzRgHheCr9irA2Heoze73A8MmHDkX3a7OK SDWNSCjqt/e6tRyo3XZWf1IGNsHMFQ6OeTSnzqP8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B86C4F80610; Fri, 15 Sep 2023 14:41:09 +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 D9D04F80615; Fri, 15 Sep 2023 14:41:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 421C5F805C6; Fri, 15 Sep 2023 14:40:46 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) (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 04F23F805A1 for ; Fri, 15 Sep 2023 14:40:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 04F23F805A1 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=UXIgqf6L DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1694781637; x=1726317637; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+nKJ/PSxOyzVc92SxY5hlQYodLmGBl0Juiujx8Gpw9Y=; b=UXIgqf6L651gBRaPF+a2vNwxi+KqcXfVRV0J13KAfV4+VKV8VzDi+Al2 9/mLwzfECGA4+Nvp0socP3yb+USAJZwKjrLkTKE9bpatFSLW+mUvA2PlL j0yvuKuIKvac6pFvF5e97gA2dH2nbCz7AO6cYwCSqynAzyNjXvgHvH5Lk c6iCu1VI2uWrsX8I59GA2Tg5wppwxj5zcmv6oUipud6TCRFGRthiDfD+o OrAtFxN/3RIvaoxuIrZXfwjnoxR4wTE59aa6Xtbrw0uVaFQX1bCu5Q451 RI2myX+x3vZFFwq8q1W8lBcT2d8imWf0sfhE4kXWw96xaNqlUq+wd5car A==; X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="358653194" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="358653194" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 05:40:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10834"; a="774304597" X-IronPort-AV: E=Sophos;i="6.02,149,1688454000"; d="scan'208";a="774304597" Received: from bard-ubuntu.sh.intel.com ([10.239.185.57]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Sep 2023 05:40:31 -0700 From: Bard Liao To: broonie@kernel.org, tiwai@suse.de Cc: alsa-devel@alsa-project.org, pierre-louis.bossart@linux.intel.com, bard.liao@intel.com, peter.ujfalusi@linux.intel.com, brent.lu@intel.com, uday.m.bhat@intel.com, balamurugan.c@intel.com Subject: [PATCH 10/19] ASoC: Intel: sof_rt5682: add adl_rt5650 board config Date: Fri, 15 Sep 2023 20:48:43 +0800 Message-Id: <20230915124852.1696857-11-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230915124852.1696857-1-yung-chuan.liao@linux.intel.com> References: <20230915124852.1696857-1-yung-chuan.liao@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: 3SYVD2C5QJVK3IWEHVH5TDR7JM464WBE X-Message-ID-Hash: 3SYVD2C5QJVK3IWEHVH5TDR7JM464WBE X-MailFrom: yung-chuan.liao@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: Brent Lu This configuration supports ADL boards which implement ALC5650 dual I2S interface codec. Two DAI links are added: AIF1 (on codec side) for headphone and AIF2 for speakers. Signed-off-by: Brent Lu Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao --- sound/soc/intel/boards/sof_rt5682.c | 21 +++++++++++++------ .../intel/common/soc-acpi-intel-adl-match.c | 12 +++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/sound/soc/intel/boards/sof_rt5682.c b/sound/soc/intel/boards/sof_rt5682.c index bbe15c36b855..f5767f9e506d 100644 --- a/sound/soc/intel/boards/sof_rt5682.c +++ b/sound/soc/intel/boards/sof_rt5682.c @@ -1153,6 +1153,12 @@ static const struct platform_device_id board_ids[] = { .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | SOF_RT5682_SSP_CODEC(0)), }, + { + .name = "jsl_rt5650", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | + SOF_RT5682_SSP_CODEC(0) | + SOF_RT5682_SSP_AMP(1)), + }, { .name = "tgl_mx98357_rt5682", .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | @@ -1239,6 +1245,15 @@ static const struct platform_device_id board_ids[] = { /* SSP 0 and SSP 2 are used for HDMI IN */ SOF_HDMI_CAPTURE_SSP_MASK(0x5)), }, + { + .name = "adl_rt5650", + .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | + SOF_RT5682_SSP_CODEC(0) | + SOF_RT5682_SSP_AMP(1) | + SOF_RT5682_NUM_HDMIDEV(4) | + SOF_BT_OFFLOAD_SSP(2) | + SOF_SSP_BT_OFFLOAD_PRESENT), + }, { .name = "rpl_mx98357_rt5682", .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | @@ -1287,12 +1302,6 @@ static const struct platform_device_id board_ids[] = { SOF_RT5682_SSP_AMP(0) | SOF_RT5682_NUM_HDMIDEV(3)), }, - { - .name = "jsl_rt5650", - .driver_data = (kernel_ulong_t)(SOF_RT5682_MCLK_EN | - SOF_RT5682_SSP_CODEC(0) | - SOF_RT5682_SSP_AMP(1)), - }, { } }; MODULE_DEVICE_TABLE(platform, board_ids); diff --git a/sound/soc/intel/common/soc-acpi-intel-adl-match.c b/sound/soc/intel/common/soc-acpi-intel-adl-match.c index 8e995edf4c10..4e9787870f60 100644 --- a/sound/soc/intel/common/soc-acpi-intel-adl-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-adl-match.c @@ -492,6 +492,11 @@ static const struct snd_soc_acpi_codecs adl_nau8318_amp = { .codecs = {"NVTN2012"} }; +static struct snd_soc_acpi_codecs adl_rt5650_amp = { + .num_codecs = 1, + .codecs = {"10EC5650"} +}; + struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { { .comp_ids = &adl_rt5682_rt5682s_hp, @@ -602,6 +607,13 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_adl_machines[] = { SND_SOC_ACPI_TPLG_INTEL_SSP_MSB | SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER, }, + { + .id = "10EC5650", + .drv_name = "adl_rt5650", + .machine_quirk = snd_soc_acpi_codec_list, + .quirk_data = &adl_rt5650_amp, + .sof_tplg_filename = "sof-adl-rt5650.tplg", + }, /* place amp-only boards in the end of table */ { .id = "CSC3541",