From patchwork Tue Jul 30 01:02:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13746074 Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010025.outbound.protection.outlook.com [52.101.229.25]) (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 8384E10E9; Tue, 30 Jul 2024 01:02:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.25 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722301373; cv=fail; b=bj7Ac4aAC/0uFRRt6WRONy78tCCJ/X8k93rIWFj4630yXhjM3YIC4mBDpmVIAf5o8T5Ti/f+sAgqF8owfj0SZ9Y0xpYl/1xEiEhJcYMTqt5aIilHF+JRxNszFe7iAZ/N7U9j+1uIXwAzCrI9OKqBcQFH2TS9FkRFRHQ45WBHGRU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722301373; c=relaxed/simple; bh=YmGwjc52Pg/rg6c5XvUuJ1GiVFvUFEF1ILm+k0568ZI=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=pHdmwx6R2U8zlmtj39d8GmNdKpFYK3yeZx9E5z6j4E2dZzqHxDptQTZRLtmEuCjRyOiEn05i9FUvimty89QqJ9RWEWD0yayVDDj9JP9Q/C3RZ8XHoFwUylggCigOxx5VE9AFnSPPWCMMfSfbR9bb2n1NOt2FHh4JnkPOv5YrhZM= 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=F8rd/IaS; arc=fail smtp.client-ip=52.101.229.25 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="F8rd/IaS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yRJTzJanXep7DIO6q0wroWYtKFgKkMhQcbZZO2yURdJgl4uqzhMt/vH7TSAClAq/cFZA5GFD1F169oFYTRx8SYtBd4C2I0821udJw6hhcOkXKglbsBkQ6VvWUMWCmwwPmaVYKlLdKUz8DE8WTZED+l4/3CoPLWyDo0Jv9lP//P6R+wUDMXxL6ffl6ESqJg1NPPc3PwqTfBQ0eDd2IrG/S9pAiML8rykTI1TumQHDQj7irp1BPzLGCQm5xKXwohsPiOWFYA9DGax8y2z4IoEovx9Z/NUsvPzPAyXDORKRpjV1fF+jIZSZAPd0hkSLF34+h+/Xzw5628lrDwv3ddvJVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G2RWZ1TbORupgUj5d7AzuSCLVdIxvvk3nLVYV31WKrE=; b=p+ceDcXN5e/jegWxdgUVWZFTUz479j1Sm0W+dgzEkmOkL1WU1Tij0zLuBFXTywn+sk3TlgTqYLFMBrmH0Q4DCKywVf0WTVOparLwYCD7w+qBi3bx91dBQ2PNI+8U+Z1GqcMgG46XLUxYn6qtPTqGFO7KE1hyUztBwrpxZIzNDjnyyQw81jWBKoDKN1rn1JAVw0CDZU0/r2C2I/Bz1UrmmE1jfISiGhFj+W/nSPjDsL1i7gXIGFse8RUkWdilC9fGR2VqM+VMJSYTX1H3E/8yIEiHA35FwTGKHdAJx14xBTkTdETnhBTV9Dwzjlqz0doy/UdQqN1l02PMKj78+i+fyA== 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=G2RWZ1TbORupgUj5d7AzuSCLVdIxvvk3nLVYV31WKrE=; b=F8rd/IaSdy27yXeZUJvpi/kiKlzoB4wwbVOyoaDyrcHQQBRFKczblVVo0HWpmbU9nXLF0mbhzFSLP0MiSe7qDvZhaI93Ijvmb5PdfsDY0TR/PGPkcxn7qPJRic5RzJzD90J3CISI5oABAWz1Axpm0I5tAOGf/0hQ/3Zz5hO2Krg= 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 OS9PR01MB12484.jpnprd01.prod.outlook.com (2603:1096:604:2f6::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7807.27; Tue, 30 Jul 2024 01:02:48 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%5]) with mapi id 15.20.7807.026; Tue, 30 Jul 2024 01:02:48 +0000 Message-ID: <87a5hzlmja.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v7 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 Cc: alsa-devel@alsa-project.org, imx@lists.linux.dev, linux-doc@vger.kernel.org, linux-sound@vger.kernel.org In-Reply-To: <87cymvlmki.wl-kuninori.morimoto.gx@renesas.com> References: <87cymvlmki.wl-kuninori.morimoto.gx@renesas.com> Date: Tue, 30 Jul 2024 01:02:41 +0000 X-ClientProxiedBy: TYWPR01CA0017.jpnprd01.prod.outlook.com (2603:1096:400:a9::22) To TY3PR01MB10906.jpnprd01.prod.outlook.com (2603:1096:400:3af::14) 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_|OS9PR01MB12484:EE_ X-MS-Office365-Filtering-Correlation-Id: f81f5d7b-3352-47da-36d0-08dcb0335068 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:13230040|376014|52116014|7416014|1800799024|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: sGZFXNe8xS4alkQn1w+aK5PTncGYie3d7SpkuVi4FMMATs7rZ8vTf+SwIRc59DKgrUDuMeZJbEhgi+HP78oH8FNfBWyAtnLMGWQNrQxhcxgTCUbXR8m41SdcVtUbKx5cH19r+Owgz9F2y4t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84MapvWkrXK8E4X3CGgG+p7ZOWPLRBg73gYJ5u7cHeElXuHo6hNXrBMH5qBZeCBb6rdMpI83u084KsAVaOxk382vLFkk+NDiKQNdJ+ce/ROfOflNKyEQX83TLbt8YdCgiSDrHZ6kCTEl0qj+njskBipOwpOUJz9nQqgvoqvjOiw+qLHk+GWBV3wv8ak6s1IBnInGFbEy29EZH2uW0bRkltD2xrFlzCLtM4TjiLpdFZqCCoIWUzQH9sAVYwWg= 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:(13230040)(376014)(52116014)(7416014)(1800799024)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: v7MMdfxz/vmqVP3kAbYjSGajsakdq83TeDSEXMUU2QwJJXxvLmYTkB8+T3KDziXBfSoSs9WAJtEJE5CcSy4Ku4og5euQ0DstpYMpqIwHEXdSDEuuCxb2YnY74d6co0IiErRJDCmR3C6dRWzy6DWr/JyXENis5W7MrRFgR3iQGIhKQVlARbTn7vpmXs3N5cDJG2ulKYuJ6wVpWF2wzR2zETbL4xJBODzCyeRQUoLUIu22vsl0Q65sk3rCyFHrki7AAP9TnlXF7PrAjVqPfhVr56TL7YkON/SadeAuw/cCgehT6Pc0FCynZtJGR0HVSIi9Cqc1edLMwkksVhbPvittJsgcWnaj1Pa8V41R3KZgj5I025QQ16TyfibuJVvpoGedT3Bts/9btBfwfb29CvINaHpYrw7jSNIF8VHWuVpl+37vlMnHq3G0NSFCHN9qMhTyDlvhwmnfUQfGZIqaiw0jBP6gvkTn0o5PHpnLh0pm8HQQq7u9kevjdMx/xyCbDGn0c9+SvlFVq81E8ZHCj8dMFHXm6cF5gFk+omW7PNkDir3nEa6RQs4NTgnDXseZDj3MRZOVaYaopNyienE2oSweR9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Message-Id: f81f5d7b-3352-47da-36d0-08dcb0335068 X-MS-Exchange-CrossTenant-AuthSource: TY3PR01MB10906.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 01:02:43.9276 (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: G6dt0I0XPlyYYDRI3OdHVkCDQ9JFDZj5Bnme8OEHq7n4+Kj9P28/LTLcRLqZ6HdyCMD8oqgJqE9Eep3tp/ldOffFpHOXdO/SV0q29W0On+L9TD3iI/f4Nmsnw4iXA51k X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9PR01MB12484 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 bbb72ad4c9518..04f1d75e04b2b 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(const 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 3425fbbcbd7e9..1bdcfc4d4222e 100644 --- a/sound/soc/generic/audio-graph-card.c +++ b/sound/soc/generic/audio-graph-card.c @@ -279,8 +279,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 56f7f946882e8..051adb5673972 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -966,8 +966,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 d2588f1ea54e5..42c60b92cca5c 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -291,8 +291,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 56b4a3654aec3..928cf5cb59997 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -155,7 +155,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 9e47053419c16..d8b0e1f500460 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -479,44 +479,6 @@ bool snd_soc_dai_stream_valid(const 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) {