Message ID | 87frphlwg0.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11010007.outbound.protection.outlook.com [52.101.228.7]) (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 97F67C13B for <linux-sound@vger.kernel.org>; Mon, 30 Sep 2024 02:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.7 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727662467; cv=fail; b=CQcfUen7RFNCAXXtXrNu5EfOqCskgPHMLypZLboXIvHM9iCJCL2Wjpk2v9W/hsa7oN6qIJl7/ruk0LpEFPKTMgusw3T5852j2zlw4l04Yc+vY2zL8Jv0GAMCZaAUuYcPJv0nrUiRAiYNY1mJqD7skvA/qojKrBdb9rqXEAy21yo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727662467; c=relaxed/simple; bh=dWJ9aiL0KPdEdwUWlUtMQzWpBBRw5tjhFlKXxKwqj90=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=FtIBUJF0soV6yVn0J1CGlYUf9JvVTPy7N7WfOkv5iYjVC7OnT6X89gX4XiRBrzCeYXW+bKNGWqicLJHQn2eiF8lN6V2w+qfa+uZ+kn/mui1NvAkS/Sj6vtfW5MA9PidyN9cGJ6dCsVM1FurRzB/P7EX+V6TPnTIiyKlgkeht3PA= 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=EVqcHncG; arc=fail smtp.client-ip=52.101.228.7 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="EVqcHncG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oxAMmiCY0gXeqcOMvnNwB7QmlekqKFmg8wKOckyp7qcCaUnMeEK70LiD50d69IbsIE9l3M3r5XxqVlM7n3EkiJ+DdgPmq3e6ywMqrNJzP/3Srqhf6hWO9Y0anoJiswUaTqFqcjxpLJ6W0l8xxKOnTEJ2KbNjbW+6TBnY8Fdju8eKvyOy0zrAUaGsph9kzsZfRoYAF0NOy70pxmBs3a3pYAqGtwuzzbqi41OEA88CAUitMZZAF7I+HKBLLcFdnz7/ij+y8+e98wx7K8DUUTwzp1yfdzu3yIEwuLJ0Pr9nlmzwpCv9WbdQSaFZIjAwxWst1aGcWgbZOhxEPHG+BT+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=ipWWxJjMu/EVkBUzGA8d5t1ousLvweYqHA9t/geTqS8=; b=e1quLcm7Bx6H7lY0w8BgV/xBIQe5cvAFontL+FnaLZ1QbvZjAdcRTUSCxbr1WiQl4eX9V8Ies9bUoKHWwXK+nQkKkDOEYbd3vKSAOyuFIDxv4w1CD+7pwcv56edSEdPEJKlw3HAcKeR3T37In1I3umB8oPfSiOVgnu70wB6IuGUTi7N0EVCgqNaFgHOWORJibUquTs4fA6FiTxcpYeik4TfpXwQS8hH31TR0AwEAyaQGmyuIDZhBVbrjSPI1JCUuMxK2P4zKzGuR0RQKuG6nGxVvtYaGmWbOfYsRZWHellPnqiWuuuZ3rPPXEdTR5hs5VTnTgU4AD6V6YEx1WnSAMA== 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=EVqcHncGO1bQd8JGDGS0r4KU1H0SzV7H5iyJd+Qp5qbvS7w9gamCAIXNiOyX5Kxv1nBTAYu6jVvikDeGaEwtIsJVEs+7dWS+NdoT/vURI3V5MSwjvB3ZzyMJxkw66JBiD6CSPpkThvp7xfEuytWlKqA2zV71MW7KC4yF8M+Fc6k= 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 OS3PR01MB5798.jpnprd01.prod.outlook.com (2603:1096:604:c3::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.26; Mon, 30 Sep 2024 02:14:23 +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.024; Mon, 30 Sep 2024 02:14:23 +0000 Message-ID: <87frphlwg0.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH v2 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: <87r091lwhg.wl-kuninori.morimoto.gx@renesas.com> References: <87r091lwhg.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset=US-ASCII Date: Mon, 30 Sep 2024 02:14:23 +0000 X-ClientProxiedBy: TYAPR01CA0183.jpnprd01.prod.outlook.com (2603:1096:404:ba::27) 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_|OS3PR01MB5798:EE_ X-MS-Office365-Filtering-Correlation-Id: c941dc0c-bd24-487f-4983-08dce0f599ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 2rTs2LJOglhJRWbbOa87zeJWXCXv5ogbqRM/V9RgvQphI0PiQne5MGvAEaQu51+7myemEx4FDr1inVLnbPJ1VEao5MwIE0xPYrHxCk4Jkv9fS/3ZFyOhmcC4GAn8t0v9/BpqNgcMED7Ovcwqv1UMEnt9+bshrRy+OaB4BuELo0L258+rePa7N02ppb65vHg0fTeIQ65BcI2x33CXO4oHqhnhOWBuwreJKoCh8K2JWz0qhw/9nCkG7Vfo8mLrVSqM7WvVNUttXZ7unmBAEk60slcOK2m8DQAA9vR8N1iTKr3Zb7B9UCW2m5PIQ4W2mDmFhxf1mvrpTP8IT4siY65gU6zne1o1ClEJBgm29wajnmSwXN8WLa12ycChXttf90QCJitvu8+iTStFXG6ox8rtrZWEUg/Wvq4XgW6Lc+w4bnbMllOFPA05x5nHVLvnXi5o3x+zK5GAu1tPtQiekElkobdRux7Xw0Qr+z5Eyw+Hh7TCFKo/BfxOLIPU3LnlixmLczMEGwEr+sEKofds59jYuqPGMOWBX/xlDgBjs1C9seYkaaA+zQYiqWlZx6XWof36m/DYIDTqHWxk89NC3Nyuv1iAjR+NPj/P2lRkliEZBgDsudXmNO8CxBxjNQO1viCop2Vu4LJ/oq/0iF+8x7xu0OLZegSZ/+zilDoryHghP0R73436pD2OF6whBIKR/Z1np5dIEKsjq2gLf1H83pp7Ylirj00q7iv8IeuEueF4+YemvfbGENuySwTu+/T30OIarV26niZ/tao4zXdxYzUmmsYgZWaEG4db7GZPOSzSM1ybI/Bi+omf8+9YJ6N5ZnNilTIFLh2/7zAlRk2e0lTgSjAn3iQ/745WXMIMxzX+h95yuoeaJdpSJdGrmS+jtvb2fLi9X+11x4gsv9AwHcUTRsDwGD6VqYzV0+742xHXDCJUaCRXxhFECGGjqVf0AOYnax0etQ0XQY+6mJNXaPTShb3wPygW9Z6GIrjTQJzsSRm8PRbUMRf/heQesMJbWspPEgY82T0LhJhZL+H4+hZSKu+q8eVC6HNV3j7AqxlpA2tb13cArKDzKQFqhNEAf0Nd7UUVe45qr3hbAKj/pLMdrq1KSdg5UvRqD67lAj/EaTzWlOKjz+43gqDNSZbGfUv3zo07IimQICYQ6TD59sTKfBZABt82mdWnt4wjOLTvp0giW2htL0RkeOhKCwT2CmNn79bm7teysNeqgfgN6OD6fun8yYCdQr5HSKpktX9vTfwN7C4Yrb4A5Q/YEdYjXH1RJQ3zqS0vv2VHnRnSW7XoEZL6OhZc7blPeyPmPEoSZdv0gLlU5EmRi0mB00fmWX0VPrSEGAS4lVN1X17SNCFfXvmfvcKuVZaO+pap2g4bI3D59fZN7AkWpDUf1NC4TwSvDNOsAEIYekcBLcepqWnVcQ== 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)(1800799024)(366016)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-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R+Ajc0b/ItJ2+y0/41AuYwCgD50EVMmSdPN1+5FqpXSNGCskNp7LeKqUsbXPin+fJT1NFMBLp1FUjnBgWUN4uODu8Ov/Zsqkb6OnMRyT9/1yGTncaMQPPjvEnSDak50zjgli5E6kLVukZAMi8Jx3b/9ibotHOvvcjNZzuulFl9nUwrzsCTT1V2Fjr7aGswWTRFvlX0xQwaLDyFc1CMXBUjjdFZYpRNRDsDPRfMkhGWSKMKWBpAuLxlWkPYYV9tV8Net1/zwFawSBqiec89B6ZXZ5KFPqh92y93iyAb+WnkNyW2TKZVfO1vmq6BZHBC6eXJ8Z9qSggq9nQuobTbkR/w5MJbbJdeeB0O1W74Xpkp5gq2sdlq8jNLNj+EhionFwtTZWfyfAfIdZWQ1TlFdmI1ruqDnIiauoUSzlxhxDBco71iU08Os0FxGoG1QPmDYBL8U9oSgSRjxTlzeKFdPBbg360ruwjzy11/wyBF3iDKyiS7t1fl1woZS3pMa2Tu8AMmRwdNfJpmsUKQ2FuKXnc9s1dwwSX3OuLpev0gKNa0U+XzhdReRCLlnEWsWZcka/QSmTjT+Wko/SHJAmir2j8/TZ4ozt/xX/touo= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c941dc0c-bd24-487f-4983-08dce0f599ee X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2024 02:14:23.4739 (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: fQouuIo0/RBZZstcJ3SrTxjU9usiQS/FKjoag7DccP+BiukAIL/PmWoH9Oxofg75wcDXYSdwvFBUZGZRbBc2kkEUtur1yvjabLy4UiClURRTJLel5hHBshF/oHPhmZwG X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB5798 |
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(-)