Message ID | 87msjovbtk.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11010050.outbound.protection.outlook.com [52.101.228.50]) (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 AAFE511713 for <linux-sound@vger.kernel.org>; Tue, 1 Oct 2024 01:42:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727746923; cv=fail; b=UnhYyLYutBpQJ9m/t4te6hbDR2VfYvriWrk73HrCZZ6MfXaKtllA0CubfK99uopfR5zSgKbpwv+jfZGebZMis/ioYt3g8wvHopUMmg8cI+PJ3YQg1OYCX18aKnciSCjuDzWMBQ2bBM8MdGOFXiXXCwL+t/7lxfL6vC111FeiuGI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727746923; c=relaxed/simple; bh=3g/snjlfb2XSX2dfRWXRD6mShHGLmwed8aThlrMzShI=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=QTJeX1dsIu/lYv2lh6dpZFeRm+MFwRtWS8aV74RAHTHomjvnQTn3imGm5ZU9VUBDoXKcsN1LCXPxg8E/5l0TXbfsOVsZDpeQTgGpFW0spSVcmPT+DZ5OlqJVVKecI97yDLkpMTkbzkG57e8Ct6RLA3PjKTh3ov1buLu3ZffxaE4= 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=TeuwCRAG; arc=fail smtp.client-ip=52.101.228.50 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="TeuwCRAG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N+Uz8OKN9ugo6bxjKnKSila9XAOwnPx0QUK+eue9AxPSWKFX0VLtypEQl+zyIw0smDNKsECV3VXqEeCAwVXg889OaZZq/D3OujUo/V4iZbGqgoxB8q4mNIOSKCkpdu0exlsG37J6zj4+StRXnmxbgvSnR9XxjDT7iksCuThZX4YEMnwo0FZaHbAmKvWunjGGjCFXYezeMKW6sIwUlRJLJcdZFOATLctpiR11IlrDzyawVvVALoj6LLqEOznBdk+yA3BjKPoyfDUenrPl/D1FL+hHzkRlUOfKXww0DK5Olr88XPdPUMDhsWowOi8Y9gBJJeo4F1a4JeAw+Uk49S2guQ== 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=KV18HMbNeNn1nP68oRwggkr9QiSOvRe1aZ8FlAj5FWQ=; b=V1yCtViiHFin21Erba9zWYAAwSuSt6E4TSEeiOWZoFNAfPfqBOx7lxSgJFE4L/uq2PmFd0Xr9v2y+z+qAjwpGAW6VBTO2sC2yjh2O/nZT/Qxc7kIGSBifJwgOGTOis2T240fRD9UgI52GkHNDxVHM4w+bc1M6qcRckTJCIjkVSHFGNsumPz7JHsPXJb29ZkgQGa2Nn0mK/h67ojBQszo75YcUXZ9AaI/2p+Bdm2fErnmyUMlOCvd+2LVUVEByRCRppS/NNBeBHGWkXCCUlFeazMMCr5Yu3n7NPWU+tQjZPWtThhnF1CiEsyMYxts44Bvz+K06cSQvWejSdSUPerUUQ== 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=KV18HMbNeNn1nP68oRwggkr9QiSOvRe1aZ8FlAj5FWQ=; b=TeuwCRAGMyH3+E72lBclkbWwTlYUGmzYJWZdkhuTbKiC0o9kHG45vA/zXQ48puKm4h7lu3AC+1mAgZ0i6veiQZP3OY89bpLV4Rre7UgJNovio3SN8qMgwgO9Rh2yGDWiNzcOczt6vnAmVPkwplzQaIoA8UbmGCdAYjVJtoos0JI= 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 OSZPR01MB7132.jpnprd01.prod.outlook.com (2603:1096:604:11a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.27; Tue, 1 Oct 2024 01:41: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%5]) with mapi id 15.20.8005.026; Tue, 1 Oct 2024 01:41:59 +0000 Message-ID: <87msjovbtk.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH v3 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: <87y138vbv7.wl-kuninori.morimoto.gx@renesas.com> References: <87y138vbv7.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset=US-ASCII Date: Tue, 1 Oct 2024 01:41:59 +0000 X-ClientProxiedBy: TY2PR02CA0054.apcprd02.prod.outlook.com (2603:1096:404:e2::18) 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_|OSZPR01MB7132:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b276dc4-b719-4491-6d04-08dce1ba3db7 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: hk7PLn8BB/tl/w4i50wwiro7laoDaRFyxWvSR62iHJ/arTwlAyoBjJZvokzHrdtvT0JWnHI+/GkiLiMbtXb2+3AG2cM7QbYk+98IYRGfhtSVfbdOKG6oJwxeIxSmvke9zvsbAWORMOvfg0jqgy+PAHFs2bE7othkT9BHCSjPXUdfb9ppUnE9GqvXzj1D/wpu5PN8IDRaxc+QkJNZZa1Vuw40Qy5LV7oWTzZ8MDAjpzSlDD0eKlh0QnMeGDG9rs5PrQ74UhFn7hrKp+YKXq44oidDMPl+JSVBBLFxAKIYLEPInzioQ/CEFIoMcEj/btRTgSUiW7w65wXxfeDNv6EJMI9cvXckdT8K9vRPiP2shLTvjrKS1Vc7CnDIQnuD4iNsxJhazCrXGkk6VADGImoCFPiIOUyYV8fWAD/fYOOkxFeGI+C+UGnrGWxQphN2T0jyoUJ59ErAL120HEylSPMqBgNZgTUYUi0Uux+Wxg4PeSn4yRJvfTPxZsO6JNeD/VZ9vQXVaCoR9MiCmT8Qo850GFWKS3vZlIi8ehljqDuG/yGdnWACuL+rqSJRLlg6UdvoClnrS7ERqWOvBphTKMExlo/Qw8nblW8SFRsuTsbkPapLAJfK6O4ZXDu2hyEt0j0jp5xX4BU+LdX0eha/+FOZAXcR7plfa7Ubad9YF4Pl00vKk8OEpsLftcUYR0O9O7YLqIJy3IjraeZ3QyNSRTjt1rnlzz5j70RTZTIRUVJcgx1dc/tS1vOj3PdrKRX8kctGB4OKVxLSrEIkJfutrO+UgPi22YuF/0GL+rn0HCT1LNkWG9/QP7tD9RgAljebco6S8qPD0G+c//UWpggEC8ZzDpL+Ex8rWteU8X645V/xk4uLiGpq6l/ZZzXTPyaPhKxTdyvq/dEdYOjHEe3cKeXq/DGeWLVWKo2TirrzLMWrzv5iKofWmrHZzOJ9ITbdNwbz3d96/XTC2vdElUW3ZjK025c6hSH6i2dFdvUHk7/oEj7b3tOeu/+b2ZtGqC0AziE28G21rHpGuEp/yJk37lHwDnjjA13uWx2Psd+SeU0lwOD6sNrPBdCC877tikag6us4+4x9ZpP/DIJvu10NQbmxI9lqbQoh4h17xB6vDUmAYfZQMGeijN5EJnbcdI/0xnjF2A5IOJCUH6lzeKp3xKgMFy4/4WNuThVsN9wNeoIEHYZAh15md4ynDsK5NUQgAUSpTZL/PJisDjKlonvbUi+elHc5wTmWjqJsYc038XhAzvvDDORNhHRekGwLGbS6XJHxU3pWW8ubKDwG5Ls/9uEgZ1+fZoyd1P7LbkscEHONw26fnpGydkzzwUP4i1ph51vVe1JTXmfapNiiEVIHzjOw1Q== 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: Huh41zOQIQ+64SHZD3wy9su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QJWgwiqELnk0Gd35IFIXyLFDXCxBSQkcs0bvb5zjaev3c1ESmGAjJu6cPlogkPwz9TImm3tjTOQlmVU6ODQ3oUOvJ5iJOVQuIO/YiWqPv5yWNsjX9YSd6CTod47d7LGj+MrLB6qrTEPom+5ZQ+AMz0THLkLxsp27psjlGXx54ZODkUJZREaiKIotw0mwC3g83kYhSJpvh5E/P3W/Gi761vowaAaQLbuJqlMj2gZ35ZK3lJtuhREv8OTAqTmzc5ijbF/G9OcQztehJg3g6pHDnuVH+0UK5I9aQYyKWqNpG68P5Pg5ALCHPZxCpUQxvT3KZ857+PrmY0AGcJA5K9/s68sAAccNZAEgwyn1um56cViS/HuDDmfCJ2hPc+I7YQ4tDZUeVK2gvB/nFOrp/czbEg5Nn70FGblBHe1UXtLnzdqYM/K60lbfuYoixW8ni9b29+01veGnWu6Lg/j7WIjIjla5S3eaiPVUhv9/a/Jq0gfYfUTE3aa1sUemZmbFMagav5vNJmbCmmy0uPyP4mds= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b276dc4-b719-4491-6d04-08dce1ba3db7 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2024 01:41:59.6202 (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: OqZ4Op2eJMLyHcc7FgnL9Oe55wEKfPYfw2OhNz/wYgEmCTNqz3Lnegjo+6sgvzyZEu2DrcBmmcSLdZ178RiPCtYsAClw0gYuSvcVupnCoYgjYrYxRW9w2m91fw5rnAwn X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZPR01MB7132 |
Series |
ASoC: remove dpcm_xxx flags
|
expand
|
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index e692aa3b8b22..a0c55246f424 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(-)