From patchwork Thu Aug 1 06:23:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749831 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2062.outbound.protection.outlook.com [40.107.94.62]) (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 9F48426AE0; Thu, 1 Aug 2024 06:25:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493510; cv=fail; b=CEqXQDH7/4xi4j4FMjSyHZgKMBxIUN0EGXAd0S2GpGC83HmZ9mFfBS3kmkksMegsUMpPrVwaeKF6WDG0yJDyk8kzciKRkgxa2l+mSh7+hRImRDYxefUkrfOi8dKgLp/qcY1TlYM1zUbQmKB5+R/RYfyvcNBclye4xlt6YOl4RVg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493510; c=relaxed/simple; bh=DEyriH/vPZc9JnNMAOgPz51EJsfR+N8BIQziaDRC/is=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Hy+xMeSgPY7Xa0yGhMQQccs5BdpGy4uBnwhdYxWuTUJtTNJEsxSGwlMejcITeue3RvYVPjXtnwUsIZ3tnOINzucXg7yFq29YPiZsTsuss49va3lvbGEW0gdALJ36vLjAZY6fPW+jl2HkdObPFHw8onebZzvOG3TbD64FmPbHBao= 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=4T3LD/sC; arc=fail smtp.client-ip=40.107.94.62 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="4T3LD/sC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WcXgnYyyz0WjwbsgRQmeQC4YUMj6b0Ar7KZHYOOc1O1mS4HE12O46kplRyaNNf/naofoWrkupsjLh3J++1RJga5UgTEUjC9OURbQdtCE9V1xzYoXlwQFPcoz3vht70Eh9GdfgJSKkH+s05e/Im3KVgq6Fz7TWby9IEh5BIKOlENpVrH6L4htuX9oiAanu/fmfiWhw9ROTbv5fetv6oiwcUHhWcxyKoXG64pBY/O65tKIo+6oQJTkQW4Lpl4oggV7uoA5xYX8w7bTC2jGLymoxmX25s7VbFMvPfYs1HNeoCIEmbI4CXvxu+kI4UW2do0yTlHZVN7zdpiV4ka1JLbC/Q== 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=nh6/9O6N5hkFvqNYO32bq/fMSHVHNmmNJeYjTlzMNZ4=; b=axU8o2Lj5N3wwuCbcRTYUoDh5NtLAZQ4W9VyKfpnGUI9qdbMeHPEysKEtrv454QczBHgHsAlWNKkzvBbNNoZRBlgX7BHaHmfLHEpq4lxZyStqj6AzxqdVDFqRguLMWBxfuGo91gtroc7z6ouP9tad6bgz4V25zohytYzbIZGclaj0cfTZSdTAokUJupAAZcuC8y5dbgMEDGVVRX2KmuiGyZhZSD0rEhy+jvR50uO9amgvdj8kmVRp4oyOe3rGWmrhKoPzLdYy+gL6tdqKqd0XCOdJX15SDjDJTUirFMAb6JazUF6z8SFFLtYFNodjuTswJsAQRcg4fUwX2WPxPTQtw== 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=nh6/9O6N5hkFvqNYO32bq/fMSHVHNmmNJeYjTlzMNZ4=; b=4T3LD/sClXZM1MqWu848spWQ8SHSc/QMviJ48Yfgq0hBkitoF61PtK5U4/HE4NS0eM7+lHcVpWFRu2XRmmvHS0NNxcG3eUPdpB4DDzqWAAz5bFCMizuijFRIfxZ2aJajq1kdwnwsiRALXldAGvxCbsc5V1xDjXYW33cxTAKz7PE= Received: from BL1P223CA0025.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::30) by SN7PR12MB7323.namprd12.prod.outlook.com (2603:10b6:806:29a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.20; Thu, 1 Aug 2024 06:25:05 +0000 Received: from MN1PEPF0000F0E4.namprd04.prod.outlook.com (2603:10b6:208:2c4:cafe::28) by BL1P223CA0025.outlook.office365.com (2603:10b6:208:2c4::30) 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 06:25:05 +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 MN1PEPF0000F0E4.mail.protection.outlook.com (10.167.242.42) 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 06:25:05 +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 01:25:03 -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 01:24:56 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Cezary Rojewski , Liam Girdwood , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Jaroslav Kysela , "Takashi Iwai" , Charles Keepax , "Maciej Strozek" , Chao Song , Kuninori Morimoto , Richard Fitzgerald , Brent Lu , Christophe JAILLET , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 01/31] ASoC: intel: rename codec_info and dai_info structures names Date: Thu, 1 Aug 2024 11:53:46 +0530 Message-ID: <20240801062416.2203673-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: MN1PEPF0000F0E4:EE_|SN7PR12MB7323:EE_ X-MS-Office365-Filtering-Correlation-Id: 523d5a07-531f-4b5b-c840-08dcb1f2aec0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|7416014|82310400026; X-Microsoft-Antispam-Message-Info: +efY75fO5rzXuku6Sgcm/PH5aFGN9UkXwWmWjBob74KLbuSmnUO9/y2r1cOh+173HL2kVPckXEGLBiind2uy2NxOYWv0FuIlKqDXhKC22Psfnyn098O1cIse9lWOkCJKiQH+EeJGsh4DqtHh5tGyRlVjapAHoR7bHBeUp13k7Dw2rkxJ1TOkr8Fk7f7xiXpoF5+V2T5XGVTeikjRJLZ272X4AuD3LaDwd4eh/7jCg9M9Etjdb0UiD4fkzq6ZuR2sG2V+JYtpaQ7eyC5/ayvw0KzEU1GVTdu2pTA1SEvQ4aJBsZT622/0SxxTZSYcJLJP17a7Y33lgW1qLirP2mrn58jfJIGSkR08+FV0Dhj/F6ioHQo3WOEU2HUY1M2Cp6uhRfyLnT9CtizhE4tisZ/RUPOa7w0kIeJyjrvxbbempp6kgJHfn0dKgMK0F20bfjPQEdK1O4vILWfTaNPWXBu2kNrdZk8DHnIk2hfbrndYNEdMHANshARChSAYWurh9ma5NE2edIhE3XCFt4cLirjqm/ReQY8Fe4ANOZKJ4fIzSjtRJkPg9HZgUcGQzIJfGUwHNJj0bQNYNjYoa2t0Tb5JG7nB8cWTjE/7mZrqQdZkylqhUnFKRZKznB6jdaCd0EgOjGwhMQJgZ0UEIJb065KlB0NOsS5BojWec6FhSOyc0l9whK5BZdhk3wuaqhXyf0/Vpb9gtG8LMjioH9s+zfsTPpRDJgKZgnQ4O7DqoOMp0kVxrwEnJQ3NMYhygUV68seCgFLHhZYkrNsYL7K5H74ewdYZ50CEFPOy03Vzbh7xMjuVjuI2iHL8aep3zpREJKR/OTGrn9N9xCHGiClmAmVWRYTLiSJVIIicILLBfC/G0iLIzrhikKTv+w0/ixf91d+v0OpxeiDX6eaqLyrjHqpQpYzadrO8qIel9qEszYoSFvb4yF6KmEX37IKnUYltjFG3bv6Z18x5/mF7lucdYEr6OLnE64EGk8H7qgXA4zN6M05T/wGyKafQ1a4QamYOleSPide5E1ol1iKa7VuWLIRkkhh2V669juXpVB8pMkmSzg9Twb82MrOIC+Y0zfJ1t6NcBIlSYSpejvsXeC86dF9wS9icTjhnvNIZaNfRX6xNWJ6AYy06sEq2vp2cyI8mgE1ALCVg9Pn7JmAERqJQc2zROzJButRq/8dBvdBvIv03X4nQ5nJIadzZ4zUNrMJ6l0njUn1gS6KQYkWiT25v2rw5+vDaBw1QA7i9jMwTf9Jy21FIYZ2viol1QgyO2u54Igz/ZXf/sNf0jz/EknYJLeE8aet7VmbZQsewnN+OPHkZdD5WY9U3EweTrG7yrdSmBUiLDOaubPqP2gEkmltyg0ER8GWCcbXp6u8UToh8DNx126uPeI3wdpbunRR/MWFS1SWclCkBrIHlmu01TWOpiJ6jfQ== 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)(36860700013)(1800799024)(376014)(7416014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:25:05.1214 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 523d5a07-531f-4b5b-c840-08dcb1f2aec0 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: MN1PEPF0000F0E4.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7323 To make it generic, rename structure 'sof_sdw_codec_info' as 'asoc_sdw_codec_info' and 'sof_sdw_dai_info' as 'asoc_sdw_dai_info'. These structures will be moved to common header file so that it can be used by other platform machine driver. Link: https://github.com/thesofproject/linux/pull/5068 Signed-off-by: Vijendar Mukunda Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- sound/soc/intel/boards/bridge_cs35l56.c | 2 +- sound/soc/intel/boards/sof_sdw.c | 26 +++++++++---------- sound/soc/intel/boards/sof_sdw_common.h | 24 ++++++++--------- sound/soc/intel/boards/sof_sdw_cs42l43.c | 2 +- sound/soc/intel/boards/sof_sdw_cs_amp.c | 2 +- sound/soc/intel/boards/sof_sdw_maxim.c | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 2 +- sound/soc/intel/boards/sof_sdw_rt_amp.c | 2 +- .../boards/sof_sdw_rt_sdca_jack_common.c | 2 +- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/sound/soc/intel/boards/bridge_cs35l56.c b/sound/soc/intel/boards/bridge_cs35l56.c index c3995e724aed..b289bcb3847a 100644 --- a/sound/soc/intel/boards/bridge_cs35l56.c +++ b/sound/soc/intel/boards/bridge_cs35l56.c @@ -127,7 +127,7 @@ int bridge_cs35l56_add_sidecar(struct snd_soc_card *card, int bridge_cs35l56_spk_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback) { if (sof_sdw_quirk & SOF_SIDECAR_AMPS) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index e5feaef669d1..26c467bb81a3 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -731,7 +731,7 @@ static const struct snd_soc_ops sdw_ops = { .shutdown = sdw_shutdown, }; -static struct sof_sdw_codec_info codec_info_list[] = { +static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x700, .dais = { @@ -1220,7 +1220,7 @@ static struct sof_sdw_codec_info codec_info_list[] = { }, }; -static struct sof_sdw_codec_info *find_codec_info_part(const u64 adr) +static struct asoc_sdw_codec_info *find_codec_info_part(const u64 adr) { unsigned int part_id, sdw_version; int i; @@ -1241,7 +1241,7 @@ static struct sof_sdw_codec_info *find_codec_info_part(const u64 adr) } -static struct sof_sdw_codec_info *find_codec_info_acpi(const u8 *acpi_id) +static struct asoc_sdw_codec_info *find_codec_info_acpi(const u8 *acpi_id) { int i; @@ -1255,8 +1255,8 @@ static struct sof_sdw_codec_info *find_codec_info_acpi(const u8 *acpi_id) return NULL; } -static struct sof_sdw_codec_info *find_codec_info_dai(const char *dai_name, - int *dai_index) +static struct asoc_sdw_codec_info *find_codec_info_dai(const char *dai_name, + int *dai_index) { int i, j; @@ -1355,7 +1355,7 @@ static bool is_unique_device(const struct snd_soc_acpi_link_adr *adr_link, } static const char *get_codec_name(struct device *dev, - const struct sof_sdw_codec_info *codec_info, + const struct asoc_sdw_codec_info *codec_info, const struct snd_soc_acpi_link_adr *adr_link, int adr_index) { @@ -1383,7 +1383,7 @@ static const char *get_codec_name(struct device *dev, static int sof_sdw_rtd_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; - struct sof_sdw_codec_info *codec_info; + struct asoc_sdw_codec_info *codec_info; struct snd_soc_dai *dai; int dai_index; int ret; @@ -1451,8 +1451,8 @@ struct sof_sdw_endpoint { const char *name_prefix; bool include_sidecar; - struct sof_sdw_codec_info *codec_info; - const struct sof_sdw_dai_info *dai_info; + struct asoc_sdw_codec_info *codec_info; + const struct asoc_sdw_dai_info *dai_info; }; struct sof_sdw_dailink { @@ -1529,7 +1529,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card, for (i = 0; i < adr_link->num_adr; i++) { const struct snd_soc_acpi_adr_device *adr_dev = &adr_link->adr_d[i]; - struct sof_sdw_codec_info *codec_info; + struct asoc_sdw_codec_info *codec_info; const char *codec_name; if (!adr_dev->name_prefix) { @@ -1563,7 +1563,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card, for (j = 0; j < adr_dev->num_endpoints; j++) { const struct snd_soc_acpi_endpoint *adr_end; - const struct sof_sdw_dai_info *dai_info; + const struct asoc_sdw_dai_info *dai_info; struct sof_sdw_dailink *sof_dai; int stream; @@ -1790,7 +1790,7 @@ static int create_sdw_dailinks(struct snd_soc_card *card, static int create_ssp_dailinks(struct snd_soc_card *card, struct snd_soc_dai_link **dai_links, int *be_id, - struct sof_sdw_codec_info *ssp_info, + struct asoc_sdw_codec_info *ssp_info, unsigned long ssp_mask) { struct device *dev = card->dev; @@ -1914,7 +1914,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) struct mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params; struct snd_soc_codec_conf *codec_conf; - struct sof_sdw_codec_info *ssp_info; + struct asoc_sdw_codec_info *ssp_info; struct sof_sdw_endpoint *sof_ends; struct sof_sdw_dailink *sof_dais; int num_devs = 0; diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 2a3145d1feb6..ebacb55de318 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -79,9 +79,9 @@ enum { #define SOF_SDW_MAX_DAI_NUM 8 -struct sof_sdw_codec_info; +struct asoc_sdw_codec_info; -struct sof_sdw_dai_info { +struct asoc_sdw_dai_info { const bool direction[2]; /* playback & capture support */ const char *dai_name; const int dai_type; @@ -92,7 +92,7 @@ struct sof_sdw_dai_info { const int num_widgets; int (*init)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback); int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); int (*rtd_init)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); @@ -100,7 +100,7 @@ struct sof_sdw_dai_info { unsigned long quirk; }; -struct sof_sdw_codec_info { +struct asoc_sdw_codec_info { const int part_id; const int version_id; const char *codec_name; @@ -108,7 +108,7 @@ struct sof_sdw_codec_info { const u8 acpi_id[ACPI_ID_LEN]; const bool ignore_pch_dmic; const struct snd_soc_ops *ops; - struct sof_sdw_dai_info dais[SOF_SDW_MAX_DAI_NUM]; + struct asoc_sdw_dai_info dais[SOF_SDW_MAX_DAI_NUM]; const int dai_num; int (*codec_card_late_probe)(struct snd_soc_card *card); @@ -153,14 +153,14 @@ int sof_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); /* RT711 support */ int sof_sdw_rt711_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback); int sof_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); /* RT711-SDCA support */ int sof_sdw_rt_sdca_jack_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback); int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); @@ -170,20 +170,20 @@ extern const struct snd_soc_ops sof_sdw_rt1308_i2s_ops; /* generic amp support */ int sof_sdw_rt_amp_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback); int sof_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); /* MAXIM codec support */ int sof_sdw_maxim_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback); /* CS42L43 support */ int sof_sdw_cs42l43_spk_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback); /* CS AMP support */ @@ -194,12 +194,12 @@ int bridge_cs35l56_add_sidecar(struct snd_soc_card *card, struct snd_soc_codec_conf **codec_conf); int bridge_cs35l56_spk_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback); int sof_sdw_cs_amp_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback); /* dai_link init callbacks */ diff --git a/sound/soc/intel/boards/sof_sdw_cs42l43.c b/sound/soc/intel/boards/sof_sdw_cs42l43.c index b7e2750c1074..e8370c3c96fd 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l43.c +++ b/sound/soc/intel/boards/sof_sdw_cs42l43.c @@ -123,7 +123,7 @@ int cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *da int sof_sdw_cs42l43_spk_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback) { /* Do init on playback link only. */ diff --git a/sound/soc/intel/boards/sof_sdw_cs_amp.c b/sound/soc/intel/boards/sof_sdw_cs_amp.c index 10e08207619a..206fe7610a56 100644 --- a/sound/soc/intel/boards/sof_sdw_cs_amp.c +++ b/sound/soc/intel/boards/sof_sdw_cs_amp.c @@ -47,7 +47,7 @@ int cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) int sof_sdw_cs_amp_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback) { /* Do init on playback link only. */ diff --git a/sound/soc/intel/boards/sof_sdw_maxim.c b/sound/soc/intel/boards/sof_sdw_maxim.c index b7f73177867f..8faa06824869 100644 --- a/sound/soc/intel/boards/sof_sdw_maxim.c +++ b/sound/soc/intel/boards/sof_sdw_maxim.c @@ -120,7 +120,7 @@ static int mx8373_sdw_late_probe(struct snd_soc_card *card) int sof_sdw_maxim_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback) { info->amp_num++; diff --git a/sound/soc/intel/boards/sof_sdw_rt711.c b/sound/soc/intel/boards/sof_sdw_rt711.c index 60ff4d88e2dc..9ea8de609669 100644 --- a/sound/soc/intel/boards/sof_sdw_rt711.c +++ b/sound/soc/intel/boards/sof_sdw_rt711.c @@ -126,7 +126,7 @@ int sof_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_l int sof_sdw_rt711_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); diff --git a/sound/soc/intel/boards/sof_sdw_rt_amp.c b/sound/soc/intel/boards/sof_sdw_rt_amp.c index d1c0f91ce589..da1a8cc1c63d 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_amp.c +++ b/sound/soc/intel/boards/sof_sdw_rt_amp.c @@ -256,7 +256,7 @@ int sof_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_ int sof_sdw_rt_amp_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); diff --git a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c index 4254e30ee4c3..b63f4952e7d1 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +++ b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c @@ -180,7 +180,7 @@ int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link int sof_sdw_rt_sdca_jack_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, - struct sof_sdw_codec_info *info, + struct asoc_sdw_codec_info *info, bool playback) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); From patchwork Thu Aug 1 06:23:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749832 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2072.outbound.protection.outlook.com [40.107.223.72]) (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 A001426AE0; Thu, 1 Aug 2024 06:25:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.72 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493547; cv=fail; b=stLM0eee8XhnQzboSVFDfc922XD0HkyBsbt9lTiAV8P6cgoBfxID8SqBbEPT95zUoYj7HdSBB8g3KW3wlMc/vrWDZ0rNfb1QceRmtQp2z0U3DdTk1DLgPQKd9m5Usql7k+vFDB0ZofiYJgXIw5hfqQmhlEh7fGPu+uKciVfxAm0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493547; c=relaxed/simple; bh=SC8XXaYdHrqKX305sqiPjndkCoUs8X1omIPvwLm2EY8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oMn63/Qsr5fbrO/+znzEZhPt1nL1OnFWKOOYTSU+R4ROzwaiHeDm7V/ULFMGSM2/Y5XGQMMHB4zaFCJ4VHVCuK/NTswM5De0mr/vQ/sIRCBsXvULcHfmVqnckE8gmvv9gRw/WI2MTrvTbvaRX+XOMXpV2B0AGxwSXrf5HzvW7sg= 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=EBzLX/jF; arc=fail smtp.client-ip=40.107.223.72 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="EBzLX/jF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nyaX9eB+XzugnzBKfeLQ2FUw0AguNMTYijtxIHBpI/bEBAh3HM6zk8DLfZTVTgjKJcFWnwqJHShxGzQ9wsDficqSW0EG21arY++e237lxONXCdqzrG7mW9lv3HjF2tMyhxkUutaDpfx9WODdxyssO4nMU/WuKH/FqfVVKF0I72oZI/RFdzcDuF9L6hsdFt/DJkia5S/dks5UcUnAuvSYMoZuv4RVHhkP9rb2Ad3oPlXCQ42nWeh4HVDkpbNbm7FBRvlMdbOeVmm8Hn8U+vD4oLpHXbpKt86GNvp3DXhduF6K+Qwtauo+0WwcdGjlsHz5Le60NZxuoGLko91N+huPwg== 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=pb/kCjdaY9LTHpq/7zeLBfpDJbotmGDtNOiv6yPhE9E=; b=gsm6Xncg6ZO+mOb3pogKCsxxLzOeZQ5xxBkFjIw8unHT3CujzuDag8E3X15iRZnj3E8MEZQdRJ90UF6FGohxmsRKAsPEVQO/ro7man/aNigImqzu092Dv9NIImw2A9wcN+oijCKyRw41HzTGFqGAslg3xsm+paM1qMjlzPt6O4Puk/XUnqjn1vUcNAFlUoM8IWBez/NwjzTf1diktXs/pIDrRsAjEzM6a0QsFgKH+MEgGpnuP2TfsQ7IxqC4dx/DE5MUp4dm+eFBMI1tRHJXeApD+pYq5E9WXWjpUsTsNO5vZ+1pOpvmvjtYgPeRMYo1n/1wU9H+SZwbCa/9SYTAqA== 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=pb/kCjdaY9LTHpq/7zeLBfpDJbotmGDtNOiv6yPhE9E=; b=EBzLX/jFrWRLBjG1Rkq8oz3esDk6o6qCEsBaL2K2l/XGU0FNdPpq/aqoCj/BT8qWPMA+Xk4pLgmkxo5+7dQUT8gPhyixrerEwVFfDTXYSslGV21SlVz6ESwDXZ9dxpD1jTkEMZkIO6QYsR0Ca8fEQz1PjwSi/5iyDPIQJJ65AY8= Received: from BN9P223CA0011.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::16) by PH7PR12MB7915.namprd12.prod.outlook.com (2603:10b6:510:27c::10) 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 06:25:41 +0000 Received: from MN1PEPF0000F0E0.namprd04.prod.outlook.com (2603:10b6:408:10b:cafe::62) by BN9P223CA0011.outlook.office365.com (2603:10b6:408:10b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.35 via Frontend Transport; Thu, 1 Aug 2024 06:25:40 +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 MN1PEPF0000F0E0.mail.protection.outlook.com (10.167.242.38) 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 06:25:40 +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 01:25:34 -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 01:25:28 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Cezary Rojewski , Liam Girdwood , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Jaroslav Kysela , "Takashi Iwai" , Maciej Strozek , Charles Keepax , Chao Song , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 02/31] ASoC: intel: rename soundwire common header macros Date: Thu, 1 Aug 2024 11:53:47 +0530 Message-ID: <20240801062416.2203673-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: MN1PEPF0000F0E0:EE_|PH7PR12MB7915:EE_ X-MS-Office365-Filtering-Correlation-Id: 56806156-07e6-46c4-28b3-08dcb1f2c3d4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: AtZH2go94zVVcRv8mRQNxCC/HLqN3gwfSQnVyQU4KOPMVIFVX3jFMiNoG2G2Nzw/U32HtIP18gkEiBWtzRUPY9s1hleA6SkMJv4tJIZBkOhvDfstDIcR5w2rhjIMkfyVEFwx8jsTF1NzO1whM0vv9VZ0kZQWeZZ8Om+RvcbIwMAZrO+McFWxTjadQNau0+OSULHBSx6AtjhAfW6PNVA6fX+IZiAskNlUT8iYisqow0XI8pDb42CCeZgK1c6BBBPn66m3+iKhydfeU9rByOWOzY1wNZH4Ovf69i4FRlEQN1ZxQgPQt0wQwsQOGCn++HVy1O7nQwMplNFfo+KwlGjgi8BhoCvEl2ksPbSU+hVeEButAkmeDF3RGObCoqfQ6Qcc4SuZxtcM02QG49DdYt4NexeDXkGWX4Y9+dn3fpxGUOmNvHDO0xLdGdtx1owYN3G6szmpBe+U+I48/48M/1bcNOkY7lNU/y5OebH/Bb0REirRaH3h3sadJRui/VBX/em12hlq/XsqM9V2p5U7ww8Fksanyw31+Hbo3YYKExz4mnG/M4P4JgFzWex+tp2Eow20DW+liEJKwKKdFKLpNPShgEGf/AJTi7t1UrrqE5dEydlcwN00MhPu9y95IGERqIX2dncCDrzKM3teQGra0bRyTBlFKF15M9sCyO/CrU7OYrteQ9k9QEQWW0FGjauYnABA6bmdWzyirbz/bdfbULWuGh5emk0GqM8wMUidBttl+VmG6wnwjJjSoxiVycuKQppcmDwg43Jpj8DFIADFhfmgFHGCdVDzbvq1WyH5Bl8QvatOq8vqjD7xlWgOHzEgTACzBdaNk//n/g76tUyqyI0vEXp18y7BoypbMKednUYUevcaGN+5af8h+CK8NNyyFlgVokdjGVyQB+KYRYgniUrdD7bITsqtJkDJw5KiqoACBN8CK/ZiqD8BDYFu/cLejBvAhD6FfX2CzvXegFH69v08XOGZTN8D8GCRG7X5DJJVbazw86uNh0nqj/Rfr7fBOTwIasL0tCA5gkOoyBv/O/TDmUpR7CkIj5W/KEMkDIaAO2jBr48tEdJByr7Dx9Yw46XKbHD4pnu1uTrxwtftFnwulgH2SohnwSgyr1eboqsr25HWgHqEGEthzNwVuTyGReYqfpED6OKiuq0BCCmtpadU6HrAWev/1cvA9Mjbu7xAVhrIYDl4tDMUJKpT+adguCCnVuxU16R0YOHScktSMmTx+oOavYnEwjSHXwyXWiO11cWHVZP8TLb7JVdo+VT2S3ddYie613zNWurForG4cpGTlJFwp2d484iclusvmXWTb7+KXNSy7PEly1BQ50AiyzpPpHUMpB7ENKGMOSrdaoKqAI5YDf4CxNKv+PAgQH2rxWP5DhMKTKVXUWRSitdEKAOu41U3feneDXmxWmIP//JvxA== 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)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:25:40.4805 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 56806156-07e6-46c4-28b3-08dcb1f2c3d4 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: MN1PEPF0000F0E0.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7915 Rename sof quirk macros, dai type and dai link macros with "SOC_SDW" tag. Link: https://github.com/thesofproject/linux/pull/5068 Signed-off-by: Vijendar Mukunda Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- sound/soc/intel/boards/bridge_cs35l56.c | 6 +- sound/soc/intel/boards/sof_sdw.c | 184 +++++++++--------- sound/soc/intel/boards/sof_sdw_common.h | 46 ++--- sound/soc/intel/boards/sof_sdw_cs42l43.c | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 6 +- .../boards/sof_sdw_rt_sdca_jack_common.c | 8 +- 6 files changed, 126 insertions(+), 126 deletions(-) diff --git a/sound/soc/intel/boards/bridge_cs35l56.c b/sound/soc/intel/boards/bridge_cs35l56.c index b289bcb3847a..6b2526c781e5 100644 --- a/sound/soc/intel/boards/bridge_cs35l56.c +++ b/sound/soc/intel/boards/bridge_cs35l56.c @@ -98,7 +98,7 @@ static const struct snd_soc_dai_link bridge_dai_template = { int bridge_cs35l56_count_sidecar(struct snd_soc_card *card, int *num_dais, int *num_devs) { - if (sof_sdw_quirk & SOF_SIDECAR_AMPS) { + if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) { (*num_dais)++; (*num_devs) += ARRAY_SIZE(bridge_cs35l56_name_prefixes); } @@ -110,7 +110,7 @@ int bridge_cs35l56_add_sidecar(struct snd_soc_card *card, struct snd_soc_dai_link **dai_links, struct snd_soc_codec_conf **codec_conf) { - if (sof_sdw_quirk & SOF_SIDECAR_AMPS) { + if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) { **dai_links = bridge_dai_template; for (int i = 0; i < ARRAY_SIZE(bridge_cs35l56_name_prefixes); i++) { @@ -130,7 +130,7 @@ int bridge_cs35l56_spk_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback) { - if (sof_sdw_quirk & SOF_SIDECAR_AMPS) + if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) info->amp_num += ARRAY_SIZE(bridge_cs35l56_name_prefixes); return 0; diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 26c467bb81a3..64fb53772c04 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -23,24 +23,24 @@ MODULE_PARM_DESC(quirk, "Board-specific quirk override"); static void log_quirks(struct device *dev) { - if (SOF_JACK_JDSRC(sof_sdw_quirk)) + if (SOC_SDW_JACK_JDSRC(sof_sdw_quirk)) dev_dbg(dev, "quirk realtek,jack-detect-source %ld\n", - SOF_JACK_JDSRC(sof_sdw_quirk)); - if (sof_sdw_quirk & SOF_SDW_FOUR_SPK) - dev_err(dev, "quirk SOF_SDW_FOUR_SPK enabled but no longer supported\n"); + SOC_SDW_JACK_JDSRC(sof_sdw_quirk)); + if (sof_sdw_quirk & SOC_SDW_FOUR_SPK) + dev_err(dev, "quirk SOC_SDW_FOUR_SPK enabled but no longer supported\n"); if (sof_sdw_quirk & SOF_SDW_TGL_HDMI) dev_dbg(dev, "quirk SOF_SDW_TGL_HDMI enabled\n"); - if (sof_sdw_quirk & SOF_SDW_PCH_DMIC) - dev_dbg(dev, "quirk SOF_SDW_PCH_DMIC enabled\n"); + if (sof_sdw_quirk & SOC_SDW_PCH_DMIC) + dev_dbg(dev, "quirk SOC_SDW_PCH_DMIC enabled\n"); if (SOF_SSP_GET_PORT(sof_sdw_quirk)) dev_dbg(dev, "SSP port %ld\n", SOF_SSP_GET_PORT(sof_sdw_quirk)); - if (sof_sdw_quirk & SOF_SDW_NO_AGGREGATION) - dev_err(dev, "quirk SOF_SDW_NO_AGGREGATION enabled but no longer supported\n"); - if (sof_sdw_quirk & SOF_CODEC_SPKR) - dev_dbg(dev, "quirk SOF_CODEC_SPKR enabled\n"); - if (sof_sdw_quirk & SOF_SIDECAR_AMPS) - dev_dbg(dev, "quirk SOF_SIDECAR_AMPS enabled\n"); + if (sof_sdw_quirk & SOC_SDW_NO_AGGREGATION) + dev_err(dev, "quirk SOC_SDW_NO_AGGREGATION enabled but no longer supported\n"); + if (sof_sdw_quirk & SOC_SDW_CODEC_SPKR) + dev_dbg(dev, "quirk SOC_SDW_CODEC_SPKR enabled\n"); + if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) + dev_dbg(dev, "quirk SOC_SDW_SIDECAR_AMPS enabled\n"); } static int sof_sdw_quirk_cb(const struct dmi_system_id *id) @@ -57,7 +57,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), DMI_MATCH(DMI_PRODUCT_NAME, "CometLake Client"), }, - .driver_data = (void *)SOF_SDW_PCH_DMIC, + .driver_data = (void *)SOC_SDW_PCH_DMIC, }, { .callback = sof_sdw_quirk_cb, @@ -99,7 +99,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), DMI_MATCH(DMI_PRODUCT_NAME, "Ice Lake Client"), }, - .driver_data = (void *)SOF_SDW_PCH_DMIC, + .driver_data = (void *)SOC_SDW_PCH_DMIC, }, /* TigerLake devices */ { @@ -111,7 +111,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | RT711_JD1 | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | SOF_SSP_PORT(SOF_I2S_SSP2)), }, { @@ -159,7 +159,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Volteer"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | SOF_BT_OFFLOAD_SSP(2) | SOF_SSP_BT_OFFLOAD_PRESENT), }, @@ -170,7 +170,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Ripto"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC), + SOC_SDW_PCH_DMIC), }, { /* @@ -185,7 +185,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "HP Spectre x360 Conv"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | RT711_JD1), }, { @@ -199,7 +199,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_BOARD_NAME, "8709"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | RT711_JD1), }, { @@ -210,7 +210,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "LAPBC"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | RT711_JD1), }, { @@ -221,7 +221,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_BOARD_NAME, "LAPBC710"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | RT711_JD1), }, { @@ -232,7 +232,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "LAPRC"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | RT711_JD2_100K), }, { @@ -243,7 +243,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_BOARD_NAME, "LAPRC710"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | RT711_JD2_100K), }, /* TigerLake-SDCA devices */ @@ -293,7 +293,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Brya"), }, .driver_data = (void *)(SOF_SDW_TGL_HDMI | - SOF_SDW_PCH_DMIC | + SOC_SDW_PCH_DMIC | SOF_BT_OFFLOAD_SSP(2) | SOF_SSP_BT_OFFLOAD_PRESENT), }, @@ -501,7 +501,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Google"), DMI_MATCH(DMI_PRODUCT_NAME, "Rex"), }, - .driver_data = (void *)(SOF_SDW_PCH_DMIC | + .driver_data = (void *)(SOC_SDW_PCH_DMIC | SOF_BT_OFFLOAD_SSP(1) | SOF_SSP_BT_OFFLOAD_PRESENT), }, @@ -529,7 +529,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CE3") }, - .driver_data = (void *)(SOF_SIDECAR_AMPS), + .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS), }, { .callback = sof_sdw_quirk_cb, @@ -537,7 +537,7 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = { DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CE4") }, - .driver_data = (void *)(SOF_SIDECAR_AMPS), + .driver_data = (void *)(SOC_SDW_SIDECAR_AMPS), }, {} }; @@ -738,8 +738,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt700-aif1", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, .rtd_init = rt700_rtd_init, .controls = rt700_controls, .num_controls = ARRAY_SIZE(rt700_controls), @@ -756,8 +756,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt711-sdca-aif1", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, .init = sof_sdw_rt_sdca_jack_init, .exit = sof_sdw_rt_sdca_jack_exit, .rtd_init = rt_sdca_jack_rtd_init, @@ -776,8 +776,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt711-aif1", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, .init = sof_sdw_rt711_init, .exit = sof_sdw_rt711_exit, .rtd_init = rt711_rtd_init, @@ -796,8 +796,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt712-sdca-aif1", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, .init = sof_sdw_rt_sdca_jack_init, .exit = sof_sdw_rt_sdca_jack_exit, .rtd_init = rt_sdca_jack_rtd_init, @@ -809,8 +809,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, false}, .dai_name = "rt712-sdca-aif2", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, .init = sof_sdw_rt_amp_init, .exit = sof_sdw_rt_amp_exit, .rtd_init = rt712_spk_rtd_init, @@ -829,8 +829,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "rt712-sdca-dmic-aif1", - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, .rtd_init = rt_dmic_rtd_init, }, }, @@ -843,8 +843,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt712-sdca-aif1", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, .init = sof_sdw_rt_sdca_jack_init, .exit = sof_sdw_rt_sdca_jack_exit, .rtd_init = rt_sdca_jack_rtd_init, @@ -863,8 +863,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "rt712-sdca-dmic-aif1", - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, .rtd_init = rt_dmic_rtd_init, }, }, @@ -877,8 +877,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, false}, .dai_name = "rt1308-aif", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, .init = sof_sdw_rt_amp_init, .exit = sof_sdw_rt_amp_exit, .rtd_init = rt_amp_spk_rtd_init, @@ -897,8 +897,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt1316-aif", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_AMP_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, .init = sof_sdw_rt_amp_init, .exit = sof_sdw_rt_amp_exit, .rtd_init = rt_amp_spk_rtd_init, @@ -916,8 +916,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt1318-aif", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_AMP_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, .init = sof_sdw_rt_amp_init, .exit = sof_sdw_rt_amp_exit, .rtd_init = rt_amp_spk_rtd_init, @@ -937,8 +937,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "rt715-sdca-aif2", - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, .rtd_init = rt_dmic_rtd_init, }, }, @@ -952,8 +952,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "rt715-sdca-aif2", - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, .rtd_init = rt_dmic_rtd_init, }, }, @@ -967,8 +967,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "rt715-aif2", - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, .rtd_init = rt_dmic_rtd_init, }, }, @@ -982,8 +982,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "rt715-aif2", - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, .rtd_init = rt_dmic_rtd_init, }, }, @@ -996,8 +996,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt722-sdca-aif1", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, .init = sof_sdw_rt_sdca_jack_init, .exit = sof_sdw_rt_sdca_jack_exit, .rtd_init = rt_sdca_jack_rtd_init, @@ -1009,9 +1009,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, false}, .dai_name = "rt722-sdca-aif2", - .dai_type = SOF_SDW_DAI_TYPE_AMP, + .dai_type = SOC_SDW_DAI_TYPE_AMP, /* No feedback capability is provided by rt722-sdca codec driver*/ - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, .init = sof_sdw_rt_amp_init, .exit = sof_sdw_rt_amp_exit, .rtd_init = rt722_spk_rtd_init, @@ -1023,8 +1023,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "rt722-sdca-aif3", - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, .rtd_init = rt_dmic_rtd_init, }, }, @@ -1036,8 +1036,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "max98373-aif1", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_AMP_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, .init = sof_sdw_maxim_init, .rtd_init = maxim_spk_rtd_init, .controls = maxim_controls, @@ -1054,8 +1054,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, false}, .dai_name = "max98363-aif1", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, .init = sof_sdw_maxim_init, .rtd_init = maxim_spk_rtd_init, .controls = maxim_controls, @@ -1072,8 +1072,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "rt5682-sdw", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, .rtd_init = rt5682_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), @@ -1089,8 +1089,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "cs35l56-sdw1", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_AMP_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, .init = sof_sdw_cs_amp_init, .rtd_init = cs_spk_rtd_init, .controls = generic_spk_controls, @@ -1107,8 +1107,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "cs42l42-sdw", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, .rtd_init = cs42l42_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), @@ -1127,8 +1127,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, false}, .dai_name = "cs42l43-dp5", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, .rtd_init = cs42l43_hs_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), @@ -1138,8 +1138,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "cs42l43-dp1", - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, .rtd_init = cs42l43_dmic_rtd_init, .widgets = generic_dmic_widgets, .num_widgets = ARRAY_SIZE(generic_dmic_widgets), @@ -1147,21 +1147,21 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {false, true}, .dai_name = "cs42l43-dp2", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_UNUSED_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, }, { .direction = {true, false}, .dai_name = "cs42l43-dp6", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_UNUSED_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, .init = sof_sdw_cs42l43_spk_init, .rtd_init = cs42l43_spk_rtd_init, .controls = generic_spk_controls, .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, .num_widgets = ARRAY_SIZE(generic_spk_widgets), - .quirk = SOF_CODEC_SPKR | SOF_SIDECAR_AMPS, + .quirk = SOC_SDW_CODEC_SPKR | SOC_SDW_SIDECAR_AMPS, }, }, .dai_num = 4, @@ -1173,8 +1173,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "sdw-mockup-aif1", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, }, }, .dai_num = 1, @@ -1186,8 +1186,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "sdw-mockup-aif1", - .dai_type = SOF_SDW_DAI_TYPE_JACK, - .dailink = {SDW_JACK_OUT_DAI_ID, SDW_JACK_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_JACK, + .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, }, }, .dai_num = 1, @@ -1199,8 +1199,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .direction = {true, true}, .dai_name = "sdw-mockup-aif1", - .dai_type = SOF_SDW_DAI_TYPE_AMP, - .dailink = {SDW_AMP_OUT_DAI_ID, SDW_AMP_IN_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_AMP, + .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, }, }, .dai_num = 1, @@ -1212,8 +1212,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .dai_name = "sdw-mockup-aif1", .direction = {false, true}, - .dai_type = SOF_SDW_DAI_TYPE_MIC, - .dailink = {SDW_UNUSED_DAI_ID, SDW_DMIC_DAI_ID}, + .dai_type = SOC_SDW_DAI_TYPE_MIC, + .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, }, }, .dai_num = 1, @@ -1767,7 +1767,7 @@ static int create_sdw_dailinks(struct snd_soc_card *card, int ret, i; for (i = 0; i < SDW_MAX_LINKS; i++) - ctx->sdw_pin_index[i] = SDW_INTEL_BIDIR_PDI_BASE; + ctx->sdw_pin_index[i] = SOC_SDW_INTEL_BIDIR_PDI_BASE; /* generate DAI links by each sdw link */ while (sof_dais->initialised) { @@ -1971,7 +1971,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) hdmi_num = SOF_PRE_TGL_HDMI_COUNT; /* enable dmic01 & dmic16k */ - if (sof_sdw_quirk & SOF_SDW_PCH_DMIC || mach_params->dmic_num) + if (sof_sdw_quirk & SOC_SDW_PCH_DMIC || mach_params->dmic_num) dmic_num = 2; if (sof_sdw_quirk & SOF_SSP_BT_OFFLOAD_PRESENT) diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index ebacb55de318..6ddfb1f9639a 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -14,16 +14,16 @@ #include #include "sof_hdmi_common.h" -#define MAX_NO_PROPS 2 +#define SOC_SDW_MAX_NO_PROPS 2 #define MAX_HDMI_NUM 4 -#define SDW_UNUSED_DAI_ID -1 -#define SDW_JACK_OUT_DAI_ID 0 -#define SDW_JACK_IN_DAI_ID 1 -#define SDW_AMP_OUT_DAI_ID 2 -#define SDW_AMP_IN_DAI_ID 3 -#define SDW_DMIC_DAI_ID 4 -#define SDW_MAX_CPU_DAIS 16 -#define SDW_INTEL_BIDIR_PDI_BASE 2 +#define SOC_SDW_UNUSED_DAI_ID -1 +#define SOC_SDW_JACK_OUT_DAI_ID 0 +#define SOC_SDW_JACK_IN_DAI_ID 1 +#define SOC_SDW_AMP_OUT_DAI_ID 2 +#define SOC_SDW_AMP_IN_DAI_ID 3 +#define SOC_SDW_DMIC_DAI_ID 4 +#define SOC_SDW_MAX_CPU_DAIS 16 +#define SOC_SDW_INTEL_BIDIR_PDI_BASE 2 #define SDW_MAX_LINKS 4 @@ -44,27 +44,27 @@ enum { SOF_I2S_SSP5 = BIT(5), }; -#define SOF_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) +#define SOC_SDW_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) /* Deprecated and no longer supported by the code */ -#define SOF_SDW_FOUR_SPK BIT(4) +#define SOC_SDW_FOUR_SPK BIT(4) #define SOF_SDW_TGL_HDMI BIT(5) -#define SOF_SDW_PCH_DMIC BIT(6) +#define SOC_SDW_PCH_DMIC BIT(6) #define SOF_SSP_PORT(x) (((x) & GENMASK(5, 0)) << 7) #define SOF_SSP_GET_PORT(quirk) (((quirk) >> 7) & GENMASK(5, 0)) /* Deprecated and no longer supported by the code */ -#define SOF_SDW_NO_AGGREGATION BIT(14) +#define SOC_SDW_NO_AGGREGATION BIT(14) /* If a CODEC has an optional speaker output, this quirk will enable it */ -#define SOF_CODEC_SPKR BIT(15) +#define SOC_SDW_CODEC_SPKR BIT(15) /* * If the CODEC has additional devices attached directly to it. * * For the cs42l43: * - 0 - No speaker output - * - SOF_CODEC_SPKR - CODEC internal speaker - * - SOF_SIDECAR_AMPS - 2x Sidecar amplifiers + CODEC internal speaker - * - SOF_CODEC_SPKR | SOF_SIDECAR_AMPS - Not currently supported + * - SOC_SDW_CODEC_SPKR - CODEC internal speaker + * - SOC_SDW_SIDECAR_AMPS - 2x Sidecar amplifiers + CODEC internal speaker + * - SOC_SDW_CODEC_SPKR | SOC_SDW_SIDECAR_AMPS - Not currently supported */ -#define SOF_SIDECAR_AMPS BIT(16) +#define SOC_SDW_SIDECAR_AMPS BIT(16) /* BT audio offload: reserve 3 bits for future */ #define SOF_BT_OFFLOAD_SSP_SHIFT 15 @@ -73,11 +73,11 @@ enum { (((quirk) << SOF_BT_OFFLOAD_SSP_SHIFT) & SOF_BT_OFFLOAD_SSP_MASK) #define SOF_SSP_BT_OFFLOAD_PRESENT BIT(18) -#define SOF_SDW_DAI_TYPE_JACK 0 -#define SOF_SDW_DAI_TYPE_AMP 1 -#define SOF_SDW_DAI_TYPE_MIC 2 +#define SOC_SDW_DAI_TYPE_JACK 0 +#define SOC_SDW_DAI_TYPE_AMP 1 +#define SOC_SDW_DAI_TYPE_MIC 2 -#define SOF_SDW_MAX_DAI_NUM 8 +#define SOC_SDW_MAX_DAI_NUM 8 struct asoc_sdw_codec_info; @@ -108,7 +108,7 @@ struct asoc_sdw_codec_info { const u8 acpi_id[ACPI_ID_LEN]; const bool ignore_pch_dmic; const struct snd_soc_ops *ops; - struct asoc_sdw_dai_info dais[SOF_SDW_MAX_DAI_NUM]; + struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM]; const int dai_num; int (*codec_card_late_probe)(struct snd_soc_card *card); diff --git a/sound/soc/intel/boards/sof_sdw_cs42l43.c b/sound/soc/intel/boards/sof_sdw_cs42l43.c index e8370c3c96fd..1688f29a977a 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l43.c +++ b/sound/soc/intel/boards/sof_sdw_cs42l43.c @@ -104,7 +104,7 @@ int cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *da struct snd_soc_card *card = rtd->card; int ret; - if (!(sof_sdw_quirk & SOF_SIDECAR_AMPS)) { + if (!(sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS)) { /* Will be set by the bridge code in this case */ card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s spk:cs42l43-spk", diff --git a/sound/soc/intel/boards/sof_sdw_rt711.c b/sound/soc/intel/boards/sof_sdw_rt711.c index 9ea8de609669..fff76291fca2 100644 --- a/sound/soc/intel/boards/sof_sdw_rt711.c +++ b/sound/soc/intel/boards/sof_sdw_rt711.c @@ -23,13 +23,13 @@ */ static int rt711_add_codec_device_props(struct device *sdw_dev) { - struct property_entry props[MAX_NO_PROPS] = {}; + struct property_entry props[SOC_SDW_MAX_NO_PROPS] = {}; struct fwnode_handle *fwnode; int ret; - if (!SOF_JACK_JDSRC(sof_sdw_quirk)) + if (!SOC_SDW_JACK_JDSRC(sof_sdw_quirk)) return 0; - props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_JACK_JDSRC(sof_sdw_quirk)); + props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOC_SDW_JACK_JDSRC(sof_sdw_quirk)); fwnode = fwnode_create_software_node(props, NULL); if (IS_ERR(fwnode)) diff --git a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c index b63f4952e7d1..9c3b93f808a2 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +++ b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c @@ -23,14 +23,14 @@ */ static int rt_sdca_jack_add_codec_device_props(struct device *sdw_dev) { - struct property_entry props[MAX_NO_PROPS] = {}; + struct property_entry props[SOC_SDW_MAX_NO_PROPS] = {}; struct fwnode_handle *fwnode; int ret; - if (!SOF_JACK_JDSRC(sof_sdw_quirk)) + if (!SOC_SDW_JACK_JDSRC(sof_sdw_quirk)) return 0; - props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOF_JACK_JDSRC(sof_sdw_quirk)); + props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOC_SDW_JACK_JDSRC(sof_sdw_quirk)); fwnode = fwnode_create_software_node(props, NULL); if (IS_ERR(fwnode)) @@ -168,7 +168,7 @@ int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link if (!ctx->headset_codec_dev) return 0; - if (!SOF_JACK_JDSRC(sof_sdw_quirk)) + if (!SOC_SDW_JACK_JDSRC(sof_sdw_quirk)) return 0; device_remove_software_node(ctx->headset_codec_dev); From patchwork Thu Aug 1 06:23:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749847 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2082.outbound.protection.outlook.com [40.107.237.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 860CF142621; Thu, 1 Aug 2024 06:26:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493572; cv=fail; b=a9xUNpXbg10AR/7Wm33U9J90orSYovl6x/3N7VFEq8s5ULbdvmhmKJa9Vq9ICtKTaCi3maKrg2v8OO7O0+SLDdP1tIoEgHeHDX3DYwhT2xMIuVaCUbY8QpqE8IxpEoKVMix+cc+6+hstVmCP89dDTVsTg5gO3826mhNfRRx1n+E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493572; c=relaxed/simple; bh=RDO+vloBM2GX4x3HsozmjsErgtAplHVdtbM9kcsLnNk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lBpxCO0Sb62Olo53/sLeFAZ3xLRnfNmb9tDcISrwg7CQLlRjIodosAEOuzdoH/54NiG97pIrhrTSXefmDkZ6vRYlFik3s5YyG3MRw92W74yYtQl6EObybdJSyLGlzRT+f0lTRtB6M13x/W0gHMn7IxaJ0eO3wq9PkRGHkkpc7yw= 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=hjRTEXJp; arc=fail smtp.client-ip=40.107.237.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="hjRTEXJp" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mxtxVWza04IqvGfofHRvO5ktYlZ8Aem96q9Ki00S2kvQNFpgjtkPBRDjW5z/O5/aDvMdhbx1IlclIrLyIE+TU13tG93FSU/hlwP9+293TVcrkozoW7FONCW1PWSSspXdZHovnmSWSAPFGpn5p6UVMIgJcQM+nZBWdgqsgrGcGqBKHnMnt9VYUrSM/owB6qkZaB3p6VDcZ3puzf43lIXEbgNUeUVFAyPurpBS2BoP3+PMC7PwSQhBdXbYHnq+1LZveZkYre36C5cJ3GaA02Of/gN9U5KxtYet0nlAEjc/DYNeVRZcOdWG26QsdLVD4ttEC7KveZKZJI4dB7jI8w2GFA== 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=8PN6D6XRbeecwMVkpspR8HoNG+SKkdTm3cCEgvNTAC0=; b=ygl7Yb/sf8L88VdXfs/rieP7eW+lOz8ZYCJKkam/9PL/d50TA7jDCGGYn9LoLJaLzehiTG36XIZBhgWViA7/h/e/KP4L2so6h30WlJmNORKa0ejqpxEFa3nnnhqr/NTzCh0s2cZXmgLVjUmcxqenxTpAeXa4kAmZ8nO0IgEAiViS7v7vOS0xTvmdKhSKSK4E3tM3+oWE1itVMY6GFZ+Eyb6AGRM/o8inJ+JQJUYnQO6gICm/yoz8qyWKYMRpPGtf20VpgPC546BxsrAOSX6MzLhz1WqwYjx/v4z4RFEVQLpEmdwc5GOayDz4svC4W4rYaYfB6YHQqYx+Y5du+uHBNQ== 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=8PN6D6XRbeecwMVkpspR8HoNG+SKkdTm3cCEgvNTAC0=; b=hjRTEXJpI/b6dTFHEXTvdjdQYeM9Wa8Tz6PcF+qRqafH1wkqoZ6sddhgtvTBPKxfViAMPKVtx65iwxHPEAwTGuFrSegiwAQr7sNJ3RX4dwEBloH1pm6KTdaeDly/3xAMBSVGYHT6FjooaLCWE5BmLwL4jIj//FJqAp5+pC1SYp8= Received: from CH5P220CA0022.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:1ef::28) by MW4PR12MB6997.namprd12.prod.outlook.com (2603:10b6:303:20a::14) 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 06:25:54 +0000 Received: from DS3PEPF0000C37A.namprd04.prod.outlook.com (2603:10b6:610:1ef:cafe::97) by CH5P220CA0022.outlook.office365.com (2603:10b6:610:1ef::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Thu, 1 Aug 2024 06:25:53 +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 DS3PEPF0000C37A.mail.protection.outlook.com (10.167.23.4) 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 06:25:53 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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 01:25:52 -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 01:25:47 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Cezary Rojewski , Liam Girdwood , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Jaroslav Kysela , "Takashi Iwai" , Charles Keepax , "Maciej Strozek" , Chao Song , Brent Lu , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 03/31] ASoC: intel: rename soundwire machine driver soc ops Date: Thu, 1 Aug 2024 11:53:48 +0530 Message-ID: <20240801062416.2203673-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF0000C37A:EE_|MW4PR12MB6997:EE_ X-MS-Office365-Filtering-Correlation-Id: 37fc51f4-d49c-41e2-f882-08dcb1f2cbb3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: GPoB4yPKY4bqTsWXdvzskvI0EuSilralOZi/pCB6a+mfmWHKKF2QYYsAFP81xixG+YeEvwNbnE3BDLQvtFVklzdDwRMuLsVMQ4T8CArMRo5LxsnpAJQq/U1L4YiX6lzikpZAOvVe/UdsZAd5Z2K45n81Oukk7l09+vOoZ/IIHyWwzZZHUBW3aeuDqTASXNnYUgB4EZalMtWEjrqeMtSchHaCUu3YwyhUU5mQyisonizQLyEoTQ10UUrugc1nDR/8ChZSC13Zc1AP6rfGRV+1GUfTnZP2SqIs0h2YOzHmxcQnQugDqUEZn6WBZd3TD46VsvIVW3fVGJSOEdf2OwN/YiePL/krTbd9DUe2hbkm5k/QslSFCPTCQtaO7AJOTYEOmjIcK3didSxpH7Wf1WF7Du295Ky+xiMpVnl42YxTgSbErK6wsm98aE0CKoyQHyqAeVW8FH/6JCzfSaet9KH5SGxNGcAxzWxyY1jr2hFJj+k2UPW6/COFKQHPTUu1f2X9/vVpzkc3rUBGxiMdSrJ3lEUu7x8Y7BSyZNL20vuMDj1gvzDoGHMpv3B3aLSN0SbE5xlHxs8IABSsmyFB/t+gaN+7kUhqosCwfGXTBbpdzEiz+PVnV1gjDtOk4wyv1LyYvFiAG+R52WbEXbovVtq1nUSpZuutUY1D7xLM9XeTDK8ilmbx+lKY5fpDyyCj5zDK5pId5aDvJ0xgzG9hrywuovBv9sOptRlKNyHrmnjx1+OTEmHlX+/5vjk0WSsEBNgz59uzhWtSYyoU2uQxlsEwq9+mq3vJR89u8Y6U+FhYsJjqmv0/DXu9PlbaPrP3MifV/uEgV5Z69pts052/CEJBQI9LoRoG1tBoXO1BxmN71vz6hUtkKeiVt8YRHNEe3kwz9xhwdgz3n7IM2Wrjl5tiNdYJngIjrqJm6CiAslqAa0XxdtrnX5AdQqljQ7K0jn9OTxo4rbSUCHl9ly7DHO23K6E6cl1QuHsLWm/dHEOqMmEZmhonHbKBB1zcbSzLSx0NV838ybRON8CQE7NJA+3fRwg4aApFiQPUQCobN9dUQ+OJNP/28klfvAMVuIS9z8DguogrS24JDXnxRib2zjbQNrIBwvipwyrPMfHmvVDd2ipMPsA312QtbI5VNPr5i9hBLVdN9kfq5EJXnCqDdS9UGtg/BAkp15nbE2dplldjmdn3e3cCLsyE8DdnCaH/TkJL9GVq2xKYn0TT8mWYgFpvvLUiUIJyG5CBk9IO/LpiKz7bzj096o+NY/WByH/s58Wvvbcc0lNO/DRFCPPrXbKPz0vw8iaYGekHFv0d+d+X8sjbASgzCOqpckY97Hi3cCanokqcc2kZJlAgJAIy9S4Xd9TkthyJqfr+J3Qzt6dLEMZq48KAXcZbAbFXVawOCX7GQfVbTDBG07YzspsVOx0T6w== 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)(376014)(7416014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:25:53.6601 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37fc51f4-d49c-41e2-f882-08dcb1f2cbb3 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: DS3PEPF0000C37A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6997 Rename Soundwire generic machine driver soc ops with tag "asoc". Link: https://github.com/thesofproject/linux/pull/5068 Signed-off-by: Vijendar Mukunda Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 26 ++++++++++++------------- sound/soc/intel/boards/sof_sdw_common.h | 14 ++++++------- sound/soc/intel/boards/sof_sdw_maxim.c | 12 ++++++------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 64fb53772c04..9395daf220e9 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -594,12 +594,12 @@ static const struct snd_kcontrol_new rt700_controls[] = { }; /* these wrappers are only needed to avoid typecast compilation errors */ -int sdw_startup(struct snd_pcm_substream *substream) +int asoc_sdw_startup(struct snd_pcm_substream *substream) { return sdw_startup_stream(substream); } -int sdw_prepare(struct snd_pcm_substream *substream) +int asoc_sdw_prepare(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sdw_stream_runtime *sdw_stream; @@ -617,7 +617,7 @@ int sdw_prepare(struct snd_pcm_substream *substream) return sdw_prepare_stream(sdw_stream); } -int sdw_trigger(struct snd_pcm_substream *substream, int cmd) +int asoc_sdw_trigger(struct snd_pcm_substream *substream, int cmd) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sdw_stream_runtime *sdw_stream; @@ -656,8 +656,8 @@ int sdw_trigger(struct snd_pcm_substream *substream, int cmd) return ret; } -int sdw_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) +int asoc_sdw_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai_link_ch_map *ch_maps; @@ -699,7 +699,7 @@ int sdw_hw_params(struct snd_pcm_substream *substream, return 0; } -int sdw_hw_free(struct snd_pcm_substream *substream) +int asoc_sdw_hw_free(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct sdw_stream_runtime *sdw_stream; @@ -717,18 +717,18 @@ int sdw_hw_free(struct snd_pcm_substream *substream) return sdw_deprepare_stream(sdw_stream); } -void sdw_shutdown(struct snd_pcm_substream *substream) +void asoc_sdw_shutdown(struct snd_pcm_substream *substream) { sdw_shutdown_stream(substream); } static const struct snd_soc_ops sdw_ops = { - .startup = sdw_startup, - .prepare = sdw_prepare, - .trigger = sdw_trigger, - .hw_params = sdw_hw_params, - .hw_free = sdw_hw_free, - .shutdown = sdw_shutdown, + .startup = asoc_sdw_startup, + .prepare = asoc_sdw_prepare, + .trigger = asoc_sdw_trigger, + .hw_params = asoc_sdw_hw_params, + .hw_free = asoc_sdw_hw_free, + .shutdown = asoc_sdw_shutdown, }; static struct asoc_sdw_codec_info codec_info_list[] = { diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 6ddfb1f9639a..e88b5627560b 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -134,13 +134,13 @@ struct mc_private { extern unsigned long sof_sdw_quirk; -int sdw_startup(struct snd_pcm_substream *substream); -int sdw_prepare(struct snd_pcm_substream *substream); -int sdw_trigger(struct snd_pcm_substream *substream, int cmd); -int sdw_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params); -int sdw_hw_free(struct snd_pcm_substream *substream); -void sdw_shutdown(struct snd_pcm_substream *substream); +int asoc_sdw_startup(struct snd_pcm_substream *substream); +int asoc_sdw_prepare(struct snd_pcm_substream *substream); +int asoc_sdw_trigger(struct snd_pcm_substream *substream, int cmd); +int asoc_sdw_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params); +int asoc_sdw_hw_free(struct snd_pcm_substream *substream); +void asoc_sdw_shutdown(struct snd_pcm_substream *substream); /* generic HDMI support */ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd); diff --git a/sound/soc/intel/boards/sof_sdw_maxim.c b/sound/soc/intel/boards/sof_sdw_maxim.c index 8faa06824869..f689dc29c493 100644 --- a/sound/soc/intel/boards/sof_sdw_maxim.c +++ b/sound/soc/intel/boards/sof_sdw_maxim.c @@ -80,7 +80,7 @@ static int mx8373_sdw_prepare(struct snd_pcm_substream *substream) int ret; /* according to soc_pcm_prepare dai link prepare is called first */ - ret = sdw_prepare(substream); + ret = asoc_sdw_prepare(substream); if (ret < 0) return ret; @@ -92,7 +92,7 @@ static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream) int ret; /* according to soc_pcm_hw_free dai link free is called first */ - ret = sdw_hw_free(substream); + ret = asoc_sdw_hw_free(substream); if (ret < 0) return ret; @@ -100,12 +100,12 @@ static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream) } static const struct snd_soc_ops max_98373_sdw_ops = { - .startup = sdw_startup, + .startup = asoc_sdw_startup, .prepare = mx8373_sdw_prepare, - .trigger = sdw_trigger, - .hw_params = sdw_hw_params, + .trigger = asoc_sdw_trigger, + .hw_params = asoc_sdw_hw_params, .hw_free = mx8373_sdw_hw_free, - .shutdown = sdw_shutdown, + .shutdown = asoc_sdw_shutdown, }; static int mx8373_sdw_late_probe(struct snd_soc_card *card) From patchwork Thu Aug 1 06:23:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749848 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2068.outbound.protection.outlook.com [40.107.236.68]) (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 9987713D8A6; Thu, 1 Aug 2024 06:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493626; cv=fail; b=tPnZI0K2VQ6ESh0WX91RQr+/4svuJbBUahZp9RsOyb24zt4zoIfJkucjXxpHtHDn8Xv6JSuPKHzgxGAhaPX+jCjx0qEv+IS+lDEbRCllY668xyGEGMDvWlx++iwlD1gKGhfBkrxpMKNCuLRsYn6LCSi9mzAlyiXICQYcvy41LjE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493626; c=relaxed/simple; bh=OOfg8tkbJLzoJgO5JTTXrI0kZwxWgXWhiT0Ax3KckYI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Sp9Xez1YaBna9osa8nMDHrx0tK2T2PW+z+ud8gJtOaM4IeglYZkTv8E4FsvIIkrqL/G10yhhi3mmMb9v9ksViovmR6ojRbkPVBVQGZ6nCK6tsSt3CKIO94upUsnYG0Q72o2cMSuwud8j5uap1DFqsL4yza+R9avpYphYB4BWXGI= 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=KpdsnkFi; arc=fail smtp.client-ip=40.107.236.68 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="KpdsnkFi" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fv8C854327lhwdt3rHiIFYnvqu2jYlzlDuA4gkZ+Shp+rt31I/pUiHpX1FIe43afR1lUBj2mdTe47mzZXoztTX5NXYcPFNDaG16lL+ay8uHl/w45ZXJh7LUDF8J9B1N6clHO+ZakIGdBVKYLeLVZUUkfeIphlNneGP9H5R7vwIzmpH8MDLSf0R+gopGHV8jzDgcG72q4f/9qhQTct2QaRKQIs5Yxh15z47Rj7AMNfb0OAS7QXWa17BEsBYPeaFV/SuxZE25YlTyrgXKjA3fxbzQF3DNus5VBRh7XWUjU0cknQAuuDQSvakBm88wXxRzIXxx4i0mIukHLqYOfdczbMA== 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=gFa3Pog6ZiXET4635aNpUlAaMrc7TXECglk3ZuIN4/I=; b=mALMWm1EJ4eH8Dhv0sjArpmvKVAJuhfd+EWRwbBk1527lDKRX8quIiphojD/dvLm7dRWFJuxTVm8jZOmv7UPibNQs/aEKVirmm2+T+0ON6ZBw4ImMm0WQYLiGyI4AUnQHJWtYIIQRlbjEK621P29PGx8vn1KAPf8HHRTE2zcb3SHEs3nLeuXjzeVNWOZsBedEpkXEWyOCs4SJOKPkk0qIlEGBW92UTJEs4tmNTEvSF71YPs+yPL6NYOicsSoTEn82kv/YiHQ0uQv6my2OAntO78WZEZTjoTdLQWAVDyjSw7YimF2o98SN+o4bUriaXT7Wjb8s0JoRH0EPIj2LVDIMA== 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=gFa3Pog6ZiXET4635aNpUlAaMrc7TXECglk3ZuIN4/I=; b=KpdsnkFiCm0STUYW2c9cenjVBUdfUB24SRWMJeLxf0EhG98vwkl7b4V4Z2JY8GqfuzexRXYabyE/SRN+SyU7DsjRo9bB+ChYlZRo7V0oMsoW79qh402WKvANBmBeCTxFrgyFG5CyjTEv6HGlI2NtlJwKioN4UgfjRSMr5X2W3cU= Received: from DS7PR03CA0333.namprd03.prod.outlook.com (2603:10b6:8:55::15) by CYYPR12MB8890.namprd12.prod.outlook.com (2603:10b6:930:c7::8) 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 06:27:00 +0000 Received: from DS1PEPF00017091.namprd03.prod.outlook.com (2603:10b6:8:55:cafe::72) by DS7PR03CA0333.outlook.office365.com (2603:10b6:8:55::15) 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 06:27:00 +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 DS1PEPF00017091.mail.protection.outlook.com (10.167.17.133) 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 06:27:00 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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 01:26:58 -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 01:26:51 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Cezary Rojewski , Liam Girdwood , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Jaroslav Kysela , "Takashi Iwai" , Charles Keepax , "Maciej Strozek" , Chao Song , Kuninori Morimoto , jairaj-arava , Richard Fitzgerald , Brent Lu , Rander Wang , Christophe JAILLET , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 04/31] ASoC: intel: rename soundwire codec helper functions Date: Thu, 1 Aug 2024 11:53:49 +0530 Message-ID: <20240801062416.2203673-5-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017091:EE_|CYYPR12MB8890:EE_ X-MS-Office365-Filtering-Correlation-Id: 5a2c9968-bdd4-43bf-ec06-08dcb1f2f344 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: 7lz4ltUiac61CLJiiKp4RvfdipHJ/GDFaJ3p8X4qRy4ijJbzp4XccKhvq4o55s3OXxynztTcwuQii43LhYCO0OAkwxqHngaz15u75ZSAP+vgstThm36VjXyQTw4Iz8LurpbmiiSTnYoUgBB8YMfJV2OcJTcebQbbndpwPddt7/o9DiPZeQXFqTMB+DaC26t6zjhVm0S6gCZ8wwtSzsRnbqlVCHPQvbftBsQIdqfJTe0FA4zpNMgc1/co+gmaiLEtxrQU76ZV1WU2zLGvq9m6lsUN8cAmiaYAze12Ul/+MR9Mh4F7Qdh38IsfZzohBHDO6Lb9Qt74+68Cjxh6V9O+5ODWY5NU3kO7uc7km2wAKUENpyU7OK//AFRuiQZ67LibfSJFMGxUFqKlXZvOp+VKYRh8ieuJWaJhiI0SCrnzyLMvGcD4Dm1vwyxd4VMy6TOyIf/H5X/6D90UIG2HcZsaX1L5ItThX+nZs2iqJWNbCYhBbhduxGnZZCECR/rfTGY8aZlV+ZpwA6hU5+CaTcnbECyZVxvWaNpmFHS0+MK7qPLsl6tCAME5+bAbpD9CeZrGwjf2Jh41UwmWhYbkePLfGaysac+s8PFNMXWz6wiuRo5b0LJvTBvuGmQSjXUaVUcMRsiGo0BKKX6S06Y0NdR/BcMI1oMBXKFUUIohnUU3qv2BbCEM0GA7AV5goxNRPBSrqHW9VYw7MAUTwXCrDkRqJuwbNhCSDDjyJpGc7xZHZSkvBVe5mPPMoAJ4+Bg1vt/uu6dPhJ2IykRJq9r+gvvGQiySAV783PEfw8DBzJz7EPcwwkfnQGmuXNX1r1iRSOmE3ssiJImmb4cjuTixRtKlZfOkYcGTRVgd3RabGfGnHBbacLEbE5TQy8JRi4xLn7kIoO7owNUmNCtQzIFkOOGeX7V9uJXHEE3gHV7fGHCefCsF7LInmCMq/Uxk9J8l4mTh/PhceL2QZZD948WMlS9Zsrr+sMjT1oKjYS985Ybh7DIGOVtL5i4+tUvPPvfrnaoAjD7wwTmj9fe3SooUKDj7OLtArkL1JSP3o8201ogTpeF7RDqKCejxp4brW1LIuSRC39MUtt2aRhH1RplKT1/Ec6JmNmB18oYboCXRqcYN3VjEAZAS7/m0ZgTvk1t3VOOfzPthU5wFkDsSX06ufwLy0bwRgEcL3RRzKKzCAJtRBAy4J4+xH3XTe2cSyoty7tM7zcqrbzbfhIBkpM4xYa/L86dJobCz8+0cOfch0JaXhUH+efozWCIbm6AG7IvlZXp7KLQ2Em7PY79n/k6Q7zpXIG8spZrx3IkaB3trrHZVgrrWjldXALGivFolO0DetXx5DZr1l/kD6/BQceWWU0uPOx+8zUiKTg4RuoXi+wotaoEqi4dNClj3GmP+YkAieW3h4f4VK4Eywm9R3QmSi5u9uA== 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)(376014)(7416014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:27:00.0256 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5a2c9968-bdd4-43bf-ec06-08dcb1f2f344 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: DS1PEPF00017091.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8890 Rename SoundWire codec helper functions with "asoc_sdw" tag. Link: https://github.com/thesofproject/linux/pull/5068 Signed-off-by: Vijendar Mukunda Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- sound/soc/intel/boards/bridge_cs35l56.c | 18 +- sound/soc/intel/boards/sof_sdw.c | 154 +++++++++--------- sound/soc/intel/boards/sof_sdw_common.h | 104 ++++++------ sound/soc/intel/boards/sof_sdw_cs42l42.c | 2 +- sound/soc/intel/boards/sof_sdw_cs42l43.c | 16 +- sound/soc/intel/boards/sof_sdw_cs_amp.c | 10 +- sound/soc/intel/boards/sof_sdw_dmic.c | 2 +- sound/soc/intel/boards/sof_sdw_maxim.c | 22 +-- sound/soc/intel/boards/sof_sdw_rt5682.c | 2 +- sound/soc/intel/boards/sof_sdw_rt700.c | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 12 +- sound/soc/intel/boards/sof_sdw_rt712_sdca.c | 2 +- sound/soc/intel/boards/sof_sdw_rt722_sdca.c | 2 +- sound/soc/intel/boards/sof_sdw_rt_amp.c | 14 +- sound/soc/intel/boards/sof_sdw_rt_dmic.c | 2 +- .../boards/sof_sdw_rt_sdca_jack_common.c | 12 +- 16 files changed, 188 insertions(+), 188 deletions(-) diff --git a/sound/soc/intel/boards/bridge_cs35l56.c b/sound/soc/intel/boards/bridge_cs35l56.c index 6b2526c781e5..55e5cfbb2f14 100644 --- a/sound/soc/intel/boards/bridge_cs35l56.c +++ b/sound/soc/intel/boards/bridge_cs35l56.c @@ -95,8 +95,8 @@ static const struct snd_soc_dai_link bridge_dai_template = { SND_SOC_DAILINK_REG(bridge_dai), }; -int bridge_cs35l56_count_sidecar(struct snd_soc_card *card, - int *num_dais, int *num_devs) +int asoc_sdw_bridge_cs35l56_count_sidecar(struct snd_soc_card *card, + int *num_dais, int *num_devs) { if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) { (*num_dais)++; @@ -106,9 +106,9 @@ int bridge_cs35l56_count_sidecar(struct snd_soc_card *card, return 0; } -int bridge_cs35l56_add_sidecar(struct snd_soc_card *card, - struct snd_soc_dai_link **dai_links, - struct snd_soc_codec_conf **codec_conf) +int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card, + struct snd_soc_dai_link **dai_links, + struct snd_soc_codec_conf **codec_conf) { if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) { **dai_links = bridge_dai_template; @@ -125,10 +125,10 @@ int bridge_cs35l56_add_sidecar(struct snd_soc_card *card, return 0; } -int bridge_cs35l56_spk_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback) +int asoc_sdw_bridge_cs35l56_spk_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback) { if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) info->amp_num += ARRAY_SIZE(bridge_cs35l56_name_prefixes); diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 9395daf220e9..64418976aba4 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -740,7 +740,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt700-aif1", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, - .rtd_init = rt700_rtd_init, + .rtd_init = asoc_sdw_rt700_rtd_init, .controls = rt700_controls, .num_controls = ARRAY_SIZE(rt700_controls), .widgets = rt700_widgets, @@ -758,9 +758,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt711-sdca-aif1", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, - .init = sof_sdw_rt_sdca_jack_init, - .exit = sof_sdw_rt_sdca_jack_exit, - .rtd_init = rt_sdca_jack_rtd_init, + .init = asoc_sdw_rt_sdca_jack_init, + .exit = asoc_sdw_rt_sdca_jack_exit, + .rtd_init = asoc_sdw_rt_sdca_jack_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, @@ -778,9 +778,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt711-aif1", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, - .init = sof_sdw_rt711_init, - .exit = sof_sdw_rt711_exit, - .rtd_init = rt711_rtd_init, + .init = asoc_sdw_rt711_init, + .exit = asoc_sdw_rt711_exit, + .rtd_init = asoc_sdw_rt711_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, @@ -798,9 +798,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt712-sdca-aif1", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, - .init = sof_sdw_rt_sdca_jack_init, - .exit = sof_sdw_rt_sdca_jack_exit, - .rtd_init = rt_sdca_jack_rtd_init, + .init = asoc_sdw_rt_sdca_jack_init, + .exit = asoc_sdw_rt_sdca_jack_exit, + .rtd_init = asoc_sdw_rt_sdca_jack_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, @@ -811,9 +811,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt712-sdca-aif2", .dai_type = SOC_SDW_DAI_TYPE_AMP, .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, - .init = sof_sdw_rt_amp_init, - .exit = sof_sdw_rt_amp_exit, - .rtd_init = rt712_spk_rtd_init, + .init = asoc_sdw_rt_amp_init, + .exit = asoc_sdw_rt_amp_exit, + .rtd_init = asoc_sdw_rt712_spk_rtd_init, .controls = generic_spk_controls, .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, @@ -831,7 +831,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt712-sdca-dmic-aif1", .dai_type = SOC_SDW_DAI_TYPE_MIC, .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, - .rtd_init = rt_dmic_rtd_init, + .rtd_init = asoc_sdw_rt_dmic_rtd_init, }, }, .dai_num = 1, @@ -845,9 +845,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt712-sdca-aif1", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, - .init = sof_sdw_rt_sdca_jack_init, - .exit = sof_sdw_rt_sdca_jack_exit, - .rtd_init = rt_sdca_jack_rtd_init, + .init = asoc_sdw_rt_sdca_jack_init, + .exit = asoc_sdw_rt_sdca_jack_exit, + .rtd_init = asoc_sdw_rt_sdca_jack_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, @@ -865,7 +865,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt712-sdca-dmic-aif1", .dai_type = SOC_SDW_DAI_TYPE_MIC, .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, - .rtd_init = rt_dmic_rtd_init, + .rtd_init = asoc_sdw_rt_dmic_rtd_init, }, }, .dai_num = 1, @@ -879,9 +879,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt1308-aif", .dai_type = SOC_SDW_DAI_TYPE_AMP, .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, - .init = sof_sdw_rt_amp_init, - .exit = sof_sdw_rt_amp_exit, - .rtd_init = rt_amp_spk_rtd_init, + .init = asoc_sdw_rt_amp_init, + .exit = asoc_sdw_rt_amp_exit, + .rtd_init = asoc_sdw_rt_amp_spk_rtd_init, .controls = generic_spk_controls, .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, @@ -889,7 +889,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { }, }, .dai_num = 1, - .ops = &sof_sdw_rt1308_i2s_ops, + .ops = &soc_sdw_rt1308_i2s_ops, }, { .part_id = 0x1316, @@ -899,9 +899,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt1316-aif", .dai_type = SOC_SDW_DAI_TYPE_AMP, .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, - .init = sof_sdw_rt_amp_init, - .exit = sof_sdw_rt_amp_exit, - .rtd_init = rt_amp_spk_rtd_init, + .init = asoc_sdw_rt_amp_init, + .exit = asoc_sdw_rt_amp_exit, + .rtd_init = asoc_sdw_rt_amp_spk_rtd_init, .controls = generic_spk_controls, .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, @@ -918,9 +918,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt1318-aif", .dai_type = SOC_SDW_DAI_TYPE_AMP, .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, - .init = sof_sdw_rt_amp_init, - .exit = sof_sdw_rt_amp_exit, - .rtd_init = rt_amp_spk_rtd_init, + .init = asoc_sdw_rt_amp_init, + .exit = asoc_sdw_rt_amp_exit, + .rtd_init = asoc_sdw_rt_amp_spk_rtd_init, .controls = generic_spk_controls, .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, @@ -939,7 +939,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt715-sdca-aif2", .dai_type = SOC_SDW_DAI_TYPE_MIC, .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, - .rtd_init = rt_dmic_rtd_init, + .rtd_init = asoc_sdw_rt_dmic_rtd_init, }, }, .dai_num = 1, @@ -954,7 +954,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt715-sdca-aif2", .dai_type = SOC_SDW_DAI_TYPE_MIC, .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, - .rtd_init = rt_dmic_rtd_init, + .rtd_init = asoc_sdw_rt_dmic_rtd_init, }, }, .dai_num = 1, @@ -969,7 +969,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt715-aif2", .dai_type = SOC_SDW_DAI_TYPE_MIC, .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, - .rtd_init = rt_dmic_rtd_init, + .rtd_init = asoc_sdw_rt_dmic_rtd_init, }, }, .dai_num = 1, @@ -984,7 +984,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt715-aif2", .dai_type = SOC_SDW_DAI_TYPE_MIC, .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, - .rtd_init = rt_dmic_rtd_init, + .rtd_init = asoc_sdw_rt_dmic_rtd_init, }, }, .dai_num = 1, @@ -998,9 +998,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt722-sdca-aif1", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, - .init = sof_sdw_rt_sdca_jack_init, - .exit = sof_sdw_rt_sdca_jack_exit, - .rtd_init = rt_sdca_jack_rtd_init, + .init = asoc_sdw_rt_sdca_jack_init, + .exit = asoc_sdw_rt_sdca_jack_exit, + .rtd_init = asoc_sdw_rt_sdca_jack_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, @@ -1012,9 +1012,9 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_type = SOC_SDW_DAI_TYPE_AMP, /* No feedback capability is provided by rt722-sdca codec driver*/ .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, - .init = sof_sdw_rt_amp_init, - .exit = sof_sdw_rt_amp_exit, - .rtd_init = rt722_spk_rtd_init, + .init = asoc_sdw_rt_amp_init, + .exit = asoc_sdw_rt_amp_exit, + .rtd_init = asoc_sdw_rt722_spk_rtd_init, .controls = generic_spk_controls, .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, @@ -1025,7 +1025,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt722-sdca-aif3", .dai_type = SOC_SDW_DAI_TYPE_MIC, .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, - .rtd_init = rt_dmic_rtd_init, + .rtd_init = asoc_sdw_rt_dmic_rtd_init, }, }, .dai_num = 3, @@ -1038,8 +1038,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "max98373-aif1", .dai_type = SOC_SDW_DAI_TYPE_AMP, .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, - .init = sof_sdw_maxim_init, - .rtd_init = maxim_spk_rtd_init, + .init = asoc_sdw_maxim_init, + .rtd_init = asoc_sdw_maxim_spk_rtd_init, .controls = maxim_controls, .num_controls = ARRAY_SIZE(maxim_controls), .widgets = maxim_widgets, @@ -1056,8 +1056,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "max98363-aif1", .dai_type = SOC_SDW_DAI_TYPE_AMP, .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, - .init = sof_sdw_maxim_init, - .rtd_init = maxim_spk_rtd_init, + .init = asoc_sdw_maxim_init, + .rtd_init = asoc_sdw_maxim_spk_rtd_init, .controls = maxim_controls, .num_controls = ARRAY_SIZE(maxim_controls), .widgets = maxim_widgets, @@ -1074,7 +1074,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "rt5682-sdw", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, - .rtd_init = rt5682_rtd_init, + .rtd_init = asoc_sdw_rt5682_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, @@ -1091,8 +1091,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "cs35l56-sdw1", .dai_type = SOC_SDW_DAI_TYPE_AMP, .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_AMP_IN_DAI_ID}, - .init = sof_sdw_cs_amp_init, - .rtd_init = cs_spk_rtd_init, + .init = asoc_sdw_cs_amp_init, + .rtd_init = asoc_sdw_cs_spk_rtd_init, .controls = generic_spk_controls, .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, @@ -1109,7 +1109,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "cs42l42-sdw", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_JACK_IN_DAI_ID}, - .rtd_init = cs42l42_rtd_init, + .rtd_init = asoc_sdw_cs42l42_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, @@ -1121,15 +1121,15 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x4243, .codec_name = "cs42l43-codec", - .count_sidecar = bridge_cs35l56_count_sidecar, - .add_sidecar = bridge_cs35l56_add_sidecar, + .count_sidecar = asoc_sdw_bridge_cs35l56_count_sidecar, + .add_sidecar = asoc_sdw_bridge_cs35l56_add_sidecar, .dais = { { .direction = {true, false}, .dai_name = "cs42l43-dp5", .dai_type = SOC_SDW_DAI_TYPE_JACK, .dailink = {SOC_SDW_JACK_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, - .rtd_init = cs42l43_hs_rtd_init, + .rtd_init = asoc_sdw_cs42l43_hs_rtd_init, .controls = generic_jack_controls, .num_controls = ARRAY_SIZE(generic_jack_controls), .widgets = generic_jack_widgets, @@ -1140,7 +1140,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "cs42l43-dp1", .dai_type = SOC_SDW_DAI_TYPE_MIC, .dailink = {SOC_SDW_UNUSED_DAI_ID, SOC_SDW_DMIC_DAI_ID}, - .rtd_init = cs42l43_dmic_rtd_init, + .rtd_init = asoc_sdw_cs42l43_dmic_rtd_init, .widgets = generic_dmic_widgets, .num_widgets = ARRAY_SIZE(generic_dmic_widgets), }, @@ -1155,8 +1155,8 @@ static struct asoc_sdw_codec_info codec_info_list[] = { .dai_name = "cs42l43-dp6", .dai_type = SOC_SDW_DAI_TYPE_AMP, .dailink = {SOC_SDW_AMP_OUT_DAI_ID, SOC_SDW_UNUSED_DAI_ID}, - .init = sof_sdw_cs42l43_spk_init, - .rtd_init = cs42l43_spk_rtd_init, + .init = asoc_sdw_cs42l43_spk_init, + .rtd_init = asoc_sdw_cs42l43_spk_rtd_init, .controls = generic_spk_controls, .num_controls = ARRAY_SIZE(generic_spk_controls), .widgets = generic_spk_widgets, @@ -1220,7 +1220,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { }, }; -static struct asoc_sdw_codec_info *find_codec_info_part(const u64 adr) +static struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_part(const u64 adr) { unsigned int part_id, sdw_version; int i; @@ -1241,7 +1241,7 @@ static struct asoc_sdw_codec_info *find_codec_info_part(const u64 adr) } -static struct asoc_sdw_codec_info *find_codec_info_acpi(const u8 *acpi_id) +static struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_acpi(const u8 *acpi_id) { int i; @@ -1255,8 +1255,8 @@ static struct asoc_sdw_codec_info *find_codec_info_acpi(const u8 *acpi_id) return NULL; } -static struct asoc_sdw_codec_info *find_codec_info_dai(const char *dai_name, - int *dai_index) +static struct asoc_sdw_codec_info *asoc_sdw_find_codec_info_dai(const char *dai_name, + int *dai_index) { int i, j; @@ -1320,12 +1320,12 @@ static int init_simple_dai_link(struct device *dev, struct snd_soc_dai_link *dai return 0; } -static bool is_unique_device(const struct snd_soc_acpi_link_adr *adr_link, - unsigned int sdw_version, - unsigned int mfg_id, - unsigned int part_id, - unsigned int class_id, - int index_in_link) +static bool asoc_sdw_is_unique_device(const struct snd_soc_acpi_link_adr *adr_link, + unsigned int sdw_version, + unsigned int mfg_id, + unsigned int part_id, + unsigned int class_id, + int index_in_link) { int i; @@ -1354,10 +1354,10 @@ static bool is_unique_device(const struct snd_soc_acpi_link_adr *adr_link, return true; } -static const char *get_codec_name(struct device *dev, - const struct asoc_sdw_codec_info *codec_info, - const struct snd_soc_acpi_link_adr *adr_link, - int adr_index) +static const char *asoc_sdw_get_codec_name(struct device *dev, + const struct asoc_sdw_codec_info *codec_info, + const struct snd_soc_acpi_link_adr *adr_link, + int adr_index) { u64 adr = adr_link->adr_d[adr_index].adr; unsigned int sdw_version = SDW_VERSION(adr); @@ -1369,8 +1369,8 @@ static const char *get_codec_name(struct device *dev, if (codec_info->codec_name) return devm_kstrdup(dev, codec_info->codec_name, GFP_KERNEL); - else if (is_unique_device(adr_link, sdw_version, mfg_id, part_id, - class_id, adr_index)) + else if (asoc_sdw_is_unique_device(adr_link, sdw_version, mfg_id, part_id, + class_id, adr_index)) return devm_kasprintf(dev, GFP_KERNEL, "sdw:0:%01x:%04x:%04x:%02x", link_id, mfg_id, part_id, class_id); else @@ -1380,7 +1380,7 @@ static const char *get_codec_name(struct device *dev, return NULL; } -static int sof_sdw_rtd_init(struct snd_soc_pcm_runtime *rtd) +static int asoc_sdw_rtd_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; struct asoc_sdw_codec_info *codec_info; @@ -1390,7 +1390,7 @@ static int sof_sdw_rtd_init(struct snd_soc_pcm_runtime *rtd) int i; for_each_rtd_codec_dais(rtd, i, dai) { - codec_info = find_codec_info_dai(dai->name, &dai_index); + codec_info = asoc_sdw_find_codec_info_dai(dai->name, &dai_index); if (!codec_info) return -EINVAL; @@ -1538,13 +1538,13 @@ static int parse_sdw_endpoints(struct snd_soc_card *card, return -EINVAL; } - codec_info = find_codec_info_part(adr_dev->adr); + codec_info = asoc_sdw_find_codec_info_part(adr_dev->adr); if (!codec_info) return -EINVAL; ctx->ignore_pch_dmic |= codec_info->ignore_pch_dmic; - codec_name = get_codec_name(dev, codec_info, adr_link, i); + codec_name = asoc_sdw_get_codec_name(dev, codec_info, adr_link, i); if (!codec_name) return -ENOMEM; @@ -1736,7 +1736,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, init_dai_link(dev, *dai_links, be_id, name, playback, capture, cpus, num_cpus, codecs, num_codecs, - sof_sdw_rtd_init, &sdw_ops); + asoc_sdw_rtd_init, &sdw_ops); /* * SoundWire DAILINKs use 'stream' functions and Bank Switch operations @@ -1831,7 +1831,7 @@ static int create_dmic_dailinks(struct snd_soc_card *card, ret = init_simple_dai_link(dev, *dai_links, be_id, "dmic01", 0, 1, // DMIC only supports capture "DMIC01 Pin", "dmic-codec", "dmic-hifi", - sof_sdw_dmic_init, NULL); + asoc_sdw_dmic_init, NULL); if (ret) return ret; @@ -1840,7 +1840,7 @@ static int create_dmic_dailinks(struct snd_soc_card *card, ret = init_simple_dai_link(dev, *dai_links, be_id, "dmic16k", 0, 1, // DMIC only supports capture "DMIC16k Pin", "dmic-codec", "dmic-hifi", - /* don't call sof_sdw_dmic_init() twice */ + /* don't call asoc_sdw_dmic_init() twice */ NULL, NULL); if (ret) return ret; @@ -1956,7 +1956,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) * system only when I2S mode is supported, not sdw mode. * Here check ACPI ID to confirm I2S is supported. */ - ssp_info = find_codec_info_acpi(mach->id); + ssp_info = asoc_sdw_find_codec_info_acpi(mach->id); if (ssp_info) { ssp_mask = SOF_SSP_GET_PORT(sof_sdw_quirk); ssp_num = hweight_long(ssp_mask); diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index e88b5627560b..28db2f1c6dae 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -148,75 +148,75 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd); int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card); /* DMIC support */ -int sof_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); +int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); /* RT711 support */ -int sof_sdw_rt711_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); -int sof_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); +int asoc_sdw_rt711_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); +int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); /* RT711-SDCA support */ -int sof_sdw_rt_sdca_jack_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); -int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); +int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); +int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); /* RT1308 I2S support */ -extern const struct snd_soc_ops sof_sdw_rt1308_i2s_ops; +extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops; /* generic amp support */ -int sof_sdw_rt_amp_init(struct snd_soc_card *card, +int asoc_sdw_rt_amp_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); +int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); + +/* MAXIM codec support */ +int asoc_sdw_maxim_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, struct asoc_sdw_codec_info *info, bool playback); -int sof_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); - -/* MAXIM codec support */ -int sof_sdw_maxim_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); /* CS42L43 support */ -int sof_sdw_cs42l43_spk_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); +int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); /* CS AMP support */ -int bridge_cs35l56_count_sidecar(struct snd_soc_card *card, - int *num_dais, int *num_devs); -int bridge_cs35l56_add_sidecar(struct snd_soc_card *card, - struct snd_soc_dai_link **dai_links, - struct snd_soc_codec_conf **codec_conf); -int bridge_cs35l56_spk_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); - -int sof_sdw_cs_amp_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); +int asoc_sdw_bridge_cs35l56_count_sidecar(struct snd_soc_card *card, + int *num_dais, int *num_devs); +int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card, + struct snd_soc_dai_link **dai_links, + struct snd_soc_codec_conf **codec_conf); +int asoc_sdw_bridge_cs35l56_spk_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); + +int asoc_sdw_cs_amp_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); /* dai_link init callbacks */ -int cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int rt700_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int rt_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); +int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); +int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); +int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); +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_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); #endif diff --git a/sound/soc/intel/boards/sof_sdw_cs42l42.c b/sound/soc/intel/boards/sof_sdw_cs42l42.c index fc18e4aa3dbe..d28477c50469 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l42.c +++ b/sound/soc/intel/boards/sof_sdw_cs42l42.c @@ -36,7 +36,7 @@ static struct snd_soc_jack_pin cs42l42_jack_pins[] = { }, }; -int cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) +int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); diff --git a/sound/soc/intel/boards/sof_sdw_cs42l43.c b/sound/soc/intel/boards/sof_sdw_cs42l43.c index 1688f29a977a..bb371b2649cf 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l43.c +++ b/sound/soc/intel/boards/sof_sdw_cs42l43.c @@ -48,7 +48,7 @@ static struct snd_soc_jack_pin sof_jack_pins[] = { }, }; -int cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) +int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; struct mc_private *ctx = snd_soc_card_get_drvdata(rtd->card); @@ -99,7 +99,7 @@ int cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai return ret; } -int cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) +int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; int ret; @@ -121,10 +121,10 @@ int cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *da return ret; } -int sof_sdw_cs42l43_spk_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback) +int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback) { /* Do init on playback link only. */ if (!playback) @@ -132,10 +132,10 @@ int sof_sdw_cs42l43_spk_init(struct snd_soc_card *card, info->amp_num++; - return bridge_cs35l56_spk_init(card, dai_links, info, playback); + return asoc_sdw_bridge_cs35l56_spk_init(card, dai_links, info, playback); } -int cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) +int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_cs_amp.c b/sound/soc/intel/boards/sof_sdw_cs_amp.c index 206fe7610a56..6479974bd2c3 100644 --- a/sound/soc/intel/boards/sof_sdw_cs_amp.c +++ b/sound/soc/intel/boards/sof_sdw_cs_amp.c @@ -14,7 +14,7 @@ #define CODEC_NAME_SIZE 8 -int cs_spk_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) { const char *dai_name = rtd->dai_link->codecs->dai_name; struct snd_soc_card *card = rtd->card; @@ -45,10 +45,10 @@ int cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) return 0; } -int sof_sdw_cs_amp_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback) +int asoc_sdw_cs_amp_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback) { /* Do init on playback link only. */ if (!playback) diff --git a/sound/soc/intel/boards/sof_sdw_dmic.c b/sound/soc/intel/boards/sof_sdw_dmic.c index 19df0f7a1d85..d9f2e072f401 100644 --- a/sound/soc/intel/boards/sof_sdw_dmic.c +++ b/sound/soc/intel/boards/sof_sdw_dmic.c @@ -19,7 +19,7 @@ static const struct snd_soc_dapm_route dmic_map[] = { {"DMic", NULL, "SoC DMIC"}, }; -int sof_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd) +int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_maxim.c b/sound/soc/intel/boards/sof_sdw_maxim.c index f689dc29c493..fd8347e28849 100644 --- a/sound/soc/intel/boards/sof_sdw_maxim.c +++ b/sound/soc/intel/boards/sof_sdw_maxim.c @@ -21,7 +21,7 @@ static const struct snd_soc_dapm_route max_98373_dapm_routes[] = { { "Right Spk", NULL, "Right BE_OUT" }, }; -int maxim_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) { struct snd_soc_card *card = rtd->card; int ret; @@ -75,7 +75,7 @@ static int mx8373_enable_spk_pin(struct snd_pcm_substream *substream, bool enabl return 0; } -static int mx8373_sdw_prepare(struct snd_pcm_substream *substream) +static int asoc_sdw_mx8373_prepare(struct snd_pcm_substream *substream) { int ret; @@ -87,7 +87,7 @@ static int mx8373_sdw_prepare(struct snd_pcm_substream *substream) return mx8373_enable_spk_pin(substream, true); } -static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream) +static int asoc_sdw_mx8373_hw_free(struct snd_pcm_substream *substream) { int ret; @@ -101,14 +101,14 @@ static int mx8373_sdw_hw_free(struct snd_pcm_substream *substream) static const struct snd_soc_ops max_98373_sdw_ops = { .startup = asoc_sdw_startup, - .prepare = mx8373_sdw_prepare, + .prepare = asoc_sdw_mx8373_prepare, .trigger = asoc_sdw_trigger, .hw_params = asoc_sdw_hw_params, - .hw_free = mx8373_sdw_hw_free, + .hw_free = asoc_sdw_mx8373_hw_free, .shutdown = asoc_sdw_shutdown, }; -static int mx8373_sdw_late_probe(struct snd_soc_card *card) +static int asoc_sdw_mx8373_sdw_late_probe(struct snd_soc_card *card) { struct snd_soc_dapm_context *dapm = &card->dapm; @@ -118,10 +118,10 @@ static int mx8373_sdw_late_probe(struct snd_soc_card *card) return snd_soc_dapm_sync(dapm); } -int sof_sdw_maxim_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback) +int asoc_sdw_maxim_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback) { info->amp_num++; @@ -133,7 +133,7 @@ int sof_sdw_maxim_init(struct snd_soc_card *card, */ break; case SOF_SDW_PART_ID_MAX98373: - info->codec_card_late_probe = mx8373_sdw_late_probe; + info->codec_card_late_probe = asoc_sdw_mx8373_sdw_late_probe; dai_links->ops = &max_98373_sdw_ops; break; default: diff --git a/sound/soc/intel/boards/sof_sdw_rt5682.c b/sound/soc/intel/boards/sof_sdw_rt5682.c index 67737815d016..3584638e2192 100644 --- a/sound/soc/intel/boards/sof_sdw_rt5682.c +++ b/sound/soc/intel/boards/sof_sdw_rt5682.c @@ -35,7 +35,7 @@ static struct snd_soc_jack_pin rt5682_jack_pins[] = { }, }; -int rt5682_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) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); diff --git a/sound/soc/intel/boards/sof_sdw_rt700.c b/sound/soc/intel/boards/sof_sdw_rt700.c index 0db730071be2..a90d69573736 100644 --- a/sound/soc/intel/boards/sof_sdw_rt700.c +++ b/sound/soc/intel/boards/sof_sdw_rt700.c @@ -33,7 +33,7 @@ static struct snd_soc_jack_pin rt700_jack_pins[] = { }, }; -int rt700_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) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); diff --git a/sound/soc/intel/boards/sof_sdw_rt711.c b/sound/soc/intel/boards/sof_sdw_rt711.c index fff76291fca2..e4d300d7d5ef 100644 --- a/sound/soc/intel/boards/sof_sdw_rt711.c +++ b/sound/soc/intel/boards/sof_sdw_rt711.c @@ -59,7 +59,7 @@ static struct snd_soc_jack_pin rt711_jack_pins[] = { }, }; -int rt711_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) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); @@ -111,7 +111,7 @@ int rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) return ret; } -int sof_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) +int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); @@ -124,10 +124,10 @@ int sof_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_l return 0; } -int sof_sdw_rt711_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback) +int asoc_sdw_rt711_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); struct device *sdw_dev; diff --git a/sound/soc/intel/boards/sof_sdw_rt712_sdca.c b/sound/soc/intel/boards/sof_sdw_rt712_sdca.c index 788796461885..bb09d1ddafd2 100644 --- a/sound/soc/intel/boards/sof_sdw_rt712_sdca.c +++ b/sound/soc/intel/boards/sof_sdw_rt712_sdca.c @@ -26,7 +26,7 @@ static const struct snd_soc_dapm_route rt712_spk_map[] = { { "Speaker", NULL, "rt712 SPOR" }, }; -int rt712_spk_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) { struct snd_soc_card *card = rtd->card; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_rt722_sdca.c b/sound/soc/intel/boards/sof_sdw_rt722_sdca.c index 083d281bd052..2da9134ad1a3 100644 --- a/sound/soc/intel/boards/sof_sdw_rt722_sdca.c +++ b/sound/soc/intel/boards/sof_sdw_rt722_sdca.c @@ -19,7 +19,7 @@ static const struct snd_soc_dapm_route rt722_spk_map[] = { { "Speaker", NULL, "rt722 SPK" }, }; -int rt722_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) { struct snd_soc_card *card = rtd->card; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_rt_amp.c b/sound/soc/intel/boards/sof_sdw_rt_amp.c index da1a8cc1c63d..4cf392c84cc7 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_amp.c +++ b/sound/soc/intel/boards/sof_sdw_rt_amp.c @@ -173,7 +173,7 @@ static const struct snd_soc_dapm_route *get_codec_name_and_route(struct snd_soc_ return rt1318_map; } -int rt_amp_spk_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) { struct snd_soc_card *card = rtd->card; const struct snd_soc_dapm_route *rt_amp_map; @@ -233,11 +233,11 @@ static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream, } /* machine stream operations */ -const struct snd_soc_ops sof_sdw_rt1308_i2s_ops = { +const struct snd_soc_ops soc_sdw_rt1308_i2s_ops = { .hw_params = rt1308_i2s_hw_params, }; -int sof_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) +int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); @@ -254,10 +254,10 @@ int sof_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_ return 0; } -int sof_sdw_rt_amp_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback) +int asoc_sdw_rt_amp_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); struct device *sdw_dev1, *sdw_dev2; diff --git a/sound/soc/intel/boards/sof_sdw_rt_dmic.c b/sound/soc/intel/boards/sof_sdw_rt_dmic.c index ea7c1a4bc566..64960b059834 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_dmic.c +++ b/sound/soc/intel/boards/sof_sdw_rt_dmic.c @@ -12,7 +12,7 @@ #include "sof_board_helpers.h" #include "sof_sdw_common.h" -int rt_dmic_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) { struct snd_soc_card *card = rtd->card; struct snd_soc_component *component; diff --git a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c index 9c3b93f808a2..d84aec2b4c78 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +++ b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c @@ -83,7 +83,7 @@ static const char * const need_sdca_suffix[] = { "rt711", "rt713" }; -int rt_sdca_jack_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) { struct snd_soc_card *card = rtd->card; struct mc_private *ctx = snd_soc_card_get_drvdata(card); @@ -161,7 +161,7 @@ int rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *d return ret; } -int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) +int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); @@ -178,10 +178,10 @@ int sof_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link return 0; } -int sof_sdw_rt_sdca_jack_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback) +int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback) { struct mc_private *ctx = snd_soc_card_get_drvdata(card); struct device *sdw_dev; From patchwork Thu Aug 1 06:23:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749849 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2050.outbound.protection.outlook.com [40.107.100.50]) (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 C3655157472; Thu, 1 Aug 2024 06:27:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493637; cv=fail; b=Ch7vlA7khve0HO940Zcs1wN/slifyJgrTpr2xGypwjFNOr7u0gn2mxdvZOyN7bxkpcUIOgy8o0VsrbFsDcE/rJRLvSJ5ZimJJd3HJ42W6VZ3Hk/2LQPUoeo0k8Biiih6SIp5Pq6h/38F9//aX7xrr28ybIejn4gO+Ebry0mLVs4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493637; c=relaxed/simple; bh=RRWOhkNxk8bwcefOMdSEvxndn4+nmJJpgvQfwB5G1AA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=N3WsxdWbNbw8kHkvnsBRGWK7av/PWNg9Q1UQ6KEF/Eg9I1m2mdWbPsONSLGUXjigfx/cCl/pcJ/735fb/31xBD6rWW3B+xmvd9eDYsCovsKnE1lmfU5tSZzA7X21lupYlOyQ3shpiNMxiWOBpLJJLI1IRv2uNDFkIjl3PlI4+vg= 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=lxCPFiD8; arc=fail smtp.client-ip=40.107.100.50 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="lxCPFiD8" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mqVTr7rqLy18Hsb8UTcmM3oHU9fmm6k481yiv3SYFFGbBJ13ETGnDC8hn4QBYL4kOQlr66CZiCAzYYxoa+sFSp1SpJClTLLuWn7egMU9UPwu4/OHmLRtRJIVo3RYIjrKn1VqAQaAVb5kJ4xxqBy+tEIUB8lin+HfxCetcamLtRJwd5sDpWsuqE0oZXAzgM1xTNFzRL0ooTiygtLnGb94uAihE7SQPQ02N+9N0ztZgvxx5bC8Jlrevz37dCjQYq9kJW+TUK9lRJDGTrbsk0II+CDNS3CkLuk+3sU6giWn2zthWSmAYgQhGhv4jlEq7jgf/2fRDjQeiKDzqvripTOHyA== 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=hHxi7ctKGh80fVvl+RED+g1Xyt1hr9XfoIzAwJv4+84=; b=Kq8jDOekzIjSrqcnSSv6I6kgmoTpCifg4Wrz0VFH0olH5qFfSdE96GDxVfDaj43gZe8ozosQPWjF+HN6DQWh0Lg3kR5TEOS9RW2maeaSQEVvVLhBHsue4HjFjIHlZuvnspM/RYoLqyrFuI6AJyS8qyKhrFt1PvWI3eXobVibHSMUb7a2Xvk+zh8kqZNiKXCDzNPvgFsO3yD5eehVk8WjsB2w3BvZDafos2g6KjrrJdESaoekCLAZVf8k1HpZWdRr4dk6bcEaDIoukHD1UpllmonKiRurCflMmbl8VOLYnWerezl0EMlwfy5qnusoSuTrs2oefZB92Oi65xZEyhXJKA== 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=hHxi7ctKGh80fVvl+RED+g1Xyt1hr9XfoIzAwJv4+84=; b=lxCPFiD8y+Y0agwI6210deAN/y8RIT+0wZTPKr/6Zv8ya/6Y8uHh0moXlDxJVme6qTD+wzl/5K/KWAfcOM40PlUqbvkcTSxn3iRerxAMOwx2zvgbS+BRlcoTCFpe2NGMDJC2Z37wrmG2jGur9SqkCf0ztPpbm+EelMrNSwyVFjs= Received: from DM6PR11CA0026.namprd11.prod.outlook.com (2603:10b6:5:190::39) by MW4PR12MB6730.namprd12.prod.outlook.com (2603:10b6:303:1ec::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Thu, 1 Aug 2024 06:27:12 +0000 Received: from DS1PEPF00017095.namprd03.prod.outlook.com (2603:10b6:5:190:cafe::fc) by DM6PR11CA0026.outlook.office365.com (2603:10b6:5:190::39) 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 06:27:11 +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 DS1PEPF00017095.mail.protection.outlook.com (10.167.17.138) 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 06:27:11 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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 01:27:10 -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 01:27:03 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Cezary Rojewski , Liam Girdwood , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Jaroslav Kysela , "Takashi Iwai" , Brent Lu , Charles Keepax , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 05/31] ASoC: intel: rename maxim codec macros Date: Thu, 1 Aug 2024 11:53:50 +0530 Message-ID: <20240801062416.2203673-6-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017095:EE_|MW4PR12MB6730:EE_ X-MS-Office365-Filtering-Correlation-Id: 82de74ec-9df0-4e10-fa7b-08dcb1f2fa40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|7416014|1800799024; X-Microsoft-Antispam-Message-Info: aPwpU2V2tpulWk0mGBZZsLMsAvC6ntLtsDhp8OrG4dvcIKr+d0UebgI0DSY07MV6l17PKc2WRblZ90SR4lz18k2hB8Othfq9bjc8+osvkO4ZNxuQpQock3ixEqCl8p3H4EP4CsBzucv7IpMIRCI39jVZauvWREvwfj1CxQZEUK/RIgY441HSqB9VHbaiVB4+0ABx5pR3YnJd3rYQzcX2b7IVcEoWPK4ByF44YLjAOd05IiRKkiu9vcT8graXvyFlBqJc4eyTzGFJ7UwggYXWwAxQPWb4xvGWPMMP5+WuGCkbjKF6k8TGcqYuM46GxG5caDrr89uU+omaqZqD5SA0FgQS/rsuIapHa6RCFi+DxOac/Mj2VBhJvDi9wrUgdNlEJ6ORHosbyqsCbbQtFKi9n/B2zmPireywn1yztHCbiMeOFGgEdVQDHTzbWiX4CaQ0uJ0pkNxCZ0emXOzDg7k17Ck2RwFbEAvBfCzOZ3gzr4LYpEwwN5hA3GArwSp2CabVKRJz7hUMjwqzxGH3nbAp6aKHq0Okeg02Qs5RGelWckuBulgF32hCvFeV6Srog3siO9bDVkvKGCviNuOEYGNmWYVaRBL9FVy8qf49QVUA/i9cJxYfEcb/TFRRE99q16kyhgsSfTjDB+s26GTj36p2d/Gsd/p3QhhNA9q6JjE5z5JA4FYx4R34RPGQWEGA/iWSwR92/TBLnbgCF/ksER31peMTBRriC/GqWplPSvsYJs9kfbpMTf1z5X4TMsGINLgpObPVLpBii1HTUWoxvoJrl7Q/Swey0Ze0kZsaHArX67RnWcUNBD+nv2o9AUI1/7DpulgtZDy1fSEsU75+Kb38srZ9Qj5mugo1mV/4EzuyNZKaxGxCaYiMvXNN51TmaOTPZboIbgf8OFP4LilSxIMlkSTIuvpZt02BjsES22q3ke8XcviBuaCisYtEEGdRpbcXtSjTn8GFkxMkbwv6D1DDqMOxQCMOZ38aWOcawRui9ZTECoYIxUlEPXvNvBM46xiA4veA8DbfAZRZ0uCxc98zrlWMuOKeZ7QzEG2Zv573KCXeSve62k7z5NfOo3z/VDB0dXlz48xLhkHSApQEYKo7iLiTBQSrXrWaWQ+XdjnPN0WXkv8HWMsfOMHEKxTcWtGvhKyXR0f8sa/aWmxQInhLO0bJSgL0iY5lI2LLJXPqdHKeW7samPmmUVGYitGGf9Te8OECtFoIcdTvYJa+HlxYNgb7wSwB+MFzkLkyMurc0DnhKA+pDmBw2uTF/K+uy+hwG4lv+LS1LmzgHQtGKWxhBpaOGpMXG8c2TBgdlhMygmyBROafkdPCK1MtHsvwxMnlqET7gBDYYF1/6XCXu5hKtefyWQtD1P/iaWp17iSGQd5/gYFQ/FnHrKFAXQY7QbCFK4jBeswDI4fKKMgV6OecSg== 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)(376014)(36860700013)(82310400026)(7416014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:27:11.7282 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 82de74ec-9df0-4e10-fa7b-08dcb1f2fa40 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: DS1PEPF00017095.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6730 Rename maxim codec part id macros. Link: https://github.com/thesofproject/linux/pull/5068 Signed-off-by: Vijendar Mukunda Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw_maxim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw_maxim.c b/sound/soc/intel/boards/sof_sdw_maxim.c index fd8347e28849..9933224fcf68 100644 --- a/sound/soc/intel/boards/sof_sdw_maxim.c +++ b/sound/soc/intel/boards/sof_sdw_maxim.c @@ -13,8 +13,8 @@ #include "sof_sdw_common.h" static int maxim_part_id; -#define SOF_SDW_PART_ID_MAX98363 0x8363 -#define SOF_SDW_PART_ID_MAX98373 0x8373 +#define SOC_SDW_PART_ID_MAX98363 0x8363 +#define SOC_SDW_PART_ID_MAX98373 0x8373 static const struct snd_soc_dapm_route max_98373_dapm_routes[] = { { "Left Spk", NULL, "Left BE_OUT" }, @@ -127,12 +127,12 @@ int asoc_sdw_maxim_init(struct snd_soc_card *card, maxim_part_id = info->part_id; switch (maxim_part_id) { - case SOF_SDW_PART_ID_MAX98363: + case SOC_SDW_PART_ID_MAX98363: /* Default ops are set in function init_dai_link. * called as part of function create_sdw_dailink */ break; - case SOF_SDW_PART_ID_MAX98373: + case SOC_SDW_PART_ID_MAX98373: info->codec_card_late_probe = asoc_sdw_mx8373_sdw_late_probe; dai_links->ops = &max_98373_sdw_ops; break; From patchwork Thu Aug 1 06:23:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749850 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2064.outbound.protection.outlook.com [40.107.92.64]) (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 E223E1411E0; Thu, 1 Aug 2024 06:27:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493650; cv=fail; b=PoFs/foE3bY9RLLehs3S6z7VPbiJloRf8TTBps2mASsD9l3m7TQv3/aWnGL4bqzJHjS5piJz4EkD8t0f8K4ksIuIUwOseWi5TB5zge4KhL9ww4K95hUEHjyM06qFJdtIK+R7BAcFuqGE69/waZxBwT8d6OweJk2wELiAy8v6kx0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493650; c=relaxed/simple; bh=929Cw9r+c2BL0Vnc8cCXwQGvRi8hiyBrAUflFaXiA7Y=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FXOExJJfNtFS+B901KQJ6IaWOCD8l+OeCzz2fYtQMbue2FTSsXQ9gSRYLm/cX2TIzHOMwnPwkVTpHbdLvMnVS4y9xTIwZ4B5uIeH1pAmCVRTVhtdsUVtgewYTH5i0dCptYlaEdNu0bzp/MZ01q+ofhjRo2UWS43MVhlucSF6qfk= 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=pvKyBOJf; arc=fail smtp.client-ip=40.107.92.64 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="pvKyBOJf" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iZKlPqAmr8Th14IyZNqKAPOa+sGNzygTG0M7dfQmu1Vodnv4KJqY4S7oqXRFBGsDO3ltotZx4h61Z6BS5gRivMha7QZYzQlT0BD8A3WFxsldEfhAzxx0zhiiDw005cHMaRTMmB2VVTc+oWqpTgJGjygaFGyYzsxN4qSrX2/ECDoU8vC/PVPW8Mgl6GWXkvGa6sJAkYhSSHYRvSXirV5sF4zNX4Hl9bBRlVnhSRorju7npzM+uvgQEZC06Ml6um9thV6Q7qceesjdN2CJo9hpVrpdxGj8Ks84NDmYBpgJ8ITmNPy4i3xsGVc/y5eaSNDN4xi9XbY47t65NNMOjO+Ouw== 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=eNOtexsJH/a9wEuZJl1vRdbZkCUD0L0ijL6tYqKYwS4=; b=yK1o1Etp0t7bWEkU6fy/tCaJaa0MJErtLXxSbINNnOsMK3m0qL+WJUPgTDWb7jXa3wpoNPwfYwcJDGWbXpPqZJ6GM18GnIEN8UoVdkgkJ3SNipVN10a5bLoYSsq2B5pG5EXMI5ZP1SMtltPZyR9cLWBlXbxAiHbduNV8vT4j67iaoDh7Zcvb41zWg9gxloBZEj7RvPy7RyUz/0a50ibEbMQ2jRzAoanaBOTK8+7SpeeAB2Aec52ogVsGSc9kK+27f0BbsFi87sr1wf+CQ4idHmhHtM/SHfwAYwRHT/xjHoeqTuTUcFHUDbQvSTyhlBmoCVJYmnaOFLkzsdqBXyyzjA== 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=eNOtexsJH/a9wEuZJl1vRdbZkCUD0L0ijL6tYqKYwS4=; b=pvKyBOJf2Igp3VoFo0JlMab6fhzq4Y1DdVnJWiiorPdZqYN2hJQLWRmZGVQVseo8czN2X543SJ4ZkRgP7kl6MrvFDP1zAV7SMtjGbIEDjRk8lLqfJ93toqNcmpRpG0eL5SfXA6htqZawyjLr9hxcVYYjnxM6a5UnNVeQSdQ2iMM= Received: from MN2PR19CA0071.namprd19.prod.outlook.com (2603:10b6:208:19b::48) by MN2PR12MB4237.namprd12.prod.outlook.com (2603:10b6:208:1d6::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 06:27:24 +0000 Received: from MN1PEPF0000F0DF.namprd04.prod.outlook.com (2603:10b6:208:19b:cafe::10) by MN2PR19CA0071.outlook.office365.com (2603:10b6:208:19b::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Thu, 1 Aug 2024 06:27:24 +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 MN1PEPF0000F0DF.mail.protection.outlook.com (10.167.242.37) 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 06:27:24 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) 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 01:27:24 -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 01:27:23 -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 01:27:18 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Cezary Rojewski , Liam Girdwood , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Jaroslav Kysela , "Takashi Iwai" , Charles Keepax , Maciej Strozek , Chao Song , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 06/31] ASoC: intel: rename ignore_pch_dmic variable name Date: Thu, 1 Aug 2024 11:53:51 +0530 Message-ID: <20240801062416.2203673-7-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: MN1PEPF0000F0DF:EE_|MN2PR12MB4237:EE_ X-MS-Office365-Filtering-Correlation-Id: 09639fb3-4a14-4773-00ef-08dcb1f301f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: OPJy66VsGRpTdL3mZGAE5cuPpniUWr2ji2lAxbXl1YYBn//grTLLHdjqx8A7oUB07axv2YiNjRQjfpTw3TiZx9L35C4Ix/xnd8JOBnBNLBEt+zZcU4qv9ratDb/RwdXylCw+UxIU9TUn44HLrO9Und1/jyQUJHWXPwjhu7LFBF63pQrzI4Rn/vYcKcaUMe4KiFa6VGMVxfN4J1o/GWpUOgX37IrtCJ9wTXRYMCOMw17I9oyZsl/rVvaEOeE5vUZZ+bKpj/W/P0NezWR0sdXyRp/LaTpE/FeDu/K1sWE4kaegujQkp32ZmqwiFADYpCV1EhnBgmQ+Xij+tVDzDqBQ3ae9QoQd0pmNEF62khsNPnixLzKLJre7UEjVySEox2CmSVjyLjlQi4a960u6MC5SNCxE/60HgGNvr2eMULh5Z3OU1zkdmWx5BMwkbXpVTd8i2pQyq7mdoclMRGk44/hMrXcOa0nY1NtujrrgPtGUHpOKf1StWbwJDH/ioWhpbCm5K0PLR/a6ALI+7jiecEODo2UkKPRuoNY9IPEtGJu6jqoKCkONpHzm1AdpPYAaQhGdPJ47PGOH720XQFn01rvXa+wpDxc6eg6GqvCr1oBq802yP4/kvvendlb8f3ebDM1GFjwv1LYGhpDWc9x6TBKhjWOnM7ihhmfRpMRP4XEO5Ogxyiuhe7TYTg/kOubKA7nXJwQjKuPhKILFTN1KGhknukg8gJiFcTKNog4+IKLsMhFXMTdHjmKUBAVhL54sLxs06gqmzhJrY1tfmZFejvg+YXAQejLN2wafFu1iFgLsegRQ2LPVT698HkLc8lJ9oYUY+Pk4VEuaccUCnVPS+GO03cRwplK5aib+TXztTwdAWlR1FJhH7bGOo9IYBBDFSttVnqoPyC4wt7yQI1yjsXoYC4ZrfRlUb1TmLswRXAWwjRclw65myxJ3WB2zMIDeMK7U3MKK/IttOi/6QqmcKgxMRhhgvaXV3td5G3Yr9nTbT2bBXSfzK41ddgaGFbZlP0MQF8oZ460LGmJjjuTQ2VaZJeTJGAqSSYnm1LWlwwSOmP4ha92J4JcYP3fxm9b63whGeNcSoj32chx3TNrufLIzdgIcmNp7SBQeHWwLBdVk8bMcP0RgLz0kzyiCwM+BwfMvqwMpkJe5HOLGzJ73aVi4bzIoXNwlBcANd5QYcQ1PI8p9wf9Et5DNTO0KnHvRH0gxqgUrhy5BByPoQFbqNFshGCOpqyCYqLlJ0G8GzCPkD0HsOOexI3dHly4pEwjMrV7dl2XDFYytNkyUqh7tHyBxtctbdUhyFGlpk3bcirVQGbu4RIG+JO5SKVoyJJfm0M3D1KzdbChkxYfh0PAC6EujuQHnIyvx7ya5mF1MaaGzU+FfMlyB9IJ6VdVBT249fwQOEOwm8bDf8gMY9ORj+VWcqw== 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)(36860700013)(82310400026)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:27:24.7186 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 09639fb3-4a14-4773-00ef-08dcb1f301f8 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: MN1PEPF0000F0DF.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4237 Rename 'ignore_pch_dmic' variable name as 'ignore_internal_dmic'. This variable will be moved to common header file and will be used by other platform machine driver code. Link: https://github.com/thesofproject/linux/pull/5068 Signed-off-by: Vijendar Mukunda Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart --- sound/soc/intel/boards/sof_sdw.c | 12 ++++++------ sound/soc/intel/boards/sof_sdw_common.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 64418976aba4..28021d33fd2d 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -932,7 +932,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x714, .version_id = 3, - .ignore_pch_dmic = true, + .ignore_internal_dmic = true, .dais = { { .direction = {false, true}, @@ -947,7 +947,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x715, .version_id = 3, - .ignore_pch_dmic = true, + .ignore_internal_dmic = true, .dais = { { .direction = {false, true}, @@ -962,7 +962,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x714, .version_id = 2, - .ignore_pch_dmic = true, + .ignore_internal_dmic = true, .dais = { { .direction = {false, true}, @@ -977,7 +977,7 @@ static struct asoc_sdw_codec_info codec_info_list[] = { { .part_id = 0x715, .version_id = 2, - .ignore_pch_dmic = true, + .ignore_internal_dmic = true, .dais = { { .direction = {false, true}, @@ -1542,7 +1542,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card, if (!codec_info) return -EINVAL; - ctx->ignore_pch_dmic |= codec_info->ignore_pch_dmic; + ctx->ignore_internal_dmic |= codec_info->ignore_internal_dmic; codec_name = asoc_sdw_get_codec_name(dev, codec_info, adr_link, i); if (!codec_name) @@ -2018,7 +2018,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) /* dmic */ if (dmic_num > 0) { - if (ctx->ignore_pch_dmic) { + if (ctx->ignore_internal_dmic) { dev_warn(dev, "Ignoring PCH DMIC\n"); } else { ret = create_dmic_dailinks(card, &dai_links, &be_id); diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 28db2f1c6dae..c1b58180efe5 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -106,7 +106,7 @@ struct asoc_sdw_codec_info { const char *codec_name; int amp_num; const u8 acpi_id[ACPI_ID_LEN]; - const bool ignore_pch_dmic; + const bool ignore_internal_dmic; const struct snd_soc_ops *ops; struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM]; const int dai_num; @@ -129,7 +129,7 @@ struct mc_private { /* To store SDW Pin index for each SoundWire link */ unsigned int sdw_pin_index[SDW_MAX_LINKS]; bool append_dai_type; - bool ignore_pch_dmic; + bool ignore_internal_dmic; }; extern unsigned long sof_sdw_quirk; From patchwork Thu Aug 1 06:23:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749851 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2040.outbound.protection.outlook.com [40.107.100.40]) (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 48CDC13D8A6; Thu, 1 Aug 2024 06:28:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.40 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493683; cv=fail; b=bY6BWM/6P6my4cZr7GOXQV28JT5gtiHtABTFc9pwP5+kJjIDHJq2VsNn6mva/M+9ibS/+xES2ZCJDQyUYZ+s1QhNKk/fDgpTXG/wWStDANDn+sd8etwCeZP+udkF8umniMZDzG/Od2IndvJruioN0dXDeJM6Ztd1hh6YBajoOBI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493683; c=relaxed/simple; bh=pGvmqBUW3OmH5h1zfuCPKubfFRHxZaRwEtYaBWodBCY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sL28ZTXdcVjZbx9HsC7FLVRkV+FBTPuJR0vfFGeuwku40r/vVPU7rZsp4uSnJfGfFx0lqZD2z3TWDlH46gHUs3YgeJpUKKWt0HoxmwFBHvgM8SO0ALFx9UWsGsYi8y8OLotUHB1qBH6niGdAYMYEoskPgaj7UG+hZyPPgt7SujY= 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=cecihoN1; arc=fail smtp.client-ip=40.107.100.40 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="cecihoN1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UX5reQ1uSOFcjTN/b6ZO7AXyojr/ZQoa5DJPMITHwUKIQXkM/sbz/BKDgadW5oR/a3xtn8oyh3aejnVLswQet4ZKZJ7n17pH43YzjFtv2gFPhL1ia8uJLj82fF0caxbojQV6RDgIiWRZdW1Exq1wsC68LYQrY/hRR/V/e9sU8XKh5nQ+DK4HlqDYJsoT8++4tpkUOKgrdIvBDqpqNHcL4HUxpxv8MfjOLiD4sZN0/VCRHTzLQMWczgQdAIVoDRiOU0SbcjRNZPm+5bTwcAvSaPYAxfRe5pPTmTLB3gR8YdJ9BA36kU/LWfeuxemmbWndIjThGdSk8hBnS0Yc4LwVHg== 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=Y/2fLUxBp7tyZAIixcn0vslXHejd8+OfNGTCTx6ZR04=; b=lPFues+jp2kzQ3heMjfNkFD92blFi8LQh435LDWiIwF79t9qg2DnUXIwYv4VI0AC5aotKTn/jmwirEIZ4GECP8Gk2+uy52EYT5CupWZVdQ6D9HbrG6Y7gtLsFnyIzNWN3I/z6yOA00eQSL5i+IMsX3HCqbRyN/lZe+BgX3mGT0xU4t9sM+ITbJPPCJnPIMfJBEAWrP07jSaxyvh7fS6Q1vqXgO3dmriKd0scL5Jf6ulG56sX9uhRUnbhwXy/xM4fZBeXahoF3vbkIIQMyVknz+Kd3qJR56iJLQ04oPtnou5gI70MSckptPAC2vpRiOS3p+GajwuLbYMEG0rTztGnRw== 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=Y/2fLUxBp7tyZAIixcn0vslXHejd8+OfNGTCTx6ZR04=; b=cecihoN1DfxDJ4nQTo8hNPbeWFBksC1zYTvvnGOKsbAwPa4yTqpZPecf3CrXFMRWb4L3oGfhBFxMH3imowVFsUpSMu2tOMF8z3vCWIjI/N8Mb/TEI/So6f0kpwPMnWLybbP7XPl7j5lv+b4p/bH3FPaB76W69TF0/azRE1iLMCg= Received: from DM6PR08CA0028.namprd08.prod.outlook.com (2603:10b6:5:80::41) by IA0PR12MB8087.namprd12.prod.outlook.com (2603:10b6:208:401::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Thu, 1 Aug 2024 06:27:57 +0000 Received: from DS1PEPF0001708F.namprd03.prod.outlook.com (2603:10b6:5:80:cafe::a4) by DM6PR08CA0028.outlook.office365.com (2603:10b6:5:80::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.14 via Frontend Transport; Thu, 1 Aug 2024 06:27:57 +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 DS1PEPF0001708F.mail.protection.outlook.com (10.167.17.139) 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 06:27:57 +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 01:27:56 -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 01:27:55 -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 01:27:50 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Cezary Rojewski" , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Brent Lu , Rander Wang , Charles Keepax , Maciej Strozek , Chao Song , open list , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." Subject: [PATCH 07/31] ASoC: intel/sdw-utils: move soundwire machine driver soc ops Date: Thu, 1 Aug 2024 11:53:52 +0530 Message-ID: <20240801062416.2203673-8-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: DS1PEPF0001708F:EE_|IA0PR12MB8087:EE_ X-MS-Office365-Filtering-Correlation-Id: de616e7f-a676-4796-eac1-08dcb1f3158b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: dHJQME3SJmPqQ5CaOYLXCN0P8qdL0uRr1j+xOM8pOAnABcVGG/Tih2xjGJFr/Y4r6C5q8hBUC2WB7XLW/iuZ2IMZLNjZ/cTSMPzxvKk7l8sC7IbndCNMiN2pM3cMYGxxJIynj0VqiFAPeehkteklpTfu2uCHElx2PnxvPL1FJHUG+x8zx4jmBBXZElbZlGu/Plg9qOwJmT8BAmClwOBYsLg69sweiWJWdqX+MaPsNqAgkgKt+mmXeC+7YfTuSxkXZTig+z8zSImsWXo2AqqZH361CTluZYHXuS6DeA8XRn4xYjHhUVNbooF7uMLVzW5SFBw83T4OnW5BE7AiyibmRfnWTxFRWxUXdZrkrNjJkHavQmLxjWmIkjf7JlqvoAqyDIGqmeacRd3qUGeSyo/sCC65au8A06/n2JDzyvn8/VnpFwiFpS/84f1rzIlEuQia05ioKGJbB0Q3ajcH9dE+mVzMpUwfBLpzsrDBEC+S45rs05dP208/8jU1fKJWeaMweUahLaSF0SgYfzUfKZTGTCkQjB7+Hmo284trYLMxPOFFu5unlfYILDPIRJNIZxZ62LwGP02e1wQ5EvoxgKF4NjQMHYmTfM9V5FbQV+uiy0wQni9ZDdgdxFl4Tu3WY3tCuyN99ZXUWA1LHuc4Z4o5perRCGq9kVEdPu49BB/p/uE1MPROzn7A4jk0G0K/Ychy6pf1HZmo0TLVp7ZaBjmt4JpCaYovjw3khi3wu6kvm+T0SZXq7I1v6beIhx6dAJZkgtMvEVeSiHNyX/ueDVz9/8PcZuvL3pVGTbRQcLD/k9+jvkiDhd29ac2tnUXaE+Q3dPKbG801HYhZ/nbA1YvtkuzNa4l0EjqCEWxCKnjR/J4SZ6rBu+oya3HIxtl8ctwaZSeHGouvmCKU0FLQr0CvuqKhQnVKRajQMB6Ecw4+rucif34APUx3XqcziUVX1L7+CIqgp+DxKrC3Cc/uTGZudq8IaEVdNcPRPAhUfu+GBTk2LTJTY0DglGsRDp4Xcxo4q9CD4jZLN+aQQqrIztEVUDKoMMq9Wm3dMU2Kvq+jJ25tPknR+11Tg+zeddpot6XFHKDdYW9mch1pVAijRGLzpIcBO+70NzOxIGKuizyjTPoVPgHNUXzyrgNYohQ8n2Ofq0QIldCAzyts9dpRQ0XqMbGY8/8PJY1f6c0tLYx1pb2K3uJoIs6Zl4S09F3+H8jvqMauO3iy+r0+0ehd+zvE310j/n+n6ME/S0ufEWcNm9dgAQHHzXhOAVgTfubcWWWdy/07grlgs/+zb7whLra+SyEatrAaeOe08SneTn6LD2YPXNta4nPAeAYu7vK3eOIFO4L969jhS9nCYKGpXLkdsdT7febdgWFqTHzKWQ7Oa0SEIqGnlqE7pFAdpjd6lAFEpROju+zujEStefmvpNOj5w== 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)(7416014)(82310400026)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:27:57.5334 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de616e7f-a676-4796-eac1-08dcb1f3158b 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: DS1PEPF0001708F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8087 Move Intel SoundWire generic machine driver soc ops to common place so that it can be used by other platform machine driver. 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 | 23 ++++ sound/soc/Kconfig | 2 + sound/soc/Makefile | 1 + sound/soc/intel/boards/Kconfig | 1 + sound/soc/intel/boards/sof_sdw.c | 131 +-------------------- sound/soc/intel/boards/sof_sdw_common.h | 9 +- sound/soc/sdw_utils/Kconfig | 6 + sound/soc/sdw_utils/Makefile | 3 + sound/soc/sdw_utils/soc_sdw_utils.c | 150 ++++++++++++++++++++++++ 9 files changed, 188 insertions(+), 138 deletions(-) create mode 100644 include/sound/soc_sdw_utils.h create mode 100644 sound/soc/sdw_utils/Kconfig create mode 100644 sound/soc/sdw_utils/Makefile create mode 100644 sound/soc/sdw_utils/soc_sdw_utils.c diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h new file mode 100644 index 000000000000..cf4cdb66b2de --- /dev/null +++ b/include/sound/soc_sdw_utils.h @@ -0,0 +1,23 @@ +/* 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. + * + */ + +#ifndef SOC_SDW_UTILS_H +#define SOC_SDW_UTILS_H + +#include + +int asoc_sdw_startup(struct snd_pcm_substream *substream); +int asoc_sdw_prepare(struct snd_pcm_substream *substream); +int asoc_sdw_prepare(struct snd_pcm_substream *substream); +int asoc_sdw_trigger(struct snd_pcm_substream *substream, int cmd); +int asoc_sdw_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params); +int asoc_sdw_hw_free(struct snd_pcm_substream *substream); +void asoc_sdw_shutdown(struct snd_pcm_substream *substream); + +#endif diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig index a52afb423b46..e87bd15a8b43 100644 --- a/sound/soc/Kconfig +++ b/sound/soc/Kconfig @@ -126,6 +126,8 @@ source "sound/soc/xtensa/Kconfig" # Supported codecs source "sound/soc/codecs/Kconfig" +source "sound/soc/sdw_utils/Kconfig" + # generic frame-work source "sound/soc/generic/Kconfig" diff --git a/sound/soc/Makefile b/sound/soc/Makefile index fd61847dd1eb..775bb38c2ed4 100644 --- a/sound/soc/Makefile +++ b/sound/soc/Makefile @@ -75,3 +75,4 @@ obj-$(CONFIG_SND_SOC) += uniphier/ obj-$(CONFIG_SND_SOC) += ux500/ obj-$(CONFIG_SND_SOC) += xilinx/ obj-$(CONFIG_SND_SOC) += xtensa/ +obj-$(CONFIG_SND_SOC) += sdw_utils/ diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig index f1faa5dd2a4f..3d59d6982763 100644 --- a/sound/soc/intel/boards/Kconfig +++ b/sound/soc/intel/boards/Kconfig @@ -656,6 +656,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH depends on MFD_INTEL_LPSS || COMPILE_TEST depends on SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES || COMPILE_TEST depends on SOUNDWIRE + select SND_SOC_SDW_UTILS select SND_SOC_MAX98363 select SND_SOC_MAX98373_I2C select SND_SOC_MAX98373_SDW diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 28021d33fd2d..fc73db4af186 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include "sof_sdw_common.h" #include "../../codecs/rt711.h" @@ -593,135 +592,6 @@ static const struct snd_kcontrol_new rt700_controls[] = { SOC_DAPM_PIN_SWITCH("Speaker"), }; -/* these wrappers are only needed to avoid typecast compilation errors */ -int asoc_sdw_startup(struct snd_pcm_substream *substream) -{ - return sdw_startup_stream(substream); -} - -int asoc_sdw_prepare(struct snd_pcm_substream *substream) -{ - struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); - struct sdw_stream_runtime *sdw_stream; - struct snd_soc_dai *dai; - - /* Find stream from first CPU DAI */ - dai = snd_soc_rtd_to_cpu(rtd, 0); - - sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); - if (IS_ERR(sdw_stream)) { - dev_err(rtd->dev, "no stream found for DAI %s\n", dai->name); - return PTR_ERR(sdw_stream); - } - - return sdw_prepare_stream(sdw_stream); -} - -int asoc_sdw_trigger(struct snd_pcm_substream *substream, int cmd) -{ - struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); - struct sdw_stream_runtime *sdw_stream; - struct snd_soc_dai *dai; - int ret; - - /* Find stream from first CPU DAI */ - dai = snd_soc_rtd_to_cpu(rtd, 0); - - sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); - if (IS_ERR(sdw_stream)) { - dev_err(rtd->dev, "no stream found for DAI %s\n", dai->name); - return PTR_ERR(sdw_stream); - } - - switch (cmd) { - case SNDRV_PCM_TRIGGER_START: - case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: - case SNDRV_PCM_TRIGGER_RESUME: - ret = sdw_enable_stream(sdw_stream); - break; - - case SNDRV_PCM_TRIGGER_PAUSE_PUSH: - case SNDRV_PCM_TRIGGER_SUSPEND: - case SNDRV_PCM_TRIGGER_STOP: - ret = sdw_disable_stream(sdw_stream); - break; - default: - ret = -EINVAL; - break; - } - - if (ret) - dev_err(rtd->dev, "%s trigger %d failed: %d\n", __func__, cmd, ret); - - return ret; -} - -int asoc_sdw_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params) -{ - struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); - struct snd_soc_dai_link_ch_map *ch_maps; - int ch = params_channels(params); - unsigned int ch_mask; - int num_codecs; - int step; - int i; - - if (!rtd->dai_link->ch_maps) - return 0; - - /* Identical data will be sent to all codecs in playback */ - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - ch_mask = GENMASK(ch - 1, 0); - step = 0; - } else { - num_codecs = rtd->dai_link->num_codecs; - - if (ch < num_codecs || ch % num_codecs != 0) { - dev_err(rtd->dev, "Channels number %d is invalid when codec number = %d\n", - ch, num_codecs); - return -EINVAL; - } - - ch_mask = GENMASK(ch / num_codecs - 1, 0); - step = hweight_long(ch_mask); - - } - - /* - * The captured data will be combined from each cpu DAI if the dai - * link has more than one codec DAIs. Set codec channel mask and - * ASoC will set the corresponding channel numbers for each cpu dai. - */ - for_each_link_ch_maps(rtd->dai_link, i, ch_maps) - ch_maps->ch_mask = ch_mask << (i * step); - - return 0; -} - -int asoc_sdw_hw_free(struct snd_pcm_substream *substream) -{ - struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); - struct sdw_stream_runtime *sdw_stream; - struct snd_soc_dai *dai; - - /* Find stream from first CPU DAI */ - dai = snd_soc_rtd_to_cpu(rtd, 0); - - sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); - if (IS_ERR(sdw_stream)) { - dev_err(rtd->dev, "no stream found for DAI %s\n", dai->name); - return PTR_ERR(sdw_stream); - } - - return sdw_deprepare_stream(sdw_stream); -} - -void asoc_sdw_shutdown(struct snd_pcm_substream *substream) -{ - sdw_shutdown_stream(substream); -} - static const struct snd_soc_ops sdw_ops = { .startup = asoc_sdw_startup, .prepare = asoc_sdw_prepare, @@ -2232,3 +2102,4 @@ MODULE_AUTHOR("Rander Wang "); MODULE_AUTHOR("Pierre-Louis Bossart "); MODULE_LICENSE("GPL v2"); MODULE_IMPORT_NS(SND_SOC_INTEL_HDA_DSP_COMMON); +MODULE_IMPORT_NS(SND_SOC_SDW_UTILS); diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index c1b58180efe5..d97aedeef9e8 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -12,6 +12,7 @@ #include #include #include +#include #include "sof_hdmi_common.h" #define SOC_SDW_MAX_NO_PROPS 2 @@ -134,14 +135,6 @@ struct mc_private { extern unsigned long sof_sdw_quirk; -int asoc_sdw_startup(struct snd_pcm_substream *substream); -int asoc_sdw_prepare(struct snd_pcm_substream *substream); -int asoc_sdw_trigger(struct snd_pcm_substream *substream, int cmd); -int asoc_sdw_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params); -int asoc_sdw_hw_free(struct snd_pcm_substream *substream); -void asoc_sdw_shutdown(struct snd_pcm_substream *substream); - /* generic HDMI support */ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd); diff --git a/sound/soc/sdw_utils/Kconfig b/sound/soc/sdw_utils/Kconfig new file mode 100644 index 000000000000..d915083c3889 --- /dev/null +++ b/sound/soc/sdw_utils/Kconfig @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only +config SND_SOC_SDW_UTILS + tristate + help + This option enables to use SoundWire common helper functions and + SoundWire codec helper functions in machine driver. diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile new file mode 100644 index 000000000000..29b2852be287 --- /dev/null +++ b/sound/soc/sdw_utils/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0-only +snd-soc-sdw-utils-y := soc_sdw_utils.o +obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c new file mode 100644 index 000000000000..cccab173fd17 --- /dev/null +++ b/sound/soc/sdw_utils/soc_sdw_utils.c @@ -0,0 +1,150 @@ +// 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. +/* + * soc-sdw-utils.c - common SoundWire machine driver helper functions + */ + +#include +#include +#include +#include +#include + +/* these wrappers are only needed to avoid typecast compilation errors */ +int asoc_sdw_startup(struct snd_pcm_substream *substream) +{ + return sdw_startup_stream(substream); +} +EXPORT_SYMBOL_NS(asoc_sdw_startup, SND_SOC_SDW_UTILS); + +int asoc_sdw_prepare(struct snd_pcm_substream *substream) +{ + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); + struct sdw_stream_runtime *sdw_stream; + struct snd_soc_dai *dai; + + /* Find stream from first CPU DAI */ + dai = snd_soc_rtd_to_cpu(rtd, 0); + + sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); + if (IS_ERR(sdw_stream)) { + dev_err(rtd->dev, "no stream found for DAI %s\n", dai->name); + return PTR_ERR(sdw_stream); + } + + return sdw_prepare_stream(sdw_stream); +} +EXPORT_SYMBOL_NS(asoc_sdw_prepare, SND_SOC_SDW_UTILS); + +int asoc_sdw_trigger(struct snd_pcm_substream *substream, int cmd) +{ + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); + struct sdw_stream_runtime *sdw_stream; + struct snd_soc_dai *dai; + int ret; + + /* Find stream from first CPU DAI */ + dai = snd_soc_rtd_to_cpu(rtd, 0); + + sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); + if (IS_ERR(sdw_stream)) { + dev_err(rtd->dev, "no stream found for DAI %s\n", dai->name); + return PTR_ERR(sdw_stream); + } + + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + case SNDRV_PCM_TRIGGER_RESUME: + ret = sdw_enable_stream(sdw_stream); + break; + + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + case SNDRV_PCM_TRIGGER_SUSPEND: + case SNDRV_PCM_TRIGGER_STOP: + ret = sdw_disable_stream(sdw_stream); + break; + default: + ret = -EINVAL; + break; + } + + if (ret) + dev_err(rtd->dev, "%s trigger %d failed: %d\n", __func__, cmd, ret); + + return ret; +} +EXPORT_SYMBOL_NS(asoc_sdw_trigger, SND_SOC_SDW_UTILS); + +int asoc_sdw_hw_params(struct snd_pcm_substream *substream, + struct snd_pcm_hw_params *params) +{ + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); + struct snd_soc_dai_link_ch_map *ch_maps; + int ch = params_channels(params); + unsigned int ch_mask; + int num_codecs; + int step; + int i; + + if (!rtd->dai_link->ch_maps) + return 0; + + /* Identical data will be sent to all codecs in playback */ + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + ch_mask = GENMASK(ch - 1, 0); + step = 0; + } else { + num_codecs = rtd->dai_link->num_codecs; + + if (ch < num_codecs || ch % num_codecs != 0) { + dev_err(rtd->dev, "Channels number %d is invalid when codec number = %d\n", + ch, num_codecs); + return -EINVAL; + } + + ch_mask = GENMASK(ch / num_codecs - 1, 0); + step = hweight_long(ch_mask); + } + + /* + * The captured data will be combined from each cpu DAI if the dai + * link has more than one codec DAIs. Set codec channel mask and + * ASoC will set the corresponding channel numbers for each cpu dai. + */ + for_each_link_ch_maps(rtd->dai_link, i, ch_maps) + ch_maps->ch_mask = ch_mask << (i * step); + + return 0; +} +EXPORT_SYMBOL_NS(asoc_sdw_hw_params, SND_SOC_SDW_UTILS); + +int asoc_sdw_hw_free(struct snd_pcm_substream *substream) +{ + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); + struct sdw_stream_runtime *sdw_stream; + struct snd_soc_dai *dai; + + /* Find stream from first CPU DAI */ + dai = snd_soc_rtd_to_cpu(rtd, 0); + + sdw_stream = snd_soc_dai_get_stream(dai, substream->stream); + if (IS_ERR(sdw_stream)) { + dev_err(rtd->dev, "no stream found for DAI %s\n", dai->name); + return PTR_ERR(sdw_stream); + } + + return sdw_deprepare_stream(sdw_stream); +} +EXPORT_SYMBOL_NS(asoc_sdw_hw_free, SND_SOC_SDW_UTILS); + +void asoc_sdw_shutdown(struct snd_pcm_substream *substream) +{ + sdw_shutdown_stream(substream); +} +EXPORT_SYMBOL_NS(asoc_sdw_shutdown, SND_SOC_SDW_UTILS); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("SoundWire ASoC helpers"); From patchwork Thu Aug 1 06:23:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749852 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2064.outbound.protection.outlook.com [40.107.94.64]) (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 D4C1E13D8A6; Thu, 1 Aug 2024 06:28:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493693; cv=fail; b=XpCe/rZBf1CLYXdYK+JhvZw1vNq2JPR95SCula2AaW8/6it4mbsZl/0bofqh5vXKK3GPlpibSmR6StV+rp+HnUOTDzho5pz5L+mmSC2u6or182chqbcI+Kn/Wx4uDWlwcI9vQsIyORQnUUy/wXg8R4hC5JMFUrdNm2mTeA8J+b4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493693; c=relaxed/simple; bh=KSTYiI0dytWJe6hGgmOuCegbFF0+e1QlYZSeZPMFj+g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K5Lk8tkdaM4q5JHWW8gwbKMCfM0YPAFqWETvqMU3g8dlLEvyNHuwmgL+vRhGPJkZK8zdwrBPcQgWrdjZZeS8gvkZWu2J5wn13ZXIg5Gt9CmNWmW0IloS0ONXzvEFm0ddt8bypedR0xBXUQYTR1+QFix6YzrHr1gen1xS6merrdU= 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=wxhD0AbX; arc=fail smtp.client-ip=40.107.94.64 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="wxhD0AbX" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GNAvxGDk+6HfojLcrqSuTfc2e+gRUdWsmxRKCA4zcQlnaKu8OX3ZehMsxo98SrtaQrSsgi1jnfsPcR428rBQJEZtBRwVq5IGhCdtbdPBPhzopXmeweEh1e5WKcLjwTm5SR8/Kpo96gMGN1nc+7Kp1tKprOTLe483ofp7Swqvd3BMjgyGAemGgzX0j+ozeqYOY0vvj4DdmoHlD491vj/ST9AnN7312Vvz03acAWzQ9T8QY4hZTo9Q1Ai5kdj4NY1BdMRnFOcmqm7+gY7I/npgILGRu+x5czOt8KrELBYWg9DYOX/mJM3pPJor3WkDvI3htdDhDSm/H1Kvn6/liSu1Wg== 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=cK5UcSHp7ey5i2K2Zi6QMQt6zdza61rvrmkQU0evU54=; b=YoUd52xNte58KKmnRtGZwW0JAJjOAPJxwDstPYOfQf1Tb6zokb51ZWNnBdqtd3QwIWBWs9pJyiEhvp78W4L4LIysQLoUivq1q1GAUi+hM0Vgzlh5caYuzNzgA1r4yZTxEjsl7NqZhP+FFlVIz+xNXNmZXAQC4jW+pg+2KJbyyoPesjBGEKqMYzg9tuVTlkSqCongPuzvfZv19FZx1LI70BLfZe5+3KyytfTVnntMACqBFBITaTDsX9fYZp6Bl4lTQHtZhdjXvY87QaJopWrAXhPcIB4nsjU+f1r8xHaiYBm0qnXN14w9nmmt1dEqPXAVlAji1dd4lHzOevalbFz2Rg== 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=cK5UcSHp7ey5i2K2Zi6QMQt6zdza61rvrmkQU0evU54=; b=wxhD0AbXdrfiuNslrvpQHlpEpHEbOZSoOPZXHSVRUKOKYi6Lay3ja2YwL/W9j8A50qeNOwRQNzJ/pyYN2OodmBeE0aii+0d7un/1C33SarQX8ITeBdnm2b153J1qn2qfY1nV31x3kuZXsZg3E9pZFZz07TRUFinvr/kdmU3Gog0= Received: from MN2PR05CA0039.namprd05.prod.outlook.com (2603:10b6:208:236::8) by SA1PR12MB6775.namprd12.prod.outlook.com (2603:10b6:806:25a::10) 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 06:28:08 +0000 Received: from MN1PEPF0000F0E5.namprd04.prod.outlook.com (2603:10b6:208:236:cafe::62) by MN2PR05CA0039.outlook.office365.com (2603:10b6:208:236::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.20 via Frontend Transport; Thu, 1 Aug 2024 06:28:07 +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 MN1PEPF0000F0E5.mail.protection.outlook.com (10.167.242.43) 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 06:28:07 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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 01:28:07 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) 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 01:28:06 -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 01:28:00 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Cezary Rojewski" , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Charles Keepax , Maciej Strozek , Chao Song , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 08/31] ASoC: intel: move soundwire machine driver common structures Date: Thu, 1 Aug 2024 11:53:53 +0530 Message-ID: <20240801062416.2203673-9-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB05.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000F0E5:EE_|SA1PR12MB6775:EE_ X-MS-Office365-Filtering-Correlation-Id: 49bf0e97-8c65-4bae-4031-08dcb1f31ba4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: MBTKyyHeb69tlhOI7tsc2dqUvhNNL3VOoPTXwTWq+9+bWkPnJhPThx7KbfCoY571sNWExhsUIBSNzqAyV1Xqqew2jnkWS4eMrtZt7SGNjFC0oNDyFArlFIV0lYxl+oeJfVa5Hm71HE16OEBunyOkh4qBfgfQhjGY0HiXYmqrEEUH4oANx3IMD/+IZh/WwdDAcsr6Kb89ifOma2DGW8NWtlRTZcG3xN/GZTYAO/DjqtOj1WW9blxCPCNpo+yjWS4MP9KcPQr+E4HnHBQGNgMu2zgSfe2F+hnxCV0Wj3EzxlTKwL8IsiTlzOd6ns0M+67kiqmTB/+29bkOJ/3D7dnfUwPbyVDvoPkVcVSO1ffY4gM3q5eqcdyhpuaQKURgd1TgeVUPZdP2o3eVT4N2HfeRWYE91YhvkfJ9x/IbQkWxJEqQuyLTyYSTk9p/uSLizSAUyV4hDLMmMrwn1jrj+gkyyuGLuNCKAiesmwCckn0DiR6LRpE0ReajmrsyRypeufSQSRgwFMuifVfgi0Czlvb69CsTPA5aVx/hzEKkhZ7I7cssdHx7vOIs20b0wcy2VWcTR+ibWPyf9jfRahe44xZDQJ6Fmnjs07k+2w79VzPMccFk4GtkUr+KTcDNXRc2paA8fkRuV8lavCw5FjgumZQYZu2xPjwDXQoB6zyB1X3AbKSTU24nexM1/2nqL49OJbfxUjzuO6U7oHpsUyBegIj3yv1oo5CSQ9mYlhZFSMf/uASl9PENjvqHKFkPePfT6N6e5Cu+aOqpDQBMmmLEmfrge/oIwBdn9JRbTJEde70He8ljYqoGBcPBSwsL996DbY9Wq8A35MQNpi/5Muc2wkzr7fMrll/o7kCMaHYAQJDId2s/jgsEgcrCY40UxZI9btiHd/+S0nC3tqAT4TxZDpQW5nA6wumKjK0Of5Re/9k3ANUOqVmU0i3o1YIJ/jda1ZEyz5XfqnMo6ZA+5+4Qq5L8BnlVq3xqobm2mlpZcI+IGOB5ueE290r5L9kFPEupgmF94GqMRAeqcQ/8B240ND/rs1r5ixVxBJsvcjrWVLpZkduKD2aSjOU8jE4/wAITrodylU+7g2nwaQ7bXNjgqFPOiE+9uCTvz75BUjEwNPFJkSgMR3Sj1iEn/YFN5JcAiyYy8ptnHKZAR57SNm+/c2tceKepV31a6yjHAWUfPRLRgPEesGbb88IhZ/5fwZQmcAJew7m5EdpXtS1VAoLMyuBVPBnnQHP8XHkVtSOMvRDLiCms36n3wbWc1j46VoeKGAPs1pjKR/7H2GKdOhOtmKV6CQgSgMWvw1oBJgXrqnZ4tcnXUA5qqwVdY1KgDowAl8/hQ4o79pjDQh3cH5WHow7XUryq12tE6z9aLw3hoUkl+Adozxolp9eS+FzmRl7/IXfx 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)(376014)(7416014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:28:07.8061 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 49bf0e97-8c65-4bae-4031-08dcb1f31ba4 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: MN1PEPF0000F0E5.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6775 Move intel generic SoundWire machine driver common structures to soc_sdw_utils.h file. These structures will be used in other platform SoundWire machine driver code. 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 | 43 +++++++++++++++++++++++++ sound/soc/intel/boards/sof_sdw_common.h | 43 ------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index cf4cdb66b2de..1ae5523bbcf8 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -11,6 +11,49 @@ #include +#define SOC_SDW_MAX_DAI_NUM 8 + +struct asoc_sdw_codec_info; + +struct asoc_sdw_dai_info { + const bool direction[2]; /* playback & capture support */ + const char *dai_name; + const int dai_type; + const int dailink[2]; /* dailink id for each direction */ + const struct snd_kcontrol_new *controls; + const int num_controls; + const struct snd_soc_dapm_widget *widgets; + const int num_widgets; + int (*init)(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); + int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); + int (*rtd_init)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); + bool rtd_init_done; /* Indicate that the rtd_init callback is done */ + unsigned long quirk; +}; + +struct asoc_sdw_codec_info { + const int part_id; + const int version_id; + const char *codec_name; + int amp_num; + const u8 acpi_id[ACPI_ID_LEN]; + const bool ignore_internal_dmic; + const struct snd_soc_ops *ops; + struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM]; + const int dai_num; + + int (*codec_card_late_probe)(struct snd_soc_card *card); + + int (*count_sidecar)(struct snd_soc_card *card, + int *num_dais, int *num_devs); + int (*add_sidecar)(struct snd_soc_card *card, + struct snd_soc_dai_link **dai_links, + struct snd_soc_codec_conf **codec_conf); +}; + int asoc_sdw_startup(struct snd_pcm_substream *substream); int asoc_sdw_prepare(struct snd_pcm_substream *substream); int asoc_sdw_prepare(struct snd_pcm_substream *substream); diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index d97aedeef9e8..688cbc3afb29 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -78,49 +78,6 @@ enum { #define SOC_SDW_DAI_TYPE_AMP 1 #define SOC_SDW_DAI_TYPE_MIC 2 -#define SOC_SDW_MAX_DAI_NUM 8 - -struct asoc_sdw_codec_info; - -struct asoc_sdw_dai_info { - const bool direction[2]; /* playback & capture support */ - const char *dai_name; - const int dai_type; - const int dailink[2]; /* dailink id for each direction */ - const struct snd_kcontrol_new *controls; - const int num_controls; - const struct snd_soc_dapm_widget *widgets; - const int num_widgets; - int (*init)(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); - int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); - int (*rtd_init)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); - bool rtd_init_done; /* Indicate that the rtd_init callback is done */ - unsigned long quirk; -}; - -struct asoc_sdw_codec_info { - const int part_id; - const int version_id; - const char *codec_name; - int amp_num; - const u8 acpi_id[ACPI_ID_LEN]; - const bool ignore_internal_dmic; - const struct snd_soc_ops *ops; - struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM]; - const int dai_num; - - int (*codec_card_late_probe)(struct snd_soc_card *card); - - int (*count_sidecar)(struct snd_soc_card *card, - int *num_dais, int *num_devs); - int (*add_sidecar)(struct snd_soc_card *card, - struct snd_soc_dai_link **dai_links, - struct snd_soc_codec_conf **codec_conf); -}; - struct mc_private { struct snd_soc_card card; struct snd_soc_jack sdw_headset; From patchwork Thu Aug 1 06:23:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749853 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2056.outbound.protection.outlook.com [40.107.93.56]) (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 F2663156F2A; Thu, 1 Aug 2024 06:28:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493707; cv=fail; b=Ma2vYmmwMkcZarjYgQTjp/8c2LxgP9DJ3F0hHcJJUmRO05kUeUJ3/Arb2JKHrnl39zHprtWDnSS3kNvLrjulDoeEwP8Ixj/gGuu6dnUoi+euZBACcFyJOxQizwxTAsjnJoNKKncnaTdpmJQ5Xob1ZXbxgq3hChkDX7Yx9NTUhKQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493707; c=relaxed/simple; bh=eGgwrcdu1pwB6BfUTjhL8YT/g4FVNfycDOP8imUnFzg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AITkYbo0YSHmzmgcAOlk8X5hay+4LN8VWF5r8/zMlnVv6La6nn2CiLKrTe7dIHPyIVHrKCGLk0cC9P0S1UxNjz+yS6eqVqizgFxFGkR5EIU7dQ3p64trmYdLSnnF+o4sXl0wNEJleUbIHM+iayrv/GmOgzygQaMh8vowsM/nNJs= 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=jjHr/vED; arc=fail smtp.client-ip=40.107.93.56 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="jjHr/vED" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=v6fvDCrM71qwyvo2gMsSZ2z8nsKLZcmcjxl0N0dmcG2H2VBEwjV//M6BbHYP6aGnbcFvHEWHhBCe0XomELD/JDVwo7UHGAXiW3VZCgni23LfHns9tvOX4eDzftsUEIxRGj9NnQ+Wj9e7PaZsgixLgIaEPsfl/nLWOmXe2hRI/zOumkqpxHs1lQ9rgY6juM6TAMHss5RTVIGXGO4mSGUFXa2f41XWpi+anQ8zRkkxBMvlkeSfdaBTFlO9jWkXcMhL9dMSBJfqj+wYSo7tSR+RV2B61mRj7L/kWkPUtH4OuhlPDgCrZ8gFl2bU69lDKkIEBtpSyji7xN+cm0+7tmufBQ== 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=n5PhBdhWSJKgEbj7Xmz6uau3/rcfvUoIsh4OCENhd4E=; b=gTXHYa7whbbSoniOUQxOaxQeuB8zPxSKi6OWLS/zE9XIcgkISteHueQOeyVk77Sbfz+sKS8lV+oF/0Q5mEvYjzVSeKCBQKXoBXublj/xArUersrTxl8cXNqEFyyCcRhgtZucgvHQjnQpS+upz1ynFG+IUN0l5XgX8tqq6/H1b2Nul0IltfeXl81LkhfyPjQqSTlqhsELV3812Gi+fYucI2rWP1fpkkAVvEK2VHAlhj6Ej+VgcE6FLMhJGfFqC/jbLpN6BxVn+rdRUqQmkTvUOAgMo11toojDwsh9lFUzD9BHcULdqjtjA6DWt4SYGZu9fl4CZGlXN2Qr6X6lKC3q8A== 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=n5PhBdhWSJKgEbj7Xmz6uau3/rcfvUoIsh4OCENhd4E=; b=jjHr/vEDwHGvzrhG6foxEedw9udjq99IySAwo20y1H4azUoHVSZvi5KHAsSyzu0sruanHo38aEALGS1dtGNvv6QoxGlDTMiANaJAhS3EYPWISFxtgbtX0qfcBSlwFMO945EAhTobWzjAhUyoSGYAq2sOi1yGiG8ky+SPne/xid4= Received: from BL1P223CA0007.NAMP223.PROD.OUTLOOK.COM (2603:10b6:208:2c4::12) by PH0PR12MB7471.namprd12.prod.outlook.com (2603:10b6:510:1e9::18) 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 06:28:22 +0000 Received: from MN1PEPF0000F0E4.namprd04.prod.outlook.com (2603:10b6:208:2c4:cafe::c8) by BL1P223CA0007.outlook.office365.com (2603:10b6:208:2c4::12) 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 06:28:22 +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 MN1PEPF0000F0E4.mail.protection.outlook.com (10.167.242.42) 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 06:28:22 +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 01:28:21 -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 01:28:15 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Cezary Rojewski" , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Charles Keepax , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 09/31] ASoC: intel/sdw_utils: move soundwire machine driver helper functions Date: Thu, 1 Aug 2024 11:53:54 +0530 Message-ID: <20240801062416.2203673-10-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: MN1PEPF0000F0E4:EE_|PH0PR12MB7471:EE_ X-MS-Office365-Filtering-Correlation-Id: b740d7f3-fec0-421f-09cc-08dcb1f32440 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: G1Dn4Orqa52+HYfm+NCqk3zUNZIVQl/PI0qX6Aze8j4eYZfEuUCtk+sSyOofybloIWTn3dBBAttFvQrRwZkMxRfEW4kTWSDmtPqWfiFn7CUEE9tCDvnszUSqvPdSPbEARp/We18m3ehs3IA/0mczJ4UqFnRfHkGjFdzUIX+IDtpVgoIPH1kiH0bQ8uYTJ1k8kJcWQzeYeNUfNR9GYY5Jy6ImZ8MiqGhENYbKcMmjwedX6i2iRcHRA7LRZjSFPtk3wy2Ka3VHgwbwuX5d2NOsFuT9o6SLWQDu33YdMSaBe+gsvvGQkAtjzeuEoLlyuoI+vI+yQWjbCHJiNOpji23BgE5s9xD02Av4aX2DXSmRq6rA2tFg0Muq8znsp9WKHnqO6YgVqvY1BTybJK9k8qrDt3sa+dMOqyuzTxAWweQ2y3WGhKtQT6VUzI/jbtI/39T4bGj8Ym4ozlkXZPPm/tC6JDS4f+DwAGv6RR7NoCyjgiPc9cMcs0B1QfMbMoi/VqKka5D6qkPBLc6pf+ajn3T/PMRXGTvMd1RomMvg/X4spBbbGFMl41/33aKODqAAIwl2cdX9SbGjneE6qpkRUYFMyAV8bqht2M6sQg2BaWoqaUOpRiNBvG4MUwC1F9zAJpP1wEoLMFVFulghtslrtOB0l24tDkZdja0X6rot0PHqCRr4WSF5gUnHZ29v7pm2MYsbpUfbDQDzvxvEDjy+Bv0WEiDhz99BhctJxHNBun7kp/WCDpFv00qVtjlvbM9YyttUEqbxeGF3/7ndQoylmlJVGy2S0HPLHjRcZAY0M4KSNlBUDXYIboz9Gbcn6xr2QsQonxlq7JhuEnTR7avzPp8HgeVCyIsN90CcxRZDlrKhJOWZV7Gb2YZAvdHg3oQcsKDEd3/CV1Kz1ghyTn0uwqq42A+15qdb8u9xnsK5Fh36WR4nIgzJ6Tl1yejZhWJMkG4LOE6fLMzCiDZrETUITljfXna2n/gofrTigixR8pmkJdvxHdL7oQRLbduCBr4q//b8laMt23ZT+L9RcmKEbDCblj9RhqHTznH1djK8dMabBa54F6UPQVTWdir0SFSQBrmOzbRjdNezQuI9VldIRcy2bLBpxOQVu7UVB1JZhL/8QRFCaA55b6UDbIQIYM0rLo8rUfZlBoMrEuCgFdGSs89U+7G9IWkymp/2AQGCBD5Tob78JK83LLUazXeTbyH5cCM14ZwseIxEI4p6dpIdcpHVEjvbBnEg1OuSEZPdIEk+kOOeRBZAuJkwaBpNXfoYShGn5kgdat8iUyCdHnfg50p2wlcvxauiJ/tmVplnsG37KUeNlLF6Ngt8yYV6ck24Dr7qeKQ2KOVT4Mti2qulgZS5MqWNEsDO1NPnfSGcrX5uQwnQWePg1uMbtil5PIJHNUdz2ODQrMU2L7w/52/OeP9IcQ== 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)(36860700013)(82310400026)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:28:22.2488 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b740d7f3-fec0-421f-09cc-08dcb1f32440 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: MN1PEPF0000F0E4.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7471 Move below Intel SoundWire machine driver helper functions to soc_sdw_utils.c file so that it can be used by other platform machine driver. - asoc_sdw_is_unique_device() - asoc_sdw_get_codec_name() 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 | 5 +++ sound/soc/intel/boards/sof_sdw.c | 60 ---------------------------- sound/soc/sdw_utils/soc_sdw_utils.c | 61 +++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 60 deletions(-) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 1ae5523bbcf8..7ca3a6afdfb1 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -10,6 +10,7 @@ #define SOC_SDW_UTILS_H #include +#include #define SOC_SDW_MAX_DAI_NUM 8 @@ -63,4 +64,8 @@ int asoc_sdw_hw_params(struct snd_pcm_substream *substream, int asoc_sdw_hw_free(struct snd_pcm_substream *substream); void asoc_sdw_shutdown(struct snd_pcm_substream *substream); +const char *asoc_sdw_get_codec_name(struct device *dev, + const struct asoc_sdw_codec_info *codec_info, + const struct snd_soc_acpi_link_adr *adr_link, + int adr_index); #endif diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index fc73db4af186..e1d2b744987f 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1190,66 +1190,6 @@ static int init_simple_dai_link(struct device *dev, struct snd_soc_dai_link *dai return 0; } -static bool asoc_sdw_is_unique_device(const struct snd_soc_acpi_link_adr *adr_link, - unsigned int sdw_version, - unsigned int mfg_id, - unsigned int part_id, - unsigned int class_id, - int index_in_link) -{ - int i; - - for (i = 0; i < adr_link->num_adr; i++) { - unsigned int sdw1_version, mfg1_id, part1_id, class1_id; - u64 adr; - - /* skip itself */ - if (i == index_in_link) - continue; - - adr = adr_link->adr_d[i].adr; - - sdw1_version = SDW_VERSION(adr); - mfg1_id = SDW_MFG_ID(adr); - part1_id = SDW_PART_ID(adr); - class1_id = SDW_CLASS_ID(adr); - - if (sdw_version == sdw1_version && - mfg_id == mfg1_id && - part_id == part1_id && - class_id == class1_id) - return false; - } - - return true; -} - -static const char *asoc_sdw_get_codec_name(struct device *dev, - const struct asoc_sdw_codec_info *codec_info, - const struct snd_soc_acpi_link_adr *adr_link, - int adr_index) -{ - u64 adr = adr_link->adr_d[adr_index].adr; - unsigned int sdw_version = SDW_VERSION(adr); - unsigned int link_id = SDW_DISCO_LINK_ID(adr); - unsigned int unique_id = SDW_UNIQUE_ID(adr); - unsigned int mfg_id = SDW_MFG_ID(adr); - unsigned int part_id = SDW_PART_ID(adr); - unsigned int class_id = SDW_CLASS_ID(adr); - - if (codec_info->codec_name) - return devm_kstrdup(dev, codec_info->codec_name, GFP_KERNEL); - else if (asoc_sdw_is_unique_device(adr_link, sdw_version, mfg_id, part_id, - class_id, adr_index)) - return devm_kasprintf(dev, GFP_KERNEL, "sdw:0:%01x:%04x:%04x:%02x", - link_id, mfg_id, part_id, class_id); - else - return devm_kasprintf(dev, GFP_KERNEL, "sdw:0:%01x:%04x:%04x:%02x:%01x", - link_id, mfg_id, part_id, class_id, unique_id); - - return NULL; -} - static int asoc_sdw_rtd_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c index cccab173fd17..2b59ddc61078 100644 --- a/sound/soc/sdw_utils/soc_sdw_utils.c +++ b/sound/soc/sdw_utils/soc_sdw_utils.c @@ -146,5 +146,66 @@ void asoc_sdw_shutdown(struct snd_pcm_substream *substream) } EXPORT_SYMBOL_NS(asoc_sdw_shutdown, SND_SOC_SDW_UTILS); +static bool asoc_sdw_is_unique_device(const struct snd_soc_acpi_link_adr *adr_link, + unsigned int sdw_version, + unsigned int mfg_id, + unsigned int part_id, + unsigned int class_id, + int index_in_link) +{ + int i; + + for (i = 0; i < adr_link->num_adr; i++) { + unsigned int sdw1_version, mfg1_id, part1_id, class1_id; + u64 adr; + + /* skip itself */ + if (i == index_in_link) + continue; + + adr = adr_link->adr_d[i].adr; + + sdw1_version = SDW_VERSION(adr); + mfg1_id = SDW_MFG_ID(adr); + part1_id = SDW_PART_ID(adr); + class1_id = SDW_CLASS_ID(adr); + + if (sdw_version == sdw1_version && + mfg_id == mfg1_id && + part_id == part1_id && + class_id == class1_id) + return false; + } + + return true; +} + +const char *asoc_sdw_get_codec_name(struct device *dev, + const struct asoc_sdw_codec_info *codec_info, + const struct snd_soc_acpi_link_adr *adr_link, + int adr_index) +{ + u64 adr = adr_link->adr_d[adr_index].adr; + unsigned int sdw_version = SDW_VERSION(adr); + unsigned int link_id = SDW_DISCO_LINK_ID(adr); + unsigned int unique_id = SDW_UNIQUE_ID(adr); + unsigned int mfg_id = SDW_MFG_ID(adr); + unsigned int part_id = SDW_PART_ID(adr); + unsigned int class_id = SDW_CLASS_ID(adr); + + if (codec_info->codec_name) + return devm_kstrdup(dev, codec_info->codec_name, GFP_KERNEL); + else if (asoc_sdw_is_unique_device(adr_link, sdw_version, mfg_id, part_id, + class_id, adr_index)) + return devm_kasprintf(dev, GFP_KERNEL, "sdw:0:%01x:%04x:%04x:%02x", + link_id, mfg_id, part_id, class_id); + else + return devm_kasprintf(dev, GFP_KERNEL, "sdw:0:%01x:%04x:%04x:%02x:%01x", + link_id, mfg_id, part_id, class_id, unique_id); + + return NULL; +} +EXPORT_SYMBOL_NS(asoc_sdw_get_codec_name, SND_SOC_SDW_UTILS); + MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("SoundWire ASoC helpers"); From patchwork Thu Aug 1 06:23:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749854 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2071.outbound.protection.outlook.com [40.107.102.71]) (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 F23E3142625; Thu, 1 Aug 2024 06:28:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.102.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493730; cv=fail; b=djivUwoF2ydZ/DfgwaCbNHwyu7/k+w48zJtXF6rHqRfNpMMmPJvuyG9lUvGgbcMOROHde8g8NuwvKAeRbzzcAl+3tDg5xUZzt8gyu1RonfR/ZzO8dnlkZPXUUiBApBU9Rw6STKHatdf9y+3t/rNXG4Y7jScSGrDFjzPDxpk30Bw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493730; c=relaxed/simple; bh=wn3Jq4xtXK/6EdLFmKyHGMbG0b6DR9OJpXRhch1t0b8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=A7x9U+WxknUVfbY4CMbDuBpFk0yO16cRfGNsdxX/sy4E9pXnt10TMjNkRG4CkZnR6ikk5GfKBOnSVUu8g8H45BgI7wDuRPxkF5csacwG6xRGDtUFeDfD1aAxLpGniX3eqgwJHWrMmp0z2wWluFYsig0DgeKz4hNSVBgZz3mAiOw= 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=5J6OjXLK; arc=fail smtp.client-ip=40.107.102.71 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="5J6OjXLK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=md+2bVvMUrpXNAt64baKRiSrYk9PnXoKanbOzgrmuMQS4vR0t7D4jeUsqPdMlN9b6UZZeuglErZbnKaR6nJuvezvb4LV1WBjV7lrXXsf5kdKCCR3PAeVAkWLDI2Y6j9ryvcVxlrcWhGhWieqBlz0bGrZm98w+Dk+TERnI7hTTM8F8Gq2Z5FPYVxQpwZTaA+wRMfnG1jhypHNAKJHRXUEGHyHzXDi67EA+Lu9cqyQ2/vkUaXtB2P/a2oHqDE0c1vKNPdnCxe5ybr0b9kWglXnaIr69/DcRqjMoYYqwmsnwOiA9QydkyItIRz58MwVoJuXO6VOQG5xSyE7N5ku1pOP0Q== 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=n32lpJGaVISCUycsy6PmNSawqp2e9DMRtw/J5CxqmaM=; b=UcZVYIl7RcGksYwHACCAwSCf23VNeUpSSWlBOthDOU0Hh3CpXZRpezrsuoepPBKn1oAsEehHFrhsevkg6qWmOtCwA1ztSN5RZwcXp/IzxBLoPr/DKhU67CM9kJuKHgMe8mjLXyKf50/irGKxlWRIElSPsmNJ1RvKR8VaDDKpzEgf2CZr7Mqm2/VtAVMy097OFlNK24xuyOBlBtFGCfw5dC4F19KH4BUy27nXSXuZU5Qn+QkFtsQloYCsW6PoTdpxjutfXwUjrR4hFz9wqMzJqaBQNzAVjYRhkRhGuQOzQCnwRmOUUiy3It+2yY4uU5849Mgaht1ShwXcg+oJhBbtPg== 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=n32lpJGaVISCUycsy6PmNSawqp2e9DMRtw/J5CxqmaM=; b=5J6OjXLKXhENlnyNe8dGsTXHbNeWJ9dKvorLLOIl9RkWXPwYi6vR4gs2xUdbkEtn5yrm8vvxb74odmp6ebWBRDfb7Ks2zC30jYS7hRz1quubAkxrrSuvHpjqExSielZOQe2ml9PYKVJjNl6XJ9UHXctdkgmgNNqjBVO+A03Gu9I= Received: from MN2PR12CA0026.namprd12.prod.outlook.com (2603:10b6:208:a8::39) by CH3PR12MB7641.namprd12.prod.outlook.com (2603:10b6:610:150::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.33; Thu, 1 Aug 2024 06:28:46 +0000 Received: from MN1PEPF0000F0E4.namprd04.prod.outlook.com (2603:10b6:208:a8:cafe::8e) by MN2PR12CA0026.outlook.office365.com (2603:10b6:208:a8::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Thu, 1 Aug 2024 06:28:46 +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 MN1PEPF0000F0E4.mail.protection.outlook.com (10.167.242.42) 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 06:28:46 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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 01:28:45 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) 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 01:28:45 -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 01:28:39 -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 10/31] ASoC: intel/sdw_utils: move dmic codec helper function Date: Thu, 1 Aug 2024 11:53:55 +0530 Message-ID: <20240801062416.2203673-11-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB05.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000F0E4:EE_|CH3PR12MB7641:EE_ X-MS-Office365-Filtering-Correlation-Id: a4a3178d-510e-40c3-9583-08dcb1f33271 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|7416014|376014; X-Microsoft-Antispam-Message-Info: R+tHkucs4LfgzOaoCuwUEy2+trHF1Td7MsKFeslPD9m0+WcYjzJAPRCwRW4UKfE4I+Yd8wPvagIUPjfoqWB0SXg8qx6ywUjzG+yKzEWSf+5bp9fdN8XITwRDMDr+6xaba0AAHefOmRsq1jgB5hPWlgHc2EQ6E64hvaFaZOnKb9fYuhJIyDCCe8vqgn06DuWZ5dFAoZnR0Zi9MiVd3b2NJWZNWDZ+r1qg5k42CAPsa55uK6gBJRtzRZfFf+XCYv8f0H0bEm0efdS+lRGahOcqoOPXn+g4VxjjqhBLq+o4Tw5RXvPK+GE5/++1G2UN9EMLk3DVyJUJfkkWDJDTY6rU8Y2x9FSnVtLptce6OC55u43HFVjRylS74qp9HnN4KriBo5q1YJ+X2+q+FMPmRNvLm/8s9pKM9ShjVl+b9bMRth5/fhvOpdb+Y0DiKPqDvORBqLTq6oqA76yq3CJ+C8pPLCaJ3u+6yOAIeU969Yl8Y5b6AHgoTsZlROJ+YpeBHZiv5AbZeKky/ENcW4Vvix7G4jc8c2adCLV9HOupE0ggNd5YAPgjyGCMBnDaELr2nz8YiWlBgsft0imS+K2tGVvD55qu4zfsAvfZZdTwheiKuTI+s0fEfo2YCjMoiQIdto+Blhjoc/3o9/2Gw6rAJ9jyoXKYkqIE4NzRj8y8V5QFCJcJLi9NmIxplmD9Gm/Sdj6IE70heIuTOksR7pcmHdhmTIVKz3G8pWVMzDYcDebS/zRw7j+I+r844oFlwaVReD26V3giQ9BsnYjiimwHucNZmyIpGA9/eCs3Nwv5E9PVrWK2EDnGwdSp1wdxHumRn4j55fpdxvVOVkZa3IoQyphr49HLDP1+Y83YbydSWRVQzmahWXe4sctyDpaM/YjC1EGvue+2oKmUc8yGDoNlK5mC6JKUlub3aGfeWqZKBkIO8s2RrkGV5qmQiXReEoiQneqk8a9CKMFEj/zxFLFKyrUfDnUz67VBs9ICaYBMt5SP5ZOIjwDVNeQKIF6pvqNJpZTT/pduVUHpvgIHuqHEi1yLqH/5OGLUEraJq1Vzgw884MmY4nI44CZ64PITaik8ezzVzwyrzAY37GVNaCUjHM/dIOPWpHICYvnd/BAg5LWvwW48fAydyfU3r6wNkRcd0xvBbefaNdq9XNAA8d7fwV5sH2XKmpZ9KBWtQHtmCpojlOpZzBH5STcSBympeRYu3xPAmLMw0Vm+1zidOkBWmxQzUUctiVjf09CoxDOo73QpW00rOoFXQ84EaquLMHyZXaRp0L6PaVv1Wief9bfRfDKdJvEJouY9Bn4ptm40rDZ0opAWB4P8AXDeetsTYgTXO3/17Mmas29Gjz5ADSuURuSJDISJ3ww69I3vbLCpN+CrdSvUWSSwwKeeE98711w7mRpvub4dQv0PCq49/iztCTynHg== 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)(36860700013)(82310400026)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:28:46.0616 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a4a3178d-510e-40c3-9583-08dcb1f33271 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: MN1PEPF0000F0E4.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7641 Move generic dmic codec helper function implementation to sdw_utils folder so that this function can be used by other platform machine drivers. 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 | 4 ++++ sound/soc/intel/boards/Makefile | 1 - sound/soc/intel/boards/sof_sdw_common.h | 3 --- sound/soc/sdw_utils/Makefile | 2 +- .../boards/sof_sdw_dmic.c => sdw_utils/soc_sdw_dmic.c} | 8 +++++--- 5 files changed, 10 insertions(+), 8 deletions(-) rename sound/soc/{intel/boards/sof_sdw_dmic.c => sdw_utils/soc_sdw_dmic.c} (76%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 7ca3a6afdfb1..0ffbd9847532 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -68,4 +68,8 @@ const char *asoc_sdw_get_codec_name(struct device *dev, const struct asoc_sdw_codec_info *codec_info, const struct snd_soc_acpi_link_adr *adr_link, int adr_index); + +/* DMIC support */ +int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); + #endif diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index dc6fe110f279..8ac6f7b5fbee 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -43,7 +43,6 @@ snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_rt_dmic.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ - sof_sdw_dmic.o \ sof_sdw_hdmi.o obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 688cbc3afb29..81b654407651 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -97,9 +97,6 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd); int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card); -/* DMIC support */ -int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); - /* RT711 support */ int asoc_sdw_rt711_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile index 29b2852be287..de8aff8744d8 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 +snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_dmic.c b/sound/soc/sdw_utils/soc_sdw_dmic.c similarity index 76% rename from sound/soc/intel/boards/sof_sdw_dmic.c rename to sound/soc/sdw_utils/soc_sdw_dmic.c index d9f2e072f401..fc2aae985084 100644 --- a/sound/soc/intel/boards/sof_sdw_dmic.c +++ b/sound/soc/sdw_utils/soc_sdw_dmic.c @@ -1,14 +1,16 @@ // 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_dmic - Helpers to handle dmic from generic machine driver + * soc_sdw_dmic - Helpers to handle dmic from generic machine driver */ #include #include #include -#include "sof_sdw_common.h" +#include static const struct snd_soc_dapm_widget dmic_widgets[] = { SND_SOC_DAPM_MIC("SoC DMIC", NULL), @@ -40,4 +42,4 @@ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd) return ret; } - +EXPORT_SYMBOL_NS(asoc_sdw_dmic_init, SND_SOC_SDW_UTILS); From patchwork Thu Aug 1 06:23:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749855 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2086.outbound.protection.outlook.com [40.107.102.86]) (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 CC0BF157488; Thu, 1 Aug 2024 06:29:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.102.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493756; cv=fail; b=CLMHez18OE29A/E/t/mIxrbNPzMEyeeyp7hWl8ZO0r2allj8NRw/GFKCPjpdQCgYibCNUUkHublr/n4Arc2ltvejsLVbUHl5EBb4M0rAJpKQI10cuAKIFTl56MiZkwz13Kb4mTmOOdikmYxuH6FeOOmzsFPLy4Ap2GBNzIIUVwI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493756; c=relaxed/simple; bh=nelUTE3UCSrTjZfAXz+ulsgjGceDQrtX87jFBIIf/U4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jj0DAEKCM7NJfQtUY87cmJh8zQmL8ZyPLjXgglf2yir9WUUILxA9AC6cYPbTr7+9wBDvRDZvmF7XCaqBCgswt373c0b4hUbPebaN3qrN5cmv19YTX4KRfKwrQJW9B5VvJMfnl9VMTuF5CDg7YtC5IcoTT4SaAPKdubY8n39IJSI= 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=lEg1Ildw; arc=fail smtp.client-ip=40.107.102.86 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="lEg1Ildw" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sPis+2mriMgZ91Fe0dQvJGq3RrmmR11OP9M7MMAoddnG8El6NOvm5fhzK7WLX31tiKN/ZH6Zsfdm3hMUCwiY1AoZjNpr3OeA73bFpBBUtZ+Wx4cVL0XJvH7Ro9iq86fUrD5lQRfORRrXwEFviRc2wdfm74ueMmMTOIYIBSCpk8DSGyzTDnIb683lWf26j+wFf6uJwHX6M+mDa+TeaDV8QnQja5BkWSll2h9MpywggWzWWmzDrkaFnWD/PBWx0B2cK5yQygkOXWnPieWkatW5kRatluFvmz8QbgUWg0jG7OyVatrEXLrM9DsQ58Qhr24TA9FmMpdw8g+ViDvuGWgwLw== 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=OeJvDV00Aw+nmZfZi2uLsM1GVaAcAdyfTrW/r0I15ZIOYesBUXJabKk/6qW3aGcx3U6z123UxmPW1Sjt2vcW4MhD3vN2Nh9WrPRyjX+NWUWS84wYl21D6wTcTpAM59l1vbUJ1ZWQTaQVCp4kisqaqBsEYufv9jCX1Jyj+x3vjbcIZhjNUkdfAWos6KhRG+aMi84dhrWdhs6r8FIfHn4QzpVqXpriuvigZocHzadecGHLE6Jba8kdvFB1VghP3hwoCXzgk5D9AZZecwMxdTvpheD3OdTO61nc25PVKrtztu17WoZtmxPh2s+uZrX0Okxp2Wzde4GCBaBZRQGmletpVg== 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=lEg1IldwV/J6bsbXZhLjj5pzDbEMtGh7bEpe1gZzY/7HCF3JUq8l1mY6+86D62W5bxjpCPtj8/smKu42RGmYM34cOIyQelX+aMJNqPfvIn9rebhOPq65HBHW9JdtrY+ZzW1WGGSRBbI1kgKpXv2f+gGzflh4k3scGlS9/dYuCq8= Received: from BY5PR03CA0022.namprd03.prod.outlook.com (2603:10b6:a03:1e0::32) by CYYPR12MB8939.namprd12.prod.outlook.com (2603:10b6:930:b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Thu, 1 Aug 2024 06:29:12 +0000 Received: from SJ5PEPF00000209.namprd05.prod.outlook.com (2603:10b6:a03:1e0:cafe::51) by BY5PR03CA0022.outlook.office365.com (2603:10b6:a03:1e0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Thu, 1 Aug 2024 06:29:12 +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 SJ5PEPF00000209.mail.protection.outlook.com (10.167.244.42) 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 06:29:12 +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 01:29:10 -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 01:29:04 -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 11/31] ASoC: intel/sdw_utils: move rtk dmic helper functions Date: Thu, 1 Aug 2024 11:53:56 +0530 Message-ID: <20240801062416.2203673-12-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: SJ5PEPF00000209:EE_|CYYPR12MB8939:EE_ X-MS-Office365-Filtering-Correlation-Id: 67ccd2dd-7bb2-42fd-4cba-08dcb1f341ff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|7416014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: ssm70Fi486mU1oXFQJXq3SlevZ8nCOzuXCKcz5/Bb2s9TPnuC6BTK3cYABCp6S7hHxqWB1ub74rvUR5h0j/BWPbOoKOPdFstyX98Ruo5SgFSt4J9YQ4h6OtNgDAZ8lCewNWDPXHH/FtyV9QULC66Jq9Ym26fhDNoclTT3NNyXVy0YQspC2p8kBIU0ifHRHiKcDwjAUkSvkcwRH5sDMsgHmaF4nuj7nO6mKkDnvkcMlPWhbNxm75QVU9PEwr38iawsaxnsjCazSRn+f8cxQWfWD8J1Y5NZyubJwmG3bEsu9GMTGiew0tWhHRRumtPX+HFn1NfpSWOUK69/aAP51av4FUOhJfOviVd0GgGLFGP2qTIfRsKCffsvxaDeBEaTQdjAB+4DyerwWyhsfP7NdRI+WBwgMBMuGs6Q4PWXnTp2ZqpYUI15+JLsC36Hbx0VYodiVsN7G9zxo+8us6pkNqbCYlZFsCQQieK/kgbLxPMygvHQi/YUW2bS2ATxNEN3qvGjCVAXDSxl+mFGu8YDG2WwX2614nw+fv3qr6GDeUGvFL8YFiXkSB8Xr6R+LnBE8pCZGmtqYPdkLEHBIMsnXWMjF0bGPeJ4fEc2S24v9a5rrDOF1R7q+byQS/kcyrPkF8cPv4DRGg8ojVNKKFGysofeSZpOwOBXdUosx6N/cBIwRvwxgJv96ipsW2qxdV/ouI//+5ZS34rLM6mbY28Z3pydQtiFOIB3DtOWpBR8Ms4U1eiEh7mcyUs0ik0wcJJv47RCdWE04RQVCe7qViXzdtxj6Hq8oerMO2n2etmJV0lLKoKoJbu1xNLPEJ0oeqENm9s67dQVW82NbUFwH+MMn/R66/c85VbL2Jm657zOWnW2mLJU4K+ZkuReZH4pPh879mos9vAPu/Ueme5Oma5simk55rvhrFuTJGLEsKuTKC8AQq5aTLKd7FDAjZBTKeengxGpEqGePdBq/zKGEYHYZ3C3IAlkF9ujWn/veQy4NTki6/B4EG3glT5JQOgMi4f6qvwd0BiB35YANN/i1jo/UoJlC2d+wzrNw9xSXJRWvnKjuTqrR8offrrzKJEJntr5wtJT0OMuYjgmZkPCqS3HRVCrglSfoZiCbidtRpErHhV38/FFsp87Fxtx704OUuER36V2YECeSh8VCWMJ3b0d+SrPmomp1ruIpCAOV9UdzB46IKGIKIgA0eupNPV3CqnIgdPjhJr7tgtDO0iBBauo2Mp7reJ3HIqINrLMCiyRch4LDLrlY4va4XQY+THLFPdzlC0oSFByxaRJezLb8K6cOL0u8SpRffwwjFOMRMSTb8DsGGOmhVG9yXc5+gse5VJsH6eaKqolPbzpe/anM3U315zhCiD7iuQ9Df57XuB40gFAGo2Y95HDtjksgvjBxq83lDZLxqiZuFcBB45K9I6GjVfUw== 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)(82310400026)(376014)(7416014)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:29:12.0624 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67ccd2dd-7bb2-42fd-4cba-08dcb1f341ff 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: SJ5PEPF00000209.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8939 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); From patchwork Thu Aug 1 06:23:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749856 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2080.outbound.protection.outlook.com [40.107.244.80]) (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 72296157465; Thu, 1 Aug 2024 06:29:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.80 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493783; cv=fail; b=LAardh41MXgu7LEMSNI2sGP1p+mzKfyYpJwaKjVNaI4uDEZeTF8Mn6EF/qBXcLlA4dCvphI9pj+NcEuRKsVLg2kpM95yydCoH+dpZImTFfEpiYrDYegG1TdZLz4I51sq/2xc+ynu+omkD94ddvsnUhgowUQOZ5gDF7Hu87DpUoE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493783; c=relaxed/simple; bh=S2ST/oiY44ugBEXzrBU0fyAlgGAV1t9LSEzykBOMz4c=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=n7yXLx3io+cpsQImd4aHKSfuPNlX+F5oxfybltINq0mnriKr7CaXKQMY9/cwwZ9i9Siz10XEdx6XmL3uRHcYDEvSoKOQTfUuqVFmhIHgwQAZSIuK3OtZ4yLtvLxWEGbSg/NK3NluWolAZNZYGzdYplTxnC2/vCs2YImAwzqOvcM= 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=whMjaqNE; arc=fail smtp.client-ip=40.107.244.80 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="whMjaqNE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hL8gxgA3y6MX/jlhni/bxlNUf2PLSfOqcWehrK2O8nCQH6+jLaLez4crWGZBYDi14IbNLHDpdGFgtd0aWVflisfBD3vfcGb8fZN6udeJpPMPFcmiXTdtSWV8xaO18rpYGry9Q02U7g2L/MBnfUiQhNfxTxDlMERTT2PGPV5+l1yXV/JXWDUG3c+T0vcbVW3BG3OzsU6Dwmh84+dqnBJkQa+2NYLOGlbePIRN/R0Cq9J+Olwv1BI3Kuxf3AgVvjwx1riJSNrm21zrVJeCmsYN9iRQpMv02+r1TrY9KktVBctZ/vTbYZJvubOzHxl9uffm5SYL+IpyEVsUk+FEnqeGrw== 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=J1hnEfkIC+ghzF+oVLNepXM9R2KLwrnFBZkn4np8uO0=; b=YCG9o/Mru/dXBXa4XSGGb8GoJubp7O6OOHG/eNXfBd/O/e5WrwFTYLdE5gX2eyLzsfOoU8KB3tSG1tuoXWLcfqm1KqLiuVsUqRHoWGzaB4NXMyFlw7tjZw6zYy2zAFNnxbizMdTlB6SzX6VgRbhc1DHiN/p6wBcF/xc3NX63dpJ0D1IaJKLredlxbHZL+68Tw2f07+6U1D+S4/JdDIzoyX4Pb7VwkH0jpvSz1x6kNbeQS/iqFcWS087qAV0V6uDMilTLiRCG0WB3vFXCk5Iam7KBY/TYM5syE34JMr1I5RlHSsggYm61YReFSU7nX2tYIOY9PNqMIcYPmGnn/rrJOw== 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=J1hnEfkIC+ghzF+oVLNepXM9R2KLwrnFBZkn4np8uO0=; b=whMjaqNEg836Pi+MBMTfoZGGjBTKTlP4nhQ37iWPukTbwA5MPzvyOeIRRzS4T7fJ5jpPXUQT2ci03GfxaDDM/HgegHh7XGr9z0APGh6XMYvoWS2pGqJzIA7LQ/NWi73RFzOpAfmo1Fjl3OU7plXK9m0brHlAMCur5Vo15YmBeUs= Received: from BY3PR03CA0020.namprd03.prod.outlook.com (2603:10b6:a03:39a::25) by SJ0PR12MB6806.namprd12.prod.outlook.com (2603:10b6:a03:478::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 06:29:37 +0000 Received: from SJ5PEPF00000208.namprd05.prod.outlook.com (2603:10b6:a03:39a:cafe::c7) by BY3PR03CA0020.outlook.office365.com (2603:10b6:a03:39a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Thu, 1 Aug 2024 06:29:37 +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 SJ5PEPF00000208.mail.protection.outlook.com (10.167.244.41) 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 06:29:37 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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 01:29:36 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) 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 01:29:35 -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 01:29:28 -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 , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 12/31] ASoC: intel/sdw_utils: move rt712 sdca helper functions Date: Thu, 1 Aug 2024 11:53:57 +0530 Message-ID: <20240801062416.2203673-13-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB05.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF00000208:EE_|SJ0PR12MB6806:EE_ X-MS-Office365-Filtering-Correlation-Id: 1e7257f9-04ee-4b5e-7a1e-08dcb1f350ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: DwdC90z2KccsoC0qzDsbc6NimKCCn+vgJVgAEn4rjGcKusPb1JwsovmnnzNQF+CvV574uUVDe+kPJna012/qrU0Yek1f/HD2vONOIaci1pxWA8yagYT9FsZKtWEArq9F4txc6FnXGyxortXn9rHQWaXhBzCMB3UjRiMNfSJAcKAWIniKOD83vQ5J/V9wgg8dSmwe2BJ3IFVSJrHglielegyI1+jvSIHdSuqVGE64/LHkmy7y+L7wDpHdM5gsFnqNufhJGMuW5vjl40XS0/CzOlZhnPqWjAYczzESLzNeGKY1UQKlHk7AYjyiZWU4u/Zok0xbxbxyh3THt1lpGaouePEGCmeZP65at0ZLmO/B9/jo1wTvKsYUXiUViWuQY8/jfPeqf2liXEfdii2Ua6q40cwAISws8E4FCeIRbcJlPTHqAM+sFT9jJ4tSY9HPUIhG+6OpJNBu7MR/cPtrtiCd2GgKG4n+2uCM607ufNhvOuDxiuS36FDb3Rt3vfhZdQwGFXfHjhsWo3yHoBQ/fU5bfJYsEaMjCtjaJlWKx8kC5m40KjUcTJfiDOxt8jHoXgBlPg+z1sFMKGd/XmOvkpzJMwkzCPHTXCPp3mKRQDm0HbkcGpiDaZ/PpzmyTZHrKonutaKGbvT7xofBVbpM369GsS40D1nzIs7yqwdYAtHge1ISb3R8ENZmqn8d302LF5ueTYu6GWp+Y9bJ0DjBs8dJbYEMhgnRffQRKduFug3kd7f+3d0DKIEyJrj+4Xvqk00dZmjAeZqk1uuDGN4fol4m1yqu84PW+yi6gE/HHoddWlV3ZVb0z5ZKTtooBrVD7C4amiJdUR4g3R4Mc8+gxUfZUCLcD7t8A7rRjR1LgTsPEn961OCdi57I32TlS1cOYtyIU8pAbel1LwKj7fp/NdN38YXDpTFFz4GHK+STgTHY2WUKecdiIiQmI0XBDMKpsEuIYhNF93kCyKp9ATYssvYpmcT2puIxQMm3KrpB+eiqJNGs0xlevAnY6tYaC+XBdjGmeefce8t7JM3avyqmJfMwWeA1CjDoqCZCIVsC5Ka1y7IA/I1KIh6yYQTHWNvAmSouiTIU8PJSfURW4hQ9vCx7xER7cavzUqZ6fEbuqiqk7vVRFtnzgfhO6ZoHlJOt9FcxYz7TPxZ24V/3fAlVRrc+qKvVYYfMQyZYHv7w8qS+3TRhf6Uw/qEljpCyprcJPjJy416IDZwa428ESvLNzYZNYpfoIvWtwiwubiH5KTYbe+qW64JzxsLULLP/q2boglpWYShGV4IHM1GxBFnOlXvARnO7cBblZ30DbiJYqeET/AzUzdkxBMlxCH+bSgWFl6RWkgQRKOtHp0EQ1UELF7PZkXizs3auqQ84rM7CMwYz4CYPkmX+SgC/zsZ3gVrBbagv2WCUqPtkaVlYyGlcd+epGA== 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)(36860700013)(82310400026)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:29:37.1402 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e7257f9-04ee-4b5e-7a1e-08dcb1f350ef 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: SJ5PEPF00000208.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6806 Move RT712 SDCA codec helper file to sdw_utils folder so that these helper functions can be used by other platform machine drivers. 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 | 2 +- sound/soc/intel/boards/sof_sdw_common.h | 1 - sound/soc/sdw_utils/Makefile | 3 ++- .../soc_sdw_rt712_sdca.c} | 8 +++++--- 5 files changed, 9 insertions(+), 6 deletions(-) rename sound/soc/{intel/boards/sof_sdw_rt712_sdca.c => sdw_utils/soc_sdw_rt712_sdca.c} (80%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 9fa102fc03c3..6fd305253e2a 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -74,5 +74,6 @@ 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); +int asoc_sdw_rt712_spk_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 dca8eecfa820..3bc9d25fc9bb 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -39,7 +39,7 @@ snd-soc-sof-sdw-y += sof_sdw.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_rt712_sdca.o sof_sdw_rt722_sdca.o \ + sof_sdw_rt722_sdca.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 73227ebf8e7b..b190aae1e093 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -160,7 +160,6 @@ int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_ 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_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_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 2c8f70465a12..f9a2baa49617 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -1,3 +1,4 @@ # 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 +snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ + soc_sdw_rt712_sdca.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_rt712_sdca.c b/sound/soc/sdw_utils/soc_sdw_rt712_sdca.c similarity index 80% rename from sound/soc/intel/boards/sof_sdw_rt712_sdca.c rename to sound/soc/sdw_utils/soc_sdw_rt712_sdca.c index bb09d1ddafd2..5127210b9a03 100644 --- a/sound/soc/intel/boards/sof_sdw_rt712_sdca.c +++ b/sound/soc/sdw_utils/soc_sdw_rt712_sdca.c @@ -1,8 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* - * sof_sdw_rt712_sdca - Helpers to handle RT712-SDCA from generic machine driver + * soc_sdw_rt712_sdca - Helpers to handle RT712-SDCA from generic machine driver */ #include @@ -13,7 +15,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include /* * dapm routes for rt712 spk will be registered dynamically according @@ -43,4 +45,4 @@ int asoc_sdw_rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_ return ret; } - +EXPORT_SYMBOL_NS(asoc_sdw_rt712_spk_rtd_init, SND_SOC_SDW_UTILS); From patchwork Thu Aug 1 06:23:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749857 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2079.outbound.protection.outlook.com [40.107.100.79]) (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 10F87157A67; Thu, 1 Aug 2024 06:30:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493809; cv=fail; b=Yn9BTeQKPc1NPrCkpbbuPqntkPZhvRtyN8fLb/Omvr3FDCL/DbGyXeaUiluVsWxGFs+VZMEZWteLcipNxRAu36WlaiCnoA6Xg45cOlM9JpPvdhbPDV38mIgVfKcWHZhSJPLiwLTMiElXtLQ0FGSg9Imop/4hKfeqi2VFqlFMfTU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493809; c=relaxed/simple; bh=rx6H9awCtEys0PBAaSFFEHLXcC46ONFHPeHOOordOes=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=C3eZMpu3nRCs+NRxIF665i59NMYUsOnNW5flf557jK2FJCs/OsDkJZR9jt7X6Rm8rA5ttv812j7QxNZyWv97qWo3AZzChslXm8EEo1b0iY2XD7WpJ5B6Gx8Ys3lC2dy/BTZ/BwXst548kEEEgouob3I7aRRxUdqKyV66nYEFHX0= 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=Amxm29we; arc=fail smtp.client-ip=40.107.100.79 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="Amxm29we" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G9pm1rW4jdH52LH8Avr+wu9eH2iXL3ysberevnAIxKqHevPTDFw27exZ/PXahQ2/4IHM7Cfv8ltk1XxFi+DVlyXWvEVYc1JpPQaZ23E3esL/WmKJnAFe+LzFwWrEe7ftZ29HhPcGchOtsLKQCEYAXLIEqiHLgT8veEw9O9vsJdS6YGW5pruGoGVhuQI3qAzlKSGAqy0NxY8AvA3P0B6OQUFHm5muGBoXcylZ7pbbkGUKSA1uxbXTcX3A2NGmIOaEmMTeBIIEy/IPfG+wpG/iBt5TiE2Wo3XJ3QFjpAUMLQhaBBjMrGSyRyzXL1RfKSeJU6ccjoK31iXO5v2hFfmYCw== 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=aUL0WKFSAgQUSTbpbD6fIs0hWRhgtQ0XCpq5Iu9xYc4=; b=G5a7aEydiH69seZ4RRgV3GaGOTmfQwrLig1hbodEyVHr7H2nn0jMXmEeY0xaBgoyearU/tWahCZ1juIAedaJ9hQrhMWACzDijjoAIaWKIknBHb5GlUd3hecuTjHFq+xpI4oYTIlHsJIZhSlxdWBJF3ZrnV+HxkzPRHbD2Kwzm1wm1AfsZhHM/Nfe9QEr2vsOgNnxsm7gpqA72BsUUeUCSD/rk3uemIlY+G1A+K0FwwCiuTVgXy0k7u6OYhybhhoyCGpRRQOsElEYITEDCun9HQp7dHbEYRMGLBQbDo3I0vR6RvXWfvodROZC4yRBrTUSQ+QWuOIMRUS2yWxCIS+dPA== 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=aUL0WKFSAgQUSTbpbD6fIs0hWRhgtQ0XCpq5Iu9xYc4=; b=Amxm29weqp0tdHSjhO363llMp8q9C9opqcXLVtTH8IHMV1ZcaFC60qKIBi1/EUsFCgzriu16A+SujL0Vk7pbYJF3jyUTmYFkFJjew6RwDM1SvQmiww7Jnbw+7K77xoEPTE4WXFJfS4ZqNGPNx4E6AS63Co2UiGrcIDJ1Dj3CkaQ= Received: from DM6PR01CA0005.prod.exchangelabs.com (2603:10b6:5:296::10) by DS7PR12MB6070.namprd12.prod.outlook.com (2603:10b6:8:9e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Thu, 1 Aug 2024 06:30:04 +0000 Received: from DS1PEPF00017094.namprd03.prod.outlook.com (2603:10b6:5:296:cafe::db) by DM6PR01CA0005.outlook.office365.com (2603:10b6:5:296::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Thu, 1 Aug 2024 06:30:04 +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 DS1PEPF00017094.mail.protection.outlook.com (10.167.17.137) 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 06:30:04 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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 01:30:03 -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 01:29:56 -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 13/31] ASoC: intel/sdw_utils: move rt722 sdca helper functions Date: Thu, 1 Aug 2024 11:53:58 +0530 Message-ID: <20240801062416.2203673-14-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017094:EE_|DS7PR12MB6070:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b70eaa7-6169-4088-74e5-08dcb1f3612f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|376014|7416014|36860700013; X-Microsoft-Antispam-Message-Info: iWIZeeeqUKWLzlwfImSCfszR4gYKYnZZYjzkv5ljkgChwMLObb2Zs+7yt8zB/WLeuNm2ug/tkahX6r6jHMOCdbLN2unyolbB7Ja/nsOz7rmjzlC2l5ZUQPceVTZ22yamrbDYEDDEr9lD2hEGy51JVUw4nmjW/VRiiNxMz7WKL7kRmxh+uLg5eQEQr1N3OJpx876wVNPqCqtR8hLYqPkiyDrNfxuIcJCqvCfGG1KAaFH5iZE1+w8kj50ehY3pHee4PhKlxFjvLUV+pvAmaIJtF2mqtKkaDKEi72lJuyDSlRtIdJ46nRwDRUw7JJMPGz5uV7/Yuq1WNMb0x5aVMOv3CQXw/adRFOabQwxm64rT+9c8tyRMcxejjqPNStqzJrY2JNQhKu6fkXl70Nn6oVj/8hr0eSqiqPb9DUY08mBdwYBlRqaTdnNB1EeHKkWi0bl/dVlzPkpJeUNdM5zlTBIkCY+y4+Jg0TLu6JImHj7pCSNz3Byzu2rYVaH9+7IkwgTLkKwYP0BwoxxDbTPn3T8yrIPTPpuIMVRtTkuv7VRv4gnAWJr7tx8DXLkXCPaX/MSzH1D+APFdrBZzWfJgwJT6lXG785EDZaGuKaKVvizJh3V195PXX51G5mas8213ns9RKPz8zPOp1+EvDLMp86SEtkWl9LktEW4HinVGiBXwq05cFnwh+YPJx3A2kA/7xbp19bou+Pv0goubWnDhWDcAJtCRfldbcI0X8GJpKPRyxK8fxdGdAJBfS+px164otS2jUh7gY1TnHjGoBp3uwCzNCoEH9ZuOrnrcLF865XVMji3staLOIrlnkGfkm6667mI7e58okrOOmu2T0zjCvVNFh34Rs3r/pXEzV/6na+ylyZ+1bnHvzv8/u33Z/A/KSTbHTjngCayvcncfE+Mw6+cNiobZMTkii+FSgQbQ4HJzr2E4t6OQaMnBuheyp9eh9NCiD+9sv5TvDCy7gJZpsq93rrMQhRpV1mF0EIJt5x3ajIZk1vdYrhmlfF1/nEf7JyYumjj+IHErYnanFUjUvFbxki8ll5ohvPhNeb/n8E8D9W5wHckiaOrsVhPvag1I6ZeRKrsyoAws8BgPezO7KXTkpxB2NA7ytXAqLZQkM/njek2WhEo5GiXglW4/9r4cNhvVNEN9LG62SaIgNuQI4844bY8eDbsCcFkJpJihs7R7qzeyxR9EITcf4xGBwfHLF0HgL4tu081o/QN+pY6ZbSy7lToXKZSRSxQORSKq+pWv1YBa1H8ZZhqQ1mLlqcxEeMAWQI2sBTn1k9ShjoQid2ykEKxMo3tZn/Nf+tyaxGQDEHLN7YsqYUYGOZmwmvghtboLXw6ZjInBqnIJ2hRGnfvsPoru+GtnUzvUs6FOggthici0LkJJYI5CV/cPsFKMjZo0EK29J1SeHGo/YMm6lHan1g== 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)(82310400026)(1800799024)(376014)(7416014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:30:04.4343 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b70eaa7-6169-4088-74e5-08dcb1f3612f 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: DS1PEPF00017094.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6070 Move RT722 SDCA codec helper file 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 | 1 + sound/soc/intel/boards/Makefile | 1 - sound/soc/intel/boards/sof_sdw_common.h | 1 - sound/soc/sdw_utils/Makefile | 2 +- .../soc_sdw_rt722_sdca.c} | 8 +++++--- 5 files changed, 7 insertions(+), 6 deletions(-) rename sound/soc/{intel/boards/sof_sdw_rt722_sdca.c => sdw_utils/soc_sdw_rt722_sdca.c} (75%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 6fd305253e2a..5bc2a89bced4 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -75,5 +75,6 @@ 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); 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); #endif diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index 3bc9d25fc9bb..f3baf9ecfbb7 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -39,7 +39,6 @@ snd-soc-sof-sdw-y += sof_sdw.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_rt722_sdca.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 b190aae1e093..c7672dc1320c 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -160,7 +160,6 @@ int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_ 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_rt722_spk_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 f9a2baa49617..261c60098e88 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -1,4 +1,4 @@ # 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_rt712_sdca.o soc_sdw_rt722_sdca.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_rt722_sdca.c b/sound/soc/sdw_utils/soc_sdw_rt722_sdca.c similarity index 75% rename from sound/soc/intel/boards/sof_sdw_rt722_sdca.c rename to sound/soc/sdw_utils/soc_sdw_rt722_sdca.c index 2da9134ad1a3..6a402172289f 100644 --- a/sound/soc/intel/boards/sof_sdw_rt722_sdca.c +++ b/sound/soc/sdw_utils/soc_sdw_rt722_sdca.c @@ -1,8 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* - * sof_sdw_rt722_sdca - Helpers to handle RT722-SDCA from generic machine driver + * soc_sdw_rt722_sdca - Helpers to handle RT722-SDCA from generic machine driver */ #include @@ -13,7 +15,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include static const struct snd_soc_dapm_route rt722_spk_map[] = { { "Speaker", NULL, "rt722 SPK" }, @@ -36,4 +38,4 @@ int asoc_sdw_rt722_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_ return ret; } - +EXPORT_SYMBOL_NS(asoc_sdw_rt722_spk_rtd_init, SND_SOC_SDW_UTILS); From patchwork Thu Aug 1 06:23:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749858 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2076.outbound.protection.outlook.com [40.107.93.76]) (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 94CD613D509; Thu, 1 Aug 2024 06:30:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.76 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493852; cv=fail; b=pMeKBdmme88f3aYNVia4FstA/EXIXR0Q155dWYv98pOOcv9KyxxUEnQ/0HxefAlmweeC7nKUMfhXEu9UZpfrU40jbSSAV+SY6Ab6luQgAt3sdBg6PPZe1A5+x661SZzL+PH8qSxUbtp3dXZBB1LLKD765qOPpGeTZ5mrrFhUv2o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493852; c=relaxed/simple; bh=xij3naBl87+OREF9dc9kTrO34TLDnQQpaz8qw7uMZ1s=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uyicvtmM24XMHBldQdScBBbt51r+W0LPkprOEA9rtFaJcgC/OaEVPVvGyXDyEot/eTdl6WDNXhDI6iByELtUzFkqELLMG/TSUOl3rYkW4Zde882MEfkgQksF+8Ps3YpmW2jeZnMvOjzzSChaA/CfkmJdT44F6MSxbwF9JYe4/F8= 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=TzIwWX/+; arc=fail smtp.client-ip=40.107.93.76 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="TzIwWX/+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bKX/m+VXcOzuVre6GN9i05gcHfAu5ElDJuzpaCs5j9mUo1gQZQ6Vc4JaIWz2BrQ7+Bn+j13VDj3FYTmXoamHkF1UCUE2/GOIBVchjXb1AiI1AE7djZVl7uqDUaxXKHtBCcPS2yetFWRI28v2k3grTgPtoeyfLzRxun9x3d4oYm9VAz59WwdTuGcotaR1aFb/V4TsYSSNHjenmHPlCF0I7R/KywY5okLfi5LS8GBl4+rj2rRBc7xlreSWyxBlTQuB9n62GjJlsC4Ko7rRFkeSG2V0oQtUT4YEpY+WkwWkCVofszkF6U61NxwHXexOm2NkT/GpTqVIq8IRbL6RmPP4Hw== 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=R4NJX/xVdvB3sXXMqg8vz7h4Q1OLf3RVEKnXa41Cz+c=; b=jBYNlwC6v5pWbq7btQ5KlMteRibh+bu5WYCgyrhromz9rWKhNoTVkiZgvupFBnjcoi1IU+L2gxOVKFz0yq4wnHWzveb9idio/8YlW8Ryf0AsOAiSW7+RVJmTiFlZj2SK9F1fDnU1lPcNUoveXE2amoTfgjjMyqKlGzMESIEHZVEjR97uRGktB9uPY7GXbW5jGjnxGxPd/JVrLaQ76jm1ZmVHdCvVMHGHzS3z6GNmsQlpOCfKcDHOQKYIJ2atVku8S8orbvW2PQfFsll0gaSwP4FPYRhoH4jrFjqnj8IaG5EBajCalJprDMNTFHhmFKrrd4PjjUzEIgZdOwYCDTyHiA== 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=R4NJX/xVdvB3sXXMqg8vz7h4Q1OLf3RVEKnXa41Cz+c=; b=TzIwWX/++MUF2E899J8L7/Gh503Dhpi9wYMe+32XMGbR5XyyscllCxC4ggaNT/zgneWgR/o0Aopw7I/2JTR5UvxsDDqXxwzfVJ/BfK4j9aIAmLfX0Kgsjm5BTJ+8U/eNtu62p0I5NETwE90kF2E3YTZSn7T2zQNjMg9l589/Ud0= Received: from SJ0PR03CA0261.namprd03.prod.outlook.com (2603:10b6:a03:3a0::26) by MN2PR12MB4270.namprd12.prod.outlook.com (2603:10b6:208:1d9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.21; Thu, 1 Aug 2024 06:30:47 +0000 Received: from SJ5PEPF00000204.namprd05.prod.outlook.com (2603:10b6:a03:3a0:cafe::48) by SJ0PR03CA0261.outlook.office365.com (2603:10b6:a03:3a0::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Thu, 1 Aug 2024 06:30:46 +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 SJ5PEPF00000204.mail.protection.outlook.com (10.167.244.37) 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 06:30:46 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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 01:30:45 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) 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 01:30:44 -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 01:30:38 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Cezary Rojewski" , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Charles Keepax , Maciej Strozek , Chao Song , Rander Wang , Kuninori Morimoto , jairaj-arava , Brent Lu , Christophe JAILLET , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 14/31] ASoC: intel: split soundwire machine driver private data Date: Thu, 1 Aug 2024 11:53:59 +0530 Message-ID: <20240801062416.2203673-15-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB05.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF00000204:EE_|MN2PR12MB4270:EE_ X-MS-Office365-Filtering-Correlation-Id: 9eb18fab-72dc-4baa-7acd-08dcb1f37a3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|82310400026|376014|7416014; X-Microsoft-Antispam-Message-Info: hFZh2+HBjt+22bgGoSOKlPmCkMGk5p0vAy3zymaJiF1zN20T+GHhvtUBkv4MG1961Be9fFELjDtzXo7teCgNv4+QP0CHGKhtbqz0oshJLTGUW4YPVsDWQLKQWQ+c4D2fuzrvync/MudQi41/VojDQJh5J97N5/HytZrNwIdxBFZB3EoUwPkEljPKuC4psLUNoCRrlSAoUdZPKKVlAQgtO+gvuznySFiis1G5ZfSd3cKKR4auCueHPLxw8Kh8AOq7XeTtpQX87oyh64iHEwrfuQAq1/H0PVviD6mDijM/u6kQLJGt11Cp+kNqEpvn8e4h/uNcT5IoGL3+TGdiKI+iUUPH1VE7kS7PVnt98uXE8ac+8XjN7HEFDoS3QT1RY8mB8fpUKv+ETtcusiqs0kvWQnfpxi+w88VSnXykK2GzTttJkbjDjTz31iexphk9Jii5cSwpcHTz4sl/7Du/Hjw53AsIzCdnW0W58ajgYo9jn/ubI80NTnQIN1YHd7qXw0CvL3AwM1buXb9bF6UirP/UdfwBX8DFOJJbkCA1aO66CfAyggPHUwxbXFmEeMMA8Y2ic3ROBKIqQ0+fsLpOOcMI/NED6+R2JNpuUu+dZJ/XBSLGfAwiBW9Rwp0JaAgoJqxRLPFBo9z9yHchb4HgabBleGRP+lpp/tVKeTMBPqbo26SlJd9xvghnNE8lKcXAy0CPXPHXHtAKfPOks9eNk9IJe3xXOwBJu8m4nFKBxoQEhkjBDBmQu/ofkT3SKb2of7inIwr6hac48F1dGc5LRG2UEUHPktl4RIO+9S4LKsMNtxxWa46eneK7Ep2Pcfs324qQIxM+pXib5KEfmGdegw83nfZ7l99/6qFhlHyCsXp6qMfIgopksL4SLJCTOzHOw29zZ63uezeoEovZEaWlkdAp//CkhdGGo8s8gZAI+qBQBdJJSI+oF7cp2VxnqkS5djY/6FeS8fBkF3zxQIEk+0itlfuQDC+E/pbI9dpQkxrk3iA8hfIVx0ZmHTXfxJQfvm9tbIKGFuXMkt5LfSslpGg/Vww6T1cwDl+RhOcaEAsd/W/smWGEboBL8H5LJebXvXFBT9kYkUfvXZURLOjFRkTLXSIUHWRAU7uZH+WVJrYK/ojjKun00kAQYQ3nPdNyODGlwydV/qcre9ChYRKOIlXDvvSHEua/dLkmMZ0LQZE1EVdw4j0iNNfeolhNBqMEwKAZklhnGKd+BJeqN210l04ffK2IgOkvwRbZDjuoBaZ3HsnVcu8OsfLTlQk2htS8/mu5VISlwv7ejKBRr5unwKvlgmleRIjw2vs9bcbZDT6/IZrbdWdXBBRfe1yCEZxjqv6eQuFBySa5v3ltnViTGqZaawmdy2hbCoN+Wc5mDUoAxiq5n2XF+wlQUXlW5khp7EGbDSW83Sxokvq+oSzPFFojWg== 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)(1800799024)(36860700013)(82310400026)(376014)(7416014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:30:46.4511 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9eb18fab-72dc-4baa-7acd-08dcb1f37a3f 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: SJ5PEPF00000204.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4270 Split intel generic SoundWire machine driver private data into two structures. One structure is generic one which can be used by other platform machine driver and the other one is intel specific one. Move generic machine driver private data to soc_sdw_utils.h. Define a void pointer in generic machine driver private data structure and assign the vendor specific structure in mc_probe() call. 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 | 10 +++++ sound/soc/intel/boards/sof_sdw.c | 37 ++++++++++++------- sound/soc/intel/boards/sof_sdw_common.h | 8 +--- sound/soc/intel/boards/sof_sdw_cs42l42.c | 2 +- sound/soc/intel/boards/sof_sdw_cs42l43.c | 2 +- sound/soc/intel/boards/sof_sdw_hdmi.c | 14 ++++--- sound/soc/intel/boards/sof_sdw_rt5682.c | 2 +- sound/soc/intel/boards/sof_sdw_rt700.c | 2 +- sound/soc/intel/boards/sof_sdw_rt711.c | 6 +-- sound/soc/intel/boards/sof_sdw_rt_amp.c | 4 +- .../boards/sof_sdw_rt_sdca_jack_common.c | 6 +-- 11 files changed, 55 insertions(+), 38 deletions(-) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 5bc2a89bced4..eb713cdf4079 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -55,6 +55,16 @@ struct asoc_sdw_codec_info { struct snd_soc_codec_conf **codec_conf); }; +struct asoc_sdw_mc_private { + struct snd_soc_card card; + struct snd_soc_jack sdw_headset; + struct device *headset_codec_dev; /* only one headset per card */ + struct device *amp_dev1, *amp_dev2; + bool append_dai_type; + bool ignore_internal_dmic; + void *private; +}; + int asoc_sdw_startup(struct snd_pcm_substream *substream); int asoc_sdw_prepare(struct snd_pcm_substream *substream); int asoc_sdw_prepare(struct snd_pcm_substream *substream); diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index e1d2b744987f..236e3fab66b9 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1319,7 +1319,7 @@ static int parse_sdw_endpoints(struct snd_soc_card *card, int *num_devs) { struct device *dev = card->dev; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_acpi_mach *mach = dev_get_platdata(dev); struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params; const struct snd_soc_acpi_link_adr *adr_link; @@ -1440,7 +1440,8 @@ static int create_sdw_dailink(struct snd_soc_card *card, int *be_id, struct snd_soc_codec_conf **codec_conf) { struct device *dev = card->dev; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private; struct sof_sdw_endpoint *sof_end; int stream; int ret; @@ -1519,7 +1520,7 @@ static int create_sdw_dailink(struct snd_soc_card *card, if (cur_link != sof_end->link_mask) { int link_num = ffs(sof_end->link_mask) - 1; - int pin_num = ctx->sdw_pin_index[link_num]++; + int pin_num = intel_ctx->sdw_pin_index[link_num]++; cur_link = sof_end->link_mask; @@ -1573,11 +1574,12 @@ static int create_sdw_dailinks(struct snd_soc_card *card, struct sof_sdw_dailink *sof_dais, struct snd_soc_codec_conf **codec_conf) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private; int ret, i; for (i = 0; i < SDW_MAX_LINKS; i++) - ctx->sdw_pin_index[i] = SOC_SDW_INTEL_BIDIR_PDI_BASE; + intel_ctx->sdw_pin_index[i] = SOC_SDW_INTEL_BIDIR_PDI_BASE; /* generate DAI links by each sdw link */ while (sof_dais->initialised) { @@ -1665,7 +1667,8 @@ static int create_hdmi_dailinks(struct snd_soc_card *card, int hdmi_num) { struct device *dev = card->dev; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private; int i, ret; for (i = 0; i < hdmi_num; i++) { @@ -1673,7 +1676,7 @@ static int create_hdmi_dailinks(struct snd_soc_card *card, char *cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, "iDisp%d Pin", i + 1); char *codec_name, *codec_dai_name; - if (ctx->hdmi.idisp_codec) { + if (intel_ctx->hdmi.idisp_codec) { codec_name = "ehdaudio0D2"; codec_dai_name = devm_kasprintf(dev, GFP_KERNEL, "intel-hdmi-hifi%d", i + 1); @@ -1721,7 +1724,8 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) struct device *dev = card->dev; struct snd_soc_acpi_mach *mach = dev_get_platdata(card->dev); int sdw_be_num = 0, ssp_num = 0, dmic_num = 0, bt_num = 0; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private; struct snd_soc_acpi_mach_params *mach_params = &mach->mach_params; struct snd_soc_codec_conf *codec_conf; struct asoc_sdw_codec_info *ssp_info; @@ -1773,7 +1777,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) } if (mach_params->codec_mask & IDISP_CODEC_MASK) - ctx->hdmi.idisp_codec = true; + intel_ctx->hdmi.idisp_codec = true; if (sof_sdw_quirk & SOF_SDW_TGL_HDMI) hdmi_num = SOF_TGL_HDMI_COUNT; @@ -1789,7 +1793,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) dev_dbg(dev, "sdw %d, ssp %d, dmic %d, hdmi %d, bt: %d\n", sdw_be_num, ssp_num, dmic_num, - ctx->hdmi.idisp_codec ? hdmi_num : 0, bt_num); + intel_ctx->hdmi.idisp_codec ? hdmi_num : 0, bt_num); codec_conf = devm_kcalloc(dev, num_devs, sizeof(*codec_conf), GFP_KERNEL); if (!codec_conf) { @@ -1862,7 +1866,8 @@ static int sof_card_dai_links_create(struct snd_soc_card *card) static int sof_sdw_card_late_probe(struct snd_soc_card *card) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private; int ret = 0; int i; @@ -1875,7 +1880,7 @@ static int sof_sdw_card_late_probe(struct snd_soc_card *card) } } - if (ctx->hdmi.idisp_codec) + if (intel_ctx->hdmi.idisp_codec) ret = sof_sdw_hdmi_card_late_probe(card); return ret; @@ -1934,16 +1939,22 @@ static int mc_probe(struct platform_device *pdev) { struct snd_soc_acpi_mach *mach = dev_get_platdata(&pdev->dev); struct snd_soc_card *card; - struct mc_private *ctx; + struct asoc_sdw_mc_private *ctx; + struct intel_mc_ctx *intel_ctx; int amp_num = 0, i; int ret; dev_dbg(&pdev->dev, "Entry\n"); + intel_ctx = devm_kzalloc(&pdev->dev, sizeof(*intel_ctx), GFP_KERNEL); + if (!intel_ctx) + return -ENOMEM; + ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); if (!ctx) return -ENOMEM; + ctx->private = intel_ctx; card = &ctx->card; card->dev = &pdev->dev; card->name = "soundwire"; diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index c7672dc1320c..7954472c11bb 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -78,16 +78,10 @@ enum { #define SOC_SDW_DAI_TYPE_AMP 1 #define SOC_SDW_DAI_TYPE_MIC 2 -struct mc_private { - struct snd_soc_card card; - struct snd_soc_jack sdw_headset; +struct intel_mc_ctx { struct sof_hdmi_private hdmi; - struct device *headset_codec_dev; /* only one headset per card */ - struct device *amp_dev1, *amp_dev2; /* To store SDW Pin index for each SoundWire link */ unsigned int sdw_pin_index[SDW_MAX_LINKS]; - bool append_dai_type; - bool ignore_internal_dmic; }; extern unsigned long sof_sdw_quirk; diff --git a/sound/soc/intel/boards/sof_sdw_cs42l42.c b/sound/soc/intel/boards/sof_sdw_cs42l42.c index d28477c50469..3ce2f65f994a 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l42.c +++ b/sound/soc/intel/boards/sof_sdw_cs42l42.c @@ -39,7 +39,7 @@ static struct snd_soc_jack_pin cs42l42_jack_pins[] = { int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_cs42l43.c b/sound/soc/intel/boards/sof_sdw_cs42l43.c index bb371b2649cf..47d05fe7de53 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l43.c +++ b/sound/soc/intel/boards/sof_sdw_cs42l43.c @@ -51,7 +51,7 @@ static struct snd_soc_jack_pin sof_jack_pins[] = { int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; - struct mc_private *ctx = snd_soc_card_get_drvdata(rtd->card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(rtd->card); struct snd_soc_jack *jack = &ctx->sdw_headset; struct snd_soc_card *card = rtd->card; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_hdmi.c b/sound/soc/intel/boards/sof_sdw_hdmi.c index f34fabdf9d93..4084119a9a5f 100644 --- a/sound/soc/intel/boards/sof_sdw_hdmi.c +++ b/sound/soc/intel/boards/sof_sdw_hdmi.c @@ -17,23 +17,25 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd) { - struct mc_private *ctx = snd_soc_card_get_drvdata(rtd->card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(rtd->card); + struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private; struct snd_soc_dai *dai = snd_soc_rtd_to_codec(rtd, 0); - ctx->hdmi.hdmi_comp = dai->component; + intel_ctx->hdmi.hdmi_comp = dai->component; return 0; } int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + struct intel_mc_ctx *intel_ctx = (struct intel_mc_ctx *)ctx->private; - if (!ctx->hdmi.idisp_codec) + if (!intel_ctx->hdmi.idisp_codec) return 0; - if (!ctx->hdmi.hdmi_comp) + if (!intel_ctx->hdmi.hdmi_comp) return -EINVAL; - return hda_dsp_hdmi_build_controls(card, ctx->hdmi.hdmi_comp); + return hda_dsp_hdmi_build_controls(card, intel_ctx->hdmi.hdmi_comp); } diff --git a/sound/soc/intel/boards/sof_sdw_rt5682.c b/sound/soc/intel/boards/sof_sdw_rt5682.c index 3584638e2192..7e52720e0195 100644 --- a/sound/soc/intel/boards/sof_sdw_rt5682.c +++ b/sound/soc/intel/boards/sof_sdw_rt5682.c @@ -38,7 +38,7 @@ static struct snd_soc_jack_pin rt5682_jack_pins[] = { int asoc_sdw_rt5682_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_rt700.c b/sound/soc/intel/boards/sof_sdw_rt700.c index a90d69573736..0abaaeacfd90 100644 --- a/sound/soc/intel/boards/sof_sdw_rt700.c +++ b/sound/soc/intel/boards/sof_sdw_rt700.c @@ -36,7 +36,7 @@ static struct snd_soc_jack_pin rt700_jack_pins[] = { int asoc_sdw_rt700_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_rt711.c b/sound/soc/intel/boards/sof_sdw_rt711.c index e4d300d7d5ef..fb5bc611b5e7 100644 --- a/sound/soc/intel/boards/sof_sdw_rt711.c +++ b/sound/soc/intel/boards/sof_sdw_rt711.c @@ -62,7 +62,7 @@ static struct snd_soc_jack_pin rt711_jack_pins[] = { int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; @@ -113,7 +113,7 @@ int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); if (!ctx->headset_codec_dev) return 0; @@ -129,7 +129,7 @@ int asoc_sdw_rt711_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct device *sdw_dev; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_rt_amp.c b/sound/soc/intel/boards/sof_sdw_rt_amp.c index 4cf392c84cc7..fff746671c1d 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_amp.c +++ b/sound/soc/intel/boards/sof_sdw_rt_amp.c @@ -239,7 +239,7 @@ const struct snd_soc_ops soc_sdw_rt1308_i2s_ops = { int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); if (ctx->amp_dev1) { device_remove_software_node(ctx->amp_dev1); @@ -259,7 +259,7 @@ int asoc_sdw_rt_amp_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct device *sdw_dev1, *sdw_dev2; int ret; diff --git a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c index d84aec2b4c78..8059e483835d 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +++ b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c @@ -86,7 +86,7 @@ static const char * const need_sdca_suffix[] = { int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct snd_soc_component *component; struct snd_soc_jack *jack; int ret; @@ -163,7 +163,7 @@ int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_s int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); if (!ctx->headset_codec_dev) return 0; @@ -183,7 +183,7 @@ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback) { - struct mc_private *ctx = snd_soc_card_get_drvdata(card); + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); struct device *sdw_dev; int ret; From patchwork Thu Aug 1 06:24:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749859 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2088.outbound.protection.outlook.com [40.107.95.88]) (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 405E1158207; Thu, 1 Aug 2024 06:31:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.95.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493878; cv=fail; b=Uhqk2HtEjRH+EM4Vh8WvfsrGqokK4h7EP92Y2ygYr8Rflfovx9O8tpdYLaI9YwaSTbeRiNyTnF5MAu9Ci6wgxK0A49vSI4loxeVTpmgJNffOHucPL/3rMUm2ZFGwYeZ7BnXL6nZiN7n7LbYP06dezDDQE/3QS++mdE3OpOxhXvc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493878; c=relaxed/simple; bh=Yzz8WOg43WeIoUjtkJVapYM27Be74R5TXQtiY0PKNKk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IcGw2nXA+8OOYovrdTNJ3rRY8xBCXcYoSucu9HeWgZQJLO3N4bP1OF1nBx/2AOBrxb8lFytbFm65CJdp+bKx++p3FLfBKOePz0Kyb12kiCe4X+iaXd4HpaYzR5oX2YkxwrdJHHJYHXutIAVi+J9JUSB5mQF7zP12hErr6+CtMj0= 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=S/w+F6TA; arc=fail smtp.client-ip=40.107.95.88 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="S/w+F6TA" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mFQylra7giED9TD4s0EFaCYpO+vOWeEMMfl16DtlAmNckvl3WA9ZjR4M5lTzTrAcz7p5sgwxpBEyLNr2BsCE0H3J1ykp28UpQB0MzKT6m8HWhPlcx7+AQh3aHeptBG3Q1vQkR6nIqtYWA4sV5PYPea8h8vLL/69EMG5ufPGCkd55h5fUSOaQp4qW1YgPlST1ALp9X479Meeo8QJc9FzkNg10dxvmS177ZPQhNmXsH/qHbY8D9bIpO1/BcryPA4QUVby9h2cTPpJYCMxrIJJgYI/ak7ysZXKSsZteBmMW5xEbQL+Ln8lD22ThLRIAzLa3qmi1RFAehVnAkfu4mdqYeg== 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=TEQNTWPPVMKnRZY/fDi8UXvH17SW7US/wuxV0scQNBtBJwU2IDKkdAdggErPCqOsyEcUvNhKJykRTnBd3h9WS4dJUGVPvXKur1eWeBNii7yCC7JZkMIuyTutIdmX8xncBh6P4F39iFaLzFKyIFuUZfDF0qTUh/TeMf6h5J0zn2KyegcQubFz2yDRbYQ7GRkymGvflcOJiPTm65a6th4JuTN/OQzrM1/OhNSnvak5t5vjpa/CbFlh+VPlKepl97HgfOyryB3U/gUvhXGcwhXwu82ybhHM42IAqqdkIh1iag5nM0XSqyk/JNS3iAVaUbArjzzf4yYPAE2Yuutpvv08sw== 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=S/w+F6TAwwiptGmtuqzq2yp1jjpJKfbDPz0CpsUxUQSs3GuIOgV34ytOz2W4VjhaH7179jByR4O7WimO+TZckOvbjFx22C8jhhsj3i2+lg+DU2Sj0ajiewYkSyciITEMPi4aZFUWlvFS3Ih6EBooO2nQTF7FowoJfWiyjF9TA34= Received: from DS7PR03CA0264.namprd03.prod.outlook.com (2603:10b6:5:3b3::29) by BY5PR12MB4098.namprd12.prod.outlook.com (2603:10b6:a03:205::8) 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 06:31:14 +0000 Received: from DS1PEPF00017093.namprd03.prod.outlook.com (2603:10b6:5:3b3:cafe::66) by DS7PR03CA0264.outlook.office365.com (2603:10b6:5:3b3::29) 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 06:31:14 +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 DS1PEPF00017093.mail.protection.outlook.com (10.167.17.136) 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 06:31:13 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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 01:31:10 -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 01:31:04 -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 , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "open list" Subject: [PATCH 15/31] ASoC: intel/sdw_utils: move rt5682 codec helper function Date: Thu, 1 Aug 2024 11:54:00 +0530 Message-ID: <20240801062416.2203673-16-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017093:EE_|BY5PR12MB4098:EE_ X-MS-Office365-Filtering-Correlation-Id: d562e3b0-f1e0-4c5d-7912-08dcb1f38a99 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: iwP571J6q7VWWiUMqfzQg10Y5+8mutr9AlFncOEgWsC6SL6zY6ZtfnYHYXNoyrzclmdsDa1r7ggDieyaSWuRoauecrvaZephWe+GkPp2NjPajL+JPNyIfevYx8xpzqjWb+4LO/fGUBrut23RVw/Hzx1EocY/EKX6g692OIpnKFVH05T6o1T78qvhnUJbd22CdV3Llw9sewsQwBDnBe6KcWTOt7pfJx5zbo8GmshwF1UBNUyUvx6wWJr4+HjKSre9kJjrYVaeaupbeYZ2bZ2NNiOoUkryipEWl0DVX9XaUrkHf3ECalcACOTcjstwOwX91kzEin5pPswl48vuCg2uHgoeu+d+U9Zd7BZXc56skZGcxtPypq+tNF6c8GRQWkFgbm52LuNku7sbdHzBvmDT5ED1ZhrnX6aF8lRnALEm5Ahdv3vA7xrXr6FQUs76vq1pqHViFhMsTV9f/kh1oaoiWvO4SnB/M23YeobzjLGQKogCkY7sCit+Q8AxqJCzhXwherb1+lf6vREBYMQITp9nrYjsXs8zXKYADlkR/68i0Yj2Bs205HAnXZbcRJ4DDoD4EeeQDTRWoc/xlGtaJAqr4Ggw45UaZbBgMBhkXJexf65aAch2bEKm17eMI56QSm9HLlfkdLFpLisoVMK4waMW1XMYATeXRin6fF8b5my8B/lpT8Rtfs9b+JS8Zs66pR4RFgZlrI6AQEWFoqJm1wBgYAjIh/9DexTw9FaYWTC4FPc1Py8EdbkqY+aKYB+7x4QUyeP3wu3t3JRs/l1JmYxTiAsKDV9Gislr2JDqhshHRGu8eRPLH6agbzDfynHDuA641mrE40OSTD/La7fz1pfZ3L5oDxQyI0+6gWnPSfcsw4sdTuvxpANiDvYGGp0lX+jFwe/z9yLXAtrbw54SFrO89WvQp31dWHGAGx3fdCiH/NLvjP9CQzB7aTbUxtBBAooSU0axZ1ycjavrzWi7XBqd23EO7R1zqicpqONWGj2YnleHJC5RLHrsD737X2GpJM1E6Z8MGTHCO56FvreEQFOg692Ry0Lz1n4a+myHsoDO2WAkVbRkqSk7UmRHfEHUqpj+Mvx3C/7xrtbc/6VVp2jr8pT720LKT9IU5UE7xSXxjKWjb7kIMMnD1jhTzZKByNSzueAEmpWtaOYPJd534R/Fw8syvMjPlgZKhMBTmr1t9rTaf4qlfDV8wXOhUvOSJjNyfqV7FkVCFpKE6ONv6N7ZEtweNgbbiTV4ioFkyM4+IN757AVdxj7g9Grl5elthKLkxaNwqXebCUezlY5qYOQYVSWrRlByWFmQIb9kChiY6FeeD7onOkeKNdUh1t+g8WgygX2fkPobTMowB1IQQEQXfkXL6wGkKuQJtMCGcz3CG4mdQK4kjjOlwPLaLZbWEXh/ 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)(36860700013)(82310400026)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:31:13.9157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d562e3b0-f1e0-4c5d-7912-08dcb1f38a99 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: DS1PEPF00017093.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4098 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); From patchwork Thu Aug 1 06:24:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749860 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48]) (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 308B815748A; Thu, 1 Aug 2024 06:31:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493906; cv=fail; b=CyAef3rw5Uh2nRR9FUBk6zuK4ENcUTaOZPWUXBpCRJfSu7mh5SVq8cw6ZM7h7pt6LaR5mLqMfF+CxVpMG/44tFNpFTMVAs4q93TVcOtGiXXKeOXeZYcxtCipvXPB/w/cLhogYu/tFhTKK7+luC/34E0dkJ+DsXZn5nN34cYA8FY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493906; c=relaxed/simple; bh=BIFI18q4ByQH2ewrJK/kJ4FJ3bbVKAwu989UsVKHreg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GNZBHH7Qt2jg42OLtVUGcWu6x7nL9ole+DkZwTe4RcxNrSqzSDmqKOoGlzRMD1RzI4OYdI6Gm6Sh++FSTAucMo9ftowxMlMkt4tB2qEtiVnJ8Vt/H5EccrRNcwiLy0Na6UcBSwd2IIJO7ZRNS+OeEedC7CMk3bbdXlwvjBIk27s= 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=2uzqDs3F; arc=fail smtp.client-ip=40.107.244.48 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="2uzqDs3F" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vvnGz2DZpv2FJ1uO2h2tw3w5m8NzWpBrahPDsTXfdzjBpEorAM0Ej1lnHTYAa4CV5XW+mN8CnMFFuonJaN5j0+K+KvhhSd8uSf1RgYodm/F+GswO4iGJj4A76yTRtCCL3lGN0pIMpqmjWih5ad5hSlBLztBVOHX47DPCk5uQ5GnABKa64xxU/5lIxoWLsLqlVMuG9itdb8pE7aJnObnqr9yd4hAaBMyX3g8URxtCvtbax3JuqD0reX83EEJfjfJzCVRn6E+ZoMMULCOgY5du380gZlTkkFtWat+kjz62S3k31ogE4rjEqf7acoSpHBIi6SUlrP6l040yLIoxaV+oxg== 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=o8eb6F6KXiovGQZ5qK0hVz3A8v39vgjsYiTEqUy9guY=; b=T4Wi9Exu2OTNXALDu9mjghwOCXAhVTTIIpCeu5bSZbpTBlodg4u9am9VPhWdpB7us8vv9HGSAIsPEM51EKWSvgvkCplmmZdCegEDpedjQR7OUw7BKqHAC6VpwKatFZJHPOBbeTf3tSKg3rMt1mnEkgPr7trBGJv+jxNy0swvYJiNnIjP/12mAauDQylKCxUtGZ8RWl14AglszRqI5j4MlJjaM93KSwpZ3EnIfzUBdGrPhWv+mNxwbzsQp+c8wUBSpmSNxWAICXCANooF4C+mgtgF+Hof7BZ2yAe6rL4YhfNuJF/6CsYs0TeeLjw01UE3XfNT1wEIAAYXNOctGFMoCg== 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=o8eb6F6KXiovGQZ5qK0hVz3A8v39vgjsYiTEqUy9guY=; b=2uzqDs3FS0X8wPqNMBTMPphSMZB9kP1rv0DQKbA4w73S6KtAhN9+Hd1maPY93UjQAQ+FqarZwsANQGqyPxr/IpQrOp6aTV3KkEEBWiq3SyYStvhWcUkMTb2NziQHIsNRrLN8VXgdCJGXTTTHYZ0fZdVTx9NJH8qgDRsixCkHq80= Received: from DM6PR08CA0064.namprd08.prod.outlook.com (2603:10b6:5:1e0::38) by SN7PR12MB6715.namprd12.prod.outlook.com (2603:10b6:806:271::19) 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 06:31:40 +0000 Received: from DS1PEPF00017092.namprd03.prod.outlook.com (2603:10b6:5:1e0:cafe::73) by DM6PR08CA0064.outlook.office365.com (2603:10b6:5:1e0::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.22 via Frontend Transport; Thu, 1 Aug 2024 06:31:40 +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 DS1PEPF00017092.mail.protection.outlook.com (10.167.17.135) 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 06:31:40 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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 01:31:39 -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 01:31:33 -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 16/31] ASoC: intel/sdw_utils: move rtk jack common helper functions Date: Thu, 1 Aug 2024 11:54:01 +0530 Message-ID: <20240801062416.2203673-17-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017092:EE_|SN7PR12MB6715:EE_ X-MS-Office365-Filtering-Correlation-Id: a63ee296-b03d-422c-9c18-08dcb1f39a4a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|376014|7416014; X-Microsoft-Antispam-Message-Info: qaf6D30zU/vcWbbsDDeETcw4lIQ23zTEQnwMdibqYYTaO+ckgdu4QKR1v+FlEpDaWdz1jOFOrWoQEnibdKKiiIXXMUSAsZWLkP02y/Sj4ODXSjlkteOeft4xo1xGnk4Cgq9Avbo+UusjbhgfMDWXOihNlLh6S2W4w4mOwdQXNP3dO/Jr3VcREO97B8WSH7IykVuUxnodBKHYKwSYiaVUB9HZUJR0MygsIVoenEaeBjqVJcJ0GV4ePoS3pa5T3BIygS5rcbxkuaHKCaFUIRyZ+X34rBKTGUSKKgYPOoZyvWKyxq8tRKgOvrxl3EvqUbx+2G1kw6IhXgTtXTu0RgaMu7tSNAiV2tXjhCPAnr0McN31GAdwGCOzi7Oh4bLcn6+2P2b8DRJQDxNyv9vjgvyOvI7Xc0UKY3oKaPf/vmdDdFBpYsYe98sVlnLp8+NRLT99I75BFjOI1MR2CACoAIn6JadCvaVt0TI+7CcGLfC4n3wk86vaiDTjcWrWOMuTBqNvleiC1XqDLTM0bDC34qH6riF70uOqJdaO57jV6d+Y+C1avI2ThJ0dpF7jffv9Tcq4qhsrSYE1/0B8OU5GQf+VwQlEa18ZgqMhqqQCzm2jEhROe+ySrk+NfCaiZLbBn3aPggKh3P3NFY1jcIpxufA9ukHPikl9W4lLBi8yvutof+MPzOmqt8qqFQ6BZ+xnsMqjWN//O6eHTRCWDncVrtx1YhPi1YqLLFkf3M4oIHlTHx5sjcAUd5oKgBm3WOoy7MbPuaSMyVswDjlTLm4b7MxkPBd5+FK5PNSRaWmDkCgY0MgHDZ7kJ51g2ohz1CVXklTy4ox72nNfwBgjtVLDtgRh4/B8nwAZo0EV+2m5DMklSH7Ppw42z1+W4tCaYnBlSpWZrfNW6sbffOmNdb1oWK8GiUPju5cGyj22VR96TSp5UzmSTUaPyNb2heOGHp0pLqb8+nJXq55sxvqFtblEalTJxrFaB1mfZJoh1NUr5wOjlpnNIzE2DeHliJn6NQcOjv0JRB1Zzy5mbMUTPIwUUObWc2JYhRSfktqynGu5K92g/a4y9bMLieKn3Kvc+iIyoC8JhyMp5Mk8Dv47joLHyKVAtRgKKYqxRz5yVRMV9HJIq5YyvSM4s8EwsPkkHqxMZOe5XDSMW0OozakinMl7ViePiO7SklNRh70XjqCAoR2qJ4eFcyissbAOhUrXu77oq1/XNGxPu3alDtKZcSqdZg+gd+z6tSS67sM/icj29nBjZItPnjSYDWqG7lMBkOhlNoLjLavHUKsPIUYnbEwlCxwbWiFHH+PABK4zgCJ6qV1DKyrP8grsEES1lbIjvGkypR+yObXSW6fBo1rPPjLiuG6niQ9LTiTRpDVQ2MwLPLksd1P4Dj3BVG4lCzNTZFcghqh4uc7tS6MqTnMDgx2gyw2jeQ== 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)(36860700013)(82310400026)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:31:40.2424 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a63ee296-b03d-422c-9c18-08dcb1f39a4a 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: DS1PEPF00017092.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6715 Move RTK codec jack common helper functions to common place holder (sdw_utils folder) to make it generic so that it will be used by other platform machine driver code. 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 | 11 ++++++++++ sound/soc/intel/boards/Makefile | 1 - sound/soc/intel/boards/sof_sdw.c | 1 + sound/soc/intel/boards/sof_sdw_common.h | 10 ---------- sound/soc/sdw_utils/Makefile | 2 +- .../soc_sdw_rt_sdca_jack_common.c} | 20 +++++++++++-------- 6 files changed, 25 insertions(+), 20 deletions(-) rename sound/soc/{intel/boards/sof_sdw_rt_sdca_jack_common.c => sdw_utils/soc_sdw_rt_sdca_jack_common.c} (90%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index ed97d78336da..6b6bab8d3310 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -13,6 +13,8 @@ #include #define SOC_SDW_MAX_DAI_NUM 8 +#define SOC_SDW_MAX_NO_PROPS 2 +#define SOC_SDW_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) struct asoc_sdw_codec_info; @@ -63,6 +65,7 @@ struct asoc_sdw_mc_private { bool append_dai_type; bool ignore_internal_dmic; void *private; + unsigned long mc_quirk; }; int asoc_sdw_startup(struct snd_pcm_substream *substream); @@ -82,8 +85,16 @@ const char *asoc_sdw_get_codec_name(struct device *dev, /* DMIC support */ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); +/* RT711-SDCA support */ +int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); +int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); + /* dai_link init callbacks */ int asoc_sdw_rt_dmic_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); 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); diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index 80c33e4b4cfe..0f1b2c288162 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -38,7 +38,6 @@ snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_maxim.o sof_sdw_rt_amp.o \ bridge_cs35l56.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.c b/sound/soc/intel/boards/sof_sdw.c index 236e3fab66b9..e310843974a7 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1973,6 +1973,7 @@ static int mc_probe(struct platform_device *pdev) log_quirks(card->dev); + ctx->mc_quirk = sof_sdw_quirk; /* reset amp_num to ensure amp_num++ starts from 0 in each probe */ for (i = 0; i < ARRAY_SIZE(codec_info_list); i++) codec_info_list[i].amp_num = 0; diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index bbd09698c69d..af656716c9d2 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -15,7 +15,6 @@ #include #include "sof_hdmi_common.h" -#define SOC_SDW_MAX_NO_PROPS 2 #define MAX_HDMI_NUM 4 #define SOC_SDW_UNUSED_DAI_ID -1 #define SOC_SDW_JACK_OUT_DAI_ID 0 @@ -45,7 +44,6 @@ enum { SOF_I2S_SSP5 = BIT(5), }; -#define SOC_SDW_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) /* Deprecated and no longer supported by the code */ #define SOC_SDW_FOUR_SPK BIT(4) #define SOF_SDW_TGL_HDMI BIT(5) @@ -98,13 +96,6 @@ int asoc_sdw_rt711_init(struct snd_soc_card *card, bool playback); int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); -/* RT711-SDCA support */ -int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); -int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); - /* RT1308 I2S support */ extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops; @@ -154,6 +145,5 @@ int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_ 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); -int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); #endif diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile index fea2b6ae6975..68b8fddeb77e 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -1,5 +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_rt5682.o + soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c b/sound/soc/sdw_utils/soc_sdw_rt_sdca_jack_common.c similarity index 90% rename from sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c rename to sound/soc/sdw_utils/soc_sdw_rt_sdca_jack_common.c index 8059e483835d..3e6211dc1599 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +++ b/sound/soc/sdw_utils/soc_sdw_rt_sdca_jack_common.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_rt711_sdca - Helpers to handle RT711-SDCA from generic machine driver + * soc_sdw_rt711_sdca - Helpers to handle RT711-SDCA from generic machine driver */ #include @@ -15,22 +17,22 @@ #include #include #include -#include "sof_sdw_common.h" +#include /* * Note this MUST be called before snd_soc_register_card(), so that the props * are in place before the codec component driver's probe function parses them. */ -static int rt_sdca_jack_add_codec_device_props(struct device *sdw_dev) +static int rt_sdca_jack_add_codec_device_props(struct device *sdw_dev, unsigned long quirk) { struct property_entry props[SOC_SDW_MAX_NO_PROPS] = {}; struct fwnode_handle *fwnode; int ret; - if (!SOC_SDW_JACK_JDSRC(sof_sdw_quirk)) + if (!SOC_SDW_JACK_JDSRC(quirk)) return 0; - props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOC_SDW_JACK_JDSRC(sof_sdw_quirk)); + props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOC_SDW_JACK_JDSRC(quirk)); fwnode = fwnode_create_software_node(props, NULL); if (IS_ERR(fwnode)) @@ -160,6 +162,7 @@ int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_s return ret; } +EXPORT_SYMBOL_NS(asoc_sdw_rt_sdca_jack_rtd_init, SND_SOC_SDW_UTILS); int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { @@ -168,7 +171,7 @@ int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_lin if (!ctx->headset_codec_dev) return 0; - if (!SOC_SDW_JACK_JDSRC(sof_sdw_quirk)) + if (!SOC_SDW_JACK_JDSRC(ctx->mc_quirk)) return 0; device_remove_software_node(ctx->headset_codec_dev); @@ -177,6 +180,7 @@ int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_lin return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_rt_sdca_jack_exit, SND_SOC_SDW_UTILS); int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, @@ -198,7 +202,7 @@ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, if (!sdw_dev) return -EPROBE_DEFER; - ret = rt_sdca_jack_add_codec_device_props(sdw_dev); + ret = rt_sdca_jack_add_codec_device_props(sdw_dev, ctx->mc_quirk); if (ret < 0) { put_device(sdw_dev); return ret; @@ -207,4 +211,4 @@ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, return 0; } -MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); +EXPORT_SYMBOL_NS(asoc_sdw_rt_sdca_jack_init, SND_SOC_SDW_UTILS); From patchwork Thu Aug 1 06:24:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749861 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2079.outbound.protection.outlook.com [40.107.94.79]) (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 AE50F15747D; Thu, 1 Aug 2024 06:32:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493939; cv=fail; b=BpHb83rqmPD4e1HgDxZWFMW4cFt9HbhCqmG3WZF3ChgrC80BBXFRgKyah6oatSVSJOjCFoFbgVTpq69z4xwO1fgKXtQeY2kAYXXyQDgUaRhhJaE+/wQPJeeXbamQWWYLxPyK5fUqQXkVbZHMpboYKdWAlELJBA6V/hCwxqEqSl0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493939; c=relaxed/simple; bh=ouY1nxnfjw9PexoiCybB7uIlzM1I8yJ48mTNr9sxP/s=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UZZ/qpvEmKZQ1qI4IU2Pi3mC/E+iQJu4bz+jWwAfK23IRu1wUzeh4lTdKxWNa+0vJFKi9gpL7hHLA6Gbk5CCZhvzH6a9H4f6O9eG9/82tCDFCUto5yYJcl4vhl8JL9LY/2qWcmfN3vTh4/5bI1AxIkew6zNAiSupRFgsscfAioU= 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=JuOxiCAI; arc=fail smtp.client-ip=40.107.94.79 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="JuOxiCAI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iB5x7oTLJOzHUGQlmFmhDwTHy+h2m0s43K+y4D7K9Z2mMZQyjoN75qXfbvlyeyoZmg50J5pBDpnN8UjZw6BQVBIn04p2IWTCY20+ulbYa8kCFufNwin0077SSbRT4MJU1FWrKf7uw5ukkGzJeS9uUAauPiFtoDDZed2LtQIn5Nmxuq6q9+9897kcgEamI+PT1vMbFunrfep84Wxf28iR1G540JXbxw4WM36Jx5hgy3U9Uc7zz0n+bQRsfU9VRo78TUkuXQT33rTb/HSMBwh/LGDCem6XFaG52NsQH3yPId0deqV+l8oeQDngxtjm3w42xEYnTscXs2Ylh300Q+FPlg== 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=m1oVuq3hwPFTWMdqa0cdEAyN9Tqh9cP8L5UQI44VQus=; b=Kt9eOqV6ztUE48zjIOJurdMOpfmrmQqXI+fYDo2owEiv60dVHVxsp6LTnq6GbAfI1rsSoFs+LZNWCzGcU/Da2V3lHCYoazAvNPIQGi0zv/vTyNInmbM2YKLBd/JGLFVJ6DBwka0AwVhTbA2gJmYC/9sBG+IX8htkM5/gnasJJmHcytLoVZaEq03+/whEZGx/YxpvRu5bGhP6Jk882/1Mt5GQr836dk696kk8mH+78lrAQ/xveYnXzDQbQKdnHRPe2s9MAJ+kJlK6bK5KZRbXNkF9J0ET6DMP29iARbo2DVuAdEXzDFAZIf3SUiZnA1HqK3RfWjNXZAjc4nhNBJXwCg== 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=m1oVuq3hwPFTWMdqa0cdEAyN9Tqh9cP8L5UQI44VQus=; b=JuOxiCAIRoWBAteACbqH3F8/ppw/i4QLJLBf15+XTJ7nPqLe67H7Mh8269zoWAqHIanH+NzpU/y7fuao5Tc0H/IU9XJgnUf8a4xjF3HVTaW5jc6bBUd5uwjhV2J9I6I3vMhA2AJF6xi6fKBe5mv6vUpI9Z0InzMNy6PEQ91o4Vg= Received: from BY3PR05CA0037.namprd05.prod.outlook.com (2603:10b6:a03:39b::12) by SA1PR12MB5615.namprd12.prod.outlook.com (2603:10b6:806:229::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Thu, 1 Aug 2024 06:32:14 +0000 Received: from CO1PEPF000075EE.namprd03.prod.outlook.com (2603:10b6:a03:39b:cafe::63) by BY3PR05CA0037.outlook.office365.com (2603:10b6:a03:39b::12) 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 06:32:14 +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 CO1PEPF000075EE.mail.protection.outlook.com (10.167.249.37) 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 06:32:13 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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 01:32:12 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) 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 01:32:12 -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 01:32:06 -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 17/31] ASoC: intel/sdw_utils: move rt700 and rt711 codec helper functions Date: Thu, 1 Aug 2024 11:54:02 +0530 Message-ID: <20240801062416.2203673-18-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB05.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000075EE:EE_|SA1PR12MB5615:EE_ X-MS-Office365-Filtering-Correlation-Id: f63c6a2f-91ff-490c-24dc-08dcb1f3ae45 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|7416014|1800799024; X-Microsoft-Antispam-Message-Info: Jyxdmw536gCFxMLNq1AUPNpay3nLscfdHR27Lad5nwfpUuf7gQdt3FtWtT/EHZn+QtoGdeWrM+wIp3PcSJx+/U4toV9x7eL+XkRAf7hYOj+EM76wp+SOph9idNefvOtukRIRouRWgBuQqR1OW9RQvt0VN8rO0vlxASxUU1z2DpTq0IrCS4hku3Tg5wAAyq1oFQ8iV/EKj1CZgVPJfPuWMgSE0hd4JYzXgqfN2NOGifEjdQk3SwPOSYsPc8roTCxk09nQChaEKdMivy2xk/s5QkCjNtGvrSFlHSvKpQ7qVaxvCdP2X4e8ERZyviFQwNgnNSXw/QEBQg+tF1IuDuItDsYK+S8RyPIBVaxbX16vSgo/xp9jr4ZC3jlUwoeqdkldrbptsmGVcebtBrKPi5VZBWRWoJyqXdwpGIuHjtgnkD1lsoieGucXHbKB7wzf+Q1Ld1ABpWCtph8dVSFIjzNvzA0WWxdQ7W3D+trLq2sktqK1P0oxYwhHJ1aFdL3MsNTs1Kc4cdoHu12W3wROopa0QJBs4NnbATRrgfuMbtfdO4ziWTeueEaB6TSI+j8mU8yNHa1SQTA80y41C27V4Xo82NT6lKhaF/FOfC1VDMQGf/YAGlHFfKshQGoP1HQD4BV3aOp6o5FHwn3yhMZQig2kyJKtkJYDeBFCu12IadMsIRUrMFq94uxaxvD6nXcTOFDzmNHrSus3fYxtq53N4aUzoAtgOlvYdmWIwk5iMkZzNMNXc5adtAHlUKyFi5cTPopBWgLpv2BROnfSRr2yNvL7Nkee6pE7pIjS2YvGKf5h9qTOkIpRi3dz/lC0yllfYGcRV+/N1OkdbSP0VpPC3Mftb0bgAQ5uZkiobb0rEvqVRg5TUAjP3ACUrKhrFKqRTDZkDMUKnh8xjpbXwG1qUYbCMaG9a6uG2ZVLxOmoRv/kZYr9pf4Ayz1qvPuUpGnHlpWJc9yxroc4sy3IwrItS2Lb5meJ6vB8ww99DRsm9V6kKsp8T4dWFwP6lnzIBj/RzvzLimm2hUliBl5DGuiZxaRi8pNbVpq5q/SeubuDnAgOVNgUISh3xgeLkau07mSs21TS4qqLEj7vy4iaRKgRq4qScek+yx4Y4Sy+YJbfInAegcGsNLeTsnD9X9GI/oct1GQhHvDtYIuSHttjXI5yQmwRgW4v96aYD6WIIEwajAD6Zid4gVJod7LzHIqaOHktgiDjtY0uta0//olSVQjC9h/T16YPdBntMh+6HLktLKXh9APIiYctgDtLpIHv1R9ArHSYIoVv1UdUv9Vkz0m5O3bEGMqn8mlr16CiYujmi8XtUpUad2diwduBu45RcW7XpEslrbuLwu/aSB/J86sXuO4whhrmdDUwFNl3ivPiUwqFj2p3kMo4NALojweWX8c83UrP 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)(376014)(36860700013)(82310400026)(7416014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:32:13.6829 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f63c6a2f-91ff-490c-24dc-08dcb1f3ae45 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: CO1PEPF000075EE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB5615 Move RT700 and RT711 Soundwire codec helper functions to common place holder so that it can be used by other platform machine driver. 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 | 9 +++++++++ sound/soc/intel/boards/Makefile | 1 - sound/soc/intel/boards/sof_sdw_common.h | 9 --------- sound/soc/sdw_utils/Makefile | 1 + .../soc_sdw_rt700.c} | 8 +++++--- .../soc_sdw_rt711.c} | 18 +++++++++++------- 6 files changed, 26 insertions(+), 20 deletions(-) rename sound/soc/{intel/boards/sof_sdw_rt700.c => sdw_utils/soc_sdw_rt700.c} (88%) rename sound/soc/{intel/boards/sof_sdw_rt711.c => sdw_utils/soc_sdw_rt711.c} (85%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 6b6bab8d3310..3e55cac33176 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -85,6 +85,13 @@ const char *asoc_sdw_get_codec_name(struct device *dev, /* DMIC support */ int asoc_sdw_dmic_init(struct snd_soc_pcm_runtime *rtd); +/* RT711 support */ +int asoc_sdw_rt711_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); +int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); + /* RT711-SDCA support */ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, @@ -95,6 +102,8 @@ int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_lin /* dai_link init callbacks */ int asoc_sdw_rt_dmic_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); +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_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); diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index 0f1b2c288162..9f92f49cc517 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -37,7 +37,6 @@ 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_rt700.o sof_sdw_rt711.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 af656716c9d2..1d7e6df02247 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -89,13 +89,6 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd); int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card); -/* RT711 support */ -int asoc_sdw_rt711_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); -int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); - /* RT1308 I2S support */ extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops; @@ -142,8 +135,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_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); #endif diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile index 68b8fddeb77e..20516094f453 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -1,5 +1,6 @@ # 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_rt700.o soc_sdw_rt711.o \ soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_rt700.c b/sound/soc/sdw_utils/soc_sdw_rt700.c similarity index 88% rename from sound/soc/intel/boards/sof_sdw_rt700.c rename to sound/soc/sdw_utils/soc_sdw_rt700.c index 0abaaeacfd90..4dbeeeca3434 100644 --- a/sound/soc/intel/boards/sof_sdw_rt700.c +++ b/sound/soc/sdw_utils/soc_sdw_rt700.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_rt700 - Helpers to handle RT700 from generic machine driver + * soc_sdw_rt700 - Helpers to handle RT700 from generic machine driver */ #include @@ -13,7 +15,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include static const struct snd_soc_dapm_route rt700_map[] = { /* Headphones */ @@ -83,4 +85,4 @@ int asoc_sdw_rt700_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_rt700_rtd_init, SND_SOC_SDW_UTILS); diff --git a/sound/soc/intel/boards/sof_sdw_rt711.c b/sound/soc/sdw_utils/soc_sdw_rt711.c similarity index 85% rename from sound/soc/intel/boards/sof_sdw_rt711.c rename to sound/soc/sdw_utils/soc_sdw_rt711.c index fb5bc611b5e7..38b4126dd45f 100644 --- a/sound/soc/intel/boards/sof_sdw_rt711.c +++ b/sound/soc/sdw_utils/soc_sdw_rt711.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_rt711 - Helpers to handle RT711 from generic machine driver + * soc_sdw_rt711 - Helpers to handle RT711 from generic machine driver */ #include @@ -15,21 +17,21 @@ #include #include #include -#include "sof_sdw_common.h" +#include /* * Note this MUST be called before snd_soc_register_card(), so that the props * are in place before the codec component driver's probe function parses them. */ -static int rt711_add_codec_device_props(struct device *sdw_dev) +static int rt711_add_codec_device_props(struct device *sdw_dev, unsigned long quirk) { struct property_entry props[SOC_SDW_MAX_NO_PROPS] = {}; struct fwnode_handle *fwnode; int ret; - if (!SOC_SDW_JACK_JDSRC(sof_sdw_quirk)) + if (!SOC_SDW_JACK_JDSRC(quirk)) return 0; - props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOC_SDW_JACK_JDSRC(sof_sdw_quirk)); + props[0] = PROPERTY_ENTRY_U32("realtek,jd-src", SOC_SDW_JACK_JDSRC(quirk)); fwnode = fwnode_create_software_node(props, NULL); if (IS_ERR(fwnode)) @@ -110,6 +112,7 @@ int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai return ret; } +EXPORT_SYMBOL_NS(asoc_sdw_rt711_rtd_init, SND_SOC_SDW_UTILS); int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { @@ -123,6 +126,7 @@ int asoc_sdw_rt711_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_ return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_rt711_exit, SND_SOC_SDW_UTILS); int asoc_sdw_rt711_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, @@ -144,7 +148,7 @@ int asoc_sdw_rt711_init(struct snd_soc_card *card, if (!sdw_dev) return -EPROBE_DEFER; - ret = rt711_add_codec_device_props(sdw_dev); + ret = rt711_add_codec_device_props(sdw_dev, ctx->mc_quirk); if (ret < 0) { put_device(sdw_dev); return ret; @@ -153,4 +157,4 @@ int asoc_sdw_rt711_init(struct snd_soc_card *card, return 0; } -MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); +EXPORT_SYMBOL_NS(asoc_sdw_rt711_init, SND_SOC_SDW_UTILS); From patchwork Thu Aug 1 06:24:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749862 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2061.outbound.protection.outlook.com [40.107.212.61]) (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 3B51D15748A; Thu, 1 Aug 2024 06:32:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493974; cv=fail; b=q99FFqvwoyOAXMAHLiz3d7iaXJs3mdelbzxxbYlr+wPQfJcyc46iVi9b/E5JQI7r1X0t9/oK7S3wj+XNDvnzhPs/c47eQ/noNP+hGO3qTAuO0tz4zzoPjqdkw9wXWiKt2YmLt/57whhLNGIDpRq8HHuitJ8qQLLMt/rczWHQ4HE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722493974; c=relaxed/simple; bh=mO7YQ+kpTp1+yWnA682z7NdxMzu/Rh2XK0nHxXaUbVI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lG4yr/+0hbjPWiz+N+1I1QPCrwLpjeXLvLZPzxnCDkDDFfZiN91rsUaSKp9z0edEQAtUbkdJQu6h9XF6OfcfH6nCKqG+5zDcN4uOnTOu5bWO+j5YbzaYBfHh/Oqb++mnsVjTjTnkpgjcDMjkfL6UySyVv2ScqIucKZHnxFoc08o= 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=lU4X4Mzv; arc=fail smtp.client-ip=40.107.212.61 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="lU4X4Mzv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JH5OzYT8HFDxnHYQLJL5CO3ypneD+nFzGtXlyNhO+SQPH1tdB2V6LOwjGoe2WBvarllRTjS0jzDnZtdjAZJu3AKmWCnFSJ9vpnCA6NlX/A2ZI/BN5d7sauoTPUZItFS8pnbQf+l0zSPXNGh1ID0PIXiUDU1RJa+QO/EXWw8CvNyEqUdZx9vEgtNZeUCP6Yfc3nyCJX/DJBo8xauFJc0z0tUMyEtZ9dQ0/w66TFwIxZQMJuht5gfNy9Vs29KdUdZY3WjsESHSJCrf0Uf61av7ABSoJAURb71/t1J7gq+2logiHVvj08k+L6G2fY7WkLsaRkuUJoNdJGcCRC9Xjxz47g== 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=qbozI4ddjgSv9+7bNOMeGoYJHbEvkkiHespHtCIOw/0=; b=Rkx7HdeOs9DGpPigWjuAoS8qU6m/V3p3DC1ouBZBWzoHTDEUqM1MiCitzbb8H9zCW8MbQ3FrWsLFHjpQOwErGdHky7BdTmnnINYePNTtXCQEEZbAGue4T0TSXKbcXidGcn7an/oCArKq9R7M53GgAdl5aKT0ZJvzSLV8lH2lakTXl8ZIqp7CG5wfhSrWcdCaN5f+mz+9pCAjLeljMk5Xat3ZEvzx6Ls6eiqcE1bBhOm4P3sEiNwVnna8QJ/NjTUuKIf2AcXSQJw/vXMbnbPJiEdfQFu4dpEAH5LJIlp3PQoc9t2kLJPse01Eyhz5NAykMVl1Nl3GoM930rYpz19vmA== 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=qbozI4ddjgSv9+7bNOMeGoYJHbEvkkiHespHtCIOw/0=; b=lU4X4Mzv5B7lmKUzIdzc6Haanfh9Ld2t8n3yNmwjlsvoLRZv3Yu1Ai5kRSczsjhgKr3DxJInjo7DE3GBN52FYWwkY3EuBUiYQY7wGzTIeLW/lwF9Yf3bsxEhg3dgA5HrHycPmz07HyAf58BlV6xRAC6Kd28m4nPkvOvDpZQ4eMU= Received: from MW4PR04CA0060.namprd04.prod.outlook.com (2603:10b6:303:6a::35) by PH8PR12MB7253.namprd12.prod.outlook.com (2603:10b6:510:226::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.28; Thu, 1 Aug 2024 06:32:48 +0000 Received: from CO1PEPF000075ED.namprd03.prod.outlook.com (2603:10b6:303:6a:cafe::dd) by MW4PR04CA0060.outlook.office365.com (2603:10b6:303:6a::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.22 via Frontend Transport; Thu, 1 Aug 2024 06:32:47 +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 CO1PEPF000075ED.mail.protection.outlook.com (10.167.249.36) 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 06:32:47 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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 01:32:46 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB05.amd.com (10.181.40.146) 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 01:32:46 -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 01:32:39 -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 , Christophe JAILLET , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 18/31] ASoC: intel/sdw_utils: move rtk amp codec helper functions Date: Thu, 1 Aug 2024 11:54:03 +0530 Message-ID: <20240801062416.2203673-19-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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 (SATLEXMB05.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000075ED:EE_|PH8PR12MB7253:EE_ X-MS-Office365-Filtering-Correlation-Id: 0da937cc-34b4-4022-bbee-08dcb1f3c279 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|376014|7416014|82310400026; X-Microsoft-Antispam-Message-Info: Jvlkt7w9HqDpheUF4CNxc1ai1WKBO+EPGK+3o0o+jftbdBT3zoUAtI6Vz5l3878i2EhnXEMH8pMJz1fWk6arjFe+V6Yby+1KA72aR19C0gECNaucLrT7G5YzIFz30Gq5b3swk6fCegqtpegfKtDyNWGiCK0ibeNydzpyzhSleYrA/UinF6hb/B70LJCQakzks7u96md7oy2XwV9+CTnJME8k/LBrqHBoUSfeqaA28Slz0fjFDzHF4k43rrZuhjVcF702YazUWmCdOVYelT2wQw45vAALxBXe9qhjPvRF+JTmBRgXT6G9clg4Twci0hgYVwhYTWWTCdl+LK0GntmnowNWYRl1RVYrfbUnrtSC1Di0AI0HxgQWGQMesyXLE8WWevzjonWOcEk2s9qTJVbqn30LgTUwSqCUi1m8kUl0SnoUrHbHF0FCCuCb1e0vKC/fbN/BCysnIxBMOMzs7tekWlghAk6J6Tfc9YUStipM3No8sgcrU1g5ph2qX3NwO4wsc3x5SL9l7SMuwWiuRy4yzqatr5w8RL1N2hLolcdWwwboeaxxc9goq/kuiXaheH/NvBZhPEgyO4bAFpo1TOTHitoSU0uR9GCElvzaq3mM4IlWVT5pU+Ui/PS3TtxRn9ixUxUrDiwCXf71LNNg5Ll65Wt8c5KJ2fxQI2pEw17k2rrj/wXA/r1BBnu4q34rEj+g6v58mnWu3Sbc40Qr96RwNfbMunMTNgEsHeyKJ9EyzL5GVhAx7aBMuGrM/PmrGsTRXdlKQ3X39GlEswP7ezg7OccWCGirSAbgdGnUPeTh9Dsd+Cua/bufn9WKLmZ7JUhW2EjTHuvm0e0P+6N5ggFW8VkSAsm59k/mhwFNLPpvkeT4QIfuUuIIJ0sY6PNbRyGnu/aKdpDGsQLmz3Vn8pO5VmuxbJThVze2Efq8qOBXzhbkF23OseJcafgaX8aNAo23LB36t6xeWcdEmjYqP6/6yyTkMURTkkgwl8dmNEJe2iw+izakCJ9A0RWOUP59qT2HYs5D09Ghq/OzYoWchN6PTBO+HOVafe78AfLhMYK0WYn+Xepc8wfSCEWuPGYhdTnD4CyNhXa+cUbduC2gpMl1LgOmsD8vI0Ofu+U8WD0YcGaiteYlGLJBkLHCgzL8x/C+NEDfm+KTjmfoLgI3lkXrTjFAAle7cZ1yZeJ8J3koFbo8/qd7Y90a0m6fwI4gkoY5lECqH9EhM2Zsiea7qsPcRD9UmbkvJqN3Z5etaoJfG9soxeINSd4lLueXkl8HLU1MRGiKLghNdMQNr0vxzvf62W0l5UD6XibYFAfw/jUkLoWok5WaK9qu2ViOX8mUanj6RA9OV15VcISalYc2IOJTxqcDV/O6e7so4cEI4EubuPxdyAxO6gUp7A2/UwQuPU89 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)(376014)(7416014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:32:47.6132 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0da937cc-34b4-4022-bbee-08dcb1f3c279 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: CO1PEPF000075ED.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7253 Move RTK amp codec helper functions related implementation to common place holder to make it generic so that these helper functions will be used by other platform machine driver modules. 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 | 11 +++++++++++ sound/soc/intel/boards/Makefile | 2 +- sound/soc/intel/boards/sof_sdw_common.h | 11 ----------- sound/soc/sdw_utils/Makefile | 3 ++- .../soc_sdw_rt_amp.c} | 14 ++++++++++---- .../soc_sdw_rt_amp_coeff_tables.h} | 6 +++--- 6 files changed, 27 insertions(+), 20 deletions(-) rename sound/soc/{intel/boards/sof_sdw_rt_amp.c => sdw_utils/soc_sdw_rt_amp.c} (93%) rename sound/soc/{intel/boards/sof_sdw_amp_coeff_tables.h => sdw_utils/soc_sdw_rt_amp_coeff_tables.h} (97%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 3e55cac33176..450542eb3ea0 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -99,9 +99,20 @@ int asoc_sdw_rt_sdca_jack_init(struct snd_soc_card *card, bool playback); int asoc_sdw_rt_sdca_jack_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); +/* RT1308 I2S support */ +extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops; + +/* generic amp support */ +int asoc_sdw_rt_amp_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); +int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); + /* dai_link init callbacks */ int asoc_sdw_rt_dmic_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); +int asoc_sdw_rt_amp_spk_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_rt712_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index 9f92f49cc517..70c56bdc180c 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -35,7 +35,7 @@ snd-soc-skl_nau88l25_ssm4567-y := skl_nau88l25_ssm4567.o snd-soc-ehl-rt5660-y := ehl_rt5660.o 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 \ + sof_sdw_maxim.o \ bridge_cs35l56.o \ sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ sof_sdw_cs_amp.o \ diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 1d7e6df02247..7f856c6018aa 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -89,16 +89,6 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd); int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card); -/* RT1308 I2S support */ -extern const struct snd_soc_ops soc_sdw_rt1308_i2s_ops; - -/* generic amp support */ -int asoc_sdw_rt_amp_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); -int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); - /* MAXIM codec support */ int asoc_sdw_maxim_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, @@ -135,6 +125,5 @@ 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_rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); #endif diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile index 20516094f453..7851af9b8593 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -2,5 +2,6 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ soc_sdw_rt700.o soc_sdw_rt711.o \ soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ - soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o + soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o \ + soc_sdw_rt_amp.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_rt_amp.c b/sound/soc/sdw_utils/soc_sdw_rt_amp.c similarity index 93% rename from sound/soc/intel/boards/sof_sdw_rt_amp.c rename to sound/soc/sdw_utils/soc_sdw_rt_amp.c index fff746671c1d..42be01405ab4 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_amp.c +++ b/sound/soc/sdw_utils/soc_sdw_rt_amp.c @@ -1,8 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2022 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* - * sof_sdw_rt_amp - Helpers to handle RT1308/RT1316/RT1318 from generic machine driver + * soc_sdw_rt_amp - Helpers to handle RT1308/RT1316/RT1318 from generic machine driver */ #include @@ -14,9 +16,9 @@ #include #include #include -#include "sof_sdw_common.h" -#include "sof_sdw_amp_coeff_tables.h" -#include "../../codecs/rt1308.h" +#include +#include "soc_sdw_rt_amp_coeff_tables.h" +#include "../codecs/rt1308.h" #define CODEC_NAME_SIZE 7 @@ -199,6 +201,7 @@ int asoc_sdw_rt_amp_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc return ret; } +EXPORT_SYMBOL_NS(asoc_sdw_rt_amp_spk_rtd_init, SND_SOC_SDW_UTILS); static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) @@ -236,6 +239,7 @@ static int rt1308_i2s_hw_params(struct snd_pcm_substream *substream, const struct snd_soc_ops soc_sdw_rt1308_i2s_ops = { .hw_params = rt1308_i2s_hw_params, }; +EXPORT_SYMBOL_NS(soc_sdw_rt1308_i2s_ops, SND_SOC_SDW_UTILS); int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link) { @@ -253,6 +257,7 @@ int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_rt_amp_exit, SND_SOC_SDW_UTILS); int asoc_sdw_rt_amp_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, @@ -295,3 +300,4 @@ int asoc_sdw_rt_amp_init(struct snd_soc_card *card, return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_rt_amp_init, SND_SOC_SDW_UTILS); diff --git a/sound/soc/intel/boards/sof_sdw_amp_coeff_tables.h b/sound/soc/sdw_utils/soc_sdw_rt_amp_coeff_tables.h similarity index 97% rename from sound/soc/intel/boards/sof_sdw_amp_coeff_tables.h rename to sound/soc/sdw_utils/soc_sdw_rt_amp_coeff_tables.h index 4a3e6fdbd623..4803d134d071 100644 --- a/sound/soc/intel/boards/sof_sdw_amp_coeff_tables.h +++ b/sound/soc/sdw_utils/soc_sdw_rt_amp_coeff_tables.h @@ -2,11 +2,11 @@ */ /* - * sof_sdw_amp_coeff_tables.h - related coefficients for amplifier parameters + * soc_sdw_rt_amp_coeff_tables.h - related coefficients for RTK amplifier parameters */ -#ifndef SND_SOC_SOF_SDW_AMP_COEFF_H -#define SND_SOC_SOF_SDW_AMP_COEFF_H +#ifndef SND_SOC_SDW_RT_SDW_AMP_COEFF_H +#define SND_SOC_SDW_RT_SDW_AMP_COEFF_H #define RT1308_MAX_BQ_REG 480 #define RT1316_MAX_BQ_REG 580 From patchwork Thu Aug 1 06:24:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749863 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2074.outbound.protection.outlook.com [40.107.244.74]) (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 2431F15747D; Thu, 1 Aug 2024 06:33:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722494029; cv=fail; b=FJJCZ5pAZMN/r+wiIq2xkxbjlfhpBXxteKE9SW9HGK40qh+rkrmFDKYS69ZVQkzTUy8ULU/7MNjPEJDhqp71hS3z2v9Ikj1C2fRhNc/kB4wmlbm0HCtOcCTzSha95OVLRjB6e0GFiOm7MtP4yy5sTFI5zqwH23KJE4/iNxA8WvM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722494029; c=relaxed/simple; bh=99tx3e05MDyfL4o7hhPthNzNR7WFUko4pk2+NFAhRmc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lYPZ9cr1zmDbkxFRLvmuYvxXLFSdQWU69gUAZJbjHxXR/elX7FXp/qDBVnPws5G3XHlcQBbjVL+6Xt10bKZIy/s2+nVmluxBh8fQPqvYcbOOmLBTqvgLFDEEsqYkXJr8BajT6uUN2cjNwJyg/B9zT8xVm5GPCXesy9dRPo/MgZI= 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=po5mPeHB; arc=fail smtp.client-ip=40.107.244.74 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="po5mPeHB" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=C/IrzrjI4/tFQfHVFH+T3s+fo4VvlQFiTdnBHi11KEbMhoCAfTfznJGR5j5XjbP0DXQYK+rqMx+klhdr1la7GBWQy7EHHtFXIIeZBBBZ8MRCL3gLXwJrdwxQaztu2AJynGsunuJZ5ztqUekMQh6FievG+HsE4PpadTRt26o13GzKfR0diWexNsePbRt6AiT3cZZOqQL8ena3laeZQNrdEFEjz41JLdjcoLApLx+t9HcPPYERtLN2ne2DIP27v4j+okzC7E4aKuJxLRJTWLue/H67W7ihmaeXfj5PnGFFnQDVycxwzM1IFKAFll9NeqsMbM5IxnAvgowYipupQx0Hyg== 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=we75CDPL7ANvzTnjyftxd/aOT+5qqjwvgSAZNMOidSo=; b=N5z1uMlzGb8a/IiDPROQgIaWITcEYo2UXz3lxUlfoIqjhzkagr+OoxhOKxC4OCl/+YjYSx6L0JeMU9JNmA7r1iJKdQ/ieqv3t8qZQRKyqb6DAbyZ8bjB+Vd0mLUMzUO3bugo4QGjsj0W0caPAQlzYJiW0w0Fd5HEN+4okh8wICYuNcn113VuXhE1h3OlxeAY4lRWmmhn7LImjt3SUp83WrA4Yto5lAXf58MdZxrYTgX+zWOEcmtX0Gr/YCJhVnmdPJ0KVTjzp61y3C76Y0pwvgLymp+DZ6DNAV/i/Mb6IS+PY4z7tm1L8aWYlwR+y9sblRcGQX7ATKrL8Jvm6cCp1g== 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=we75CDPL7ANvzTnjyftxd/aOT+5qqjwvgSAZNMOidSo=; b=po5mPeHBEgpY04dKa9xrqorOZpb+7i2FDMnXSx1CQ/c+l9WKrm3Sfu3YCNwHquneKUuf+Eklde9k4TE7X/1CLNTrTuULnGdevCSTvu6JrnurcyAB1eJwSw0mMB1s0wvmW/a9tf3di/2Uec+ZVPJ3HbWWwNrzZazIs+3c3dAV4no= Received: from SJ0PR03CA0123.namprd03.prod.outlook.com (2603:10b6:a03:33c::8) by SJ2PR12MB8062.namprd12.prod.outlook.com (2603:10b6:a03:4c8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Thu, 1 Aug 2024 06:33:43 +0000 Received: from SJ5PEPF0000020A.namprd05.prod.outlook.com (2603:10b6:a03:33c:cafe::69) by SJ0PR03CA0123.outlook.office365.com (2603:10b6:a03:33c::8) 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 06:33:43 +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 SJ5PEPF0000020A.mail.protection.outlook.com (10.167.244.43) 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 06:33:42 +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 01:33:41 -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 01:33:35 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Cezary Rojewski" , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Brent Lu , Maciej Strozek , Charles Keepax , Chao Song , jairaj-arava , Kuninori Morimoto , Richard Fitzgerald , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 19/31] ASoC: intel/sdw_utils: move cirrus soundwire codec helper functions Date: Thu, 1 Aug 2024 11:54:04 +0530 Message-ID: <20240801062416.2203673-20-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: SJ5PEPF0000020A:EE_|SJ2PR12MB8062:EE_ X-MS-Office365-Filtering-Correlation-Id: 85fbcb83-e5ed-4c2d-15fc-08dcb1f3e35f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|7416014|36860700013|376014; X-Microsoft-Antispam-Message-Info: oi6Q/kfedadRvurpyFmTQn3HQ7zE7N4x6Iir8eNM55KEOvG9oI8+KC7tP8v/iQObj880wHNQecWjfU6j+mwFESzg10o3cBINjeicPoWZB8HOKH+CGLU5GZgKyk0kzWMNQ3t6rt1WVK4lqharDFmUusKGLTkMlQQEytuck5Z0YHWw1szFjw9LDGsWrMgcXzNKALgAQeJdjDwjn3nmAB/zSk5BU4QOLQkwS/VKshfBpaPtkbNQQPvbZc4S0Pf9BcANJ50f7k1VFoKpxKkN7w+TWdGaEpMw5Ca/0PVA0aCPckyv4fD69njQr75A8c4CtvmP3AXQzZlvorrhFHJceayKIsUNclG0JgmoCAb/AcgOjD+qmb1upLZb2kRDt1dvWKaZssYl0xP+LZKJ7P2GP7rQRXvVbz/khLNZAdJZvt7N9PpaxxI1aoo59NlGpSeV/KcWg9imBaMVWS/fj8NbYD0ef1P7naoASRnD5BOHcIyvEMI/yZETNXiSaVwoxL6BsP0+AyftRtGkUaxu5VaZM4xlcbBBb1UXUtsIwtL1HEox71sUU6KZAVAEXJCfmkf9gaofR11VIOoe4m6lR4uv/KP/InS+Fa9cDJzvMv92CwYIqJ+z9JHE8Wzus6EuF2/gFIZBseQ0OlpQj4RBZgoflAUGa6ilWuyvMjEGUYRZlay6Hy1uwmEDrw2trD4WQf6JDMSV/+8ru5gSzTYZs6ZcOIIwAhWOQ1Gm9Os2EIpX22UUJtn0qNBJ/xNCRIoYcBXqeijMTJOq1qWGj7oSoYUUqg/MopwR1+9yHVj+lGOtbxaap6z54nzCWUCntFqimgIpjSPke/B5nk8uHfa+2WZ5E3XR+6bUflh2yRyWv8NSD+VCMpZq5mq3MWs7laS/WEACa//4KGDyL+g3SiahIiNplHq6wcYf/ZoBsscM/bAdxpx7vhnZIqI/OW89y5OFrd183LBOl/ngM0nIsQCdd5L7VQFSzeu0e6fOp4IQbr5XS8dnOcFye4ZTjoM7v5xz4VjC6AmlrIR6lV1Wv2UXS0lYO/50258jnkvfLu9v9KFKiwsru/7vS8UZ8TZBJw7aYSMXFvNgDzsGg3lAFC6Gt7UeNxxWy7l7Ir0Hki8mCm1RuZpbe/42raxqxISk9xl+nMc4ZJejMCCmEicDO6ToqDILfz9k1jRsOO/CCgWs45PW1Um4D4/BwTqR4uCb9Njm9mL1P7WQACApevHIjhGN8d6SuHqz7fj0lyil34w8tMUVNkZd3nNjmbh5Jwki4YxEUGXFbByefd+8wrIAbBYE2mmztDHHjK6aHjulnzYVuB1iPcdTzxeMyTuZ0MD7uijUJYzKqQ93Bqwtji0mYzUA3mThq/A2odP/rghsaMOQLLeQy9gjEgVfgRyYpXiHVIZkqQNpetzd5hX2btsQdpXE6jlHVQvbhg== 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)(1800799024)(82310400026)(7416014)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:33:42.8190 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85fbcb83-e5ed-4c2d-15fc-08dcb1f3e35f 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: SJ5PEPF0000020A.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8062 To make it generic, move Cirrus Soundwire codec helper functions to common place holder so that it can be used by other platform machine driver. 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 | 40 +++++++++++++++++++ sound/soc/intel/boards/Makefile | 3 -- sound/soc/intel/boards/sof_sdw_common.h | 39 ------------------ sound/soc/sdw_utils/Makefile | 5 ++- .../soc_sdw_bridge_cs35l56.c} | 38 ++++++++++++------ .../soc_sdw_cs42l42.c} | 9 +++-- .../soc_sdw_cs42l43.c} | 20 ++++++---- .../soc_sdw_cs_amp.c} | 8 +++- 8 files changed, 94 insertions(+), 68 deletions(-) rename sound/soc/{intel/boards/bridge_cs35l56.c => sdw_utils/soc_sdw_bridge_cs35l56.c} (73%) rename sound/soc/{intel/boards/sof_sdw_cs42l42.c => sdw_utils/soc_sdw_cs42l42.c} (88%) rename sound/soc/{intel/boards/sof_sdw_cs42l43.c => sdw_utils/soc_sdw_cs42l43.c} (85%) rename sound/soc/{intel/boards/sof_sdw_cs_amp.c => sdw_utils/soc_sdw_cs_amp.c} (80%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 450542eb3ea0..d5dd887b9d15 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -16,6 +16,19 @@ #define SOC_SDW_MAX_NO_PROPS 2 #define SOC_SDW_JACK_JDSRC(quirk) ((quirk) & GENMASK(3, 0)) +/* If a CODEC has an optional speaker output, this quirk will enable it */ +#define SOC_SDW_CODEC_SPKR BIT(15) +/* + * If the CODEC has additional devices attached directly to it. + * + * For the cs42l43: + * - 0 - No speaker output + * - SOC_SDW_CODEC_SPKR - CODEC internal speaker + * - SOC_SDW_SIDECAR_AMPS - 2x Sidecar amplifiers + CODEC internal speaker + * - SOC_SDW_CODEC_SPKR | SOF_SIDECAR_AMPS - Not currently supported + */ +#define SOC_SDW_SIDECAR_AMPS BIT(16) + struct asoc_sdw_codec_info; struct asoc_sdw_dai_info { @@ -109,6 +122,28 @@ int asoc_sdw_rt_amp_init(struct snd_soc_card *card, bool playback); int asoc_sdw_rt_amp_exit(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link); +/* CS42L43 support */ +int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); + +/* CS AMP support */ +int asoc_sdw_bridge_cs35l56_count_sidecar(struct snd_soc_card *card, + int *num_dais, int *num_devs); +int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card, + struct snd_soc_dai_link **dai_links, + struct snd_soc_codec_conf **codec_conf); +int asoc_sdw_bridge_cs35l56_spk_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); + +int asoc_sdw_cs_amp_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); + /* dai_link init callbacks */ int asoc_sdw_rt_dmic_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); @@ -118,5 +153,10 @@ int asoc_sdw_rt711_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_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); +int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); +int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); +int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); +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); #endif diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index 70c56bdc180c..1ee903e12249 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -36,9 +36,6 @@ snd-soc-ehl-rt5660-y := ehl_rt5660.o snd-soc-sof-ssp-amp-y := sof_ssp_amp.o snd-soc-sof-sdw-y += sof_sdw.o \ sof_sdw_maxim.o \ - bridge_cs35l56.o \ - sof_sdw_cs42l42.o sof_sdw_cs42l43.o \ - sof_sdw_cs_amp.o \ sof_sdw_hdmi.o obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 7f856c6018aa..b95daa32e343 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -52,18 +52,6 @@ enum { #define SOF_SSP_GET_PORT(quirk) (((quirk) >> 7) & GENMASK(5, 0)) /* Deprecated and no longer supported by the code */ #define SOC_SDW_NO_AGGREGATION BIT(14) -/* If a CODEC has an optional speaker output, this quirk will enable it */ -#define SOC_SDW_CODEC_SPKR BIT(15) -/* - * If the CODEC has additional devices attached directly to it. - * - * For the cs42l43: - * - 0 - No speaker output - * - SOC_SDW_CODEC_SPKR - CODEC internal speaker - * - SOC_SDW_SIDECAR_AMPS - 2x Sidecar amplifiers + CODEC internal speaker - * - SOC_SDW_CODEC_SPKR | SOC_SDW_SIDECAR_AMPS - Not currently supported - */ -#define SOC_SDW_SIDECAR_AMPS BIT(16) /* BT audio offload: reserve 3 bits for future */ #define SOF_BT_OFFLOAD_SSP_SHIFT 15 @@ -95,35 +83,8 @@ int asoc_sdw_maxim_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback); -/* CS42L43 support */ -int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); - -/* CS AMP support */ -int asoc_sdw_bridge_cs35l56_count_sidecar(struct snd_soc_card *card, - int *num_dais, int *num_devs); -int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card, - struct snd_soc_dai_link **dai_links, - struct snd_soc_codec_conf **codec_conf); -int asoc_sdw_bridge_cs35l56_spk_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); - -int asoc_sdw_cs_amp_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); - /* dai_link init callbacks */ -int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); -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); #endif diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile index 7851af9b8593..c15b08f3ab0b 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -3,5 +3,8 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ soc_sdw_rt700.o soc_sdw_rt711.o \ soc_sdw_rt712_sdca.o soc_sdw_rt722_sdca.o \ soc_sdw_rt5682.o soc_sdw_rt_sdca_jack_common.o \ - soc_sdw_rt_amp.o + soc_sdw_rt_amp.o \ + soc_sdw_bridge_cs35l56.o \ + soc_sdw_cs42l42.o soc_sdw_cs42l43.o \ + soc_sdw_cs_amp.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/bridge_cs35l56.c b/sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c similarity index 73% rename from sound/soc/intel/boards/bridge_cs35l56.c rename to sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c index 55e5cfbb2f14..fcc3ef685af7 100644 --- a/sound/soc/intel/boards/bridge_cs35l56.c +++ b/sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c @@ -1,6 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-only -// -// Intel SOF Machine Driver with Cirrus Logic CS35L56 Smart Amp +// This file incorporates work covered by the following copyright notice: +// Copyright (c) 2024 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. + +/* + * soc_sdw_bridge_cs35l56 - codec helper functions for handling CS35L56 Smart AMP + */ #include #include @@ -9,7 +14,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include static const struct snd_soc_dapm_widget bridge_widgets[] = { SND_SOC_DAPM_SPK("Bridge Speaker", NULL), @@ -25,7 +30,7 @@ static const char * const bridge_cs35l56_name_prefixes[] = { "AMPR", }; -static int bridge_cs35l56_asp_init(struct snd_soc_pcm_runtime *rtd) +static int asoc_sdw_bridge_cs35l56_asp_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; int i, ret; @@ -73,7 +78,7 @@ static int bridge_cs35l56_asp_init(struct snd_soc_pcm_runtime *rtd) return 0; } -static const struct snd_soc_pcm_stream bridge_params = { +static const struct snd_soc_pcm_stream asoc_sdw_bridge_params = { .formats = SNDRV_PCM_FMTBIT_S16_LE, .rate_min = 48000, .rate_max = 48000, @@ -81,7 +86,7 @@ static const struct snd_soc_pcm_stream bridge_params = { .channels_max = 2, }; -SND_SOC_DAILINK_DEFS(bridge_dai, +SND_SOC_DAILINK_DEFS(asoc_sdw_bridge_dai, DAILINK_COMP_ARRAY(COMP_CODEC("cs42l43-codec", "cs42l43-asp")), DAILINK_COMP_ARRAY(COMP_CODEC("spi-cs35l56-left", "cs35l56-asp1"), COMP_CODEC("spi-cs35l56-right", "cs35l56-asp1")), @@ -89,28 +94,33 @@ SND_SOC_DAILINK_DEFS(bridge_dai, static const struct snd_soc_dai_link bridge_dai_template = { .name = "cs42l43-cs35l56", - .init = bridge_cs35l56_asp_init, - .c2c_params = &bridge_params, + .init = asoc_sdw_bridge_cs35l56_asp_init, + .c2c_params = &asoc_sdw_bridge_params, .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_CBC_CFC, - SND_SOC_DAILINK_REG(bridge_dai), + SND_SOC_DAILINK_REG(asoc_sdw_bridge_dai), }; int asoc_sdw_bridge_cs35l56_count_sidecar(struct snd_soc_card *card, int *num_dais, int *num_devs) { - if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) { + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + + if (ctx->mc_quirk & SOC_SDW_SIDECAR_AMPS) { (*num_dais)++; (*num_devs) += ARRAY_SIZE(bridge_cs35l56_name_prefixes); } return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_bridge_cs35l56_count_sidecar, SND_SOC_SDW_UTILS); int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card, struct snd_soc_dai_link **dai_links, struct snd_soc_codec_conf **codec_conf) { - if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) { + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + + if (ctx->mc_quirk & SOC_SDW_SIDECAR_AMPS) { **dai_links = bridge_dai_template; for (int i = 0; i < ARRAY_SIZE(bridge_cs35l56_name_prefixes); i++) { @@ -124,14 +134,18 @@ int asoc_sdw_bridge_cs35l56_add_sidecar(struct snd_soc_card *card, return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_bridge_cs35l56_add_sidecar, SND_SOC_SDW_UTILS); int asoc_sdw_bridge_cs35l56_spk_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, struct asoc_sdw_codec_info *info, bool playback) { - if (sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS) + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); + + if (ctx->mc_quirk & SOC_SDW_SIDECAR_AMPS) info->amp_num += ARRAY_SIZE(bridge_cs35l56_name_prefixes); return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_bridge_cs35l56_spk_init, SND_SOC_SDW_UTILS); diff --git a/sound/soc/intel/boards/sof_sdw_cs42l42.c b/sound/soc/sdw_utils/soc_sdw_cs42l42.c similarity index 88% rename from sound/soc/intel/boards/sof_sdw_cs42l42.c rename to sound/soc/sdw_utils/soc_sdw_cs42l42.c index 3ce2f65f994a..78a6cb059ac0 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l42.c +++ b/sound/soc/sdw_utils/soc_sdw_cs42l42.c @@ -1,8 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation - +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* - * sof_sdw_cs42l42 - Helpers to handle CS42L42 from generic machine driver + * soc_sdw_cs42l42 - Helpers to handle CS42L42 from generic machine driver */ #include @@ -15,7 +16,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include static const struct snd_soc_dapm_route cs42l42_map[] = { /* HP jack connectors - unknown if we have jack detection */ @@ -87,4 +88,4 @@ int asoc_sdw_cs42l42_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_da return ret; } -MODULE_IMPORT_NS(SND_SOC_INTEL_SOF_BOARD_HELPERS); +EXPORT_SYMBOL_NS(asoc_sdw_cs42l42_rtd_init, SND_SOC_SDW_UTILS); diff --git a/sound/soc/intel/boards/sof_sdw_cs42l43.c b/sound/soc/sdw_utils/soc_sdw_cs42l43.c similarity index 85% rename from sound/soc/intel/boards/sof_sdw_cs42l43.c rename to sound/soc/sdw_utils/soc_sdw_cs42l43.c index 47d05fe7de53..adb1c008e871 100644 --- a/sound/soc/intel/boards/sof_sdw_cs42l43.c +++ b/sound/soc/sdw_utils/soc_sdw_cs42l43.c @@ -1,9 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-only // Based on sof_sdw_rt5682.c +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* - * sof_sdw_cs42l43 - Helpers to handle CS42L43 from generic machine driver + * soc_sdw_cs42l43 - Helpers to handle CS42L43 from generic machine driver */ #include #include @@ -16,7 +18,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include static const struct snd_soc_dapm_route cs42l43_hs_map[] = { { "Headphone", NULL, "cs42l43 AMP3_OUT" }, @@ -37,7 +39,7 @@ static const struct snd_soc_dapm_route cs42l43_dmic_map[] = { { "cs42l43 PDM2_DIN", NULL, "DMIC" }, }; -static struct snd_soc_jack_pin sof_jack_pins[] = { +static struct snd_soc_jack_pin soc_jack_pins[] = { { .pin = "Headphone", .mask = SND_JACK_HEADPHONE, @@ -73,8 +75,8 @@ int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc SND_JACK_HEADSET | SND_JACK_LINEOUT | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2 | SND_JACK_BTN_3, - jack, sof_jack_pins, - ARRAY_SIZE(sof_jack_pins)); + jack, soc_jack_pins, + ARRAY_SIZE(soc_jack_pins)); if (ret) { dev_err(card->dev, "Failed to create jack: %d\n", ret); return ret; @@ -98,13 +100,15 @@ int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc return ret; } +EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_hs_rtd_init, SND_SOC_SDW_UTILS); int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { struct snd_soc_card *card = rtd->card; + struct asoc_sdw_mc_private *ctx = snd_soc_card_get_drvdata(card); int ret; - if (!(sof_sdw_quirk & SOC_SDW_SIDECAR_AMPS)) { + if (!(ctx->mc_quirk & SOC_SDW_SIDECAR_AMPS)) { /* Will be set by the bridge code in this case */ card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s spk:cs42l43-spk", @@ -120,6 +124,7 @@ int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_so return ret; } +EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_spk_rtd_init, SND_SOC_SDW_UTILS); int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, @@ -134,6 +139,7 @@ int asoc_sdw_cs42l43_spk_init(struct snd_soc_card *card, return asoc_sdw_bridge_cs35l56_spk_init(card, dai_links, info, playback); } +EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_spk_init, SND_SOC_SDW_UTILS); int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai) { @@ -152,4 +158,4 @@ int asoc_sdw_cs42l43_dmic_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_s return ret; } - +EXPORT_SYMBOL_NS(asoc_sdw_cs42l43_dmic_rtd_init, SND_SOC_SDW_UTILS); diff --git a/sound/soc/intel/boards/sof_sdw_cs_amp.c b/sound/soc/sdw_utils/soc_sdw_cs_amp.c similarity index 80% rename from sound/soc/intel/boards/sof_sdw_cs_amp.c rename to sound/soc/sdw_utils/soc_sdw_cs_amp.c index 6479974bd2c3..58b059b68016 100644 --- a/sound/soc/intel/boards/sof_sdw_cs_amp.c +++ b/sound/soc/sdw_utils/soc_sdw_cs_amp.c @@ -1,8 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-only +// This file incorporates work covered by the following copyright notice: // Copyright (c) 2023 Intel Corporation +// Copyright (c) 2024 Advanced Micro Devices, Inc. /* - * sof_sdw_cs_amp - Helpers to handle CS35L56 from generic machine driver + * soc_sdw_cs_amp - Helpers to handle CS35L56 from generic machine driver */ #include @@ -10,7 +12,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include #define CODEC_NAME_SIZE 8 @@ -44,6 +46,7 @@ int asoc_sdw_cs_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_cs_spk_rtd_init, SND_SOC_SDW_UTILS); int asoc_sdw_cs_amp_init(struct snd_soc_card *card, struct snd_soc_dai_link *dai_links, @@ -58,3 +61,4 @@ int asoc_sdw_cs_amp_init(struct snd_soc_card *card, return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_cs_amp_init, SND_SOC_SDW_UTILS); From patchwork Thu Aug 1 06:24:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749864 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2067.outbound.protection.outlook.com [40.107.243.67]) (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 A9207157A67; Thu, 1 Aug 2024 06:34:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722494053; cv=fail; b=Uff8eUbYeQsM/VFltknkURSDr0AhydpwNrT2P0XbmUTl65u98BKdtDLHogaz1NiOsUj/8SBP7Fu/q+NIUQ52opbLBQ7WocyHHk9/6XsrG5vd3+g3/JS2yBzoXMfpaMyMAg1AXcfsd9vcM2cHvPUdq+TD8ElYaF0/MRg1i9c72jU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722494053; c=relaxed/simple; bh=wZF5msvkReMqOaD9lENyucelsey8O5TFWxvA5TTaEio=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sDzbwJk8Mw52IIQzt5ax8C9apuyCR1c/oUQYZ1TkwIQPS9ehfN3E2lgfRV6023Et6lQuKTIguo5uIF8doetlbLebRJhu1+SoZpspYGDKzbYMbfapOPiR3xDHnd4q4TCMx8eC90ZmFkMaf60GqrwY2fbtDdVlcMLZ7hrg2JfK5NU= 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=sExfNgI/; arc=fail smtp.client-ip=40.107.243.67 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="sExfNgI/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Umn7gONcbUdvY8WgNd56pDca3WY3XwG/28TwoWGc8u3QJnqwPNTIwV4XPMRxg6DD3ddLEMPCZxgOgnKtLQTMG6F47kXT4trRiUOqSTfdQluECDl2n4S6B1rY95qWz5nifz+5EjHeoN9QMr0FXTI4k4IP13CHTnm/OEP53eHdGCCnUrtKqZiNV/+yiXMFq1byj7ytUKvqeM4EAY1gJKjCfPCjfGsX7jWlcS9jattkCqRaNgimCbLgAFZz+tt92CPbjJfk7Eh6X8dM4uBOKZzW1Iv28jyyNTuYqysOzmAHK64ik+I9h19V+x+GnXHrVW83Fjl4fBd7dYWH/Ty22wcYVw== 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=rRwr1M8HYTTJ9pQI1KdXfbC6gSD4Lv3+HS0qRoT2L1s=; b=HBsTGh5SHS+riM/lA4F8ymKiP8fqjHdu8yVCISzixxG/y6ir+i/dj/jYJVE+vlc1nCn4rzSU5fojLVjnnZYJdjnzYgoGN7cy3mHcWer7n478OLGn3LsrzLKZRotjZA+7RpMm4IdnGaO3ho37qJhN2RL3kUSIde0PSu854jARTZmQNsSVusgFAzGhwXjCV+k/eeG47Qh/A+JARBmrY4YR02sn7YuVu60pG2drJHoUcRwHHWsG+brfCzpA4wk/GxwWNmZ66mfZlMg9p2uejuUG5CoyFYSuKAi5u9/yz78Ct53bTv2sDAtjYHKdYdwXnbfEuv4rvNdEq9Xd+nwSk8ogeA== 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=rRwr1M8HYTTJ9pQI1KdXfbC6gSD4Lv3+HS0qRoT2L1s=; b=sExfNgI/bDJCWL0oL7p3FXyYXvkP9G3dtHY8GMuN4c7Me5EDyqOGh48fKPCB4VayeyZPtEL7/t5t49/AiJoWeEEKK4GTYKMzqnCszrJWmvHAm4H2nY5ejBTy754qO0PRwq2Pdjbo87wf3Filu1ot81jtBhH1Zx6kVCo2GLFW+1w= Received: from BYAPR04CA0020.namprd04.prod.outlook.com (2603:10b6:a03:40::33) by BY5PR12MB4084.namprd12.prod.outlook.com (2603:10b6:a03:205::14) 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 06:34:08 +0000 Received: from MWH0EPF000989E9.namprd02.prod.outlook.com (2603:10b6:a03:40:cafe::42) by BYAPR04CA0020.outlook.office365.com (2603:10b6:a03:40::33) 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 06:34:08 +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 MWH0EPF000989E9.mail.protection.outlook.com (10.167.241.136) 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 06:34:08 +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 01:34:07 -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 01:34:00 -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 , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , "open list" Subject: [PATCH 20/31] ASoC: intel/sdw_utils: move maxim codec helper functions Date: Thu, 1 Aug 2024 11:54:05 +0530 Message-ID: <20240801062416.2203673-21-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: MWH0EPF000989E9:EE_|BY5PR12MB4084:EE_ X-MS-Office365-Filtering-Correlation-Id: 984799a2-075b-494f-fba5-08dcb1f3f27c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: mXGH20R2gYzSSxGVFAOPidvqTh6EkeZ1o69St2VH/fJzuZLXhYmmIiaT/ZRzxHamcqFGr31YYW2oEFhIr8Jt8eYa1bsggh5LdylsfwoEwV1p2HMG518cPsPwxSEvzVNJUx8aydlagg9LbwOr+YbuMuZrn+Dw+Xc3MwPAwdJhxd9fJGTqU7N+2wsOB6tc1ed7CJrR7DzSoHfQuc1Wwf1CeCUQLLQfr1SFjRi3SjzsG/kSdJffNhHPKfiRi3Rc2gHew2AHoS39oIPvsUWEo8HPz3qHhDrQ3q0ytRt2kDCKC2utU5kFDZ5KTRt7P6ijQfyJ03D5Tw0Ug7XprPIfMcRtICjIGRHnob7xHnipNXZt1bveqRSUbS5vOSVguNb0d6NwIGcnx9Dn8h1anzsEISmK7Zq0a++MBNK+b1PgwLcdjcS9tDHnTU2v/teSRYI/EZ7k0vkUKnDfWoaBu+pg/GL1m5zW/0WI8myBB38WS0ybLJ3c2AmxiVxbzBR+RCRFNwVjdN5w9FREybELsg+DKxYZG3yhlmDK6q9YQzwRN0e1SmlYdgfMgW6ST1bERuq9O9pwMr7HnLC3SKm8n6yRDf6HD92R3MHJq9gjs6xr+RQe5nXYl9Bb//i9yXaFPukvy0K4b5OBQKgC+phYXiwW0qu3K7m5Pq9ux99+vy7wT2dkPcYHIJJQTHqMTTMwn5rfOVKJiqtuR+8HZMhb7WavFdMC5PQSt1CyRRNLzb1E5HAMXPZ9c2n72bj2Bp2ish06WNAHgYEb9I8gmxOQp14Loz1jxpkQh34ksbFZ+MJiea5RCFDlfcn+6My6EuXviLGQJIKkTbfgCGB2VdJAJ2HXmyGq3PCK1K1fjR85CL/O6DbVpFZHywdMNODbgDcx/vM98mOW4Em5b2tMTOj9QOWIfBT8X1K16bD2gqv+kJYATKRkEoBuo32FrWxaAsHTNNwRbICVsLthXl7UDDg+8LgkUd0/suHWWHomnvB2K6GIBtEThL7PLdR8V+vKtQHWDbuXw8Qo2OLDt2XxO99zwZLtnt97uQOhG0jAogfGbuKRfjuQikr/uQjARGQFELZ6ijwJUe8bb8NSEctD54llYnNxxoEZT9uwBYBkPsPhBGaPyw2KKmdTKlOpWHxUaB7+x0W2bacUO+0lm7EFz15v5t+TaNXXR0sDQpaVqTYaovuiZY8UAFu+ubNO+Jo8OIgAcfKbxUuOhUvIgZ2KX6AdbwJFMiFXHIwz/G1AqHJolQMVFN7UaOzVMGHc4loq1rV+D8Q0+5JBuc8OgavQnegA33WG8ggr31fCLoM7oDc3LTR28Z8O3MyrmVoR+ibvM9NjwcctS78whbUmMTkeIMHaQgUGqACCkfynGdeOKgIhdtykSActPXAySX7DpCOucQ21f4QHsE+eQh7S/7S2r1JKlE/ZbRYyzA== 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)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:34:08.1495 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 984799a2-075b-494f-fba5-08dcb1f3f27c 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: MWH0EPF000989E9.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4084 Move maxim codec helper functions to common place holder so that it can be used by other platform machine driver. 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 | 7 +++++++ sound/soc/intel/boards/Makefile | 1 - sound/soc/intel/boards/sof_sdw_common.h | 10 ---------- sound/soc/sdw_utils/Makefile | 3 ++- .../sof_sdw_maxim.c => sdw_utils/soc_sdw_maxim.c} | 14 +++++++++----- 5 files changed, 18 insertions(+), 17 deletions(-) rename sound/soc/{intel/boards/sof_sdw_maxim.c => sdw_utils/soc_sdw_maxim.c} (86%) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index d5dd887b9d15..9e84d1ab6cd0 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -144,6 +144,12 @@ int asoc_sdw_cs_amp_init(struct snd_soc_card *card, struct asoc_sdw_codec_info *info, bool playback); +/* MAXIM codec support */ +int asoc_sdw_maxim_init(struct snd_soc_card *card, + struct snd_soc_dai_link *dai_links, + struct asoc_sdw_codec_info *info, + bool playback); + /* dai_link init callbacks */ int asoc_sdw_rt_dmic_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); @@ -158,5 +164,6 @@ int asoc_sdw_cs42l43_hs_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc int asoc_sdw_cs42l43_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); 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); #endif diff --git a/sound/soc/intel/boards/Makefile b/sound/soc/intel/boards/Makefile index 1ee903e12249..5bd8dc2d166a 100644 --- a/sound/soc/intel/boards/Makefile +++ b/sound/soc/intel/boards/Makefile @@ -35,7 +35,6 @@ snd-soc-skl_nau88l25_ssm4567-y := skl_nau88l25_ssm4567.o snd-soc-ehl-rt5660-y := ehl_rt5660.o snd-soc-sof-ssp-amp-y := sof_ssp_amp.o snd-soc-sof-sdw-y += sof_sdw.o \ - sof_sdw_maxim.o \ sof_sdw_hdmi.o obj-$(CONFIG_SND_SOC_INTEL_SOF_RT5682_MACH) += snd-soc-sof_rt5682.o obj-$(CONFIG_SND_SOC_INTEL_SOF_CS42L42_MACH) += snd-soc-sof_cs42l42.o diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index b95daa32e343..664c3404eb81 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -77,14 +77,4 @@ int sof_sdw_hdmi_init(struct snd_soc_pcm_runtime *rtd); int sof_sdw_hdmi_card_late_probe(struct snd_soc_card *card); -/* MAXIM codec support */ -int asoc_sdw_maxim_init(struct snd_soc_card *card, - struct snd_soc_dai_link *dai_links, - struct asoc_sdw_codec_info *info, - bool playback); - -/* dai_link init callbacks */ - -int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai); - #endif diff --git a/sound/soc/sdw_utils/Makefile b/sound/soc/sdw_utils/Makefile index c15b08f3ab0b..28229ed96ffb 100644 --- a/sound/soc/sdw_utils/Makefile +++ b/sound/soc/sdw_utils/Makefile @@ -6,5 +6,6 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ soc_sdw_rt_amp.o \ soc_sdw_bridge_cs35l56.o \ soc_sdw_cs42l42.o soc_sdw_cs42l43.o \ - soc_sdw_cs_amp.o + soc_sdw_cs_amp.o \ + soc_sdw_maxim.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o diff --git a/sound/soc/intel/boards/sof_sdw_maxim.c b/sound/soc/sdw_utils/soc_sdw_maxim.c similarity index 86% rename from sound/soc/intel/boards/sof_sdw_maxim.c rename to sound/soc/sdw_utils/soc_sdw_maxim.c index 9933224fcf68..cdcd8df37e1d 100644 --- a/sound/soc/intel/boards/sof_sdw_maxim.c +++ b/sound/soc/sdw_utils/soc_sdw_maxim.c @@ -1,7 +1,9 @@ // 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_maxim - Helpers to handle maxim codecs +// soc_sdw_maxim - Helpers to handle maxim codecs // codec devices from generic machine driver #include @@ -10,7 +12,7 @@ #include #include #include -#include "sof_sdw_common.h" +#include static int maxim_part_id; #define SOC_SDW_PART_ID_MAX98363 0x8363 @@ -41,8 +43,9 @@ int asoc_sdw_maxim_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_ return ret; } +EXPORT_SYMBOL_NS(asoc_sdw_maxim_spk_rtd_init, SND_SOC_SDW_UTILS); -static int mx8373_enable_spk_pin(struct snd_pcm_substream *substream, bool enable) +static int asoc_sdw_mx8373_enable_spk_pin(struct snd_pcm_substream *substream, bool enable) { struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct snd_soc_dai *codec_dai; @@ -84,7 +87,7 @@ static int asoc_sdw_mx8373_prepare(struct snd_pcm_substream *substream) if (ret < 0) return ret; - return mx8373_enable_spk_pin(substream, true); + return asoc_sdw_mx8373_enable_spk_pin(substream, true); } static int asoc_sdw_mx8373_hw_free(struct snd_pcm_substream *substream) @@ -96,7 +99,7 @@ static int asoc_sdw_mx8373_hw_free(struct snd_pcm_substream *substream) if (ret < 0) return ret; - return mx8373_enable_spk_pin(substream, false); + return asoc_sdw_mx8373_enable_spk_pin(substream, false); } static const struct snd_soc_ops max_98373_sdw_ops = { @@ -142,3 +145,4 @@ int asoc_sdw_maxim_init(struct snd_soc_card *card, } return 0; } +EXPORT_SYMBOL_NS(asoc_sdw_maxim_init, SND_SOC_SDW_UTILS); From patchwork Thu Aug 1 06:24:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13749865 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2065.outbound.protection.outlook.com [40.107.92.65]) (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 544EF15747D; Thu, 1 Aug 2024 06:34:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722494062; cv=fail; b=VnosCbxO64tbahcwVBodbqfunalD8jrvGU6EpwK8AuxmFF9zZfvYqK0W676m8YBb91BIm5HDyNHiHjRx4jYwHtzSBKaIGTdA7en45ZNt4dlrQocuYQIEAQ7OprwTwQYV/ZrKEOEJEV1RD1+q+bgRiVU+4QFfsKx4onTKH7YMOws= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722494062; c=relaxed/simple; bh=MPZvZJr2dKgEyoC5PT2bfOAWgLLDd/Ys8BCPH9ABZM8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GcTaB3ABhuRZVUZ2i4vYeEg0EzddhYeOji33/NvM9OLmvZAEf8jHS2DUKV2dd+p0ebz738B7bXl6GfR9fzR9rnUOvmhM7yZ9FYMfX2tXgbfHtTczMm40BsTNDv3TAFpij6TAeWhljqh3HeR725PpM+rcf2C7CSqUJG9S3eyogkg= 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=tp2CkYFN; arc=fail smtp.client-ip=40.107.92.65 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="tp2CkYFN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h2aB3Z48YtcnHCM2kGx0woEUw8ZE0hLZwSYpov/9FlXAxz/KQRiSkN1NJxV+5i9uRLC7en0tHZhb7y8p50nC+quM8cwNYlACOKvUBRYftXM7EJD94AMFErE43IOtqICgK2Fh7PHOWTXCPuhSKJDEHpgH+RbGLTZ7B6rNBN+LppklVsZMGsMtoZ463NFsXA1uRBgKZhbXJ6XR/2K/R3fmLp8b2gqRar2yPg+STGQjF8L1YJSisYxmAWZbSsRa0JAmBqQHI3mhTsXyO/KfkVVcFZ/IbcGt2Q8/N0W2NU7KrZCE6oqGOmgCaFZGx5ueh7g5OXGiB1QnDMFZ9Vopq9Bsyg== 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=CDKExy/DCIR6/246/oZSdxS0in9FcMvHavGaSS7dzj4=; b=UcqvTYHzocd4czqbpmLJrsST1c6blwFW0TmHbuqa6mq/idtdKIqmmdSraQ32KQjaI3XL8R6Ix1ot3WpWzrOXOdgtimjzFuO4qZ99Tvc7p9YibgRG6RR5R79x86KI43g00Knp/5gsor/Zd6smUpyWjMHzlfbwOzm2fTTJf6ZzKJKd93L1n1VebCTLlFYw8BSl1/zML98JjNEf+3KvIvgEcdGX7FsfA0GEKULMyuZ9TuPLn1YpTR5rfpn1ceAJeDOP9jxJ/EbX/eiZBvhyFD0aI38b/BCIC58JnzwQiFTLF+lw7lW05GXPWIFuAaiZ/ar67NbsRxqC61o2tjVH1SiX3A== 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=CDKExy/DCIR6/246/oZSdxS0in9FcMvHavGaSS7dzj4=; b=tp2CkYFNsk2/vrLSgirFrG3T1yes8mo+i96d0gS3aD5IwFC2fjlxM7DnbcwEBKKk9bofkPsWf2sJhPRNV4inAL8mp6kQHukmQEqUDtQ1llH5YPkXJYRmxkLWjuihnWJlcPTwztPt53tpUZNiEIQCeih6Talk5b0TwBExy0+3lZM= Received: from SJ0PR13CA0155.namprd13.prod.outlook.com (2603:10b6:a03:2c7::10) by DM4PR12MB5865.namprd12.prod.outlook.com (2603:10b6:8:64::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.20; Thu, 1 Aug 2024 06:34:18 +0000 Received: from CO1PEPF000075EE.namprd03.prod.outlook.com (2603:10b6:a03:2c7:cafe::22) by SJ0PR13CA0155.outlook.office365.com (2603:10b6:a03:2c7::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7849.6 via Frontend Transport; Thu, 1 Aug 2024 06:34:17 +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 CO1PEPF000075EE.mail.protection.outlook.com (10.167.249.37) 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 06:34:17 +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 01:34:16 -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 01:34:16 -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 01:34:10 -0500 From: Vijendar Mukunda To: CC: , , , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Cezary Rojewski" , Peter Ujfalusi , Ranjani Sridharan , Kai Vehmanen , Charles Keepax , Maciej Strozek , Chao Song , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 21/31] ASoC: intel/sdw_utils: move dai id common macros Date: Thu, 1 Aug 2024 11:54:06 +0530 Message-ID: <20240801062416.2203673-22-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240801062416.2203673-1-Vijendar.Mukunda@amd.com> References: <20240801062416.2203673-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: CO1PEPF000075EE:EE_|DM4PR12MB5865:EE_ X-MS-Office365-Filtering-Correlation-Id: 750ed3e2-a415-4df2-e308-08dcb1f3f813 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|376014|7416014|82310400026; X-Microsoft-Antispam-Message-Info: rEBfyxFJSxcoU54926BUpoJf8ndDryi0E5Ws/u6HcUqpsUwTYvAI3iV/wfmkD8A5HENUTmK9IQBOE3VDK/7F9k+0zinRL59Crpmn9l/+IWvY0oXNxt51luYgkE7c8xapkCIqKxYA6OyuUB+NNJqU8k3pFNt0RhzYLRo8hq0gS5Dd3jHn7o3i9PjEyvsCCjB/5TwPiiKaxgU6IU/8tWOauuNCB3Xub1Rh+4vUsFToo6QRq42yr841KKqS9c/8sdt9RPZaYGPysJF52tGQxyhLsUh2+ncXmNKaCzlfQQRri3/uYgja20ISwELoLgHpO1tImZJqfV2YTR9lxOnU6VYhTkiwilnukq7ha6wJGx7vGPfc/gzbSXd2DmE+z5Exs2GbY8rtIAok3vZfZBQyrH8tcGEMc7+x//J8zfvGnxa6tsKRuWtJjr0B/M7ZXDtvASY3w4bGj/OpKj6CKeFwHjhudSdPnFNSMKNcP/o/lcDtESDC4r8VohJc6Zpd1v0j2/jyg0ybJm8kYImNJ0GLLSDEgwWJXy2Bo8GernCmS10/Jyf693amBUa6i9ZlSLbAsSR0wbnaluemRR5fkkAofIeziBEwH7nvxTeB88nwExUKVEMziBrdfx/m7cmNVBizvDXs+j9oexMLPGT1rKVugKwK3I73kv+SCPlk7gr+Xt2QqhUv8c7fPvlsAooHSCELdfQzugqcuIKmm+LZlp0fHMhMmyF0aLGR3NWnX+JdeCuxFnvWeMlloTs1U1h5bmuPaJ5Hl0sEcGOB07i8t8UKMVWEvxtjxsN7cayP7obB+G/XdOyZG8pCcavqlC33etu4YAHo4fzy2pwYbq46dRDfdYT+1EGp3x//g50+YvkTpcN2fRwD78cDr77ujABhaLLfZz1gwwBF9hE28xeq8zxgyzP/OPMw/OqZJV06hlqOxvoN0sus+n+gh3IMCIuGCjckcvDwDKBkw8L6Ki/yw0LctBR+nF5LayF8vFrvCQqyjqb37NfGkm6iCcnnHEQyf1sgLqYYKLpEbeYHWXot+PmlpD6pncrcff8CJYj+gRblQzM/2vp0acCULpFqPU5E+Txf26h6PMylJdW3qNmZGI1nMAE0V0kB+9fHmeEzj7Hh7nLr0HkkZeCx3DkMj2hI2t91/v9maDWh/uHRHlwJAVaObLPkfc3AiVPJAy46kTL6n1AQkzk9A7hSSpKygYjEj9TvxGw8uoSOT50lQdu17VFeazGl0UOGsq7TOnLpfpf0xgqupInngoWziC8tLkosRg1RRh0LyEWn+D4OqViLwb1NCBRKM3DuiaoEio3pAA9NyJ7uu6aa3E0ig35Smnde8iu+nyOI/pyxztJ/t2TM1dyyDjY2lViGv2oBwUhRS1jcmv45VeDNuOod7MjYCfemRCLz9A2jJBIQZHxoJXCeOjw+yWNiHQ== 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)(36860700013)(1800799024)(376014)(7416014)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2024 06:34:17.5427 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 750ed3e2-a415-4df2-e308-08dcb1f3f813 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: CO1PEPF000075EE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5865 Move dai id common macros from intel SoundWire generic driver to soc_sdw_utils.h file so that it can be used by other platform machine driver. 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 | 7 +++++++ sound/soc/intel/boards/sof_sdw_common.h | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index 9e84d1ab6cd0..13941ddd24c8 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -29,6 +29,13 @@ */ #define SOC_SDW_SIDECAR_AMPS BIT(16) +#define SOC_SDW_UNUSED_DAI_ID -1 +#define SOC_SDW_JACK_OUT_DAI_ID 0 +#define SOC_SDW_JACK_IN_DAI_ID 1 +#define SOC_SDW_AMP_OUT_DAI_ID 2 +#define SOC_SDW_AMP_IN_DAI_ID 3 +#define SOC_SDW_DMIC_DAI_ID 4 + struct asoc_sdw_codec_info; struct asoc_sdw_dai_info { diff --git a/sound/soc/intel/boards/sof_sdw_common.h b/sound/soc/intel/boards/sof_sdw_common.h index 664c3404eb81..8bfdffde16a3 100644 --- a/sound/soc/intel/boards/sof_sdw_common.h +++ b/sound/soc/intel/boards/sof_sdw_common.h @@ -16,12 +16,6 @@ #include "sof_hdmi_common.h" #define MAX_HDMI_NUM 4 -#define SOC_SDW_UNUSED_DAI_ID -1 -#define SOC_SDW_JACK_OUT_DAI_ID 0 -#define SOC_SDW_JACK_IN_DAI_ID 1 -#define SOC_SDW_AMP_OUT_DAI_ID 2 -#define SOC_SDW_AMP_IN_DAI_ID 3 -#define SOC_SDW_DMIC_DAI_ID 4 #define SOC_SDW_MAX_CPU_DAIS 16 #define SOC_SDW_INTEL_BIDIR_PDI_BASE 2