From patchwork Mon Jun 17 00:50:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13699707 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2080.outbound.protection.outlook.com [40.107.113.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 CE97938D; Mon, 17 Jun 2024 00:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.80 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718585440; cv=fail; b=DA7cLEg95jlUFO2TI1EIB0/jQdOi0uQbuYkSaBBxFwYB9PvMrOWsCarvyq0D5NaK3AFz+mWL42vcXFzmuuu7uL2oFpMviacI29wF46TdiAVjLPtqnHeOUpVY09O6lRRly9ZtBumaqF4RfTHx4femB2tC3AKr6UvPfejGloqGhFs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718585440; c=relaxed/simple; bh=HcR3Z/effrP1FZUPqig3Zvj7l0KDHU6Suc98FZZqaxU=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=SxnrtVtvEHOjAgFRFEyys0jHJ0H/qoCMhqiiIV4dYMQsRk2mdLBfbyLaUxoWZpEr1WkQ9r2nd07031KNqnNW2T/cY5lE1+mZhcBmFl8HXQhTlShPpvX74wWrBh+fT3FODhPkgZxe1CVDwW4OmXJKcb917VTDUsooK8dwNxwGah4= 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=Hpcnl8Hx; arc=fail smtp.client-ip=40.107.113.80 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="Hpcnl8Hx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sd20TUWJQSgTDrtn/dXoyK+1CSMvaSydB6GBMIRh3K3cLrVC7QPRCd5nivcrIo3OWNyMjSh8CJtv1gV6VQid6ttuW7LD04oQhDBLtZbAh9U5Bp8fjz1WDSJbvX2sOnrn0JvWsAfPSZur4fFjWgVoBWRyCPaYioruuI8tKteMdSivHbUPiSZIDJqBpomgPhfE50Wc5/ZQ46BT0abndWZ2AvxY1sldaT4g8XmvHHUImZQHftKdEfuOY80P8Ki4qKyw3Izmv6/4AdfA1alKcYgWpmXDmUJZKS1K0gOfLFx2bhwXj3KbCPWK07KP0RZXHQK8WEYpxRWv5eNIOFPXJx0tNA== 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=2vonKr3xCTVsyBVxO7nQoUW2nAXyiCWU2/z8amjUQWY=; b=M3K+YrmeFOxD/pPWdCvgNaV883gADE6UcheUUa8m37ecfAKwwZwb3QQr6GlZyDeMUcSgr63c8+dlwLH0zMkW7nMjHE3pzOId2Pu0nE15Zr8WN+0ynPOv0j0Q0wW0NMt9k/k4w4uowPRMSK3oeGeDkVhPXNKX+vPPPbh28Qk2FeX63H+ucGDlCNRh73dTTHvnN9u3Yw9Tor8plkHI7hlFf/Rho/Yq/clk97c8u7USppG6+xxJQ7cSHdLduJEloZh4DjzAb0IhB/cAvlLgiyKM1fbNdo42vEpSbahd227muzt2RZwlqBE799IJSyY0gYNrozp6CHLlRmkhLCn4hFYbHQ== 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=2vonKr3xCTVsyBVxO7nQoUW2nAXyiCWU2/z8amjUQWY=; b=Hpcnl8HxUVIp0l0nA3p13VaXR6kaGEshbc6QjrCCukQawwjod5e2d20yoPARLX/Ibl4ZrcYHbLlBUHxI7W5XH2lxpEJHTWQ02Qmg0myc90nmV8VKAxDhbsoVV75cVZP6NdUNdiMV9oinwiuyjqBuNuKCzyhFic/NJQVz0+sgOmk= 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 TYVPR01MB11229.jpnprd01.prod.outlook.com (2603:1096:400:36c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 00:50:32 +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; Mon, 17 Jun 2024 00:50:32 +0000 Message-ID: <871q4wtmsp.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 resend 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 , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <8734pctmte.wl-kuninori.morimoto.gx@renesas.com> References: <8734pctmte.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 17 Jun 2024 00:50:30 +0000 X-ClientProxiedBy: TYAPR01CA0197.jpnprd01.prod.outlook.com (2603:1096:404:29::17) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYVPR01MB11229:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ebcdd8b-c3ee-4b62-1412-08dc8e677d86 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: g7qSACBt1QQDHT5x72dHhTItDA9u3RNNr+jyLZVHLS/HQooCn22cMu6ODK0y2rc2PN/cDajBeYC/dEMRA1uldfeGec35PA5T2JPNjadgFJYB7P7PvpGeW2cl7bbImS7Agmqs5iguNbcmI9/57bj4dTJ4eXzadcpoCHzUc1Msv9bNu6aRHuHRiHAOfJHoXA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ChBUPShVnCGQdxzW8Ifgb0ngzLR+wx/t9420p7wjIUXgWrrAZwCSVzVACIzz6f8WKNOQucg4qO3mhPN1Fi1xtx9b+l5awOXRwpBuIutA== 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: 7bQ0Sm8MwW4R9lK3kt5vxeAEQ9FkEeDO9fAf1q8XswclQG+BH5lbnyIiJ16LS3WVLpqMxMvYmeR+h0EzvQHWc4GraMReClaD4Uvts4E+/3j6M7qiWwDs3fnvLPLc664jc7EP7D6yst/jKFOHeSrq1qab/nREzxQDCyLOJODA9D049uBKZqegys+lvw1YWFpcusz10H7/kYr43Uy9UxwyaKEPEFQDiXiOquOAiLhCkyYcvIc51Jc5m2gSP4kkXkgt+N4MWA5xbjdIbGS8ja6ZazBhrz49SodaMZbgsKT+KizHEtN7GwdIwFKV120iBCBlaAUYW24CEVDU/bpKoOlEjNzi/5AF7xye/zgrKsRc1wbui6SB8ztViIDeJoyO3qqHBwQLFyDakKy/WUKYvbeIhwzC/5wzlCmelWh3xrHLKgSa5bLJnxHl6q32SbGNnQqKm4nXBCI7nGmaPfZZCEpZ4TOYAAFuH/P+sqlm5aNDnT/s7LXkLt5xfpxlDuMtbGWvsqow/fRAELSfOkM9J6gAv4+7xms/h0+I29mq+aP6vk7OTnrXJgXEUstLsrSFBivRdJAbho0WmVRQhwhMxoXUwROSJ9Jz+8lp0/B4GSSXNWes+IaD2+ujv8c9NV1RcD0eGx5iveLMfcDqSX4dd1adEFb1bFRL13CqDYYQEZ45s6fKmcOqgsU90k5FaPWb5j+3cR4nrPN2vlEEJSrxZL91NXfs1hTMIJ59T1HqJrBhI5SRma18Nam3NAzG3wtiKOL2HurM8TpD+5rMao8imJHB9A1zhayV3BIKVfQzPNmgAWDHrUuZ5bEjGC90q9foBv90ZkuRNbYr62nY/UdKvWTSQ7jboHH0ueCEqZNFpb+Ln5cmL852uti3VsS1CNMGILT+KwRoTfQuQQ2Afd9PmHtnZSRPpq0/S6pp/cA0pY+qsP0b0LJpn++1cy8RaQFE7WM0eDD9fIdnTVq8Lx23A43pqaXhGTjckhnfE6kgK/vRdsegruyk5GgEfrmX2UtpFUUDV5yiwO9VSgOT9dPFeI+fAtpFvF1tQYj7Eb6cEuSoZJ3d+waevmBuQINI6XhqQAYlUG8svR6j3BcBoQzv1YerRvwaD9HtYKy887gp7zS1taX8ZzeeMk/nmZ9s/IIfA/UWICZyPpRHDRb3MCD9MoK6asC0DqN+U58qNpJ6R4AmrymD/7id9nlYQRrXgoV0s7NEd+g1U6ZKt18bzY/4UuDUGMbI1ww3731HX2AiQ3x2dlmgwLPCHaH1KqWmHvMuhEu3ZGOCftC3YxnKZY4dgXxgVR5RzmoDEJB9LWlCTY6juvSIFG7+WElcgUjTAQH9hrn7qXYNTFLIgTuoyztP9+N+W+NIB1zLB91LyhOsCScPtlcdy0yyK9ML2RyI7XbpmpS3+iDHOIhmIXpHpyWtR2VngXqz+7+xFueHx6HNUTkVL55H7EZJcoOEzvib+9/lgQPt6IZwuu8AQaZiZpaxtABaTj3RWrdCaguPQ/ws+YU9TSHM3e7jLi8mA+InWldeMge3+nc86eH1mYZhxV72Ie+b/Rji70xda+2dxxIIXd9Y1M5xYiWkFfFWh4vaELHxpXNz+ywUwmEQsW4uOAMJf3IygljAr0xXbe/eDnWAOm0upmw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ebcdd8b-c3ee-4b62-1412-08dc8e677d86 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 00:50:32.0111 (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: H2QZtwtf6oicnXsRIeklNAruAGc4r9MXt3gQKjvqC3ddY88kNGzDjX9suSi8LVJAXK6sJDOdndNj5C46YZ4WfWGYdE/C7pViJ7VMYMP/tV7TwfqtRuAFbeqfa+gzQ7T8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYVPR01MB11229 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 33671437ee896..2a3da1d913776 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 711b2f49ed88d..7fe5ee3bcfd4e 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 Mon Jun 17 00:50:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13699708 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2060.outbound.protection.outlook.com [40.107.113.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EE1D29B0; Mon, 17 Jun 2024 00:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718585448; cv=fail; b=LYBbkWcR8/nlhcjUh3+7C/hWE/qXdl97GGKphv77EahCLSRVuYVLsEuUxKWN3NraIWwapU42Ap4q5VoBE2CWAJpAcC5PR2AzS569OPVLVAdBjOZgtyE28kMnttyzK0Ubc54TZpxPwx2HOje/KiO8AKuk36/9RoI4Emij8ZjWw5w= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718585448; c=relaxed/simple; bh=BXdEy4rBSsI1XqWIHjU1yHH/aBia4P2YdpMKjHS5KzI=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=opI7YlTGWjwSV2AmDDfvZbLe/DesjAEJGas4oSTbYUjFT3iHT4KJKQNASuldFhggO70tP9HzMW0YxYAxUKcMwg5BVUSnVX0Tj8XYrfFhvv33dVGuP8J4lXBSD35Zpq5fCCSy/zBFJChDTCH8UGQxChhRBRPva8Oics3VrVwu9Ho= 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=IWnbhFe4; arc=fail smtp.client-ip=40.107.113.60 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="IWnbhFe4" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GY3qs8vd/qf6TFBZQpQKh1NCMQIfJpEuoISdeFbO9fJqnAsQdkSdYKGEUNz0kUCEHFTOExIiGAOm948X2QxCGn3XPjISpxnIMveKXXA1VZkLXFbmzysqtfU+pUYGBG7mrX1b0/TTkhlQkGAd/LnQ8/PgB96BVleDks422vpJaBSce4HGkJs23jNGGwd+Y4RXaNGuouymdbVID2GwmsAqkIejIWMapZgmMS7sURUa2NLRimqPkfdA66tPdOxEt+/zIz8xK8aJsTVLPQSzjDrkoUMGb4qNcHcHtU20o6VaQ+YEuFs4Tw0oeMqBnoKM5KpkcQrRkntot9hJWY64Q40IAw== 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=C5iITOs5R5cfPgTMhiC2uT7qEz5o6IQP5+fLA9G2rFo=; b=Wl0nAWhTmVOiP7KeNqieQ3PZthmUATjmzlHo7FR5TX1DUGo7wykDSbpzlncRZoHKnP9f5zVDf1QrHa0xmXc2NBKN5cgsK3jfLEkXhAIK1CqckdPPXlmak+PBvoMO8mS8mG9TDCmIgsU6Xx0UqJhbR+OxvMeJ6w97g3WV8c0YcEFqW6ok0SsQqKqULdzqt7gVlG9NEAcXEs/sNqFAVL8YJeFlU7j8QvROem61NAWpQXWXh83frMF/qvieNnvvIPhglGglEFKgqJkrpKN4LHtS+nQOw0bM9z8RbphYxykL1Ocr3FViq6w7cwJO7ADl6PlIE6WWmuH6JCxmwGS0mCxIog== 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=C5iITOs5R5cfPgTMhiC2uT7qEz5o6IQP5+fLA9G2rFo=; b=IWnbhFe4GAZIDfBd268mVlnhmwz2wToVPrZq4PKlgTBTzCFOVvuUpyb6C4KuzakXqfPTXivrHzsjQzwc2ODT5S2xogGme0/hfYxxjQRr5C2/SPpzYC61Tj0DXTh1PVvx+ZczwL4M+Aqbg7c4vOs+LBLKHpPYs+2TW8n5SIyTSwo= 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 OS3PR01MB7897.jpnprd01.prod.outlook.com (2603:1096:604:178::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Mon, 17 Jun 2024 00:50:40 +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; Mon, 17 Jun 2024 00:50:40 +0000 Message-ID: <87zfrks881.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 resend 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 , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <8734pctmte.wl-kuninori.morimoto.gx@renesas.com> References: <8734pctmte.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 17 Jun 2024 00:50:38 +0000 X-ClientProxiedBy: TYAPR01CA0092.jpnprd01.prod.outlook.com (2603:1096:404:2c::32) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB7897:EE_ X-MS-Office365-Filtering-Correlation-Id: 0f3e58b1-3758-4c6b-e98f-08dc8e678254 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|1800799021|366013|52116011|7416011|376011|38350700011|921017; X-Microsoft-Antispam-Message-Info: QSzWGLRcA1rgAxNViOyv8OuK7v+JxZOdOnUwTxOgLRbxdh/YZzXcg73n15jy5vsa61MwqKzf5B3d2vh0HOsPClx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Y6h+1TSOqsafaJcEBskana53xj08eSJ9imYqQx10W42pVOShBy1gJ0NnZB4xuEw1C+BTmrLlkRF3KNfjEiY7NXBdI522tX/qRnd7hwkvwKbBq4H2qCd8dixz+68dEeohbVVApiSkRpkQ9C01HGSHG13dArr6lU6CR7AFPAyXGwiwXe7LH5bObmn1lCBIQnJ92lFLtcVpBuV8l293TtchqFuo9hWawKizwQqeydagLvHg5KRoGWDsGjvBQ 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)(1800799021)(366013)(52116011)(7416011)(376011)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zWTDcp1TvAFEfygGQYuI5a6zLuiU6OOpD0PiFfkF/TcAvyFQ2pDASHcXdW47qDfcLvt9omNcFJ1ZL7elPah79UfCmSWoyf2tEETY0SF00qsJSf8Vaw2ILVVK9itfIbAq/3tGpdA9Q82fanubFPP9bpLT5tuEQ47xeFrGFWozIe9sW4fx+KkFrXlZZs+oBsvuZHLS5Dzl859ysMSbiLoWEUbdKalXSDRGcxYZS9T1npc/yw5cRjo7QaROfy3d4wXEyTyjqcgy1g+mFzXeS/YvgBGbA+EbZKbbD6Xz3yI0Lh5QqkRmBZwlnTYnmFZeVU2VgHJp/Wkf7SWuKTplDmoIEtv268nZVN1Zcw3sNyIiL24P1oMRNUbO+XUC3E/thG5weptWL+ybw6WcYRpcQbceJB1kanxJPjy4/SPcyb5e6fQaMJD4lXvxhhwBM4j3HCB3vaov5ZvGUs5mZz2FFhnH5uUOzuYgiWmSV5oHRjJaGsFJg4FBHIi+9UAy5rDjLFngi9M+yFXHWYAa29SFlJV3uqOEOm69I49wMlLmmecJK5T+VxHlCytM/sQECWiVyHmWZ8HzT0rlZkn1Zw6qZ2kaS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ossTenant-Network-Message-Id: 0f3e58b1-3758-4c6b-e98f-08dc8e678254 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 00:50:40.0846 (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: 5zJhkyTlhsR+v3Uu3kLpY4Ddo7gR6G+eVtHdvgfFM0lKkVWKJHxDqLPjMGdQ9Z/p7gK7ncWy2Rej+pbwQ0Wk3QZd29mjC6WzqyKuxHGYod/6NKTIskFRmGXpBu9UXDiu X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB7897 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 15ef268c98450..e73e906298adc 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 0e18ccabe28c3..98b37dd2b9013 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 7b981aa8690ac..2495b0ca3d2c0 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 8eea818887580..d7641923fcbb4 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 2de5e6efe947f..0eefb348ecd3a 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 8c5605c1e34e8..09aa36e94c85b 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 f1539e542638d..7edca3e49c8f0 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 3d02aa3844f29..11cbcb588336c 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 03afd5efb24cb..54348a055566a 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 Mon Jun 17 00:50:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13699709 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2062.outbound.protection.outlook.com [40.107.113.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 E995D23B1; Mon, 17 Jun 2024 00:50:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718585452; cv=fail; b=hQUclIgvqyWXaOaS/jNAWJjhkSHqhrGD8MUI/RKoOBnZYMBCMVfaNVdR8u+VV9k5MIaW5ThXV5MMPH9qy6Lhw1CP0BTRqHGrvSlyaADTrVqblT9gqs1XX707occXk/0R2SU9AUqK7CjvYQSb8xC5rXJz1qlI0oqOYZ+2asvl+fg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718585452; c=relaxed/simple; bh=iSU3JJsNU5z33Am48uwyctCzLsp+FdUOPoHqbrUbFKY=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=lxgid42SgAKfcIpABb76IC0bmQOhe8G3iTBT+dqwtk6S9px0VvYqFd6RzLA18YSrdYaHMEPlc/RNXkei65/4oZcUIyc0WRDDtVlKNVc91k/0xhAmT2lFDkokMOcASQYZu1qZcyuroE5coi9lqYmpR1xvsFeIkE8lLUv/4kelFu4= 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=F8Vj8LZq; arc=fail smtp.client-ip=40.107.113.62 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="F8Vj8LZq" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SCfgznIDo6egccXxQwVUTGftcPfvPMr6yyl8mIuLMUFvODDGe5rCERiVDQ6Ko4FZZnQlEypPIkd5ZBWeYNrkP2UJCQjdJEGb3EAMrF2OdfMfr/XkkJLuFeDBtP6xvb9ocqJvUo/gEKS+GiXXPxT5ioZ/IM5bOM0nddmzvhkKzDiHCdCABrObupvndfBEEKEGvfa+4lGF5n1hGAIWXnkQvZtIhyKN6j4GfZl48NcGW+oz9Q8HzdMUSFjm0jwaB2jn7FI4zQSZLPYxJZcW+zlniauFVU8UIYtEw75N2YnORFjCTFQ1Rqmqc/8GiflEjcxsi//r+32c9NxMlnpoqxHOuA== 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=W38nidIvKGQqFNX3kjmn0/hAzSh3plyKNuEVs3DX0iE=; b=UvV0nK3CestX9bZNyTJxa2yF37LlXEB5l9BD4zEzb22mPe86oSWJfkZbdQGb1wjqKQnwpzk5XDNm6xlCqFkI02fvYxCsZ6L4sIEyKWfLJYuiLjTje2tzOQDmE5X6zga9UB+T7oY9lif57AoTZ+QrUc88txRXUCnShrFdhs1oElMtv+WelDQXydTtB43ebp3/cp800/Jgs4EfC82+pP8/e2Ml2h/fjkcmEtgA2Z69PTx4SkWRCyQBlgE9E3BpcPgIsQOw2XcM+592nhr+QEiWbWwYWPdgk8LCY2cAuP3H5NWUi8y/4LUQpNPN1Xedh2wme8bT2nRwM5WL+qKlLUe/BQ== 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=W38nidIvKGQqFNX3kjmn0/hAzSh3plyKNuEVs3DX0iE=; b=F8Vj8LZqmBS9YAoR9TMCazW6wQ5ZvrLv5mg6I0SxFle/BzY2aD24Hjho6fdL70Vk5ByT0EhYa2/Nz6jy1fI6jfRfiO4vbZ0TtUtiItQ8+6RlljorQ6G3Ny3Tjr6R3Y1ycmNlshtZYDKdhpQfmWtIGmeN6LFBbxuvnYxDfeTBsSQ= 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 OS3PR01MB7897.jpnprd01.prod.outlook.com (2603:1096:604:178::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Mon, 17 Jun 2024 00:50:47 +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; Mon, 17 Jun 2024 00:50:47 +0000 Message-ID: <87y174s87t.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 resend 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 , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <8734pctmte.wl-kuninori.morimoto.gx@renesas.com> References: <8734pctmte.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 17 Jun 2024 00:50:46 +0000 X-ClientProxiedBy: TYCP286CA0285.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c9::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB7897:EE_ X-MS-Office365-Filtering-Correlation-Id: a5357f9d-84a9-40d1-d991-08dc8e6786f1 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|1800799021|366013|52116011|7416011|376011|38350700011|921017; X-Microsoft-Antispam-Message-Info: 6zvOBqR9n3TSwnQVVukorBBMPK0A/rVoSdp0OuF4WWxcpac9kTgLbfh4T3aGmmflhEnXYvXmVYQfC3t+YNBNa4qAOdlPtdJHt1O3+TAZRfzYx5ia9KhOVtKDL3YfnEVnhwCMscS2k7nPcfaptKdZtHe2F3IEMMg0DpGR4vCDd8mzULQ3uLtLYbGi8S1tDeR6/yhx6u8UILV6QzTBdAaCNbwLFkAXgCpoIxPnY2J29h8nNTFfjK05dQKta5XNqs4f0itEi+olYu6U9fE60t1EkrtqrqvPDRmmfeR6daTfqIvmu+EQQFvunpKDzWXq3+jlAoCIP/kR7EvdQvHP61gQpu8T1XNOB8geBz2bD3P0ypKRIb0YakYTSoSOT31KA+Q91rX/s4f1pqmOm4eLOCauK/CjAnQcEaTf1X5B03OfyNUvFPkWLxCL6QiAhBBZr4UhP3q7IoDa4oWvMRPEPxsMTtWXi7W+6cgNdCqHUWRgQj2c3tv+ODMElQwBfqgzY6QcsSOi1CGqBNveZpp1Inmj4svUYCGRJadFL8MYrsX10IyGyxK89TqY3CRkHx7izvyfjj9pJnzY95RqrHtrwRf9OgAosYWUU4h8ragcOL9LrdVA6agETRW41b/cpgzOYXRErxz3UTvrgEm5tVs86ddDahGAk6iDugh1vUjXDrMfwXtcIO1fdi1HElapxxB7wXf5ogsTZByMWyxi7x1+ws+OjAuii28k+GS2RmMyWZueBsF2wxCdnB3wBtxb+k8cNWOg8c7b7PTc8RJ5q3UfEtcdNR8pM27Gtv3PL9UIkf5WHsIfGNa6K7H6b2do0+KbWll5rpc9LNitdtpe5pG5wUAPcUQ10X+kk/NSPSnJeyh2uOp9MjI/lDGbZpTbRA6nMF6fGkASgq9UPdqH57QgoSF+o2asrL4HfYGKfIeHMiVY/Jv0F0bx0aAOi7NLdCaPHhtWlA/CPeoVnUiSkkCy3x9OX0WNlpWLllM5Hwdif8+FjPBrgiRd7hwex2vsBF6GnGCFOIwgKWzJcJt6yAGxMZd0h5khqRtaIXRa7jCg/z8Kgmd4M13wyzchYNaHpuNUVlCy4Xt/OCk5dxIkvpLi/SP74ZGf9+iHLEEnIcbZkOp1v9L7yoBYlpI2lID1+4g2nSeXKbNwjn30EiueiEu+LhhwMGbEeGzdImStSbSJiP3aTnXT67GX5/NoP+daWH9ZqDIDvpSYw/LoASEQL6XdVH2gbLfyJPoSywMBuFXwJ6WIpA12hvfL4DRin8YCr6TgIhHXKFHGgGbU2+FrE3qIJPIfZwlcSN5bsqalWfdvpSEecDKLzqjPUr+Xz8/sjeS9aMGnF8mOx9Ue7/aYXMpvBDGEQb0PZ6nWC7L3g9AbOtGxLfq4klGnNh9i3GHzIpI/KuON 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)(1800799021)(366013)(52116011)(7416011)(376011)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yvxHwVTEqapeLXxJZ5UZb0e6Rk34hnG4AB+7wEIZ5Zs+d2z/CRJlU0n4exaRBkx/8MlCCt4YYgq3K3tcORz5Jmqy0gjfSrGAkI0fGKPxjBSvxY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YgQEMmsNx5nf9oUJNiq0bbeCh8j5hrMU94ls9Io8ZxF2IE9RiJB2xWJppYt5T7ZsUlqCBLfnpNUZgEPIRh3Q5v3acE7QJLgaxq58R22aUwY6rD6CFDQoA4L+YIzaWOCrAh7ZxJuJMIRq+akoxCegAnTdBZAV+49Bnryr+dqxhv9pLhn5vFCmxsArS+BGetsOVuGSnftl4aMT4xBPLdnoOLXEF6XcT1k73+vx6a3hWDiYJE3XDoe/U2KbG0UOWHdvC1GSBXgCv/eik8veVn6SFqdNP+SmXCCol/ftrsbv0/VvjMn88zmivihgUdZjmeNACapXsRqEuf6hjWgL/CJ+mp888Q2dEuskdPlphHNDMoC3Lr6p3mROZ82Na0oYaC29SKlX5446Z1sOwPm9ZrxuB0W+m+tYu5XhZAIm7h+bSBtL6Js0mpgNY4Ud82K4= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5357f9d-84a9-40d1-d991-08dc8e6786f1 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 00:50:47.8095 (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: 90gc3c7TYqRAmPgRwFZTgzKocJwY0YJjgDqLVprT7TQM1fotyLodB9hkJBY2NKfkML7c26Kh9uMgy+Rud5Y1p5t+QA1uxUsLucdUskRXfNy7f7R9cjybf4WUmQ68BA8d X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB7897 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 09aa36e94c85b..646ab87afac24 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 ed6c7e2f609c9..1a4ef124e4e25 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 Mon Jun 17 00:50:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13699710 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2088.outbound.protection.outlook.com [40.107.113.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 1987033E7; Mon, 17 Jun 2024 00:51:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.113.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718585464; cv=fail; b=D7qnyEvGJEIRkt0CcK55SvRMcbGprT6j7kF0t0PsV7Y4HnjJ6jifcpx1xLOJTpRLep+/Ql70O7ZPQ2ISClTwDTHFfSiXtSvGyy3C0eDrVkFfA08KF9oAL7wpW/l4SKmxJTIxqSogO3B51a/bYtHLzRCMVpb7/OHij/qWmcGoN3Q= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718585464; c=relaxed/simple; bh=B5RO6p7327DKtCZ1Iqx5LT+0U1LaPgTSoSUsM8Ty2Sw=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=rvQnh0RTUS70JVou0nIAvgKfiGoNByEDWAbnaepnNA7ISXpd7yHS6M/qCu7/uZYSTvkX7FmMhWk/pdOyuRWqUlSHQVG9QHq9/OL8INz7Rrd4TNWomY/mlHFtbCJFQ8Po382NEu9QDByTguqVBW1OmoG5vUdj7VVGthIJN6LvFEc= 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=QcEUN4Vs; arc=fail smtp.client-ip=40.107.113.88 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="QcEUN4Vs" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BmS5ZQy4HPDqZ+Z5fp2HxsjRyRNy3Buk4YNcyzSe4PvEnmag55CWCn7fIWJHVwdEB8R1IsN7RLajofoF+iWMDEKL8rW/Bo9oi7pjMFn+YDx4mZZOKbKCZ4oYOLJ3c+7TXAjPpqNvKTDOyC5Gz/DzTZPWHwwMOUvEq+RBqwUcxxNoLc1918lgmzPKN6RzbqWIlahljlGGZvV1+e55ff0b8g9VUN9+oNkBOml/Z2pLc2RNK0FovbzV9WiZ2osk+G7zPeBziAeUfDV97p5fkne33iR1Kps/WWGKLX1jB/fxxKDIlmoUTY32hdcijRf7w221t6/7s5NTo1xvEyvzIOMtww== 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=5pUbo9QCCHlxibWt8XhYosX8ClUeSIMH3Y0wEycUZdc=; b=kpNLuuy7vpT6FvI709hXlynGAwxd9vDQQjWWNpdv4UybQ58UeXJ44BK4vRmGlc//OwkNtc3SZGqmkTVSx2v4WFwnlXxL43JdF7Hqr4sD6czQF0/GyXxCHfGj77Ew1Ue6b679YXxAPv0Vtar2ZagrK+QkzbZAFAnPCg4Tr/UCVKyaNj6Fsor1wH7+0ZO1d1e8eaiAmdA7zFMCJ1Q8y9lY1z7+sFJhEP1ki8a6Vq9P4CCiBxaU0M7YyYlpA4CqUsMqA3H3+0EIFpuqMjwCEyO/gCk0Mm7xzZAwBEUqePl3mRafgKpZombRO/NI/0c9xi9T4jCi8t8SIkdhdZdpsT9Lnw== 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=5pUbo9QCCHlxibWt8XhYosX8ClUeSIMH3Y0wEycUZdc=; b=QcEUN4VsYMle0vMtVHqsc1mjCMB4VKis9iB/YYM/NZEcsSf3yiU0U4Ejski/dGkNqLWEYOaZdB2/ARpYydYCe9aNrfQRQpMJEZUy7/gijkxxtwmh4wJqZSnavcNQQz6KsmI6XHSUPWbhgpqN7gD/0JKLDMUC2PBkwsgZo/IYrpc= 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 OS3PR01MB7897.jpnprd01.prod.outlook.com (2603:1096:604:178::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.36; Mon, 17 Jun 2024 00:50:57 +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; Mon, 17 Jun 2024 00:50:57 +0000 Message-ID: <87wmmos87k.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 resend 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 , alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <8734pctmte.wl-kuninori.morimoto.gx@renesas.com> References: <8734pctmte.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 17 Jun 2024 00:50:56 +0000 X-ClientProxiedBy: TY2PR01CA0016.jpnprd01.prod.outlook.com (2603:1096:404:a::28) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB7897:EE_ X-MS-Office365-Filtering-Correlation-Id: a87bd248-171b-4eec-3b0b-08dc8e678c96 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|1800799021|366013|52116011|7416011|376011|38350700011|921017; X-Microsoft-Antispam-Message-Info: kBu26N/kU4QKSxUpoGi5JWj78YJxq4gIdtzwlE2wNFAHT2RV0YRSYIXMpagKJW2ljqyC9l64/sx6V2L3RO/guVdSAX+sC1448SmVzqnG6q9zkEVNnRv70+3q/xF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Jl54gmAP7sQTu6I6OFXB5dJqthx8y48DwUEE3k8VADNvrxfJdKoXqASFBUcJedNrvPZ+DPuJGffts3baqH8ufT4hAQ1LzUaQNiHo7Hx+vcriB9Xfg96agNOzAQfpBlXqrP/ESkIgAiLjgmEfymEEIbbvzt4jLbPrYRJQ1+qhHYgkPkvW7tHg8rSPgzrb7CQLwnTMjbbTG 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)(1800799021)(366013)(52116011)(7416011)(376011)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NyvfCFSwNTy8WiogRZWQ8ty9BM2NXN1LwcyprEi59qbK8sdBu7XO5064yDuzuFz9SESPThNKlOBEwQnmAjW2FlZUIM5KyS0Ve7tj8Se6r3tXcSqgqdhaM/JvXo7zcluDo9qW2Hx94KPPf+XGrOTB6FnLaLO3Gz2Bsa5rBBG7101W0DknHsS8Zvtd0csAZbDMsnwsWZgxj/syBdARQyhHFa0g+bkNa4SpLNksb6upTYzO2TY2lVL3D+rs5R0Wp84NQpLtSrzFTJmdSqd8y2qlbHRIXPixP37t7aBSUnvprw4o2iLzWDxq8wBHz3orWSY0h8B/TrOO4J6P9kAox+esc4NPUxFcqBNW2Of52Rpahtp8nhmKQysZ/Mw+wgBdiwsFEgIdSaB+6T7Y031fpJaBjOLS9M+b2lex34JibE4PndvN4EdKAfLJJ8yd8oXsS52nfEsMzOFGjkWKGGjEyITvPrV/wG4lb1DPdUJPwfmDUckcCRBYdlYh50eRqqgPTGdhG3KIQ0dQxzw/bMMvB2gDvF1J4BnORCtjM+/yIssuxvI9FSYMyG0LfNEDcIql1AfSv/S5pHlKPTOL2X5Cfon6wfGfJ5qdizE8cZt4yE91kE3W3I1TeiK+3Hs2eEB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c8e678c96 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 00:50:57.2461 (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: WiDwBMOlxP30EVPWboCXwcc15lfmEEGMRrC1OJMOr+Sl032scFiJdh70Vg5JMAYkDJ+pBI3FWoX0+kCZudfQaTuVzpdYWGvRsmgkhxMUbX+YDfFf/0zbArOq36vt4nw1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB7897 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 b646b32dd3119..3d11718198650 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; }