Message ID | 87a5ey9vhj.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 0f77c88f0e3a3945c328bbb9a9e3c4b5826e8fe0 |
Headers | show
Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011061.outbound.protection.outlook.com [40.107.74.61]) (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 4ED1F197A67 for <linux-sound@vger.kernel.org>; Sun, 20 Oct 2024 23:59:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729468764; cv=fail; b=S/k3t8DKXHqsLPWucGbhr8Wzv2FNydMw+Q9LTDTzV9WWedcA3GpK9PfOpU/qPih/toBWws0d6o23tYyL/xXyWw8nSZmpl2sZUzNPJonJ94CGv8nw/i4zCw+OtBrSkSL5qgcX5ZDQ0hMr7jtAHEMMHSbL2DvmsccWv4c40Q3kXPk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729468764; c=relaxed/simple; bh=dWJ9aiL0KPdEdwUWlUtMQzWpBBRw5tjhFlKXxKwqj90=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=dJg7jdMhdToTF9z8s5b0UIAkQZQCJWge+0v4toiMdp73OvkiMEfBONxcV9rCQTI3nK360RJ2AhQczr7FUv95uMuTPKUQffPVFKpLIrCKrHA9rro/ENhHElQSKGXf4x2Oo13B9CZXQs7RG/ACtcFeOmLlvPvrEUlxPQe/YK7JXw8= 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=mvt6htHN; arc=fail smtp.client-ip=40.107.74.61 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="mvt6htHN" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jpaVOVSNl0rxa5VMD1OwYmde0EBwYX6xEFMH5DTqBtlgXQIjFhmp8zr9mWk3cgTOCzuFeEwS4ccbqg9fqyhXfwh1ZF4T1VVQIU/h8t+1NjKf4qr8bK1hSaMmLibamwFS/5BkTXk4vseUjP/S+ms67L9w0sRtXXB8Hht7OJiYSh3Shd8vWuJEi32yRsqPPrGLAevsHcl1/G4L0212vBV6bCIZEnjh8K2LxhNHsMNYUsS76NN/bSyY5AP3H1fM/DwBQ5apq4IiaTGtPVuW5bxr0ZUcfs4bR1dEx9bjujcKSF3kGZG8iCI+GoCwGjzB1DkwWy1B/Gh+ocVcBWdSnEyncQ== 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=eYW0SQfFREcYA6fwT2cXxa3vtqzD9wvoIk/5q36Ob2oB1GJl6xeMaKnvUbigFckmOFz19A/HMB4OtvG+9CcHHz1Ze+b0OgvgrVvkcTxR76BVeRNHJ9t2rZaT7rtI48Px9z2OvLY6EAI3N/GUkUzvg7SRalGWipFeHkCMRhHXJ7/YrSWWxbl4fiqTmWbcQ/RIrAuzx3jJ+OVrLs8eQ5y9w0aXbRqLOa/BFH2BfT7FZcJwGXJed0gmEDBPOfvrc1KYlI3cwFx3ADv6h1KYfsI0CVcf6g+4Ats/PdqvCuytvhggT7ad5r4J3fAJ/8SbIM3kNlpxw4zayfq4ZmL+TN5MYg== 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=mvt6htHN1PspsdN5T+CPITW6xuFIgWiBen1smRhheNta4KTXYVI5mCIJB2Mr8vh9HPcPUGYO+Mrf5kLLRrTec5Lg1EtJh2N3eVmpLJqXT/3RCle0t0aZiQa8XHveb9OwBVjOsTslYJX2U97Dv9NjTRNzbjPfQo3ChT+cgeJGW8I= 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 TYRPR01MB12916.jpnprd01.prod.outlook.com (2603:1096:405:1b4::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.28; Sun, 20 Oct 2024 23:59:20 +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.8069.027; Sun, 20 Oct 2024 23:59:20 +0000 Message-ID: <87a5ey9vhj.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH v5 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: <87ldyi9vje.wl-kuninori.morimoto.gx@renesas.com> References: <87ldyi9vje.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset=US-ASCII Date: Sun, 20 Oct 2024 23:59:20 +0000 X-ClientProxiedBy: TYCPR01CA0031.jpnprd01.prod.outlook.com (2603:1096:405:1::19) 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_|TYRPR01MB12916:EE_ X-MS-Office365-Filtering-Correlation-Id: 7aac8d19-a9f8-4a63-99eb-08dcf16336e5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: Zito7ZCEkHeGDmtV8bkZ7UB3l8f8MGsY8y0cP087jqeLT2+g6raR9I+zzcXJbAzlwhXLFPjoGULAK5tZItWrSVdzEwJG8/IitGMjtdUw0g65cZOdzA/BJrCKH8OsBSVHM2uNjbSjE3s+yRP4YP21gFzy32orG/igV52k5TrgFVRBs3b1tZ46Dipbi62ofjySjvWtfkcUJn3zQBwiS7KvZc2YiFry7jEAQCbzKXNH6A2xYWugPKSbdO9/LlM84zpTpbqwU9T9zH246ol2FbfAh7aEcMtPbJN0cHYsCkiE7zg8qxxOwIShsOo3CX5pWVFo6xWB3jgz3mYwHsYFuOtoT1kIATvKFy4RZ3Swn62CtoutNDJg5pepnHBRsMbS8OnljsWJ8vkD465U5wNMhYE2bkmh7UlzUwrr57ag4iTj5r0/Hvq37ZM4c4lUMG0S4OMjd7nclhe3s7E60AV4lVC4Qb6/UKBUrxXItVfdN3P5Z/fg4OJpYd7wj+SlUuGM1t/8j1ffmEsGrHaH9xnIHcLfxxGeKUtTCif6jt3Uha3NKN25OZW+TgrAAbwRldKwHLmR32qB/o9VrFS+zQM0lbQt4jrSHginXqttEGg2xwrkyfP34j0hTr6YDNmylmWkS4As0JT5N1OEsTwtVE7rC2tfLKv+3iLzXAT9f3R5UYi2vBcGx+WyfKuW3NXXaD8H6puRt4aCM/3SY2ByJP75TE704twpLR9ZhiESR1a8JWfbcEpYg4LOMDB6E4vffcMgU6//Bh/biarJpM6HzDwgoOHqRzhvkRd4bVEshJR3QF3j4uGhEUnnsqfXrPhoeHj7OW7S/xKldXTUzx5xNkEpM2tz5p8YqTJX4AFqmF1gxLPetHonzNAeWn1CE8BJJI0ohYkiD9wJt4IMybyusHN05HoNR8G9OaBjUQhu4PyXt30NEjkAjWjScH9++32tq/2g7bJD1KziPqOHQ7gODA1IhhyKqu0XZvaoMuibIHNDYigW1ASsh01VdIY4EBtZgN/PkvntfkXokpd/rdeN+I144wa3hMI2npNLIIBiBb0R14XSCAIySYyf19IdR662CkvVlk/4nK32Gb8Dwm/vVqjd0CRrkTY275WBHsOMdvoWch/p19RDZAtnCZ6AVnDPXB1VU5Z7RaQFbsI7TW0ZIvN6oU/f61d7FY9QGteJaBp5LPgUlJSldgnzP6WbNLsM0oVG3pXNm6OxY8quktKQ32ceylndaDX6e5nlhIwFNyYZ/TuWdXrDfoVMGwXg+miLnMxmjHrTUKP9nL0QujEmubNDHk9TtiBZAMuOjDDw3sKHR/FRLMfrYVgEukFy/ViSaAHuengFNouwAj0XLSMmakqK9bt5/P6NVl7LYU3NgK9RICWNFaM= 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)(52116014)(376014)(366016)(38350700014);DIR:OUT;S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Meq/8YJJ7Lwi435ofEPxBNzJHw5UB9l/orlWo8JOqX8tU3VGz6ImwyMV01JAmf8eGR1oOVUBePiErx9Ny1q/dhi7/LQlUrlQk6RgwJZ5xb5wUr6/e6mBj3FkaWY+itw9M3T4YNnGF7ihNwpbaCx0m+9b1XGR3hosv1k1JrMzya5pjjEXZJZVOXi+M+735m6Rp6Ymnly1HMqEPXTcPDOYl/b3Kj94QGKdvshSONlKGkJqHDnSH95hMZE42thbBsiAVGk2uBIXFpE/bvCGRKaIqvlfsuPNSL1PC/BxEx950BGopoOeldMwVn9FGmL0+jblgAroTTbwYbDeFNoC26ABAuXoy0obJ1+3GNAHBp+65FO2ycL8A2/Cxuyk326QsjwDJLm9rH/0oQzlE9K6OTKkP9MCv53g27r6A+iTj1/fufko/Yvg8GZOdyOJffBDYLTv/ALNhq+qjAEkKg9cCy13zOO+k6m1JGFBdVeNnL4PG56y0P2CuaeyjmPpBza/oOzpNWERCzyX7G1LJVUpOde8YFPPpCUcTxAiJ7m8wk2RaCD3mynQRk48vO1QFDN2Es73+Clam/5caUUcIfu41xWbS6GpC/aqqCLGEy0MJCJw92L4JY= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7aac8d19-a9f8-4a63-99eb-08dcf16336e5 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2024 23:59:20.5720 (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: wxkQtW5utmp3CrTtldGX+uZed2dSqPDvBEWQHoTgJdC9M+hlBrBjcnz0e3IY0GGHop90n470NN22274IlBIefc8EohbhNz6Zr5VpY7Gw7G31N0NTUTZjGHGUZjOen/wB X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYRPR01MB12916 |
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(-)