Message ID | 87cyk2qj42.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010021.outbound.protection.outlook.com [52.101.229.21]) (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 2DAED482EF for <linux-sound@vger.kernel.org>; Tue, 15 Oct 2024 00:56:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.21 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953793; cv=fail; b=UdBZ+HX4G2OzM59C9cOOn4OD0rvzBeXc3ducE3MeEUThEiGeDzQ0syTxtrx9RZqUjfJtlI5jUaXDI23XMUZfFXyhTqBRhAfiuQB+cE0qoeWbCvOYa9k0MpKN9ZRWsonZxxxFJgjXTyJ+HWF38CNfK3rMgMsA8mSB9pkN0z7RWL4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728953793; c=relaxed/simple; bh=dWJ9aiL0KPdEdwUWlUtMQzWpBBRw5tjhFlKXxKwqj90=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=IYACidRBnk5hbKDYhzZKBIhRDH/U0vXqBRQZNr6ArDA7ZaqJ0cIYAZhTpRUZBZnSYOEUt6NCwEGEi7ZSvr8Zi+i7rUTaiNQq5lbcSX1f3+IZs78k3HDbU+7em7D9Jcig8cmcwgXt0+zfZVeYmPJ/i2OlWE9NhTxR0obPfALmT2s= 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=Qqc2wUxF; arc=fail smtp.client-ip=52.101.229.21 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="Qqc2wUxF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VN/ZasU6hoYbiEmv/uAOeg9qpwigJN5nYRzlF7XJMo0bVVce6X9upbV5Vzw2333PQvgrtvOkY3f2DQilKiu0n2G7F4hVWrAAnWFLNsJQCCDmz+vaohLIwSLVwnNWQa98iTTFYK5M2ia9dlIX42KOb1reIf4/GNajSQ0q+++6rfErb9paoZxj/XM5WBIFVjXl/bm9zBhTq9DXGo5NlkIiciSCl8FQMlSjLSkS9OAqlwGcaShdGfmPUKWaeaWSYRRPhJLP5SlpvLRzuJ+3TtL54FKIE/dJ4vuuHW79NLJFSTbZHiUEakJqAL5BU2dljaiTH/YSXvmHYRhxP/OGt5gAwQ== 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=ipWWxJjMu/EVkBUzGA8d5t1ousLvweYqHA9t/geTqS8=; b=eW9r0gEXqcPH2TYVnHc1y9isdT+xM5mPRXBxzk8R631yEnV0n/4GViy77LMIZ842wdbHsfxn6UtrWminpG3+39Th0a1xnNKtYf0bpYNPQSgVug0Hkrgyk2EkN6F7HfwXz8BAdznyutloKFtvRF4Y9xd7ufmciNxxFsG2DiMPkzjR33+fj/nzlbZi/ZWdH/kNT+SYPl+0mgs+KMUqw+/QjiRElQ+tpQ/+VKj9CWRD1y3yFFqhucy+pwoIdOX0+VtrDDT1T5qjk73DWW9Z10ei96ohv1d7guWQzc41b6QJQ/x0IN84+wAhXnrQhhUmsu8EYAYnHV4A3UmbSI+JdtRvuQ== 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=ipWWxJjMu/EVkBUzGA8d5t1ousLvweYqHA9t/geTqS8=; b=Qqc2wUxF67EBptBz+97KR97BQwrfKopkhSdB+aSqeO/yjY1ggPULr/sp39SP8UaOqK+9Ul7ByxytCKXGNSJw54iGIYILfe04Zw5CN7+lOIQvFYqsLTzSplIV8C2zlHQpfMqwq6G/ZC8/nDxJH8BsqEfvjwglYsq7ZhMNA4zqt68= 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 OS0PR01MB6130.jpnprd01.prod.outlook.com (2603:1096:604:cb::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.27; Tue, 15 Oct 2024 00:56:30 +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.8048.020; Tue, 15 Oct 2024 00:56:30 +0000 Message-ID: <87cyk2qj42.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH v4 08/13] ASoC: soc-compress: remove dpcm_xxx flags User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown <broonie@kernel.org> Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org In-Reply-To: <87o73mqj5b.wl-kuninori.morimoto.gx@renesas.com> References: <87o73mqj5b.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset=US-ASCII Date: Tue, 15 Oct 2024 00:56:30 +0000 X-ClientProxiedBy: TYAPR01CA0106.jpnprd01.prod.outlook.com (2603:1096:404:2a::22) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: <linux-sound.vger.kernel.org> List-Subscribe: <mailto:linux-sound+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-sound+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS0PR01MB6130:EE_ X-MS-Office365-Filtering-Correlation-Id: dd77f241-251f-44d9-618e-08dcecb434a9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: 2lN1ytNyC1Omfh8ieKtJbzXmEi/k3E3e16tNHZx3L387xdH7r9Mt7J6pgrvOaPp69tx00GfM5hkcWFm0doB617i/aJGtzXtak0qFrwzClUNnszkEcK9+av3YesgTGwOH+L9AUckL9oUXOwOIX2bf+hecyLKp6RGNseW7tprPAJ6gTARnYb9hDyYfivgHklaC3PeGFdYrgYYmvOGQKHzmihjSs6rPWtlRLfv0M/D9NFfWiFj/J5h1ywz/3BqkrXDzVQuhJkSeLyBFUSKKXJRBuTyzKY+zBg6nCTmCJTYucFMykZqEhKuZl4ZK3EGAIlvofYRaC7RGO51nGCSUi/KqMW3CaREoep/Ejocq92c0iqfIeweFAtEbLJs/owRYw4Yi64DK0693Qj2cIpNW/8dSNPX0IPJzNDkBymxZYUvl6eBoNCsSdlYN5x0A1pysrdbLBUx/AZzKFlaaTRb/1Jmihue1qUSqF/m3VzjqszhbwDowcfMVMiLCRBxylhYZv10LxAI8kfWV7tnWM0Veww5WoCEWYoMRnHzLR2xTJLTenoe030w0YkboX52fHEoXWPN0sRtod6HQWKt01ixP/8vEXBWvCCAFOHpCRZ42licd29T53z7nLeCq2DRAAJGYP9fBfMpgesyRk6t/HlHpnD8la62c+P0F5uM1SsNlOoJj0kK3o9ijXrCYBxRXwexvErR7+pYUMLHuRuaL023sAn9Hlpuc63+qcpUrujKGdVJPglvNgvfHKoFtejz3J3gFRe/AuOV21O3XN2Yzgl/MOPOZF2X7F5YYg42SI1/jyCgFw+yhEH1Nbx/IAR8BcXy9dDO3bnEwuSm6Np7fD52rlVtN2IowLIOcLVgODy0STIkeNpZqiR8T5woLnb7g4H2eOf6Krz+RYhpmM94e++3EFwiGjDfdgxQblZmiSchGLp7Lbr9fgeIKSuqk5kYsYhm7nnIb89v13diSq7ENOgYWVTVvge0zh8UPFZbmdz4LoT6jmaAild2cfXFZV17SeDSWp1HUWv8vpZxRhmzXpjurzgtISNlKDCjw3rrVq6Y1sklK9folbOfERliEzmlAsgqgkhF9u1UA7iE8xa6YlqjR+b7QEc6RqjGbhzP6UtC8ILYUrnfzqXFWsIpTcljqyiuk1zXU4+bi9hE5IHy0pXiOxnYU9XE6wKMoHmz6zJcZR5USMJrs5c74DyM1U1ZAun+os6zId9/CGP7+ZkEszhtcjzjTqrbORYvxjyNzOdNov6WS8TzVxwzEaQM9hmLmOKXwS5wviMvCqApXuK57zuK/oiwaC5hgeCDPVdK2dLvkCga5paHrMW9+tSZY3+jbejpZLKfCU0NR3b43wD7pgteFxwQZQA== 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)(52116014)(376014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HIPqlKbpY6xPv4AIxTTJ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j8PswJnNkrlH9Ufy8MKhSEa86WfTF0iJEPTb8YYewQXg/ANK/zpjkMNdSQsUcJDLyjvjWnHc3u8sYWCXiErPO1UaJORTfwyEKas+thyBxTeX8FIupniA/dtrV16k7eefhDntLEBWwNoQG0fJ4qJeYeOCZEEoTcqO9SOYPXrvt16OIzBaMCVH6Mxbnc7hbjHJI0qX6XHArVN3qVt1Bz5/vse1uCBDkgRgmbSUZhvtE2HjILd96NMvZPrRm+xwkSuILo2VqLZjcrEPZPaibQI8sIKcx2vQ/iwsTFfzDzYCrwXdQPcE2LQD0qBA1M1F2yx1vjAgrECP0gRe8EYna6ffW+QO7FcP0Jmi9FHEqEzZ+3YQV6WrgbLH9K528igcDYK54mwPdrifrIG4Cx5NkjHBUpV5/TNknghSYVcvUFbWV64Jyb2zF5gLzac8kInLqiJHC6m4nQiDA9vD8LWFY8iRe7PmiOqkyVtAQ5h2Z15FDxBv/JUdRERBfitBwJzIZH+0KTje+ne+SV+uTgu7Tjoikbjvx0rCPUFY5mvQGUAZ+qUEeU= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: dd77f241-251f-44d9-618e-08dcecb434a9 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2024 00:56:30.2291 (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: oZL81ZGZBvtSkCCu0RPG3d61WDkzVrP0s1tURZTFtZfNIm2kRC2N0TcVE/7fqCz63okqwhjKjPim22Wwy5Dzg2JXMz/qpx1EKPS7BqV8e5botUd1JQyQEyqHMHXYCn1U X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS0PR01MB6130 |
Series |
ASoC: remove dpcm_xxx flags
|
expand
|
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index e692aa3b8b22f..a0c55246f424b 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -606,12 +606,19 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) return -ENOMEM; if (rtd->dai_link->dynamic) { + int playback = 1; + int capture = 1; + + if (rtd->dai_link->capture_only) + playback = 0; + if (rtd->dai_link->playback_only) + capture = 0; + snprintf(new_name, sizeof(new_name), "(%s)", rtd->dai_link->stream_name); ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num, - rtd->dai_link->dpcm_playback, - rtd->dai_link->dpcm_capture, &be_pcm); + playback, capture, &be_pcm); if (ret < 0) { dev_err(rtd->card->dev, "Compress ASoC: can't create compressed for %s: %d\n", @@ -624,9 +631,9 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) rtd->pcm = be_pcm; rtd->fe_compr = 1; - if (rtd->dai_link->dpcm_playback) + if (playback) be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd; - if (rtd->dai_link->dpcm_capture) + if (capture) be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); } else {
dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to xxx_only if needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- sound/soc/soc-compress.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)