From patchwork Thu May 30 01:17: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: 13679593 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11011008.outbound.protection.outlook.com [52.101.228.8]) (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 6EBE0FC18 for ; Thu, 30 May 2024 01:18:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.8 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717031883; cv=fail; b=jlpKWOdSl7RA8Bq/k5uJ5uzdvSBOwT+PLYGkLEY8/6gZLPVwwbCVAIBr1iif9RnQZDC4EnCxNZLnt1wsoyYGEMc0grSgBtlLRPPR/DUMHX3iCqltTY1LdYvUJJYN4buWEVMDzPwezZwBFkMfgS1mRh5xeSqzs9kh/cPgXh0bac0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717031883; c=relaxed/simple; bh=HcR3Z/effrP1FZUPqig3Zvj7l0KDHU6Suc98FZZqaxU=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=pwbQFufSV9ahiAVvDIp2FqOe3WvuYnNIslj3fOGzC6RxMXbqIILQ5L2Ws7ZedI/PAYoYtwqZ5pfY1pGw9UK4C2+yBe6nTgvuHfqTerIHuyat8wULiZ6zE8HUpYCw6LfZ8aeAYBKklrXrXKbdnZkYMFlwxiFr33VL8IeMH8S70gU= 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=QzHcUlRj; arc=fail smtp.client-ip=52.101.228.8 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="QzHcUlRj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f7ENcu41rU3mvVzYwshZpA68yt3yEJpb1TAWBuslHnhotw3pq46zZvzf1HhjIxG36rHMnBm+nz4DsdM9akscQKfggL6RaHKufzn83rPMpkII68suoSLM4xCDnEk+vtiajYeEQ0xI5d5oKVX6C3YHL59JWqZUXUU5yjvuuSyPm5MMQkITwqGpDdU8+KB7aqsWJBk/Nqfie9C5WNvYdpnMAiFfmnzEFql2QU4Wi3TJBRPpZVG08Fjbux/exCZZ/E8HwcuF0AMAEn6qic0ToRGFvnVz6IvM7r8gMDqXaIsXx8sezKdV/XCrt5tSz18vsha3F8QbPNTQiGLbopcq9grbRg== 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=M6CFICq86dg60BXZA7J+NN/Pw2IiAOcVf6fCUeBcxu3MPDgCDZzb5KzPhlnKxEQOCr8sBtGg6D1yFm80Tr4Gmm07hNHXvvh8iXIn8bKqn8plKp9Js+N2mIkPASV+UXQ+pmxujwBv5qR1tfXHamXCZzpGtK9CmhMlwC5waUBRGAAfwJzbyAaV5qWU7+41Re/MU7PADCZvMzj7wM5xY2ZbgMfz0e5Tq4gRslUo7BNFmFol8r/zzmbzlX6xXN97LS8aB/JE/8YlFxzz+lVCAmrFsueu7wCh5o7TuCOjkF2G8GXKTbN/pnoLdBo+JlVQWhHf1SpYZNGROFLV/tFP3f18vQ== 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=QzHcUlRjq5UmYoYR75aDdDwWjEVaK08hjydv+enf2959Lv+xY8oV219fJZeWAXbL5T2T3yEVqEwudo5OiKMUX1n2IxiK8iQHlw2O15zX0LM5KH6ul8Cu6SVQNzPiy03jjND2C5u6susKoe45m5nx1xNZ4BAZopeRQdODJTEZ80o= 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 OS3PR01MB6933.jpnprd01.prod.outlook.com (2603:1096:604:12c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Thu, 30 May 2024 01:17: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.7633.018; Thu, 30 May 2024 01:17:58 +0000 Message-ID: <87a5k8qerd.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 1/4] ASoC: soc-pcm: Indicate warning if dpcm_playback/capture were used for availability limition User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 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: <87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com> References: <87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 30 May 2024 01:17:58 +0000 X-ClientProxiedBy: TYCP286CA0106.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:29c::13) 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_|OS3PR01MB6933:EE_ X-MS-Office365-Filtering-Correlation-Id: 30274907-6755-4f2c-7e4e-08dc804657bd 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:13230031|7416005|1800799015|376005|366007|52116005|921011|38350700005; X-Microsoft-Antispam-Message-Info: 5Ja9A2g/zjxl1fwfoz60ZfEkdaQ96nYnFgE/chBJVrCkxb4K/WJ/xICZvQKku1+nPYXBgJwBdwu42ViunUi74lAkKmYixg2+XoY//TT/BxAQ0qGexX0D04j+Ox8LqOWkmeycETh2wlBECtbK0bjrlOX86zK5i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0cbMYCxad5SACOrok7GYepKmS9KJTp7Xbyw3dHLDkLuCa3YwOO5BTecfkEpfi+r/P8cFNao0hQw8aD5ta1Yddbm1rLJEs= 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:(13230031)(7416005)(1800799015)(376005)(366007)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QHj/gk9lShh9Y+z5bdHcO/7qVcndMgJzYjFAlGOEgOit7mCDms9OmJlfkj/XBUPl0wU+r94/qqO80Or4wU5XS2l3w9N8/FXFf0MJURiodvSQ65q7UeGwJUORJaKwwnfTn82n/ZYxDkXIHOUw4DFBfvOmxXFDM+Pg3ZYoT4q4d/O6iUlZQ0L/4vacgKxRLVmjY+TfpsWkNnZ0nCWhuCDKAKVbZPfq5RdhcQcQMl9BAftW4skFE1Ha+MAVdbudWnZXJ+gHbBvQ/y7tu5QjinNbmWjJ5TODAFq3qT83nnZICPggKXDFgeD+Y7WWRM9IC2LbJ9z803fLZiILwTkAIAUIjRoQOjx+1LyZ6IaJImw9y0AiWNFYARG7OnHXkqHwnvlCXV4iRvoB3Gq0/YhK0s8kYCLlsSwUoXUNlXmC1Ah5HnGN5P7Exua7Qie5+0ovTeZBB+IMvih6eDhbXMHuWHEGqtZz23i3w/OPtTUPmiWUyRbATwvKS/o2HDh/0d9CUieWt1Ce89S/+7q8z7vUrNc6myg+IIXb783btfrlOj2aEb98gGppNkuksd/MdUkgBFuXfQpuG2g3il0u4C85EQ/YhdMLcDPSgW0silrSuobSEApgPd0x4hbF7aTYGPWbgwLGfDaGMSlajDFx3lmfY18Lvh1BQFkEqV2oyxU1/6FKHCo6YqszB6wxhbZk+Oek9Txwx18g+2d2Tyg1+6yljPWd3UpK/uUx+hqEqDGMx83CyGGXXsUMdFVnlLWTGs+Ptr7Qzs5dstmcN51/IVUJQIEpsSwuXus9GLDNSnWRJVPd16b6s6N9YtnWVWlImM3rUTpLSVKAe3hMdcPa/qydHaEGAmq+rMeUYUHGiyVo6UOAsluoyVBIUTwd3+1JHQLAc0zg4+n9ADyJrWNo2Z0/hSK3IfEyefv+8M9Z3EulukpukN03uV1iUrlAh2iRMbHgNXCiu4kwpYftlaT7G7+yWtBJJ7kUunTSKk/YtihWezENlOAwyAwXT2hLuQfJEXNgL2sK3bflc2KzDA2C6tseGu2m0ftChHfTaXaV6GOpCyjq803+w7SaL/e/+KMn3o6BQ4VUixX0t8u26giGLi9PgrX/tJdjJ8MfyMrCwT/E7zJcuaUYJWcGCw3iOVZboTE2Y+gdWm+o9hsJDGPfxBLHxr2AjFIInwSksz2YAutAqTwOHSmnkniTdXXkkl5R8zy1Xnhk9eVETsRJkq7oU9j29A9IgQTpR8TYFh8a6CwW8a7aLWIX/U/AdGCO6sncngTHuXvL5jrrAJDYRPFkBIMKlK+CVnBdw8iZp4BDmntgMTwiuPGB9wCdf3Dgh2HyyYSMaQmCA6GMqdnczkclWpzgHAiD2NrfaosG8VQcNcBGg4IlNg1uzDtduf9aYqaeEJuzIzGvfl7Pe6sJMaG7Dhs8AxxFvwQqFs3ozawogLptOTPzcBHAA6QATdz1nEdOt3sbzvozpHRAbpaOKvupLjPJHq4+b2sXS55A/tmC5Akx1Os0H5c/t8XrmcEeT3EQG7NggQ/CDktihx2FNR2+vZSqZ83NWaSBxZd3VA2o3/MT1YFbMRyGsFZMRLEPZxYyWwrZ/sswmLbrS0QubhO7EQ8XhON7cM6mD3gy864S6TRIjnxQyvc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30274907-6755-4f2c-7e4e-08dc804657bd X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 01:17:58.8911 (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: 5uf9v+/Q52PurZtdv/AZS7S+WOTYW+j+GOzyaHBuN8PwAx7l9jUBCXe8d2Qlf86O+yHFnHu3PJySJswv/iNoK3ZAomNQh03Y2t8HWzig9UsdYGoe1lPCWA6ye101wz6u X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6933 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 Thu May 30 01:18:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679594 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11011009.outbound.protection.outlook.com [52.101.228.9]) (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 C694CFBE8 for ; Thu, 30 May 2024 01:18:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.9 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717031890; cv=fail; b=IeAuNwHXPZQobxWznqUCVNGEC7b4p+vbNn9SvYI2KWOGgPDSaKBpG3Kiq6H95k/A9hvgjCoKvRzzYXefzHDephyzr76BE1G7at6kWTHMmXjjActeUM9tnXZw7aS0/ssl+nLeaUZgBJJOyjQzo50z25q8kUUcMOiIkaTmt8T4+uY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717031890; c=relaxed/simple; bh=oQIVMDFzjpt1LBJtWA9IUf5z2dD/RofWOC4ANJ82Mok=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=OpsVVuNsTkNmf+XZ4W2o/rbbVxNk889ObQ09tNP+ByqWE5SL8g9LzTjQd7OdwyEVDXZp6k6JqcCqKgfWyWt8MTFd4bpXxtc4GFf74mTTZ5UkxP5ed7s8VNFp+KGH4ko0O1PDS4W9F/H1uTEoEC2n1hVYhGhzE8GlUjaW4knsjUc= 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=OeuPG5p3; arc=fail smtp.client-ip=52.101.228.9 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="OeuPG5p3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DBIFHg8dL5bLc8xrmcUFNAF6ohssO9bU4PBYZpB4c+AT1uYvc8EsDQheRtwNhZL+ApKk+vP6arrkGZFIhdncOTqUNT4qbtfu8wvbdUoTlvyHnYHyisLk1m7oK2HqUlDZfLtIyQEQ+OLBmu7ykVfPxUyHEd/jjyemGQV4sx8BAQdy5Sojm9ktR3gW3ddpQ30TMsVZ56ftNfCyQOpiU+EuKrpQwz/J0kOmOH6DumhN2umO5uxDuMCjvHnfyk/YSFsjHhtbZIiTbj8zb5pVFmmCErYvifBWgV4fCcG3jTf5LpQ9+i4J3HptgEaska2Nv5GhScbshrzNw+6lQKpoUe+QJQ== 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=P/cKIiT+PZvxA9x95hKkw5+Eigp4hDXcZ5lf3TDTI58=; b=OoSDGySZ3fct3WmAJ0wvq7iy7MUin8l1i+ZNeBejLuN4ESKzplI3QPB0SgLiqp/2hDct3NMX5WyKN3f9GaU4qzUf8T2pG0SoVKNatskSO67zvRClg+kM6qhAUcWYla7DmZDlFsdVUB1Twa9dhMDXLYPwuLDZHm2v6pcN8jYwZbr8tdWAQKuqsCBINtG107wXHtFUCvXhbo5ooR2PJL9QO9NTUwx4v1M04FO3RtZ1ooV2y/rASbCDHNFb4e17jZ/Zkphs47fLIcxtD82nKhox/22YWqmImTTUrHh44jqSKf4cdyI4tlvKtqeLmpty0qXfHUruP0DUEAI7sHeog0N7jg== 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=P/cKIiT+PZvxA9x95hKkw5+Eigp4hDXcZ5lf3TDTI58=; b=OeuPG5p3CGyEMQf+mGEHFQkL05Opuf1/57Wju61970a4KB927yupxw07fMhodNbCW7pcOuBVuS6Fc7u2uPP6BzFB23bE3GeCdft9J0OJOsZJiMbyg2hscWSpKuZcgJ4qjrnd4HttF+3rweSAvhE5mMH2bHiA4B8hbQiQRe2eHq0= 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 OS3PR01MB6933.jpnprd01.prod.outlook.com (2603:1096:604:12c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Thu, 30 May 2024 01:18:06 +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.7633.018; Thu, 30 May 2024 01:18:06 +0000 Message-ID: <878qzsqer7.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 2/4] ASoC: remove snd_soc_dai_link_set_capabilities() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 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: <87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com> References: <87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 30 May 2024 01:18:05 +0000 X-ClientProxiedBy: TYWP286CA0013.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:178::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_|OS3PR01MB6933:EE_ X-MS-Office365-Filtering-Correlation-Id: 15788655-2492-49b6-0685-08dc80465c1d 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:13230031|7416005|1800799015|376005|366007|52116005|921011|38350700005; X-Microsoft-Antispam-Message-Info: uLoEQh4OLpXxXHYUVZjfv1jRyIEZKreJnm4ND5viApi2/K6dH8uTq+/7JEkEabWCw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q4nyAmc04tH9Sk77/8ZOWzqzOzpx6cOBpWvMyxmwRiPV9e0f07I2CGxzcxkpx6GTR7XsbW61EUFBQRvJjmTdpXH/SN/R2mjVj/pcWAIlYOQpT2brpSxPU236fVz3lAJK9wIUl46UB9VOg+eMzpzZnOaAtgukW2JFSLw8xlPnAWUk1G/5a7hatO+zjV49dH0ylnZuKh/1YoKypRCSj54QrJhzOeXqp9a7jR927aU= 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:(13230031)(7416005)(1800799015)(376005)(366007)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JzDaNeleBiJ/M2upkziOpV3pk8qUI3vWDJEdhkliqquhhTs2v7896G9gZc2Wi+0Lskf1CdPP6RbcevHdw+NsaZeFcoZVYDwU4pw5iSB0VczLG/E/6CKaXb9WuZq4CbIbb06LfRjhkVFV9/+u3A7ZHSbf1OOgkJBa6eu7ATBTeVz8Ufs1U4eyqUCv6dTuZSo4iWJLwZztglSTYrFOKp4/b/LnNUb8ADO5Xc09FbBsgBEe4yJTron0oPo641mb/K/mtgS8Pzm3mE5IppT/hzQjZeYBAEtDv5YpvNUi2+ElWw30JoHJ/SXAzXbEGL6TqmES8nOMwgthfG1cdJjm8Q7c3NDMDOnnOubQvT3wGMIMACF75Vb1ma07H0nD0T79NigV2IFPCYQ3PKLnraC6GMAY+nZv+98GXlaYJouyOd0CRJ5SmtYRjL+8fawfI/ABU3CpbeXt5ag0M577nrA8Gqib2UPiypJ9lc+db9TMl+zHtHRK2kyWpiPHy6dMNULnDIeX73ZkAOkX87j6XBra+RBW98pDgjeiYmirzXCk5yVirRyin4xGb9dQE+n4cH2LaA3/0qCuL6344AZDdJmO6pvp5tZDCr6xVZHPCqS0mU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15788655-2492-49b6-0685-08dc80465c1d X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 01:18:06.2279 (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: nk0lvEqp/IGAvsQW5bgCYX9sudEVb98hwGQ7oqBmdK/QxSqpehIQSbkbuybM3XGEv7g15acRpD/r+3us7R3kW5GGC7RJbmAfDge5lVTxSRQQKJHmy3Uzt+vQoVdwtMFs X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6933 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 83e3ba773fbd6..714ce1f4a061b 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -246,8 +246,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 81e84095107ed..6aeb578891f68 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -925,8 +925,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, rport, 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 9c79ff6a568f0..5e66812ffadfe 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -276,8 +276,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, node, 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 Thu May 30 01:18:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679595 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11011008.outbound.protection.outlook.com [52.101.228.8]) (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 C5468FC11 for ; Thu, 30 May 2024 01:18:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.8 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717031896; cv=fail; b=kCJ0glQPjk2UVXR0d8T/IuAIlnV1su5ii/DJSVkrfxOTQwBMYLT9f8GbEoOoyhQtW184cCUpuFOP58LublA6O/l1sMVJWBiL307VhDpiIiny/ZW39l9sEs+hkj0iQoV3g7rMJJXAPQ233Ax5NuLLdvi72UC2hBJlgO/yYb9B8Xg= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717031896; c=relaxed/simple; bh=iSU3JJsNU5z33Am48uwyctCzLsp+FdUOPoHqbrUbFKY=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=blYNz7PQ/r/3WyMxZmSkmU5gmRj4Rfr9XLOJ68V0A/B/xzkrkRapYFZqc05E+3l5t2BQYym0bAHmbcp4gX0kq9hDCLZ3DwcwXpMueoxVjTZTIZaeS5PolrwjZsVoYTN1J+Ska51U9XRA4nDlX86byiVNZO1rGbmjHlrD89myzNU= 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=UBb3v1hH; arc=fail smtp.client-ip=52.101.228.8 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="UBb3v1hH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nAdp6IPGXT15QR62rO8A7XFGkmmQxiB1OgoCNAbEC4hSvKURyPA55CKGU3M7VuUKXouo1h5G18g3HOvNRB2ebbffYV7Wi/5RZuHoSkDn1Qy7iihfb23qv7buq8UcfCbQoVNQDCyppy+lgZgJ3wozcvQNSO7VBcV2pJqFRLEaWO6F6qImUDrvXrVJLjFdDVDmbIsPonWlmv2El2dECuzfyqHjkxkMcabl6M1wmh3I9h5MjajX+84VjLUzZjEeCythWPdtumAM4iMyLj7Yv5bFB7kcTvpsr+e/lCp6nkU7fi7l/rVckY4ELPjMVAgi7Xgxvfz/ebmlH/dKSdFw0ol0Lg== 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=iWDosUTxi6RpSAVl1eTkGLABEUW3S2JDlYlUggL0cV432cpLIXLAAbYymrGiHN4yAbMChN5u/bXLdXmF4nuYdeIhzXqIrKpXYQH3xhSxp8AB+Bycbeg+s2tuHmsvby0uAlc6N6N1K5p8UM3O3Mm88PbherL+w+nhy7z/1xUSfoQVLL0ywO8aSKrEO5sJGCmjutW9zLjD+a74iSUfgT9NXNGSWDe5xuixpOXSi/b905wHOVxJ1VgquC9CC4spCJuMLe/4GhZPVBMdQ30KT1dp+D4ryWDagZla6mzTrmokECSifQMTKY7NkLVANuTeQXgBPDbU4WdBey6yBj5rXayStQ== 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=UBb3v1hHfNTddciawW244WwSTslTXftjRHcYHHftf2CPwzc8bM1UWbTPWm7TcV332N9klDRL0po4ZEp4IfqXhxmg0lgeEwNDqHDUyCazrrfWt0EwpRip6Orsj0lJqt23+c1FPIol1Q4HzaWG5V5Z7oPyN/Rgqtq1W1Pi7eV5QTI= 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 OS3PR01MB6933.jpnprd01.prod.outlook.com (2603:1096:604:12c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Thu, 30 May 2024 01:18:12 +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.7633.018; Thu, 30 May 2024 01:18:12 +0000 Message-ID: <877cfcqer0.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 3/4] ASoC: amlogic: do not use dpcm_playback/capture flags User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 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: <87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com> References: <87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 30 May 2024 01:18:11 +0000 X-ClientProxiedBy: TYAPR01CA0013.jpnprd01.prod.outlook.com (2603:1096:404::25) 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_|OS3PR01MB6933:EE_ X-MS-Office365-Filtering-Correlation-Id: 1b96f8af-032b-406c-c7ca-08dc80465fba 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:13230031|7416005|1800799015|376005|366007|52116005|921011|38350700005; X-Microsoft-Antispam-Message-Info: 44ceqGNiq8c4Ie2L+0HU4P8yYvD87PHZ0mBZwTrh96GvWNjA3Gl/GqpnHIGt2ob4/4D6/7OJYt4FmYCn9fSY8QHrXhhr5NITdYCzr1Utn63gdN4PEjfdX3Nm5SC5fLB2IWPEvlZXOna7MxzGqOMu2eWmgM4aMAP0eRNJABRBcCa/SVLGshXlhNK3CZHUDnmjplTO0bE1LFzE1k25hch31IAVp1LLCcAx8n1WK66/EzwDj2mRVXbHEnDUfnslAuj3bsHp48+4gtBj7p4lmJGjiIO6CVEJp4b0d+IrA2rSAV+p4ko+saOFEzVUVAjf5VjfLW6GmxUll7AFWMzRwpHoS3A4nH4hCXlTiYssRf8/HwiA6ZKvJQVmzN3S4ujZ2wBL0CE4UlCXrcf5R4XWAshcybzidMK/DRQnP40Ijv9o4seuabOQYBCc7LvDQienSJyJ7EeavesV2KsPT2UH64LI9Ibh7ot5kz7kZuuYj7mi/026AwhS2YjPEmFqvhR3joWyjXKfXNk1vAQbDnFukdsTsDzFFI8wy0dLc0t0iWM0tK3FHrj1jKDHhelJMiAAJj4Zy6czlLu8+2FCFAFSgXE37bTGxkghgIK+vJ24eApsQi9/+d/Sm80JNwwluIS3hX8ITTSkMK2DKwX88Xns9BWKHzhEj+1XXqIs5r4WGkOB553TW7YjgoG1Ape2jf0fSDB5njdqVTHg+E41pXShmAljukk2IuFvcv4OKZH7JpYX1N1hPTuoyzkI6ROyghIz4/jOuax4UMncb2wGK7r9Zc/F7DVg+oor4YAJDx9Po8lPztPi52uFKLm6vV9cJ2p2ubZ5oOJcKHBt0g1vsZ6ZJhAVsGaay/pwb9D+IC5ovUgTzXUMgG2jKGCuXST97FsnqPfkthQHL3NOK941LiIKkb/d5yrRu10JtMcBPf5WAt4DlaMy61AKonn+4UIDQM1yXy8fE0mrwmmxZT7GoZMoV0rQoseldSxOC0r3I7eP6ZfHuOAIyAf8xkYfCFYc3yuG606UXeaz4UR2Ex4oJnFgODgpN/NTrNi7Nj0K0iFoSlxlWTegAx70N4hvsyG1pqqyQ/G6qAY1nAeSrFZWG0L1SwXO3FucpIT0ayOzfaJwq2YyWMSsvwSPPrkXHkhLRwuPyXF4KvM4Qwm77H0YdfXXTi/Jj+jTmf8Bf7xJYpoNtO5qgyURrdGyyj6hnoICI9npMBp2sRlq7I0bLrBcDoloM2/CZlTpiO0bLPWNodXzrG2FfSdTYmq0YX5qdTy/3ialm8cn/sslWQk5rXS6RSiJyCi4Z1dMp8Qnc24FUlFR9h1vuGBaPCifKr8G/MhK+Fng3GopjufbjpLSimliwslZyRWhmZKPbHG4sz13p8zIAB67oGs= 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:(13230031)(7416005)(1800799015)(376005)(366007)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Yguk8nQtsMPF0CrMSGsCtqVd4jDVfAgVSAUClK1n4z5BWPCqPpg7MpehgXdzULnirSU98h010Hte4VFEA1s+HkNd1cAUn6xMK931mCBTTXyW2BIOvJxyOS4j+tb2qkT9rW2RFdaPoby2h3dr+hzYKYavNa90dWoFbT1RXK0EJ7AQLZrbQ2E6+VU1eFURV1q2oTECu8b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T/hpFdtDm7DsLOsP7I6tjEJsOVJlghzCcxrtOn/Pmsryya5nWwMmSvl2INyzlIAtZrPlhQoe07dPzCdIbFNs3OLau35YQdLNlrZ221LTUjODB31ZscPdOUcHlICRWks/y4kV3ar2Dng8QrN0/h8IpKYP/4MBZFxwKlqOheLp8AV3y8fpEMXXKEZWhDD4lxCmGI1xw62UsrdEIu9Ax11CJ9w1kZk7dDk6R1/x+lbQ0BNbJyj1XmaOtYBo1KweAsrERB55AFPrOVVKk3eTBZmxadw60OrovfKiJHSG6qEyOQSFsEQYHf6Nuvf0VG+C99Kbd+VkYQomn2UtpoAc7JnU4NUCCR4pL5A6eEcVtlqdOLR0Mf1+Q= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1b96f8af-032b-406c-c7ca-08dc80465fba X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 01:18:12.3340 (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: zIi0b+n8wVv4q4vvpbgklXxQLZZuk5k6A5OUpecjEDVyFkE2O/O1rebf2701U1g3XuutCixqlSMeGg5ZqsIz+v4Ua9Wkg5RtWzB9rLMv5B57iTv6nucqEp5QK6AZlodX X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6933 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 Thu May 30 01:18:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13679596 Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11011008.outbound.protection.outlook.com [52.101.228.8]) (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 DD10AFC18 for ; Thu, 30 May 2024 01:18:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.8 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717031903; cv=fail; b=VQZ/AdgwqQoJSX8o3i7LykHLnbWQZXQr6GQdpA1ja+Z8bMG91ge/cdoCQ9F7fXe/cgAdN8zl1UxaNAuhLIP2vchnqxzzp9ASrg00xLY13w47AuGu21UVqX+py8fDJe9dJ3VxpXoc+omVpw3PPKR1csFtuNx7bUgQSS1F8sO5J70= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717031903; c=relaxed/simple; bh=B5RO6p7327DKtCZ1Iqx5LT+0U1LaPgTSoSUsM8Ty2Sw=; h=Message-ID:From:Subject:To:In-Reply-To:References:Content-Type: Date:MIME-Version; b=EhlRjt4t85osCkJcdiIHVKSJs4IOp34uejAKCnpgvFZfiHBDZwYVn3Ja4i1fkCObEl04gzoI7UwyBGr7yR6+MQpqQNc+IOGGgPsZpyXgFjeQssjoaYouWWDkHu4e0LmZu76W6KUplyjaUR3fZU7BUHaTgN/eYXaGx62Uvj7rouA= 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=bAOzjsBc; arc=fail smtp.client-ip=52.101.228.8 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="bAOzjsBc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BY1Ak7eIh42d6MOad/Q80VqgEu1ERAr0B+JxeATBEJffXlsnWqaYsRzmEAnboTscPYKhx9OMZn0m4zile+lIh+BP70Myha65eMVrS66Ka8YKf1XCTxiIcZmpHcfOFVCkyOhbenV4+aJce3dZIYXgJh9iIBgCStJuFWM8KCil9PRnjKvfmOqate2WU4xhFynyfZonnhshkbKDeRGP10Z0wYLUrd92CZkscJnvtHsdoA7rN1Lf9ZPkNPXi+WicVuWA+wmPkpprpP7ooJE9rePPxlFuT/vmAOzjmMLZFUnqGTf3yXXKUk6sGEAnabDMJDAo9PoDkgfG90dgtuFrf2LidA== 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=el8HqcWAb0b3E2klBpFi7IdN4HmJ1bJVTsSjMQevfwJCBl1OzuO2QAQNX+Aokfhcv3b0V2Ax6nztMreQ+kT1tSCv/o/utEVtpozcaEWkf6UldWe8GyFMNWfTtrffZLSmSGL57N2Geecfj4yZf7LlBCX5jbm1XH585xMLVxwhaAYicEMycir+B5WWjr5IM+i1EDRhhg78/kwKsziKCzyzsNcKLVXX7yKrjyUEZjAzqmoLz7+yC1+FIBqrOqOPAuZrOaayz0SMDjT5mM/ChkON/uXlofWYJzH+LrYs/emTCQj3JkGdaChuahgFo3AYn9qyl+6m7bHac60F53S1hV99sQ== 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=bAOzjsBc9zMbXwJ3Q8DKLOto6BTxYMvkguddvVJ2RqTjYgJ3QkkWDlXVPCP86/2nuva26tE2/BvjAjeP49Oim5cliJ9E9XjhyFRe45CfdJZmlT+/+Is7X5yh149qgkX9a+Gqgw8FR9E0ii75Ho0eBvoiETL5Lvn8ghZ/EfmGv5w= 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 OS3PR01MB6933.jpnprd01.prod.outlook.com (2603:1096:604:12c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Thu, 30 May 2024 01:18:19 +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.7633.018; Thu, 30 May 2024 01:18:19 +0000 Message-ID: <875xuwqeqt.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v5 4/4] ASoC: Intel: sof_sdw: use playback/capture_only flags User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 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: <87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com> References: <87bk4oqerx.wl-kuninori.morimoto.gx@renesas.com> Date: Thu, 30 May 2024 01:18:19 +0000 X-ClientProxiedBy: TYCP286CA0170.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c6::11) 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_|OS3PR01MB6933:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c37bd4f-bf6c-48fb-47f1-08dc80466406 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:13230031|7416005|1800799015|376005|366007|52116005|921011|38350700005; X-Microsoft-Antispam-Message-Info: Cxugt8KhzLxk/YqqzvnVNYaKak+9FQ3Aa4L17r/Q6VT/7Hemz6jnC9CGBMFi9jcHzztQ12KUpVhJMiqSvNoZeqAEVM2sH9bVtJ6NN3c8dMtuXIXIik1w6NmoEJWvSFzSkZe92gypkqS7jd1t492NcFFTiXWFrUe+m9zG4kD2/lcsQTV7BTX0h7L+gMNwsLuYWdDD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lCwtySPzdOOIgqwHu0FME0GgO+ZrNws7u1UVEZJh2mLv8oKH8dKzmnacas4WSNy4v//ojwi8oOJ7D/B+aQSQ//odId8m9mbXMg749r9MdOe2QSqgKxbMq9Xk= 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:(13230031)(7416005)(1800799015)(376005)(366007)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +L9U2XyvvC//kO1W1u3Wdg6928eaa7OerkxwUMOm/zU5g6zhMvOWhYvhQKhcGeVZHyndXny44cg55TaxvO03cFbLhzg4UKDABk5MwUulEvZtUidtnj5nFTJjIXcbe0dp5+KZ90ZY7tLznSsQjJd2OfUdcrQ+EqmwO/rwMDovo/fsNqJZMnTIF4vs4r5haqoZ1pzj2es94+j6UY+3hbY7Nu5U7Gl7sAHTtJkEIPgiqYnaTtLxqQqYP42AB0oUXz73Zvu8CjXt4ed7JVpL6HmsJcWT9ghJ2ix/u5qxuYXgpf67754x/87HLmkVjCttJbGxgDtA1C/uCHC4/X8ilxepaGDhGr5a2SnBxD8fQLYWOBmOSthHG6EU/ncPO2I876Ihu6fB3B3Fcljt5vaDTGKozzEFLiSX8Q+Yf0ZI4pmtmzCiQeEBLqxUzSoNa5G6lboZwcUb9R0mBKutDR5BiEUW9u9MXrTfbPmckE9cvJhdU1JXQ82dkCfw1oy+ybbqqgg7RkH4CdJSleYu0vwxKIOEVrERyinQyNfp58JPUz6ZZSLE3hAwtDcZDFer4aArJcsEfVaOo/FkV/V2Xc+W9F+jiGXNM21QaOXMr3gh7RWHKKqqYWUloZzWtOeV1tXDk8rxdQowdEgT6TIHvX5TYweyKOiNUFWvFoGc+L6NRyk6CA1fWHx+BRw5O4evffsS4i7yXqujWebGWm+MKAuVdbMi87gUNSpkd6eLawBJLX1aPkT39pj6496fcRoJwOxQEZRXh9rUe5mj8ypLVtT5+ZbYzLlA/cEX7LoIYu+JwX7X4k78t4PcGRi9veg96PhXpilkkFmQgvQ+myMQO0msFZQvuUd0JfJWVeVlvfcmaEMFYtF7OtUBYd8kPf0Y4f5UEXbzqmVsq1YL52lp19DLkm0Zfp5uYFY++MBOmbxPA/UqrMhYndbnn+9Q/bxZcWYhF00G28HnVpcJJjmcYQusQRb2hrfGBrSc225KHxPYohn0+px5rrAO07weQ+UoPkV09Z0CYdVVomqcQFvr+dgE0AaTt0Q9Gpfz/ytwoQuK3IUPdSlJ2GBEDziSiLxzgfab5/rEI8Q7VEqVlhx6UYcOfzoBdo1LyaZ8MQQXif5UpjlWbpCtbHlJd12Rafkve9R2X2Gmj4zYfK1d3jcY3F0sR5y9BYhrtKmJd9SjPZODM7UkkuC2emGWA/C27Z5pjVuq/Uiocj3718Y2cfcyphjzImO2BFeE3RLJRmqxoVXJNXt63OU+GdvY/4Zx1QBhdSr3Hr272Wu31vGqkkWxJdGOoNHezS/Vx9scV6PLzGVy9nMnteeFaYWabiMPKlM06LThycJ5axkYd7jBrZgQ+d0EY9dgEZ9n65pNVMfN7Ts6dm/K16Wg+cARFkFdM7TVGRUIWKKhphOBdphRMImrc9XClko76q/ERlqycWAoKof/Iy1y2SznlLEyKRkS0/LjNYFL1orCrvY49CPKkG5JbtdTtmJAHvSVWZAOxnK1NApRBwW8yhCcML6TAIkuKS2yjjnGpJMHABIoXd+5Z/oY2DyuXFFt7jzJwwa4fV8TGfVy4uBy/hIYjGfytx/y7XyhpLU7RIILJyCNrL8CvFFlht1BDhrbf1+wyJnb5FVOUj72TURQfdo= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6c37bd4f-bf6c-48fb-47f1-08dc80466406 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2024 01:18:19.6032 (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: 5cwabnNh7jdPnkKKH9ams6ADus0e4aE12Ao6sV2+Dh8VQvMkgTXAH110+qsPUjyW6bkju2K7p8Gr78ZorW737cVQ8JwrHmU+K8ggBzAp3oWkQRSvGOeLgxManHJ1cyRD X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB6933 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; }