From patchwork Thu Aug 1 09:14:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13750046 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060.outbound.protection.outlook.com [40.107.220.60]) (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 4562316DEAF; Thu, 1 Aug 2024 09:19:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722503996; cv=fail; b=a+Dah9vzGza5a5/EFOD6qpJX1dOmphYGH/X18yWcB3EON0bIyKna8RoOBIs61ZnBPXhd8OlNONN3fZGXo3F8DuQ/g7pIk8ZCE2+5aQ183q2IG58/QOXkTNlboJd8Tt3WhTaNPGoecIqnoo51zlJxVGZXaa9qobWSnVWiIee0ZNU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722503996; c=relaxed/simple; bh=nelUTE3UCSrTjZfAXz+ulsgjGceDQrtX87jFBIIf/U4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qZza52FF8JQnU8uND2s+OOQKEkG2HqJMJq3b9fmqPpGuDN0u+20vVr36hlyewaUwhrZH7RUC996qlIR0NM+K9MYU9U+EJON9L4wcToPI13RMVr/VN8G8sN8MEBezRAp7FFGv6DDChwXkVff1Uz5nleIuo1plldVVLWvbmuha7xM= 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=J5Qf5RM1; arc=fail smtp.client-ip=40.107.220.60 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="J5Qf5RM1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=K1twrXD5AUM/HCvb8DA4n698SGJPAlq/rESN9fmmqDQ06l2SBoL2RgbUUyraFXQh2+NahaJkEdFQUCOg819ta0GGalsapajjB9G9X/OvB2dPotQrgaJWDRxGl54yXTAPgFXYLaStg8GRKvWjTQKP4viDgwWkJg0jwKBMM52qWJwYJ40Mw27UQ4rFoWUYNgu2oD69ZyXgBJ9aQ1gb/rHdPlzjReohTXhkfWk5OZ2zI+kEWba6yHqME/kQk/mx0g3zoP76bgWHibbMW2XAj4lfzNkiPslLjcbGUmrB5jvgzpZBzqnRIOe2ZiQZelvVbyg2OPhjBzlBRLZD2P1wp/XxBw== 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=3h/1p+WbV/j7E5Ukqg9CVqE+GidDOg+hifcmtgW1fCc=; b=j1Q6kW1ixeA85kmOGhb9PYlxJ6E1YazCGxXrbwKKFalrVH5/FgeEIuAZujL9ljqg4yc5GED+o+pMr+HumjAABhK5eZEcGrz0ImNtdSN0iqwfwzo6TIdz7j3fOZD4SqSO8kInyF4QYcOJBtx+RDgHUWGq3cZ015xMCDjzufr2Nmtmnb/dv1jndu0jTbcoPLXWKl/u6fvHytz3IqDcLTkeldL+2RPk33SEWGa9/moGeCyiWDIAgE0g7LTH6BQf3Wy9+iOqrtFeTwF/q3V39zsH18BLf8WudNuIUjRkxWPcur6BaEeHuQVTi/ethS48FhY5Sn3JBM7eNlXM8iK/wNqg6A== 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=3h/1p+WbV/j7E5Ukqg9CVqE+GidDOg+hifcmtgW1fCc=; b=J5Qf5RM1LcdJlC5Ar1Yu6WmsxClWfLb5n+rELTaMW+4p8/Sdn/XphPBJX7m7gNYadqKd9YuMJOhUWxOEbJ60SPjsEmJjuCRW61QoTcl579I33hx1vWcWJkEmR/ecg3SuSbhrdat7nufL4X2RtcFWJ/Gy3Kty2caDYNUdnneTkos= Received: from DS7PR03CA0248.namprd03.prod.outlook.com (2603:10b6:5:3b3::13) by IA0PR12MB8226.namprd12.prod.outlook.com (2603:10b6:208:403::21) 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:19:52 +0000 Received: from DS2PEPF00003441.namprd04.prod.outlook.com (2603:10b6:5:3b3:cafe::5a) by DS7PR03CA0248.outlook.office365.com (2603:10b6:5:3b3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.34 via Frontend Transport; Thu, 1 Aug 2024 09:19: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=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by DS2PEPF00003441.mail.protection.outlook.com (10.167.17.68) 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:19:52 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) 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:19:51 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) 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:19:50 -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:19: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 , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH RESEND 11/31] ASoC: intel/sdw_utils: move rtk dmic helper functions Date: Thu, 1 Aug 2024 14:44:26 +0530 Message-ID: <20240801091446.10457-12-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 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003441:EE_|IA0PR12MB8226:EE_ X-MS-Office365-Filtering-Correlation-Id: 23a101d6-99f4-4f9d-17a3-08dcb20b1991 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|7416014|82310400026|376014; X-Microsoft-Antispam-Message-Info: 74ZgPy2m+rzM25UdoOtGEgfynJSZKiuOIo8ylbDbhHJuhALU+u0uT+JppVKlKXPHR6oiWfFHy+5jU3OfL/ug5P2hmfQTlAKQIlsFAv3RGFw/8x4KdzeH2ahgo6qEz+tL2qxgUzMxeMq3eBMMPwlsl2jtSyP1Cv6o+mXvfqAWpaNp1FYt8w5skbIkzZFOLQMi2v/tLxyP8kzcFaA8abIg0Xkw+4DQH5g59YmDHgpwLTw53zwjx8cFbilV7LxNMTowLW7rdtJGBPeiOVT5Z+Rjd5QRiSAw/RGjc3r//QziqWuSWQ68f3ZeTH2AIMDXC7ElH9aUtP3M1u9lv5KYldFQNcbptjfmWqOkax5Bd9ZQ9knlMXekdEtsGbPJ8oTbjVvKy+Y/l98rhtOy9m0J3eVFT5ZtEGALjMnf9zXzTq/nZKnhQOanRthQbuBG5BG9tWXNo5QcCbdBMTTPgbHx6nxWzvjn/2TVHGQ3Uj7uZty6NUDtNTKJ8i1n9NkcB5z5O/rmvm29YUX0vwS3KOWSv9hOiWgpX4JV6KQ8OI4btK+deSEBBvkXmLh59grKD48i1fguWBZbPrwWmlt4jQTE8QU2VrdUxDmzwBjX5bPmNhPy3nPdu52Ld4kv6KIamXZb1CrBhUOrzBF4DcLirl+3qcDjkKRGL9v8iNbJBtJ67kOohTYZSEjh+TdISSqaVV/f2rJVBWgomre8qxHjSKJ6n+2RDe39hFCmbd8D3s8pwyL/9XwxjM5KY4ps4A3SWWK94/NkDUSCXfnTnhdXdCEAmOvkoZdnYWI2waJ2i8CGSYMWll6V7jxGXO9zWorgO6Bdvtzxndwu7fkkUrgidSawECrglrDhW747X2pul2wpgCWmiAVmGqpDhuIA5O57G1r52bm77+kswGJATiZ/rSyBzcX8kY0rHo7xSNMVuRf0YXyqJXJJLRTBuCt5jsN5DvCGBBBe8M0rsqOT2ZjH22Sb4kRQtQws9H9ad12VcFj7YXUm4e+xF6Y0zNho3JQMzAMEVzdIT/RhVElhArcRS3cT1VYBj3clz27PQsKVisjFtGEqZhDBzqEqaeukR0sS+CQbZuGgyLtizkRdaDmO5kPozcknv8RloRS3BcAk4fe9MOxmjvXkjr7oVgvNH3aYWPwCh272roxLMWjTmX8hNoGl+EjOeMUCgsllbmshUySYScRrckYLMv6VXf6G8rS0qlN0C7YnU2zsi7dLvMRPXSWAl7rE/aw/7xI4Dx65Cmf4Bsmqh8JkNciP2qqEYMQOnPdvshCYqkIQQqaBIhqrtXxQtu9LeBQ6gQDUQywnuo8OINbVzOMdb2HWnBhz0q4EnndOLQhB3YILdXa6wiu0g9QP7NpYROeokkQA+Eyu6l2BKDfeZF6Uf+PEfZc7rQ01LD2da3gint/BR3wNup8rPTfKNfrnyg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(36860700013)(7416014)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 09:19:52.1528 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 23a101d6-99f4-4f9d-17a3-08dcb20b1991 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF00003441.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8226 Move rtk SoundWire dmic helper functions implementation to sdw_utils folder 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 | 3 +++ sound/soc/intel/boards/Makefile | 1 - sound/soc/intel/boards/sof_sdw_common.h | 1 - sound/soc/sdw_utils/Makefile | 2 +- .../sof_sdw_rt_dmic.c => sdw_utils/soc_sdw_rt_dmic.c} | 9 +++++---- 5 files changed, 9 insertions(+), 7 deletions(-) rename sound/soc/{intel/boards/sof_sdw_rt_dmic.c => sdw_utils/soc_sdw_rt_dmic.c} (77%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 0ffbd9847532..9fa102fc03c3 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -72,4 +72,7 @@ const char *asoc_sdw_get_codec_name(struct device *dev, /* DMIC support */ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); +/* dai_link init callbacks */ +int asoc_sdw_rt_dmic_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 8ac6f7b5fbee..dca8eecfa820 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -40,7 +40,6 @@ snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_rt5682.o sof_sdw_rt700.o \ sof_sdw_rt711.o sof_sdw_rt_sdca_jack_common.o \ sof_sdw_rt712_sdca.o sof_sdw_rt722_sdca.o \ - sof_sdw_rt_dmic.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 81b654407651..73227ebf8e7b 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -162,7 +162,6 @@ int asoc_sdw_rt700_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai int asoc_sdw_rt711_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_rt_dmic_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); int asoc_sdw_rt_sdca_jack_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 de8aff8744d8..2c8f70465a12 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -1,3 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-only -snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o +snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_rt_dmic.c b/sound/soc/sdw_utils/soc_sdw_rt_dmic.c similarity index 77% rename from sound/soc/intel/boards/sof_sdw_rt_dmic.c rename to sound/soc/sdw_utils/soc_sdw_rt_dmic.c index 64960b059834..7f24806d809d 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_dmic.c +++ b/sound/soc/sdw_utils/soc_sdw_rt_dmic.c @@ -1,16 +1,17 @@ // SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2024 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* - * sof_sdw_rt_dmic - Helpers to handle Realtek SDW DMIC from generic machine driver + * soc_sdw_rt_dmic - Helpers to handle Realtek SDW DMIC from generic machine driver */ #include #include #include #include -#include "sof_board_helpers.h" -#include "sof_sdw_common.h" +#include int asoc_sdw_rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { @@ -39,4 +40,4 @@ int asoc_sdw_rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_da return 0; } -MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); +EXPORT_SYMBOL_NS(asoc_sdw_rt_dmic_rtd_init, SND_SOC_SDW_UTILS);