From patchwork Wed Jun 19 00:19:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13703263 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2068.outbound.protection.outlook.com [40.107.113.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 DE228EDB for ; Wed, 19 Jun 2024 00:19:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718756382; cv=fail; b=FJKHm05AxkEE4C3AF0YtNG3920qT9fc6yLKLlbuaxHTYG8O/chnD/pd4Lp8iBdF+QPdgTTszJv4MT7YTxE+92GtKh19vAMThO8In3ngN0VJuEMFZSIcACWzSO9c2y+vVFz7EgjX3/Ql2vmktjSHF5OaLsnVBc4cLv+bKwEjhMr8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718756382; c=relaxed/simple; bh=se4WcdwbITVFDokTGVdfhD2eqTW+zcMvrCXrgISiZrM=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=dFTc9fKTG3gnQFFWhZALOb/xTUn2wj9mAc1Hhsit3GP76LD6Sxs3NbEN2hVyQY/HjvsdI8mmXZ13+21MvmEIvM1WpVD0qFBuGh8r4YFByO+IR3xy/2ylWriwZMDUiKGPtwaSX0C9Q1RKkUmjhfx3bVWha+UwWz1LAIbHzazqUZM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=l1JXsh09; arc=fail smtp.client-ip=40.107.113.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="l1JXsh09" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U+7OKzc0NFKdUjCAaBnzkXzmpEeHU6Xr0/jaL2+EsyI8+BIK+qb8iAoYS3XhM11gDTY+CZt49y0ssEiwnjw2Ik4W6gY7o2Xo3icm8XygB01pU2DYT5FCv/nMVOZKJH1R/qa6IsMKZm3y/3bAAefZe5TEyUzeA8DKXeL++sEPtCtLnt54ZZqGlxADocsUCiDpPQ10ciTEggLDS8UBYAVkoLTneApx5ePWy09GRotW3u1PyU6FKe87aLfeV1tCdh0J9vD6lcDfbjpclZx7nfP+cKd9lqmF7VCpmyDV6opFnXkN7qAsd8RzdBQURyvZ7gR9OwhRPID9onqDCdoMrOftnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=AdMd3EFoHmtq/QP8bndNVlYrUlJsRXLuagPZvm7tS9k=; b=Ooy/dgMf53QHf26X8sj2gOjBbVbZVtLwfG2G1f+486pyXDnZA6Wi74efyvQ+7wumvEVDNAUAbsQkFVKeTZOdTl/LgeaKgjnc+hmGSqowjDYlxXHSq/uTbsVTQGrWewXfPWE/0cYznP1ApdPJSraT33ysy+H3qvRGfQe8caw6uXSFeqnFSrFtjq/1hqqlis34ohzoyVFNmzvH7IJBAiGZMUhqH1VCygZDM+J2hQoDOcqnmSsKS4m8r4LhTdAbJm6nzxvIM+QrfMN8/Stikg6J8RvD+wZF+YN2eYGt4/A2Reg+j0isOc9eom85rfHR6PPukq1fOOIrz5+K0DEaILntfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AdMd3EFoHmtq/QP8bndNVlYrUlJsRXLuagPZvm7tS9k=; b=l1JXsh09h5URJqm0CqqA300J+EH+j9hEHkV1kIpR0WmBFDbX4gA1xs8ASZXe3hsLPjClTJTQkp87rZzV2PW3j/9dT382HEQzsLMXf3hkRfb5xkiH1myK0zwsDyAPbWFkWfENGu+aRZjMe9ESUNar5/y4LOYpZ67jBtTiglKbMQ4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB11717.jpnprd01.prod.outlook.com (2603:1096:400:37d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Wed, 19 Jun 2024 00:19:36 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7677.030; Wed, 19 Jun 2024 00:19:36 +0000 Message-ID: <87plsdwzqf.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v6 1/4] ASoC: soc-pcm: Indicate warning if dpcm_playback/capture were used for availability limition To: =?iso-8859-2?q?=22Amadeusz_S=B3awi=F1ski=22?= , Alexandre Belloni , Alper Nebi Yasak , AngeloGioacchino Del Regno , Banajit Goswami , Bard Liao , Brent Lu , Cezary Rojewski , Charles Keepax , Claudiu Beznea , Cristian Ciocaltea , Daniel Baluta , Hans de Goede , Jaroslav Kysela , Jerome Brunet , Jiawei Wang , Jonathan Corbet , Kai Vehmanen , Kevin Hilman , Liam Girdwood , Mark Brown , Maso Huang , Matthias Brugger , Neil Armstrong , Nicolas Ferre , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Sascha Hauer , Shawn Guo , Shengjiu Wang , Srinivas Kandagatla , Sylwester Nawrocki , Takashi Iwai , Vinod Koul , Xiubo Li Cc: alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com> References: <87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 19 Jun 2024 00:19:36 +0000 X-ClientProxiedBy: TYCP286CA0077.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:2b3::9) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB11717:EE_ X-MS-Office365-Filtering-Correlation-Id: 5fb00101-c67e-4bc8-860d-08dc8ff5806e X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|366013|52116011|7416011|376011|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: QlkePzcijHtCl8uPAMo3mpZCbtoAIKJdscLHomArnc1VkDH9j6ZKT3UL4vIOXaDt+rh9vpqbLkZ3TwejOOI9OZ3ZuAa+VxNqrq+2LXuCT+LNRNHMwV1wGs7ufsSFg8vq3PfiI5NDprcY8LEJ5ewhKqHFEw0aKNb4AXRD6j9RVLJP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cMYrzIaO6/6wAmOWUMGtmNvBamFMN/7hRGerqfc277xbnMgpAglQJPGSsr+LTS0RNuJeJksreO7ekjcipV3SVabDYCT92+BR7ocg9Qan00bwQEHtd7hkInBnhqMOJ7cdTaYPw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(366013)(52116011)(7416011)(376011)(1800799021)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PskQuAB9X7LIOKpsJWRFcN7KTYp8a9SuCLX8TtnXE7GVtkuwquqto8QMpmhkSy2pDUyLj35h4w8Yqrv84EK/ZPO1qigL6pAD09SoRkIi6MM0dDBhwllLDaa+b4IsRRtIP0AIkAD0Xb7IwYyX66UKh06Eb+NWf1ZgCG79DM/KzvE5406VuWcd/o8PkOcSQp5wpxmnprwsFNAc+B9j2gYriC++JJixoZ1rSVvH9Q1G8Yl9Q65ebsvp4rA6McWxwK9LFl2xfvLGVhAWbXPC74424HYjhIvdq/jnmvQ289WcuYFADLAR9UXUpZmxCvz+47PpmmfhRI8ov5utLX2KVVpKxu8UdZoeLDjN+wVCunLUGS3AajBNFRMpPTQ6+HJn+Z5OCZH0WitUsHgRG99vIhy25O7UivoGH7Njw/nvAs0f3G6hDqDKV7jisLmG4CRIBy9m6OgMzSkMV9a7j3DZuvHsvdE2xwKM4gDjJmeHktBiuweapcZDypVmepv16JaTYiICWjtYsxWydfXmS2iWBZCxLEm5SWI8++OweXJw5KpTjOPHUXny0Ba8NlWM/uSSFG95kVJflG5yWl+pyDm1x+/4YHbdqmxXHRUmabHpYzuqh0Jmy+ENdaqEdGUGXmTYrKgzXDyaIEWgVotvA+LYqc5nC9Mu42VcvOqlVWpLNiJ1xJ5UW2FF2i/3OQzQmjdyBSnMfBV7jQdQYhCihi7UNmBdLQ9awor225OL0IDTR0sW7+xyuewSl5s7RFsl6cmbb6q2WyUsDr9eewqyZL+DO8xtWmsTdbostNjjPaQR7fowDXylmLYIWPC+jTJXmZEZEHrAKxEpL2H0yUEU2V1Icb4zJ3w/3yEcCMV7wgNMTyTJS4ZdXC97xr72dhJAv3/Q/oJmyfVKIK1iQm++jTqudZ7yKfUoN+xxsKBVk6J64T4+bUbWs43qQjuJhvGFUnmAo6HKyxmySC6cetjIJ28g7288rZtJw4aJ6Wy1YBAV3oirpzzBrf0fA9hY8+BIHz0syB4eKsnWoOZj7rZ7r42eyMNldw7/0SpwmotdE/7qNkq0VsGz8y0xwoG5T6TstlWfhqPqVDv/tWnQRViXRqrehrWbPe1bQhPFgGSCJHRgY/wt401AQpm9i2apc6yRgD5A37V6HPQOwJsXZJnunJJTUFi58hhuMsw7SOLbLL3x33T8nBFqnf/kBFD1YojK5fCdnr+Rs3tGsdd1UOZn7i0ydwSn9Tr7TpmQLLqxme4SMd1cjHPO3QPJxBQA3Auuu5YtVMf7rSERckThaqTSmoDZ05EyelTGo8LbT3cvhQLrqlwyDj9c97825nGS31s0YXP64MlabBTgsi7+Hh4xBIn0aKBjuPKwFAO/CUlISEABAgfeGPbBMWiF+OFEFmkQ1Yxz8YQzsALD7UH9kgqtCtM7oCh1fBAMAWnTScfkrCiYBityA4P1wH4uk6+bQmRlmw9ImWI+V3BWEhwTX3r+VvSadr0p3zNBkfYHOpFAe9Sxb5tVJme8azOQARFlaqs6AMiddo7XIvjJeKUoMw02n223Jff5S1kJSCldCRormxzo4XzXM9I/IOnUx6lJtaq9aQ67R3Dlvyo8WLEXvmz4iz03cp9zQKvSLSTdcskk0XeNWXVsfjE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5fb00101-c67e-4bc8-860d-08dc8ff5806e X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 00:19:36.6221 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dC44GJqxBl4c96KiMdinNuvO5/RxOMYR+cRMuCSKk3oe2nuPhW3uevo45SYIrMdtsudKgBEVJxCv+0+YDbqMKVQgZCDNZKua1rkJJ/qWe0W4mOfScGSRc6DsQbbPe8m8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11717 I have been wondering why DPCM needs special flag (= dpcm_playback/capture) to use it. Below is the history why it was added to ASoC. (A) In beginning, there was no dpcm_xxx flag on ASoC. It checks channels_min for DPCM, same as current non-DPCM. Let's name it as "validation check" here. if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { if (cpu_dai->driver->playback.channels_min) playback = 1; if (cpu_dai->driver->capture.channels_min) capture = 1; (B) commit 1e9de42f4324 ("ASoC: dpcm: Explicitly set BE DAI link supported stream directions") force to use dpcm_xxx flag on DPCM. According to this commit log, this is because "Some BE dummy DAI doesn't set channels_min for playback/capture". But we don't know which DAI is it, and not know why it can't/don't have channels_min. Let's name it as "no_chan_DAI" here. According to the code and git-log, it is used as DCPM-BE and is CPU DAI. I think the correct solution was set channels_min on "no_chan_DAI" side, not update ASoC framework side. But everything is under smoke today. if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { playback = rtd->dai_link->dpcm_playback; capture = rtd->dai_link->dpcm_capture; (C) commit 9b5db059366a ("ASoC: soc-pcm: dpcm: Only allow playback/capture if supported") checks channels_min (= validation check) again. Because DPCM availability was handled by dpcm_xxx flag at that time, but some Sound Card set it even though it wasn't available. Clearly there's a contradiction here. I think correct solution was update Sound Card side instead of ASoC framework. Sound Card side will be updated to handle this issue later (commit 25612477d20b ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper")) if (rtd->dai_link->dynamic || rtd->dai_link->no_pcm) { ... playback = rtd->dai_link->dpcm_playback && snd_soc_dai_stream_valid(cpu_dai, ...); capture = rtd->dai_link->dpcm_capture && snd_soc_dai_stream_valid(cpu_dai, ...); This (C) patch should have broken "no_chan_DAI" which doesn't have channels_min, but there was no such report during this 4 years. Possibilities case are as follows - No one is using "no_chan_DAI" - "no_chan_DAI" is no longer exist : was removed ? - "no_chan_DAI" is no longer exist : has channels_min ? Because of these history, this dpcm_xxx is unneeded flag today. But because we have been used it for 10 years since (B), it may have been used differently. For example some DAI available both playback/capture, but it set dpcm_playback flag only, in this case dpcm_xxx flag is used as availability limitation. We can use playback_only flag instead in this case, but it is very difficult to find such DAI today. Let's add grace time to remove dpcm_playback/capture flag. This patch don't use dpcm_xxx flag anymore, and indicates warning to use xxx_only flag if both playback/capture were available but using only one of dpcm_xxx flag, and not using xxx_only flag. Link: https://lore.kernel.org/r/87edaym2cg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Tested-by: Jerome Brunet --- include/sound/soc.h | 1 + sound/soc/soc-pcm.c | 65 ++++++++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 28 deletions(-) diff --git a/include/sound/soc.h b/include/sound/soc.h index 33671437ee89..2a3da1d91377 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -815,6 +815,7 @@ struct snd_soc_dai_link { /* This DAI link can route to other DAI links at runtime (Frontend)*/ unsigned int dynamic:1; + /* REMOVE ME */ /* DPCM capture and Playback support */ unsigned int dpcm_capture:1; unsigned int dpcm_playback:1; diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 711b2f49ed88..7fe5ee3bcfd4 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -2795,6 +2795,7 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, { struct snd_soc_dai_link *dai_link = rtd->dai_link; struct snd_soc_dai *cpu_dai; + struct snd_soc_dai_link_ch_map *ch_maps; int has_playback = 0; int has_capture = 0; int i; @@ -2805,43 +2806,51 @@ static int soc_get_playback_capture(struct snd_soc_pcm_runtime *rtd, } if (dai_link->dynamic || dai_link->no_pcm) { - int stream; - if (dai_link->dpcm_playback) { - stream = SNDRV_PCM_STREAM_PLAYBACK; + for_each_rtd_ch_maps(rtd, i, ch_maps) { + cpu_dai = snd_soc_rtd_to_cpu(rtd, ch_maps->cpu); - for_each_rtd_cpu_dais(rtd, i, cpu_dai) { - if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - has_playback = 1; - break; - } - } - if (!has_playback) { - dev_err(rtd->card->dev, - "No CPU DAIs support playback for stream %s\n", - dai_link->stream_name); - return -EINVAL; - } + if (snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_PLAYBACK)) + has_playback = 1; + + if (snd_soc_dai_stream_valid(cpu_dai, SNDRV_PCM_STREAM_CAPTURE)) + has_capture = 1; } - if (dai_link->dpcm_capture) { - stream = SNDRV_PCM_STREAM_CAPTURE; - for_each_rtd_cpu_dais(rtd, i, cpu_dai) { - if (snd_soc_dai_stream_valid(cpu_dai, stream)) { - has_capture = 1; - break; - } + /* + * REMOVE ME + * + * dpcm_xxx flag will be removed soon, Indicates warning if dpcm_xxx flag was used + * as availability limitation + */ + if (has_playback && has_capture) { + if ( dai_link->dpcm_playback && + !dai_link->dpcm_capture && + !dai_link->playback_only) { + dev_warn(rtd->card->dev, + "both playback/capture are available," + " but not using playback_only flag (%s)\n", + dai_link->stream_name); + dev_warn(rtd->card->dev, + "dpcm_playback/capture are no longer needed," + " please use playback/capture_only instead\n"); + has_capture = 0; } - if (!has_capture) { - dev_err(rtd->card->dev, - "No CPU DAIs support capture for stream %s\n", - dai_link->stream_name); - return -EINVAL; + if (!dai_link->dpcm_playback && + dai_link->dpcm_capture && + !dai_link->capture_only) { + dev_warn(rtd->card->dev, + "both playback/capture are available," + " but not using capture_only flag (%s)\n", + dai_link->stream_name); + dev_warn(rtd->card->dev, + "dpcm_playback/capture are no longer needed," + " please use playback/capture_only instead\n"); + has_playback = 0; } } } else { - struct snd_soc_dai_link_ch_map *ch_maps; struct snd_soc_dai *codec_dai; /* Adapt stream for codec2codec links */ From patchwork Wed Jun 19 00:19:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13703264 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2041.outbound.protection.outlook.com [40.107.113.41]) (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 0F8BD15B3 for ; Wed, 19 Jun 2024 00:19:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718756391; cv=fail; b=CpTVyB7+Vp9gpommCpo7s/OENj0xbQFtm7alUxOSTu3NHSRCWXM/tP9/HX+vT0kHem/4aSfDpvioE/3dpspkQAPf+8PpVLJwsTrxHPx7wuIVZAIQc1oDPXhIf2hJRi+1h1lt0sST1o56NpofioLkkGsU34Y1B4EgHOC6wueRXHU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718756391; c=relaxed/simple; bh=WpIJ6ZhUxErQb6XvZacBe1atFhcwAn+DXnHQaipq3mw=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=IcOeE9gSyQUD2DGrscPUt2NsYzB+pkjgiDhcKH7PNfhXBKoOfV1uh5xBn1L+lKgcIBAm8REnTSH1XBZVaPMehA0PBzt7JWghvfmS7QjSIM1Gpk6QA9Y9alb2yZtMTCOAK+rfnpNU3io+Folw056a5nryNPwgFhGtmt81IVd5VJk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=oj6OspYO; arc=fail smtp.client-ip=40.107.113.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="oj6OspYO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XiPwKvKV8UUuHIOY9GaqG+rq2x53IZshu3wE5hw/cmgkfhxRIyuXXAb0XqpeDOHgDNZhdvIpMl4TX62MCFb8yWOYcCvzVGek+TliSzjeSotTOTEvU3ENgXtENCq090cj0PJpePbkRPWs9Df6eQvqGWua4tiPJADF7D8l5Ejo3kM4tuY/7gc+4YlDZ9GRFn0M74+VBxrW8ojBulY1vR/oFo48L/BGjkAnKEsPVaLrCYubs/eDlv6L48LfM41KayZP8Jjl52jtpkXHUzpK0R1eZYxvQgsQDphoZTPF7ApDbVg9yhCbve+dXfeJjxySrOiZafgzVFW7oqJ68cL0wpESPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=IaFNNbDVUkeUlT59hSm5rDwQtL6OcQB+NfUInbzjlSg=; b=Fhidx0tRcAS47hUYFU0Rk1ODu60Wgslp7rM1LvCUEDcyhsGacWfrcsVk8QlKim8KJsrJl1jHdhDnrtUJcweATluid/nxFTma2FA0z6wdD1FHo5+E5ClU8I4Ma79AqwvA7iq37Uuj+Ahwb6Ah1FoogUjKu4fux5RajChr3AEg5H7UJGPoEo8XLrW2m/6j8byrsNEe3OFUU1DvJXEQ9SZg/MdCUEpHFQs5a1vlidvS3bUAXUrekWXW7FsrdF+2JRxK2exS1hqdXACpoYI8dS5lRYWbJPA8JgbLQMdFTDXDT8SF5LTOMdsiJ0aY/NpIuGY7MjUmuU8QdRvkMMtNedpaRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IaFNNbDVUkeUlT59hSm5rDwQtL6OcQB+NfUInbzjlSg=; b=oj6OspYOM5y9d7yGhywmCEzdCn3r9hCbH8LZUr46Ip7GnmIHcNQpj1aOEBHr1it2oqMWWtEt5Y70mR9bOfPwcqtmiDXRpsi2b7lt8GjGSHFI0DPvdSEEfvNXRftbP8ddw1ZAqXLYVpmCXHZ1SzTb0s6lKdPG8L++yvczfybS1oI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB11717.jpnprd01.prod.outlook.com (2603:1096:400:37d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Wed, 19 Jun 2024 00:19:46 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7677.030; Wed, 19 Jun 2024 00:19:45 +0000 Message-ID: <87o77xwzq7.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v6 2/4] ASoC: remove snd_soc_dai_link_set_capabilities() To: =?iso-8859-2?q?=22Amadeusz_S=B3awi=F1ski=22?= , Alexandre Belloni , Alper Nebi Yasak , AngeloGioacchino Del Regno , Banajit Goswami , Bard Liao , Brent Lu , Cezary Rojewski , Charles Keepax , Claudiu Beznea , Cristian Ciocaltea , Daniel Baluta , Hans de Goede , Jaroslav Kysela , Jerome Brunet , Jiawei Wang , Jonathan Corbet , Kai Vehmanen , Kevin Hilman , Liam Girdwood , Mark Brown , Maso Huang , Matthias Brugger , Neil Armstrong , Nicolas Ferre , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Sascha Hauer , Shawn Guo , Shengjiu Wang , Srinivas Kandagatla , Sylwester Nawrocki , Takashi Iwai , Vinod Koul , Xiubo Li Cc: alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com> References: <87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 19 Jun 2024 00:19:45 +0000 X-ClientProxiedBy: TY2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:404:a6::21) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB11717:EE_ X-MS-Office365-Filtering-Correlation-Id: 8652a5dd-f7f7-418e-063c-08dc8ff585d7 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|366013|52116011|7416011|376011|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: dADJWioGNHdvK18jMvFxu4Ce1Q1Tl+gX14qRGMDgoSU3VDOA/zMrdqTcz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lKW98SMZxpFP2311Czh0TrlrbY0qHvdVXF0M+CqJUCrtVegVBdQ936JUKFhwwN1P7vUTjxQTLwYEJeYYLoij8tW7WpC/Dl7PsdEtNItEh4anG7drc0dLKZieKO+G4fAGb5paQeNtE7vaMTVf8e0RgKODcijR2UTSviof7KXwsRgAWyXMvfPZb2ZCo1eYhPXCMJK7AtM4mzjMsKogEEjNg0qF1CA72l5wUkIa6VM1eAgdnDzkG4rq6aQZ9j+nPtqx79MyO6t2ssqJBSMZkKXKvk3sBR1E7dS0 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(366013)(52116011)(7416011)(376011)(1800799021)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: s4yWRmqHLV+ZxJyA1kbOnUTdRucNlTeBEnH7co+GClA9V88DAZRTEY9+WIiabLqlB6L/RZ78GErBPSBLW9PO0ODYI9zu400niVT+Z2kzqX/zlDvqxKpHAGiKvd9qVvo8DD7rbRsivFfAlDxjjh4nqR09hxX/jGAF3oAAdbWfKrifEmKjA2MfO34nMi67wOna6g18Zwi0tfQUmMvs23Em2yfXkL4xUPqG80RC66+8h/YWfe8bvsnGxvEqzYdhRnlnH5qGkVfVzEjCofyUP6bvMxCU/+yqaP5KSJWdH0nOPX6dqVm67jvK3+59Gi+RHy6ufryiLoVD7xtbJzddEhZT15rEcQI5pZDbHHVi9iiU8HxtkX5u4Bfh9gCBF7+tkdRoJcYGhYt+xPF3dR47qGlvhTTIhSD0px9jG22MJZ20iWjtO1okk/z8Io4a0Q4l09XhKQ7T9q2MHLXST9oLF0aoHjGPsdp4DNKE7zlJ6Lfv4WJ9HdYOc8VFp9vH2NowhZ95eLAup82LanEcyrkK1/e1h01X2D78DDGTvQ55xxcmjc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X3rY4gLkLBfPI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8652a5dd-f7f7-418e-063c-08dc8ff585d7 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 00:19:45.7103 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8zz7zhIWeb7yHv1Ok0j7tkJWC3wnKEvFZ2RuGQ8g1kI0DEhPinEw+H+BA3PlEe79Qw3i1NYqgpP/1d2TqaAIsR1ZI+3KCim9NITa0LsjibpWndLxC1elvpJQRC6NBXPm X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11717 dpcm_xxx flags are no longer needed. We need to use xxx_only flags instead if needed, but snd_soc_dai_link_set_capabilities() user adds dpcm_xxx if playback/capture were available. Thus converting dpcm_xxx to xxx_only is not needed. Just remove it. Signed-off-by: Kuninori Morimoto Tested-by: Jerome Brunet --- include/sound/soc-dai.h | 1 - sound/soc/fsl/imx-card.c | 3 --- sound/soc/generic/audio-graph-card.c | 2 -- sound/soc/generic/audio-graph-card2.c | 2 -- sound/soc/generic/simple-card.c | 2 -- sound/soc/meson/axg-card.c | 1 - sound/soc/meson/gx-card.c | 1 - sound/soc/qcom/common.c | 1 - sound/soc/soc-dai.c | 38 --------------------------- 9 files changed, 51 deletions(-) diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 279223c4ef5e..34594590db76 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -219,7 +219,6 @@ void snd_soc_dai_resume(struct snd_soc_dai *dai); int snd_soc_dai_compress_new(struct snd_soc_dai *dai, struct snd_soc_pcm_runtime *rtd, int num); bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int stream); -void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link); void snd_soc_dai_action(struct snd_soc_dai *dai, int stream, int action); static inline void snd_soc_dai_activate(struct snd_soc_dai *dai, diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 0e18ccabe28c..98b37dd2b901 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -650,9 +650,6 @@ static int imx_card_parse_of(struct imx_card_data *data) link->ops = &imx_aif_ops; } - if (link->no_pcm || link->dynamic) - snd_soc_dai_link_set_capabilities(link); - /* Get dai fmt */ ret = simple_util_parse_daifmt(dev, np, codec, NULL, &link->dai_fmt); diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c index 7b981aa8690a..2495b0ca3d2c 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -265,8 +265,6 @@ static int graph_dai_link_of_dpcm(struct simple_util_priv *priv, graph_parse_convert(dev, ep, &dai_props->adata); - snd_soc_dai_link_set_capabilities(dai_link); - ret = graph_link_init(priv, cpu_ep, codec_ep, li, dai_name); li->link++; diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index be5a4ebfddd4..fdae0891675f 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -953,8 +953,6 @@ int audio_graph2_link_dpcm(struct simple_util_priv *priv, graph_parse_convert(ep, dai_props); /* at node of */ graph_parse_convert(rep, dai_props); /* at node of */ - snd_soc_dai_link_set_capabilities(dai_link); - graph_link_init(priv, lnk, cpu_port, codec_port, li, is_cpu); err: of_node_put(ep); diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 2de5e6efe947..0eefb348ecd3 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -280,8 +280,6 @@ static int simple_dai_link_of_dpcm(struct simple_util_priv *priv, simple_parse_convert(dev, np, &dai_props->adata); - snd_soc_dai_link_set_capabilities(dai_link); - ret = simple_link_init(priv, np, codec, li, prefix, dai_name); out_put_node: diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 8c5605c1e34e..09aa36e94c85 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -339,7 +339,6 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np, dai_link->num_c2c_params = 1; } else { dai_link->no_pcm = 1; - snd_soc_dai_link_set_capabilities(dai_link); if (axg_card_cpu_is_tdm_iface(dai_link->cpus->of_node)) ret = axg_card_parse_tdm(card, np, index); } diff --git a/sound/soc/meson/gx-card.c b/sound/soc/meson/gx-card.c index f1539e542638..7edca3e49c8f 100644 --- a/sound/soc/meson/gx-card.c +++ b/sound/soc/meson/gx-card.c @@ -107,7 +107,6 @@ static int gx_card_add_link(struct snd_soc_card *card, struct device_node *np, dai_link->num_c2c_params = 1; } else { dai_link->no_pcm = 1; - snd_soc_dai_link_set_capabilities(dai_link); /* Check if the cpu is the i2s encoder and parse i2s data */ if (gx_card_cpu_identify(dai_link->cpus, "I2S Encoder")) ret = gx_card_parse_i2s(card, np, index); diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index 3d02aa3844f2..11cbcb588336 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -145,7 +145,6 @@ int qcom_snd_parse_of(struct snd_soc_card *card) if (platform || !codec) { /* DPCM */ - snd_soc_dai_link_set_capabilities(link); link->ignore_suspend = 1; link->nonatomic = 1; } diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index 03afd5efb24c..54348a055566 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -479,44 +479,6 @@ bool snd_soc_dai_stream_valid(struct snd_soc_dai *dai, int dir) return stream->channels_min; } -/* - * snd_soc_dai_link_set_capabilities() - set dai_link properties based on its DAIs - */ -void snd_soc_dai_link_set_capabilities(struct snd_soc_dai_link *dai_link) -{ - bool supported[SNDRV_PCM_STREAM_LAST + 1]; - int direction; - - for_each_pcm_streams(direction) { - struct snd_soc_dai_link_component *cpu; - struct snd_soc_dai_link_component *codec; - struct snd_soc_dai *dai; - bool supported_cpu = false; - bool supported_codec = false; - int i; - - for_each_link_cpus(dai_link, i, cpu) { - dai = snd_soc_find_dai_with_mutex(cpu); - if (dai && snd_soc_dai_stream_valid(dai, direction)) { - supported_cpu = true; - break; - } - } - for_each_link_codecs(dai_link, i, codec) { - dai = snd_soc_find_dai_with_mutex(codec); - if (dai && snd_soc_dai_stream_valid(dai, direction)) { - supported_codec = true; - break; - } - } - supported[direction] = supported_cpu && supported_codec; - } - - dai_link->dpcm_playback = supported[SNDRV_PCM_STREAM_PLAYBACK]; - dai_link->dpcm_capture = supported[SNDRV_PCM_STREAM_CAPTURE]; -} -EXPORT_SYMBOL_GPL(snd_soc_dai_link_set_capabilities); - void snd_soc_dai_action(struct snd_soc_dai *dai, int stream, int action) { From patchwork Wed Jun 19 00:19:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13703265 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2087.outbound.protection.outlook.com [40.107.113.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 9545D1C3E for ; Wed, 19 Jun 2024 00:19:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718756396; cv=fail; b=nS65nOkgVsGaqM2HPyZgWtr+K0yjriMiSws4bAPucuJfcsKsKAccMQp2PZd7vuNWAAEeqkiwus9HCC3IuJ2OMm6QaqGxjY/xoZLYMffXsGeK1NNSnUNuKoEhfxe+gg3y2xdM5hyqC+FVcfRdo4jMMSIZW2QTj0K9qpaIYYs+w1E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718756396; c=relaxed/simple; bh=R5m/4n1JoYnPi16p3LCIa2mEuJhAVRlRCjFtk+jPqoc=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=jQsa05dBcrbdAYVEpoW/t8VsXgtgxgSMC5Ogo7GIWWEy8xcpgzOwTNAW3gWTnERcsH0pAdfYAekTOm9opGP12Xi1huKwmdvmJw1zt5YdbojgTfCctaZHHQFRyQ/mjJuP/PdobiSrBUMVVE81Qi92aArRwrX/A3SvMfYhrhQIT2Q= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=dsbEq2fE; arc=fail smtp.client-ip=40.107.113.87 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="dsbEq2fE" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m7nHH3J0Yq7+nZfUxX7ur6cWOq7zvCtEPh13pjpiKEZdSXXbR95URxJgUigp+2AY6rD2V9FetjCenV7u6SZeI+GIU91CzYWLQakcCF6pdEpv2J44jfTjwcYdqGo7gQ2/0PgSv9RUx5RLhUy8xbjiT0JDY9p/nmFZDm21Nn10L7ysJ5HyhOwZ3aCwedEGpyQgkZbv5lXdx98PVnGKLFAfLXa5h0rXfFv/g6EwRX3K0ZLMl8h2Fa+URB3Zyu67p4VLxcETmyNWcIO9CMnUMOlN0DA+dbVeHpRb4U6h+C1mMMlkPagFMZ3bAg8xPCwkzCDZZq2D/hzpYamzFaw0NJSpCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=w61PALYSiWkhH9o42uXVCAd/pnpT87hto831DJrTNiE=; b=QZLi0Iwl18HiOW1hyj9Kv2ZrNapY99cwE48kGX2kaAbltkz2XNtbsDusZulBio2ay/8eVBqaXKq/J6/F8POylV8ozWRD3V6SAiliThlAy5mKgsPgjHLvvdMcdcXtf+edWSSHPg8ssJkk0Bwh4X95pD1CVdHPI/EA2qe2hlbWlaQEWv1ojHTnGTGRl7tHUtOcZEct4NKLb20+cS9Us12SusmkACxs6JgJ7cRkOyLAPEOI30/CEZZaWuMFOaZ/4WTBltsMCFSC4yJmgnLYR31HqzQb17ZPtnPnoRM/wqm4k1jM03jI3mgkWJV/Tgi6SJnY8Qlk2MCUv2PrTwUbJc9nfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w61PALYSiWkhH9o42uXVCAd/pnpT87hto831DJrTNiE=; b=dsbEq2fE1sFonWqwVRe9wOYLx0wKBKCG7vel2lyprdrG++1Zb78NoR/t9+1HaaiouDDXnguiqWlZ34UcUikjcgq/u3I5h7hqsvmEfQcInpCFzHOWePcL3u5Fs8H1H79FghpNE964y4A5hkMOS7+99MldTX2qWTr+SKJYFKWWNc8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB11717.jpnprd01.prod.outlook.com (2603:1096:400:37d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Wed, 19 Jun 2024 00:19:52 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7677.030; Wed, 19 Jun 2024 00:19:51 +0000 Message-ID: <87msnhwzq0.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v6 3/4] ASoC: amlogic: do not use dpcm_playback/capture flags To: =?iso-8859-2?q?=22Amadeusz_S=B3awi=F1ski=22?= , Alexandre Belloni , Alper Nebi Yasak , AngeloGioacchino Del Regno , Banajit Goswami , Bard Liao , Brent Lu , Cezary Rojewski , Charles Keepax , Claudiu Beznea , Cristian Ciocaltea , Daniel Baluta , Hans de Goede , Jaroslav Kysela , Jerome Brunet , Jiawei Wang , Jonathan Corbet , Kai Vehmanen , Kevin Hilman , Liam Girdwood , Mark Brown , Maso Huang , Matthias Brugger , Neil Armstrong , Nicolas Ferre , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Sascha Hauer , Shawn Guo , Shengjiu Wang , Srinivas Kandagatla , Sylwester Nawrocki , Takashi Iwai , Vinod Koul , Xiubo Li Cc: alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com> References: <87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 19 Jun 2024 00:19:51 +0000 X-ClientProxiedBy: TYCPR01CA0123.jpnprd01.prod.outlook.com (2603:1096:400:26d::9) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB11717:EE_ X-MS-Office365-Filtering-Correlation-Id: e20b2dd8-9b46-4b10-51fe-08dc8ff58980 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|366013|52116011|7416011|376011|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: eDBJ3xTo1iPn47peB6QFpmdYmAjSWI3y3CE52+1JSO08a60wGe3N3tN8Pexn8tw8WpXT5AZceSPEGiwmxWj1xPcv2r1r3LgltaDeJveiz3jy8/+U26Fb0e1qwAYT9evSjbwtyCBa2Er/gWptTRQazZiVyRhrFu0OB7TjKrU3qpwc5ti3u6vBpq8j8khyhKKlojQEhyfS/T80xXiuvv1qeWbbTgQCU73+Mah+RN3tDyCvr2tNXWhJE2xYicnhdrtB2iXwL4nHDg+VlT67qU5nhAZxi2BA7MtMhqqJ3TIpktZs6ZD1ds7Ci7OvF199I0PsT4Sz+TOrc9d8hLwwTUrE2x1aENEt8rMBj2T1wTLifXeRom5AzCif1aUdCUELVZMNGihf2ZFpweFl6KxcyktQlxT2IvA1+3bu7pfV+K5gHxosMYOwcVGJ08A8XoQQ3AdUh8VsbegR1L8a8noU+qfI7avkYfPRI7QPJrKzAMiMdxZQEJJEjO6Anr9rirk9qgOHfX2bUYpB3CdBjmnVBQ7REKVE6Wcm3MY8zonQHd3hinA87+5tm8LdX3cgHafZguN7rmZkyLz9jMqEMKZo1xHimJZtxgHov3kSIe1PAeRH9j9xX6rc+D5y/RKHXDi3CIk0kAvgoFGrTylScyKMBqhv66prvjCerML/FUPdmY55owlPVoi1njuJhQlu6utEX86BF8ToYxUIrGiITbgTJ24VffKN6P/04amN8z5zC4dsekdTkSUYj3e1+g2v+gCssSOqQc/faOUxLo2T/n7tsdNb8zq6ViWfbLZSA7XSlWVlbFBtsxfyOp40qEY6n3g66weZ97mkedopF8f9OecKMW7HOprmZLM8l4eg8dmERO7/+ZKNURMdAApNVAHuwCcwD5+tCAJ1j+cdb+uzzdTNwYS6OvDheQwBQ6ZF8IRopEAwXDlDdVnfnr2YSJOGOon28m4iq9YhMnCrMPieBcVfpSEw3MQk3OWY6LsiaJaExc3+U5Hk/AdO+jmW0a11JdakHdB4X9mafKl86awoQeVNGMTM4vrLuW2FKG30wvuJ7+HUPQV6lylkfydv3Qus58M6ClSvfa8xuVaPvhKu78hPoJxZEl/6e+9bMcBJbC20pk4i+sis7JZsvT8RKOHOY01WdWGNPOSi/H86jbMt4QGJXtQEuQRjkwJernHyYFSHkG6wNEtZugAUqAvN/SMdHunoKMZ4xlsAm+z/aZVRh7jyygyhOlUZM09nhpgzyzTED3PiNkvaDWCWxrOV6rt2X6ayFz/JVrHPRGaZZsisTqhaQn3yan1GArpv7CNNtTsmtp8wIPTzwQJw+jPmC54Wj0O7m27YxX9BscqBh43P2YcrLWjLU9Ajpp2hXXVPyLoxpGm2Y6NJQUV2wkqWlv4+EStKw9Xh X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(366013)(52116011)(7416011)(376011)(1800799021)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mm/6/h40yfSPB4HMvqZDPZNnseVxTyFcKPnGJ76/p4fivfBBo1Sc2j5FhR7CtVkAKPqfpaiCUJ9K3Qty+gDGN0L2nO13BbeTEKA4VqLCzoBOELFW/SQg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Qru2jZmGeuN8ZEEnU9HBMdAmEbt3CPk3MPUYSSlM1dJOyEGhg9FZrUT36HwSowJOtTes/JNDFnLLIOr25IIsOEleOKeyYTYp22sDcpAas3KB3gnU1kZF7cCm82OEb2OK8Uew7mgbldR07ZsHI7TUnqy7OsJHJjwJTVVeD/8XDcath644UtfumEutKBs2Qtv3LBwuyqCtMmK0+Fi3nOW+VcrTKmCPa+cScMN/1jF47isWzWysJ+DYojGCMmFLRlpMQXjZnQxnWe61Op3mDHRZp5C8f747cUQc4uxjwPwQptNf9gyKGSKuuGF6LQh3Xc3YhbGB3YI6iCXg5nqqp/OpnN+SS9zWoIb1nXl7y4bYvLJU9G8Afh3VNwPAqlbqToKzv+bnbiHGIlAiOv9iJRhgcoB3tRkiuk6F/1Fo4OZK21o64QWEMbjSJuIYvlBI7Q= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: e20b2dd8-9b46-4b10-51fe-08dc8ff58980 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 00:19:51.8568 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2KZCY+wcMN0jWypjRHXaI4Ver4HoC20cMvFsos5hUuxcBgenj1zHTcOveJBWn2XqfLLLx4T6EWUARB/hln6uUZBcccsj8/9cRVTRkpSSzjx6dyTyGXvZnQC2RwU5hlCZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11717 From: Jerome Brunet dpcm_playback/capture flags are being deprecated in ASoC. Use playback/capture_only flags instead Suggested-by: Kuninori Morimoto Signed-off-by: Jerome Brunet Signed-off-by: Kuninori Morimoto --- sound/soc/meson/axg-card.c | 10 +++++----- sound/soc/meson/meson-card-utils.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 09aa36e94c85..646ab87afac2 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -132,7 +132,7 @@ static int axg_card_add_tdm_loopback(struct snd_soc_card *card, lb->stream_name = lb->name; lb->cpus->of_node = pad->cpus->of_node; lb->cpus->dai_name = "TDM Loopback"; - lb->dpcm_capture = 1; + lb->capture_only = 1; lb->no_pcm = 1; lb->ops = &axg_card_tdm_be_ops; lb->init = axg_card_tdm_dai_lb_init; @@ -176,7 +176,7 @@ static int axg_card_parse_cpu_tdm_slots(struct snd_soc_card *card, /* Disable playback is the interface has no tx slots */ if (!tx) - link->dpcm_playback = 0; + link->capture_only = 1; for (i = 0, rx = 0; i < AXG_TDM_NUM_LANES; i++) { snprintf(propname, 32, "dai-tdm-slot-rx-mask-%d", i); @@ -186,9 +186,9 @@ static int axg_card_parse_cpu_tdm_slots(struct snd_soc_card *card, /* Disable capture is the interface has no rx slots */ if (!rx) - link->dpcm_capture = 0; + link->playback_only = 1; - /* ... but the interface should at least have one of them */ + /* ... but the interface should at least have one direction */ if (!tx && !rx) { dev_err(card->dev, "tdm link has no cpu slots\n"); return -EINVAL; @@ -275,7 +275,7 @@ static int axg_card_parse_tdm(struct snd_soc_card *card, return ret; /* Add loopback if the pad dai has playback */ - if (link->dpcm_playback) { + if (!link->capture_only) { ret = axg_card_add_tdm_loopback(card, index); if (ret) return ret; diff --git a/sound/soc/meson/meson-card-utils.c b/sound/soc/meson/meson-card-utils.c index ed6c7e2f609c..1a4ef124e4e2 100644 --- a/sound/soc/meson/meson-card-utils.c +++ b/sound/soc/meson/meson-card-utils.c @@ -186,9 +186,9 @@ int meson_card_set_fe_link(struct snd_soc_card *card, link->dpcm_merged_rate = 1; if (is_playback) - link->dpcm_playback = 1; + link->playback_only = 1; else - link->dpcm_capture = 1; + link->capture_only = 1; return meson_card_set_link_name(card, link, node, "fe"); } From patchwork Wed Jun 19 00:19:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13703266 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2083.outbound.protection.outlook.com [40.107.113.83]) (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 6CD65136A for ; Wed, 19 Jun 2024 00:20:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718756404; cv=fail; b=dFVBYlc5jC4EhRODnkIKc14hL+Ny5HrgHSCJ5+dqkOucIHjEaw3iR1OnFTpd0bvrkYKDZdG51TVWkkiLZsW3JcUb4RULvTLZgKWOGPGqfRLFugpJFbKL8uiFE5pu5McQrYSz6rG6ZDpYsxFJv2kLjnoHl0PU24QkCfWteNR4HC4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718756404; c=relaxed/simple; bh=zj7Jimic/OCmqYI3ZZcXQkEfbmKUdl1UJxICXnrcihE=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=SVJSaNXn5Z1zM1qj5yxjsWhfBzqmGBFuAHiuz0DleRxl/rEy2GRDDkWQ/yFsEOHhC1op8oCkacY1seCbF4vArYjns2zRiGGgBMQGeFWNNSY2OW8DOJUMANiYqluI6y8iBiTlRnyjushhloO2gTxRG72iLy0L4bWQuivqWzp0nBw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=WxZ/U95a; arc=fail smtp.client-ip=40.107.113.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="WxZ/U95a" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N1MRYBiqoLK96CFMllfftt6eT3OwhhzuSx4jFoCDXbzWHOaCkv4Nzi1N49Tszu5VfYUhWQA3AzYm3+Y3dwZF8fZ+TAsE1rfaPmVr8IF7pZtogIuqHJswG8k7g1Zow5dA26fadbKwDVYKPIrhCqbXoxt01dUPolR3ZkTeFFzfqVguRHG+HclaWHBk6QbNcqEVJhCU9G+Qq2bw9eMwHZENyIeJ+Z5fujqrkSFx8vkYWj7O//wklTaN5iiuQ96PIEdsm6d6e5ob7JpozLaqaGiwDnJIlcSqop+P8UhVus1w1QrxjcaEeP/NZc9wyxL0IQxbEXMjb5ZFrAuvT1GylmOIIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=Y0jFt60dQe7vWPsbVc/vmXOegPcUfdy9YzPIcVCY9nE=; b=QMaKoHFOLJPb92QsWtRMuCBbtZ0me8J96ewNRsLDs9uTF8n7bWIoKHeAA2QW2WFSg9WsjYUxGEojEM5J2oI82Qic5Lq5mueOqazNbP+wich980ZQ+EdMlUBDJj9k30aLpuqvkTGxg1eEyUE1eKfA2HEbUXdIZrNn9MwbIZtnrS6n+Izk/2kLwDVDBPB/sq/Q35uv2X9ihZFJmMEyMWzb5TxR/9/o9nd4KKheetvKol5l/EpVxgl6sneAOjSxUBahbAU6mEiwyXD49TkhBnV2aeoQ+S3CM75+YJIDVyarVdWnhPNfUSEiVoKhGm1JIf6G3hSNrEYwYaXqpIQPqg/1XQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y0jFt60dQe7vWPsbVc/vmXOegPcUfdy9YzPIcVCY9nE=; b=WxZ/U95aoeD7Vbd81LINTOaPtrQA9qovMnjhhXtafQx4/vBdubIkAI5/GvZI3kBYUeKqpyZASvRy5fwr1eJ5suCAptLC0WDWN9zTLJKHECuihZWGvGoZj1vkhvoMFjlZQhEWE3AJPKleTPflsP/WIk1Ap8FvIASY3bK+fHuNL04= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TYCPR01MB11717.jpnprd01.prod.outlook.com (2603:1096:400:37d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Wed, 19 Jun 2024 00:19:59 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7677.030; Wed, 19 Jun 2024 00:19:59 +0000 Message-ID: <87le31wzpt.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v6 4/4] ASoC: Intel: sof_sdw: use playback/capture_only flags To: =?iso-8859-2?q?=22Amadeusz_S=B3awi=F1ski=22?= , Alexandre Belloni , Alper Nebi Yasak , AngeloGioacchino Del Regno , Banajit Goswami , Bard Liao , Brent Lu , Cezary Rojewski , Charles Keepax , Claudiu Beznea , Cristian Ciocaltea , Daniel Baluta , Hans de Goede , Jaroslav Kysela , Jerome Brunet , Jiawei Wang , Jonathan Corbet , Kai Vehmanen , Kevin Hilman , Liam Girdwood , Mark Brown , Maso Huang , Matthias Brugger , Neil Armstrong , Nicolas Ferre , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Sascha Hauer , Shawn Guo , Shengjiu Wang , Srinivas Kandagatla , Sylwester Nawrocki , Takashi Iwai , Vinod Koul , Xiubo Li Cc: alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com> References: <87r0ctwzr4.wl-kuninori.morimoto.gx@renesas.com> Date: Wed, 19 Jun 2024 00:19:58 +0000 X-ClientProxiedBy: TYWPR01CA0036.jpnprd01.prod.outlook.com (2603:1096:400:aa::23) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB11717:EE_ X-MS-Office365-Filtering-Correlation-Id: 21ac47eb-591e-4d3a-4b59-08dc8ff58dc8 X-LD-Processed: 53d82571-da19-47e4-9cb4-625a166a4a2a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|366013|52116011|7416011|376011|1800799021|38350700011|921017; X-Microsoft-Antispam-Message-Info: VrBv1+QFWB5/NhTErEsEpSwDyXzMwi6jRVkVo0NwSBhQ9hFkewG5RejK5T7UOYis0m4UUFQoUCFH2Os5wGGkCLIhZGv7NAFTq+iI3ncIAjLF0gvsrO3dLMGJfH0R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ld2HVnFVcNU3c8mPnMdEu5hTteeC8odmXYkhe5y0gvsDi/PSX9OTi0wMyVoKew/xfw/HbOYkvYyIJdWkZ3LwYj3Ptc4M2EJW3fuukg0OjvnZzHCTTqKF1clk77F4y3dUu/sxElrEYNB0/1OfLFnkfl0iGZ1iEna86bBHQQPdpfXuWPDQcXtfK8I0sOtUdmLy7Qq1UYi X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(366013)(52116011)(7416011)(376011)(1800799021)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: h292Qvy1rQRvHbXDraBKeylKGyeZt4JzgxAIXqPXDuBpWC4jpLoH4FRn5RiPczcfoNbR8MkkfFOtNY41mky2zlrJy2f5Y5JBHEwzA5SP9GxlSMnYajKKUoOZPartWJG4MosJKxKj2hGUgekRiugjrlQ/Ja8G0TUBoifgbzNIp1dZsbFOmO+qbB6WwrAzY2edX8rd8xsRQWKTU3/qPKIuSRF4TsLMHEB6pYtvm0lO+qYXzYRUTimz3bbnXDZMZITzI2v7dKODcTyNoeQ7dDQ3Y5SP/0l4Wai3EDJNJlHmr3iMzPg4kku3BJlHUtditrBBfXDNwY1o99+eB4i1NTfrxbp4ZSFg6PmGMJqJKucv1Z9XvPBz6iXwWrn8CDxebCgTY5w9K7BqdNx+ueX7lHbNRnCHI4lJegIlBOr9VXzMVwBEpJjZG4f7OioSLM+yho+W1pU402qu7RVh0HpJjxZGszevUZiNwANFZacWYWAEAuG1mPGPS4KueI+rbS36jNSDqhbkjLe5U+/iyg4vCYa9T0jYXaJChxNvCbVW+SU0n/tf6Y15CtzLu6k60jDFNm/bSSG66zbIb7RR7G+qHK6VaWgXySqrchy9D1JUjQQWaEo/Vgn1jXWBT6ov9jk/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b59-08dc8ff58dc8 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2024 00:19:59.0308 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: lp1iTOIzFgx4fdJNhSM8K/s9x5uoChAp+3XbSlWXagQyG6YAfR8T6lwIah1uV+ENpVjmAn2n7HgSrBV3f0bFaQLQD02U1Gbh8Z2YMUlI/IQivTwDXh7efThTHrpf30zm X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB11717 From: Pierre-Louis Bossart Prepare for removal of dpcm_playback and dpcm_capture flags in dailinks. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Kuninori Morimoto --- sound/soc/intel/boards/sof_sdw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index b646b32dd311..3d1171819865 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1271,8 +1271,8 @@ static void init_dai_link(struct device *dev, struct snd_soc_dai_link *dai_links dai_links->num_cpus = cpus_num; dai_links->codecs = codecs; dai_links->num_codecs = codecs_num; - dai_links->dpcm_playback = playback; - dai_links->dpcm_capture = capture; + dai_links->playback_only = playback && !capture; + dai_links->capture_only = !playback && capture; dai_links->init = init; dai_links->ops = ops; }