From patchwork Tue Jul 30 01:02:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 816359 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D4ACC3DA4A for ; Tue, 30 Jul 2024 01:07:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D91921E0; Tue, 30 Jul 2024 03:06:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D91921E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722301618; bh=GLTttUg063vXHJRylgU1noA6r3NhEhRVQ3L0YGxmuK0=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Ms8mZtSEbEea4nicxg5404NiBdNRWkr+3l8FuURnIQoO6wW3trOguq911vQA3Ytue YHCXvCXHPnccro6ndV/xTDnFaGjvM/z8pM6RNzudLQHM65djVMSCjtrGbQ5+VYqe5e iN8ZLZ1n49Zuq7jSMXGInGWYcBAgd1cQG2QjFSEI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF25DF805B4; Tue, 30 Jul 2024 03:06:27 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9DB9AF805BB; Tue, 30 Jul 2024 03:06:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AC7F7F802DB; Tue, 30 Jul 2024 03:02:45 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 01225F800E3 for ; Tue, 30 Jul 2024 03:02:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 01225F800E3 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=Vh6/AjE6 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=D3db5tmsVKdS+NfK1MeZxg85q3jiXHMt/H9QuO/2eYGX4/hAw/q1FIhyplAkG32AfAXXi0SB8BwUDA6nLx6LUC4Urh6L00xE2OGp+DUONG4IY3u23rpG5WiVWm05hrwJqEJ0V0fm2zf8t8UXAvpgoV04I27iW3uwTAw532bzMzOn6Bo/qCyFZQQWTSwm6XbImq+eWOuhQQedRE3reMYmeJ9KzEo2Kh+RIINJjs3SQfWKsb4VgJK+KqhCSU3F5QFbwZIqrZ7xJ+BNfXNHuVGoA7sVVz+M9mkTcM3oXeLa0zzMndsQfn3VS9jeT54WsiDh6Fxcig1jaIkajrYuWYXtLg== 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=iZlI5hnmne15pWgb6MdOl92WpAgAkcXV9OlOJ9ZQOnE=; b=kSdM8OKcoYhfP1kD9aBqr0SgOwT9Hx5/ycc41RKJVKUwc1rgC3pnMD/uee+if+g+hXODUmUYljpfaGMk7qs/FYKG3NFYfO25n1y0iyle46HGP+f6TWvlBiQCLe4LUHr3dbRBugW1T1ZcMl059wsAc5eJT0UA+3mG6v52z15l3dUfYzCYKAVH16hHyuSBJf+vbTOEaKuqWBwVEpXlRbZA5mkc347wCIBTxH6Sq8wlSDYKdhGbE+lsSH2Rj2gTuIyJVjFd9Pw05RHvArABuZ3CNVJRCQOc+2hYRXb30QfWx3GtKJKwq67amhs8djZpcBR0iabF4MSVWYLD+jyvpSSRbA== 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=iZlI5hnmne15pWgb6MdOl92WpAgAkcXV9OlOJ9ZQOnE=; b=Vh6/AjE61x3AEniSMfeyPyEJ56OsF8yNYRUmZDMlPuCpSC0WpzRQDgFCwg1hM0KYyuChy+vlrOQgeOKGJEtH+XV/kWhxkU6e8ul8++g9prZLxU2zrAouwgPQqemc1Q4Z9xihOaZktPi6StrFOmTExID4VY17OUtwqLH85A6kLdY= 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:26 +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:26 +0000 Message-ID: <87bk2flmjh.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v7 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 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:26 +0000 X-ClientProxiedBy: TYCP286CA0262.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:455::9) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS9PR01MB12484:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d37d5e2-9981-4d2d-d25d-08dcb0334768 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: Nporgj2EhP4BdIBAUlkdm4YwkxmwCmpXytp8Xm+1bUG/2QehpvdpRyXcDmpABicd4ggneqR53nsz1x30yQc6KJlI/eYAaFDb5L1VPCYzZmKu+Kxihe9PlldABA06/rv3eY01c9Wf7dO4y/6Lk17Yn0GkkjBvG77wnkyx/leQ+9Y7XX2K6dIBIe4tnQB8FIYlsGQP2Ykq37UJVkk3rYHpG/K6hWS92aoTspD7n6kSxFSgvSvXcujmM88ZQB9MXpl52Seos1HqpUNWUIc2t40wRVH6hLqEhx8P1hHz6tEdzOnGN672aqJTaJS7seuo//E7oN1yXlXohbTXBOc1zZ0XB8svOKHoibmopF1csPoYS4ZJpbHcdfSqW2jbvcvDhTEEkaQexcnesYqshWu1N+DDifa0fWRC6m7wO3cKrYoJtHAuvY5Eq5q8ZGXSxE1Rfay9k4jMNwIkq0WwxcdWdiFR9CWh/PGvi2oNJHm++68h5ybR881cD1J6Y8dCmAneBwpI8tsPQj0W9GeCsxrrYqwmcM61cT9DxlBdDzOrjg+jE6QxjHtEkqe1pfvq6UpYbMCQUHwSTReTOQmh9aVk+DVzPI139gJtXh/0DVO6o5IEfx/9XMJ+iAqCw2BgSBirtCCoizkHFy/LtdK0LggKzBmWmTQyZEOeBEwE2VJ61P82IJO3kNTbYkx9IjTXSlBaufVem7hkLNTIfc8ucO6mGdEfangHUe//QV182TtqXjbfyx3eITL9YX3PGUROk9PJRiYDPHkm4HBEU0xqlH9pj6qdPSyxjDwVuQRM+XYxAgmBNM3KQ4pK6TCsqTsjEXzmmMBFgm6Fdkk16WdULPjRtJk+QA+Cidd3gEbWIutSowAF+Uv53pOSCxrW03J8xAQwTBbFNpbYINlHWYiZrIlwv+dtaOheg3LqUhKVA7jjJtrISPhy0ylSIgH4slHtJ/LWH1S5AWinc+7Aq8LgjOkmilm1HeTQ+RIkPkMv2ERoLp9u7qJ2C/UqXiIdOnZI/ivnOqISx1cAv9LU4wTtRGgtsVOUmupC6VA7U+SttmX1C1GynzYKcrbOFsQhgcFLaX08hDgcPQwbEDThAGSzNeMzbQvPCfxrZPs7D56P3Ts0KnHmHQa8jQCNa3jfShnWMy3b8Ea299T+7Fyln+GqrRgW+mh6l/OT3lW3rH6FFA3RstOPM/9mhBKOuVgIdHTqQ2gGPoxNQ7BEDM7ZQ77YDtV3lTXruUrMJt/zwWAZMSjgHG6+YEAZ5S2djN1GGYIbCThFVDznESh3b6pttqOjHosaLUXp0dZqw89m1E1QmiBfMm9lACo3bc76XpGCniiEuJ5Y1yyxSQD53J9mo80WV+RJm0fwQvsIGJfr4fREcYdln6H6IGHgbV8THGly6c8qrGPTBtN7 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: O9tfFdGWzZJr4U+7CWZFKa5r9QFRpR8bW8zYYDtw8CFADHr5PxbERl7S+td4GNM3jQPlyq+SfNdWkU4kDmeeqJmWKKifgN5K8ZSp1OR7TjoV5/as0Zs4EUPg3s3CSvgLRkxgS0h9h6+qmOEXK7/U6EPPzLYKn/qsZS9nuW7f2d2B1Z4hJig3C4rN824X53kINpFaQ0Ni6+dKaHKC1zRs4cIJqY3zu6YltNGy9Pv+vsKb8SjU+N6nczv5AzXMkYJcsrsRQXimc2IyXn/7n5nF99ogAF+0+5PMEuJ188LTJqPa5tbO6MOhAF5JqDcCVZmg20DRl0KCmEL0JoY7AQSurC52bR7rjy0qUqxLrffNw/m7LumkdWugkxj1TFX6DhJu4PxT2T/2GyHDwANPYr3jXH0bMAmqMJ4cmTMJKyj2Hkq5RXSX14Z5N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KcVb8A+q5VBtkehqRnsjsCrLXHcfRtYEUk44BoNno/hcxYFx9Z/dhLxriXwbKLN1vifA1TlaCBh8x6a1fAU6K74b7Bq856od7oyM04FrYt4wCylHyE1VjCNqiBCMfvsqRiw9HLU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d37d5e2-9981-4d2d-d25d-08dcb0334768 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 01:02:26.8652 (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: ERKZPD33+Sx8a0eI1A3Z97J7czjky0LYYoE2fwmbEI0Qx63+woY7LNCenVOPPHzmYWHB7wpJDQXaVmZ1JD42co4h3UsAQ0AGSMlFzBUbsBhX6E3NI4JSSdUy9l1Vxj7B X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9PR01MB12484 Message-ID-Hash: Y44DUV77ERMIHZIYDQWRGQWOE2A6LR2J X-Message-ID-Hash: Y44DUV77ERMIHZIYDQWRGQWOE2A6LR2J X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 a8e66bbf932b3..abd27d2f42e2a 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 bad823718ae47..b1b35e4d35d70 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 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: 815354 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 99707C3DA61 for ; Tue, 30 Jul 2024 01:07:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 072BA839; Tue, 30 Jul 2024 03:07:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 072BA839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722301641; bh=YmGwjc52Pg/rg6c5XvUuJ1GiVFvUFEF1ILm+k0568ZI=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=BI9P3l58vC9FQipWdofXkzAdbsZpAHCbUF7GPOGJI/paXi1837CSLJbGY6/JoQuQS yS7uX66HYYnvt7HHwK03RlEOzdsnjWzw6UORTPdD0cqHzmgeD7cItuqAnbFGoTwcL0 amRW3FY+SgOpoqpjJkeEhJ30V75qMgenBCS+4r/M= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BBF6FF805E1; Tue, 30 Jul 2024 03:06:30 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8428CF805E4; Tue, 30 Jul 2024 03:06:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 749A4F802DB; Tue, 30 Jul 2024 03:02:59 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CE5E6F800C9 for ; Tue, 30 Jul 2024 03:02:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CE5E6F800C9 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 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) 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+Owgz9F2y4tJg9Qv5OX3Rrh51QSjxtwmGUpwqSHq/N1N8/RC45ZTxxi0pzsnIAg4tzoG+yErUvcqFdGl2jKUXMFg1Y4cOn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k+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+omW7PNkDir3nEa6RQs4NTgnDXseZDj3MRZOVaYaopNyienE2oSweR9xXac+f+ahMwrK5hZTfNG01nsWogjCw0eaZG/phA0zXubFV+Uj0cufrt7u/5Vk/dyb6zxvIraximX0AXEGvvzHMJQMd3XqeAfXOJCjWYRpcstQW7iGJLom1/F13YWzOPCsM3kYSQAut6g1sDYaX5ORSw4fL7i45Izkn4SH9OVIj+iDMw1fqGAr/j/+vXVnvKW4gSeGsdIRTdGCxaf2QiVqjxS9hiUh86T0I6OFSndYtmAmtSXyBl09ydgKbfD9tZc3excr9h3sjE3TexK78OkGaYxM3D9zvrJljbO3NA87re+ppHg0NRWP/Sf7VM8GsQrGbLkeOAlEpP/TdYCnEZSRAHKNad6CE7QUlyQucJu3WjIeimdwYBvzsFKhDfOrIEiLF85JdBsV9NBvpJATKDYniwin0gx3XYP5R3OWxGrhlY6ISA/deE+rSS96Sin1IuFtDWP0bZu6sqehLDBUllGe9E8vxb5OjjFRMXu6T6KN/bgUByacBgme4wXVazBEV2+P35Nr18G5GIGAhptNwe7XJt9npxC/8kfCFOOYMqpSBEN1HZJ746VZo+R4dKEoQzZTxF4qVhRIHTOwOAFk2gPkWv/E+W9mp7dWRIQNSGgSxQK7YHEoZzs3k49AS4okxKuxh3+YnCfRjHV6QfixtCY4U1cNmFIsbU/mfuMeGK1wE3DHsXUYcFxx2otPLNFGRMfokFot39C5pE+0f/eF94kiU1ZN4SPPCQ3mcMO3BH31hbPTLbCmD5X0V499oVQc2XQPnpZ/EaLWzrOH9mpd0OQ11uC9KZDDT0pc5IrsJE6g9SpzQig8QdtrdjsiMZtlgJwZTbEv0TY1FEkZ4q9glxjzTg7igbx3avjSADtfdMmtsU72EVl17sCeoOkHTI8loTpuoqxjWhmAxHe4ze0KBDTb1t9Ks/n8B1GnDqpo6C+2GMdxqgttXmh8NjnfgZe77tv/l1eRI09Ll4lvyOUTehhIC5ccqEeuwvLa7axIm9SNvZaKT7QbsRoUzH6FLCWGOA1yWoMOLNkKkAeTLEw+d8iY= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-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 Message-ID-Hash: NMLFTIF2TF52VB7KRSQMILOAF73VHL2M X-Message-ID-Hash: NMLFTIF2TF52VB7KRSQMILOAF73VHL2M X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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) { From patchwork Tue Jul 30 01:02:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 816358 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5D157C3DA61 for ; Tue, 30 Jul 2024 01:07:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8A01C7F4; Tue, 30 Jul 2024 03:07:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8A01C7F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722301660; bh=iSU3JJsNU5z33Am48uwyctCzLsp+FdUOPoHqbrUbFKY=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Kx9+A2x6Yxll5Cfl66yIJQYWTNun4qsxzwacfwSj7GCNClRty0YvZG+nq/mii8kFK 8JP0sd5NpyIKxzmKiP1jXYLDSq59DzK9TXAd1LigyZdhX7AkUytX/iCqCCo66LTDdS QvpPDQ8GMot2EH0I4wi8TzDqy/GID6pGRg341l2M= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4AC3DF805F3; Tue, 30 Jul 2024 03:06:32 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C83EBF80603; Tue, 30 Jul 2024 03:06:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 000B9F802DB; Tue, 30 Jul 2024 03:03:09 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8CBA8F800C9 for ; Tue, 30 Jul 2024 03:03:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8CBA8F800C9 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=n6NfTsmU ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yAObGC0lyyp99tskYkm7wjXBqpKAm1E2ct/cgKFbEIs6de5mFq4p5+cxN8BFkO7mUhvgGqZDQNEq68iv2ldbTYdGLEVUjDp5g2li0o+aC//k20c0r3C/wYxeHbUg+TkorKj8IM5jcdpu+3O9rkqSOrYdpmUTS9Imurqf+sHJgXYEq6Pr+1UgChXoF0jO3YYa/bbD+ELsYJYexdYGBGIfBk4EogMPNG1vU6b/XKmadjOhEFm/kW4lxRg1FVMDmH5g3MjMVg5FCez2UV07ajhB8GD4mmZRAqeD34g/fSQIowyy2IwA3HpLJL84/Zn7Avg/tNMd+4bgK07dM2DnODeERA== 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=W38nidIvKGQqFNX3kjmn0/hAzSh3plyKNuEVs3DX0iE=; b=T00rdNGN7aHwxo6wONhZB3tPCp1nRitE2lFt7abgOoe261ZlDN3wYf0l9OvjN6ZMwQmam2JWE4ZlyegB4cl3vmpyDX7N08BoHH+Fvyvo8rNaLmVWAZPh4ZWjwVPzYHuk3BI0h9ysGudhsOfhQXBmGYGcPp1veLEpQKBJ+skdZMaX6wSWeToDcKhQiihb5MaOjo5rB/7te0CyUm0okjy3WVAXTy3bFUfpV/8D/J0nnVvwQCY6Sh9PCk8a881ziM7+F5T6wq0urW5SFW/3Bjs5CBFCow+e6HEP3dmnBNukLJGhjfGACemo2DLLFz8hD02VoVPYHxZg1GElf1OHaKsA1Q== 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=n6NfTsmUPMkdCoYyhxmBnZrMFZ/swJhQtiSnre0hbyiNFJgwzT4mhVjuEfVOAXHZhX6rR4jN+aFIZ8ir2o1WLAGAgqetinv3boDkiNOfIAXX6U17j3W8azMxuh1CThhfFKczNWVOhnULqbV8EPabdFZFfbmd+r1PSdFSuDUc/t8= 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:03:03 +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:03:03 +0000 Message-ID: <878qxjlmit.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v7 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 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:52 +0000 X-ClientProxiedBy: TYCP286CA0269.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:455::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS9PR01MB12484:EE_ X-MS-Office365-Filtering-Correlation-Id: 54a84d65-e606-4c51-22db-08dcb0335779 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: 5Lj1kPR3aEwTBWJOmaS5i+yFlrNCU6FBuQSJRPTp5J7NprFAxTIr5k/vDY2gCkgfWBkjBnc3UytqYY+YPzHVUNUD0lcFmnW11M83KHQvxpUlm7PfGZD5MD9aa+C/Wvv4u4KtWiBMJwNTFmVv2RHyhpse7iXxMdzBBckh/Lu4yxzRw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L0RCopLnjro9QQq9olGt8Ui/evnDqO+OPcnomraA9OJizngftzqmQ9+PPZtrikXQzx9mLM6IXq5jNatnDK4BYZ5rqjdyYrTFMwQE0emtHJiGQlNOn/FHj0lhlORRkQiATyvQww7S8esJEEa1qnCv7T0peB50rG05UVztHb/sYWomD85GQydiYIJdJDHwY9Lg0+RRs6Y= 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: Fh3rKw6Km02keMW10nCWISL+i/Dth7u21YrD0Zo4opyPBIGzrQN18jknGi0CEcTOOcuW2MmAU2TfqjPPwMpIYshyonvzaNhWNXZQMAZUKAclGsSDXO1B14EmbKHPFsM5CRa2aeaTFv7wY2KcyK45R98K7v8Ey3EPwAoPr8lljfLrKrq2RHK7tyJC6dIpa/FxXXRePl2D31ikABGNEfKhZFo9LAOC2xybkeAnJnYppkH2Z2v8WSQyFPW+s8K9vVHjGfFq2uJv4TzueMWxaVqyM/vOV3/Tk4n/FkSxotyoEkcojmAoqlWwq+Wphs0pcQUt7Sm8ix5UF2WRYphh0s2gGfxly2Ewu5FWWxLsilRFSTI0TOssMNLhpA4KHYphHoBt6h4gMg8IS/5hy1G6BQJisRwlZntM/sTDRBOBvklXh78fnNPiw0SMDNnhgk7R0W/9zuF09KbAIz69Sw++dceWP2C/L0SJWitrJeWN9t9Tsz9TGKnNbDBIA9EgHKnZ8flpcg47J74zrzMWtbI10oLtI9X3OqTGdudNgcBaXXK0ZwlEn1Kwv4eh1HwlcqKv6S0KWJfuaPmjF9Fnp75Ylnaw5KDKqxqvBO98VV5RCCllB+SZxPcuQMFkkQoMSd1RnA4xLcgpy/dY8/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CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 01:02:58.9206 (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: c9r3clq2gE+KqJKzUI68iA2MEq7eUFu79HOYeIe7xDrIKHsf0/qsdjcjT2n+wLaKNJsMRPqOsgjW8OoRPS32L1AdM/CQg5pACKEyQGcGmHWXFyLOmuFU5vKLPrawF7EY X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9PR01MB12484 Message-ID-Hash: 26CZU54GPZXB53Z5MBT2HNYYHC3CCNUU X-Message-ID-Hash: 26CZU54GPZXB53Z5MBT2HNYYHC3CCNUU X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 Tue Jul 30 01:03:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 815353 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 786D7C3DA61 for ; Tue, 30 Jul 2024 01:07:55 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6267C85D; Tue, 30 Jul 2024 03:07:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6267C85D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722301673; bh=Uz/kPhm+sBwzmYBtIrAWuxVrZiYDofB26JFdChMs134=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=NH/IoZhEnul0jcXswwuY3BAox0Y8OvkuWgT+FBxewGtiyShY5F2cArh7y2thQQCLG hZQBXaX8DlUhD726BVo56h0d24jAH11/cGa08xBFXnChTwBm94Ttl8ouEfvmAr0LPX Ug+QIz0mSEyzG5JfnFD0lNvZbvlOhv5dwMpscAo8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9A15F80633; Tue, 30 Jul 2024 03:06:34 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 59FCBF8061D; Tue, 30 Jul 2024 03:06:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07DE2F802DB; Tue, 30 Jul 2024 03:03:18 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 63708F800C9 for ; Tue, 30 Jul 2024 03:03:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 63708F800C9 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=Y0l4oqQi ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FHNM4yw/4tpGy78Dm2088keqxeZRKvlSjUTTVDLIOFVflyDR9qeZohVQRLb9Pbxo3mYLxMib1mPhqmeIvmmIKFZHtSxRyig0DZX1RSu7aNl18ZTgUTfyBaRr+iX24Q1hc/wlLLbTDh5d5XrmMp+Bf1Eb4om989dGT6Mrmx12EyXkDaPJ3Ntprbt6JuAPpJ9j2LNEUER3Opx3AYekyKm972te3ZrxzthRYoh2eL3CD1sEUzkIs4LQaUtQzwtgJn8W6A/P1jioTh66Ay5Odl30EgJHlYVrZujSX0y2iz8a4D0cfGt063kUvvmS64BZXOO4Epe9cNpLwa+wyPSvzw+yuA== 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=d07BmDK5flRTcQ0+f2XxaGi76mesJGwHsriDAB1CJ1A=; b=qfCgpnH4UijxuZOMRZH+ERg1dF5VDEw+7pWMmpKdRiyFfqqlmP2RB9QjphZh7qs4wsBLChIVw7EO5b3TYGzG/nNlLQZ+HOdT8jXOXOeGzI3FT+0jH69Xv3qNvqwaFm3PgjGPoK3aD3+Cpu9hgDZgB8uDTm8hAP/Hmd18l7u3MC6flC4sBQ/hsV2yYpzGZX3+kt86Z1c6SuKwezX6Aq/8+bmXyhqbxfOpvCnKzyr8I0P6tnTvIfPRTOrBGhNFN/A+QDKnLHDAco/fWq/xtVWQ1+yihRd1F/rhAEU95A+9L552at5J+Zr/4v++fW00W9mjV4GNYPSH3RocoHZC9zVmtA== 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=d07BmDK5flRTcQ0+f2XxaGi76mesJGwHsriDAB1CJ1A=; b=Y0l4oqQiogsdFZQ7V/GyprTLPoCxbs36z1UqZjXV598Te68Vdg2T4w7joKXkjsSi2ZGfwkhkiInP4AwO7rxTXWYxNJrAY8Gy+Rafkk1OMa7PsLpzcstYAMAD7xzhrxHluxHcgeIBTnpWOLfOq37CqhB18p2K6LYiPBG+FeoMXDU= 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:03:09 +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:03:09 +0000 Message-ID: <877cd3lmid.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v7 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 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:03:07 +0000 X-ClientProxiedBy: TYCP286CA0226.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c7::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS9PR01MB12484:EE_ X-MS-Office365-Filtering-Correlation-Id: b35b8924-a2a2-4393-0867-08dcb0336069 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: LzhuE6S7FTCY8JV4E3zNKQ+i5PS37TT3plLNTNimkd7129ry5xrm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Rs5kO6fAYuSyouKatqHSchpZ2jNiNpabU8JxVb8uJ94cQDxDbxLVGBHldx3QEyZ9F3cr9TTppE+R2sskqBw7aGYCaqiaw3h1W67qvmrbLM3Ptsl8tVTdG+RfQrInFhQLEMtZWDm8VG4n6VZBJ1gTKJtccHaKhAQmtPzC1QUxyfs/YQ8Z+fUbJ/SD4JX+lxGwiZ9x8UsOtFPYw3xepbLlPSFLGNybHX2C+UoES1vYxOmmH8YTfShmNfwrlx90dDDh3rC3hwl6YSRroWUX8PRAJbPx0tVxk+VFka1aETjIZU1FuBtew= 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: MGQmcfyLZzR/5AP04xnEHxecs4D8H0AhKKnF0/GM2ohF30/tZ8wDJ007nl8To8PbYA1Er/XhsNf48FtH1KRRrg1FOpz8poihFU7SoiguzPkHFHiryP+PZDJWuhHDYJhF/6NlX+qVk21QWBe3bqEgnjwjWDaVprL9+Y5xTs8wqSS4E2ztQEW/ZEFotHlcPIGlQWoERO7DyCCsPhsk8QBry8KbeOC4qmi9lUsUvbE01BzeKbaddPnV5cKpH5W2YsKW3Uzx3+YpqaLe6/YM/4eEbep7bizIvCChGN0VtxtXoawMtZ8qDs8ntvHWOEltFTAJn7yvIg65/qD5kFejWF0Y/yZ0ou11/yq61TyjJzclMSMA5x95qjZ+QFJZ32jBvBSXPCHv3dmEzyfv+lqjYU1hLf+3Dhic2XWUjhjxyxmXD8GTfnBdQREfqZLsRR71JyfjM12ImEqKgZfbKztSnQCjmRK6A/uF+4IJGNKswD9TZPPiwodI898Lk1m6MNxsF0EL2nhg0aC+nYcdDkBJAtLO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Zyiwv9kDQJWDx6O0OVACVfnhkGgGMbxRZVqTUE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b35b8924-a2a2-4393-0867-08dcb0336069 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jul 2024 01:03:08.9756 (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: q8EDUJ2BGlab+gfaviJXpGPcS2xLqxTblHsAl3Pax2ZzdDzfjEshquDy9Djs4jT2Uz7yowyrkk0uc0uSo6LpHMNejMbx6aMxFZ5/82vbtrw/H2hJyPSBMpwNJIqpi/Su X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS9PR01MB12484 Message-ID-Hash: TROXLZ2HGPMJ3PA6XCNWUP2SRBHEK6ZH X-Message-ID-Hash: TROXLZ2HGPMJ3PA6XCNWUP2SRBHEK6ZH X-MailFrom: kuninori.morimoto.gx@renesas.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 e5feaef669d14..17581473343f3 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -1289,8 +1289,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; }