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);