From patchwork Fri Sep 13 09:06:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13803172 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2087.outbound.protection.outlook.com [40.107.223.87]) (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 486731D7E21; Fri, 13 Sep 2024 09:07:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726218436; cv=fail; b=H8SmWUJsEa8yW/oMTMKrQq9jjEdSj+S5T0CiT3E3HQ2ylzdCF050f14KxGIR6p9O/qZ9cMfPGNOpNavxkuPFTqribPuYnxr2k2VH7LO+P52liu33jhVtZ3yYDgTcnKFi5u7IwYUmqfXZtKekLyAq7jTaQc1RdfsBxymhyGOSHqM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726218436; c=relaxed/simple; bh=2Lc4GiLB8K1mdzeTgxlYGhsrGSETeSJTaQUqJMgN+WE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TNxMNiJt+WiEOrjLJ7rOc/K/TGhzXdHX48cWliBniZvmPjlWmhWAIV0QX1R28Oi0JON5Rd82PooBZJ0eIREQR+43Ln7eY+87/tJiDLfZd55aFRm/HtI6ycOMKsDU9YAY0aMaoECeXH0nNBE8eWetDFws+lHgxCajNPPiwKj5oio= 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=LH+x8Ulr; arc=fail smtp.client-ip=40.107.223.87 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="LH+x8Ulr" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AOuEJ5Yxw9AEgZwoL8EQ/2ZIQoervGaaT0jqoGqiwKCg8UqXf6L7D1BoYdMgP8LVOEcYwiuNADJDQPcwhckvr/nCjORTdZKTP0ZVCcYfeqHkZ5PidG0h/Xjws85NYd+MW+zsOQ0NdL3ZNClqMr57WawZqdJsNW9Zpz1SBAXRMp6bs/sGTaT2yXE953q0aDJ/SPnRje8HwcuSSYxzLKmI4Rl1ZcsKceT9cV3BxJfTsvLVBYXDhQy8y8H1Li8kcTpjJ+63ic2HdSQa8R0o5eQqP0YMF9Hxw7T/RoX1X9AYgfvPjkqvhNY3eXG4AmPFi1Y0ZAnSa7BgLQjG0sn+gj9+1A== 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=2TGVG1rAtIOo6XDRP4na37RieCa1dYr9ZKoZRy2HGPk=; b=wcKmobwM0OZpYXwIheCZBIuxoslmJNleWr/pNjoKYYQwjndp2gtY3kIeXBOn8n3vZ+zZtPRiwYIZ2Zy2Zg4mZHtWpeme4SdgPoref6NnrtyirM27T7lQLWCvYuCFCJlebzkMvfKzvmUibFr57WB8Z78WKh3oHGfGmLsFX4BEqfvgUScUnDSFxm2q081pf9qd9vE6i9M/MexUp8MEdwHm2AfrvevkxxZu0E80U8IaLQ9KKMHlKyShvb+TWjLFaHF5eO7RRkC9851in4WCXzMTuXV9tWWQ9u+B7sz9R5frExlbZjadizcpPAeQUTub783erRBFYmYaKe9w3cPo/73N1Q== 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=2TGVG1rAtIOo6XDRP4na37RieCa1dYr9ZKoZRy2HGPk=; b=LH+x8Ulr7yroSbLJgiOuA39uUkUbfOCiwNA4JACRpfk9bqb19b/y51jPpfaSL5kVVGLf6mlgGxBqZsdnrfNkPwzr3aVPH5Am2pzIiNoS9xCZ/k1h7e9wl19vhI+Vzu4QBziJXs5foTkNQ4r9MgcOe7QACgga0wpTp1hkWOPmJxw= Received: from PH8PR02CA0014.namprd02.prod.outlook.com (2603:10b6:510:2d0::6) by SJ2PR12MB7944.namprd12.prod.outlook.com (2603:10b6:a03:4c5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24; Fri, 13 Sep 2024 09:07:11 +0000 Received: from CY4PEPF0000EE35.namprd05.prod.outlook.com (2603:10b6:510:2d0:cafe::dc) by PH8PR02CA0014.outlook.office365.com (2603:10b6:510:2d0::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.23 via Frontend Transport; Fri, 13 Sep 2024 09:07: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 CY4PEPF0000EE35.mail.protection.outlook.com (10.167.242.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Fri, 13 Sep 2024 09:07:11 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) 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; Fri, 13 Sep 2024 04:07:02 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , , , , , , Vijendar Mukunda Subject: [PATCH 3/5] ASoC: sdw_util/intel: move soundwire endpoint and dai link structures Date: Fri, 13 Sep 2024 14:36:29 +0530 Message-ID: <20240913090631.1834543-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240913090631.1834543-1-Vijendar.Mukunda@amd.com> References: <20240913090631.1834543-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-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE35:EE_|SJ2PR12MB7944:EE_ X-MS-Office365-Filtering-Correlation-Id: 8671b957-db5d-4a71-d2dc-08dcd3d373fa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: IoNyGWLD/SvzZY+WTV+aQi3G2GBkqkSY8ifbGmOP/1D3ZtzQjqAlpILs52AL/Acnh1QIT7WI25QGMzMbeI5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ZqwmZQ4sy1YqexhS9uLdMUeGilR509kGAd4BttyW5O5TQ7YvCshCd7FkmbPBMJpFAZvlQlYf78Q6ti/kknGTS5FajKorWmEMi3f6frUFHQsKfdeig+YAYW63hknReamiNTftdlghWS3/KEqCTTJN/BhWrjdlJP5Wpcvvt0Af2e2kSymyZGSKgN2MTc9kiUt2xy8U4N/rLV+dHsAG2AveRuN9wqgz97prr1qkpAC4pzMplWKg1I9lVvfGnDmstHr31pZiVeORu+c1/0I08rIYxpQ6t2+o3jkt49HNstRPs 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)(7416014)(376014)(82310400026)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2024 09:07:11.5270 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8671b957-db5d-4a71-d2dc-08dcd3d373fa 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: CY4PEPF0000EE35.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7944 Move Soundwire endpoint and dai link structures from Intel generic machine driver code to common place holder(soc_sdw_utils.h). These structures will be used in other platform SoundWire machine driver code. Signed-off-by: Vijendar Mukunda Reviewed-by: Bard Liao --- include/sound/soc_sdw_utils.h | 21 +++++++++++++++++++++ sound/soc/intel/boards/sof_sdw.c | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/include/sound/soc_sdw_utils.h b/include/sound/soc_sdw_utils.h index e366b7968c2d..e3482720a3eb 100644 --- a/include/sound/soc_sdw_utils.h +++ b/include/sound/soc_sdw_utils.h @@ -93,6 +93,27 @@ struct asoc_sdw_mc_private { int codec_info_list_count; }; +struct asoc_sdw_endpoint { + struct list_head list; + + u32 link_mask; + const char *codec_name; + const char *name_prefix; + bool include_sidecar; + + struct asoc_sdw_codec_info *codec_info; + const struct asoc_sdw_dai_info *dai_info; +}; + +struct asoc_sdw_dailink { + bool initialised; + + u8 group_id; + u32 link_mask[SNDRV_PCM_STREAM_LAST + 1]; + int num_devs[SNDRV_PCM_STREAM_LAST + 1]; + struct list_head endpoints; +}; + extern struct asoc_sdw_codec_info codec_info_list[]; int asoc_sdw_get_codec_info_list_count(void); diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index 222cf4a37707..6b30659f0e25 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -617,27 +617,6 @@ static const struct snd_soc_ops sdw_ops = { .shutdown = asoc_sdw_shutdown, }; -struct asoc_sdw_endpoint { - struct list_head list; - - u32 link_mask; - const char *codec_name; - const char *name_prefix; - bool include_sidecar; - - struct asoc_sdw_codec_info *codec_info; - const struct asoc_sdw_dai_info *dai_info; -}; - -struct asoc_sdw_dailink { - bool initialised; - - u8 group_id; - u32 link_mask[SNDRV_PCM_STREAM_LAST + 1]; - int num_devs[SNDRV_PCM_STREAM_LAST + 1]; - struct list_head endpoints; -}; - static const char * const type_strings[] = {"SimpleJack", "SmartAmp", "SmartMic"}; static int asoc_sdw_count_sdw_endpoints(struct snd_soc_card *card, int *num_devs, int *num_ends)