From patchwork Thu Aug 1 09:14:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13750052 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2082.outbound.protection.outlook.com [40.107.220.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C25DF170A01; Thu, 1 Aug 2024 09:21:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722504117; cv=fail; b=oy+J03lF08GdJECeND89PEBsL2etJdLGGWc2y/yzBdoS3q2qlZMRMHXYTYdqBqF6z9rqNZCSOWqcB9arZcFNJw1qrw4YJ36Uq4ly5Ah6HwbgU2WGutAGLp6ZMeK54l1TzjX994sZujAQyGflJdAlFpGdx3tsR+xMzPTfe7HCRp0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722504117; c=relaxed/simple; bh=Yzz8WOg43WeIoUjtkJVapYM27Be74R5TXQtiY0PKNKk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WV9xPWS7kWamGKJhSaUenAjILoHgjqamyv38243soiH+DjQB2Fd8ckyET9ILLfKe+Vy2bXmov/IWjAoHeZ8Ty4pmvusPNwBJYEUq7it+7akPMEaSf/9LkeN+jMP2Isc33C6MDKNaMMHEFP/soeRWE4Q5yPHwXPtrr1KjJAHeIDw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=lV8Ztiwt; arc=fail smtp.client-ip=40.107.220.82 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="lV8Ztiwt" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PaPgqe+sUDsduTJl/lEP6BjL9nJzzHFL9GeQpuvDKSk6aRoRbUMelx4PzUyiW+RSz5L1h5Bp+X5p15V7qUcMYx3WjE0kRiOaqtPkyezuVma8vvQywpuWpWHA6iogSnMt73CpkFqid1MGZd4GBgYxlc5jKjUcAgynHjwHPrVhS2GUuQBqSSsg9fQ7zN3bHDY8zkP4mCaokUYMvu71zpsxyKWwEeoeTBQ9pcT9b7Na/2He81CLjmu3upMWJMNOgBQTwDXGN8x8KihahFuN5ql901fr0ZGdKXYe/BY8x41IMIg4aHIboOR3PY5A6/XEk5Z7lq2a2adOfbjD1WQDEzZK8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Z6mKQYLX0Q5OVdsXYYGk5DZZpfqfgmCoNaifWSLyRIk=; b=jqNgv5M+2Yk/C53vUiEp7Ij+M8ouRxH/uayfTkN2uethvLJIVnzWA+pCBGf93y1O2B52mGOG6RWJLHqW4PpTnEmSyoBS/vy5LMURxLy5AyIgkzNwLf2xZSgvjDRDgL4NVkYHY7Bedekpib7r4u1T0+mN7VHv6El6F1EXdd9WN2OTPALz2L94ldGfs0BI5ChHsAYi4uCbc548muUikAImNeJaxPDyT0bCq45+5extcn2SYxJtT4FaareWAMc6qmgPG1lViTOWSVPiWBOsaM4usMZMfogRKZ0/4J46jeLlbADsr90geFyW70Jtu2j8zUtBKNBjy7zXxkRKrinQ70yP7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z6mKQYLX0Q5OVdsXYYGk5DZZpfqfgmCoNaifWSLyRIk=; b=lV8ZtiwtiaMn5LDJ0Un68NeY8/sOSklz6HcM9cC5hZF+HzeL8RhsPavOdW5edC5XDjAb1DkgCVL8f7EB93+kVmTuqpRNn1ETllD34XvWTIvVR3aCygvKWioZ1Jn9padJ/83qcEdz4iba2a08/ZZWEC5KUW7DVF6fnepvHcsx5wk= Received: from MN2PR05CA0014.namprd05.prod.outlook.com (2603:10b6:208:c0::27) by CY5PR12MB6035.namprd12.prod.outlook.com (2603:10b6:930:2d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22; Thu, 1 Aug 2024 09:21:52 +0000 Received: from BL02EPF0001A0FD.namprd03.prod.outlook.com (2603:10b6:208:c0:cafe::97) by MN2PR05CA0014.outlook.office365.com (2603:10b6:208:c0::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.21 via Frontend Transport; Thu, 1 Aug 2024 09:21:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by BL02EPF0001A0FD.mail.protection.outlook.com (10.167.242.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7828.19 via Frontend Transport; Thu, 1 Aug 2024 09:21:52 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 1 Aug 2024 04:21:51 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 1 Aug 2024 04:21:44 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Cezary Rojewski" , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Brent Lu , Charles Keepax , Maciej Strozek , Chao Song , Rander Wang , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH RESEND 15/31] ASoC: intel/sdw_utils: move rt5682 codec helper function Date: Thu, 1 Aug 2024 14:44:30 +0530 Message-ID: <20240801091446.10457-16-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801091446.10457-1-Vijendar.Mukunda@amd.com> References: <20240801091446.10457-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF0001A0FD:EE_|CY5PR12MB6035:EE_ X-MS-Office365-Filtering-Correlation-Id: a7d8c33a-dcfb-4031-bc07-08dcb20b60fb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: FTylGS+XhOummUlTgVdfrcdV2P6ywhwoSM+iiu+qk/5+9Gj6YTG++XbKewm7uI5SDBh4IJ+ZJqPd0QK5Jzl3VIYfEToNlPk8o/2C+GLg6bE0d31aClidseWz7tS+BzyXokk1f1v6+Km8o5XKJnQ6N7rnnStn83SoZDauSUGSs41zTj+6pR8r0VFmtAtHYIn0PvxjEcqCZ+OXf+SCPpNhJeLcAj42b+YzOzEC/lJy+v2HKBEA5u5MMoyPYSCiaa4z4sRFWqpVjO7YjNnBUD1NRkkXt8gjNmDN/5tTyPvR8n7g48LX7wnsrMmCz9k3xcWj8UjarGCY2a9LgxIfwA9lZh4tUvSV0lSXmfYXuw7XDVGKEgpKxB7LFn0HgpNmosSGToyGHh0P9MCP+I6Qd38djg0ansO23mBYxfk8NtYS8OirTR6VEifh4QejOliRCsEi587orvgft6MQFwpJvzf7mdq55REdlKZgtQf1MQTQdOAVm0Aq/aWID6yeHOojNkhTlS0Yemsp2zwHoij1L0oJHcjLshNWBYqwlQPeT/xAvyiMycR5Yz2VeeYUuhUSl8ip1v5A/BZtovzDQSE2Vv44Q7HaOyhQbHg2qMs78ZIo1LNFWLTDyR/XS7znUU8PKq/G51GzLdiMRquJ7GrnqFg23dy48J57CMa62jyyV7H748DH1/eweiiTk/lIIy4TPni2NCjSQ5NrTVLrlEyi3pvxSBRrP7dCESz0f1LCpEBXon80p2MXySy7tpzgwiPJpsfE3IwRxlm04yjsjHIIH5CdMZMFbAOLgi8Eti51Vz2Q+YRkWXapsUvVyx+IPUF7u8JppLo+WTFYoT25DI8Fa5bZoJ8EviaUmEb+UtVzzsR2wEPsj0NOEATLHVry5j9XPQY4lXErpJrwdiVz3qMu3xU+6P+HzpKX3JQCIoZB9FZBtwdRE5HalHZtncGrlrs5Z7xMnrUfwzVJMAAX1j1FHEZY3BrWgt1fWSZfAof92Kdp4bvlX6pB+xI6PZD902+34GJzlf5SuNnHTKjF5RCKey3tNq4Qw4D7Kh0O0PUzmw4GfWkAZ5k/jBkv8MLm9dA0wglGO86MXnLEOSSdu2usoysrD9l1hXO+BRf7NsirL458shVwNFMy5fcONOLGSZ+8aO+eiyvmRr1cvYN4cSgPrwf3bPTf8LBL08GFdVdPnCY3D8Wrx5E9rg2dwQsPRNBjQQ53AAXJAdptVnFrcwwwVSpp9BETjqVL4E2lE2AxywvrKmJYEwuOBHB8AXnEhQeTvNrqZL2n96VHHWOr4FQCuZOAL8jAzonM9039I2rFzNS2U6GXc4j0Q7v4KQ368LG5Y//Z4/23iHtYGNZdXBpvenKsHid++6rsDhiMO9Zyqap96RVE8TWwAyirS+/BNOLPuU+l X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 09:21:52.0481 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a7d8c33a-dcfb-4031-bc07-08dcb20b60fb X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF0001A0FD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6035 Move rt5682 sdw codec helper function to common place holder to make it generic. Link: https://github.com/thesofproject/linux/pull/5068 Signed-off-by: Vijendar Mukunda Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- include/sound/soc_sdw_utils.h | 1 + sound/soc/intel/boards/Makefile | 4 ++-- sound/soc/intel/boards/sof_sdw_common.h | 1 - sound/soc/sdw_utils/Makefile | 3 ++- .../sof_sdw_rt5682.c => sdw_utils/soc_sdw_rt5682.c} | 8 +++++--- 5 files changed, 10 insertions(+), 7 deletions(-) rename sound/soc/{intel/boards/sof_sdw_rt5682.c => sdw_utils/soc_sdw_rt5682.c} (88%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index eb713cdf4079..ed97d78336da 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -86,5 +86,6 @@ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); int asoc_sdw_rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); int asoc_sdw_rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); int asoc_sdw_rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); +int asoc_sdw_rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); #endif diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index f3baf9ecfbb7..80c33e4b4cfe 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -37,8 +37,8 @@ snd-soc-sof-ssp-amp-y := sof_ssp_amp.o snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_maxim.o sof_sdw_rt_amp.o \ bridge_cs35l56.o \ - sof_sdw_rt5682.o sof_sdw_rt700.o \ - sof_sdw_rt711.o sof_sdw_rt_sdca_jack_common.o \ + sof_sdw_rt700.o sof_sdw_rt711.o \ + sof_sdw_rt_sdca_jack_common.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ sof_sdw_hdmi.o diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 7954472c11bb..bbd09698c69d 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -151,7 +151,6 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_so int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int asoc_sdw_rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); int asoc_sdw_rt700_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); int asoc_sdw_rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile index 261c60098e88..fea2b6ae6975 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ - soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o + soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ + soc_sdw_rt5682.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_rt5682.c b/sound/soc/sdw_utils/soc_sdw_rt5682.c similarity index 88% rename from sound/soc/intel/boards/sof_sdw_rt5682.c rename to sound/soc/sdw_utils/soc_sdw_rt5682.c index 7e52720e0195..80b4caa92667 100644 --- a/sound/soc/intel/boards/sof_sdw_rt5682.c +++ b/sound/soc/sdw_utils/soc_sdw_rt5682.c @@ -1,8 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2020 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* - * sof_sdw_rt5682 - Helpers to handle RT5682 from generic machine driver + * soc_sdw_rt5682 - Helpers to handle RT5682 from generic machine driver */ #include @@ -15,7 +17,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include static const struct snd_soc_dapm_route rt5682_map[] = { /*Headphones*/ @@ -86,4 +88,4 @@ int asoc_sdw_rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai return ret; } -MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); +EXPORT_SYMBOL_NS(asoc_sdw_rt5682_rtd_init, SND_SOC_SDW_UTILS);