Message ID | 87mslrztw2.wl-kuninori.morimoto.gx@renesas.com |
---|---|
State | New |
Headers | show
Return-Path: <alsa-devel-bounces@alsa-project.org> 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 (unknown [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 49C82C3DA64 for <alsa-devel@archiver.kernel.org>; Mon, 5 Aug 2024 00:52:13 +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 0563A5046; Mon, 5 Aug 2024 02:50:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0563A5046 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722819046; bh=bAV5BV0q06/Z0Yt8or/mXIzxAHdygLVgFo0G1yPUBoM=; 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=XTOeYBpAH01MCKdAGW0bYtlV9DZtr7n+p8mBC+1tUnaRqMtqZu/AFhGhxv/aN8Hhf nP4k/SO/1OBQMZO06hd0ytpj8V/CvH57SvZunfRAHpVzKu7diZUSVPMxlZ4ho3TeNa VeaI04LqBHEI34IQ4HZoF9KD4B1R54vnC2dt7NOE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AB7ABF89967; Mon, 5 Aug 2024 02:39:39 +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 E4529F805DF; Mon, 5 Aug 2024 02:39:38 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 72682F802DB; Mon, 5 Aug 2024 02:38:19 +0200 (CEST) Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazlp170110002.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::2]) (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 B9A88F800B0 for <alsa-devel@alsa-project.org>; Mon, 5 Aug 2024 02:38:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B9A88F800B0 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=HiYNh3/R ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YgSvy/IWG2jDEec4gCf152IcftuhqFMhxS1hmDLur2sYQJz4Uhidf8aiqPOucLtXuo8HPl7A9crZmTjtJvrYABSAAR7CiPVYhzQ/lqrvFYFvipICN7dXgqRB3aREHAWtFAgIagaiFiAoWMzkPSZD0OpuYb+mk2jDosz0NOenDiTq+vx4F94xxBT6bXGG3gp7vS5c1NWgzjknWFQFBekPqnu66HX/gXmQUijg0iOkePPURZglwenM+PVNBcRdqFA68kgQ9tv5WXtauguggSAzJLQOgqKcR8MCsFF3JWKb1GwDcFAIliq6uHo54rz+8MvC8Md1qFbTuGCHqb2nGykpsQ== 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=oW6KHFXVwx8L0pEHeBT87ZUc3ogZn+4saFVcPvn+Cmo=; b=u3qHh22Dqvmmk5ntOsJdFepoeIvfQzckuMOSWJpf96DFbkqTSPu+444Pcs67RZuhh3J0Q78vcz3zPU/LFKTPzaUHCFyPZwI8KOu9oqak2dDvqw2VEfX5yO3NHFgrby5jI8svRgIxZM6BGt+yjB0SVqgEk+546aQ1O9nSsdLKkBXNlwal++IbaT53o7dX1+653FEsJ0mJ9gOpuf7HfGQVAdPTjBCdj/9qUrU+nQW08XOif9WdJh1C9TBoS7dkXprKYgBqC6Uov6QhDYtL2zFSwHVsQRE8UcifEMKS8GrRQKQ/glNubqxgnF424bbtn4TZP2UQBIHpNo7dJx9xim4f4w== 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=oW6KHFXVwx8L0pEHeBT87ZUc3ogZn+4saFVcPvn+Cmo=; b=HiYNh3/RouNdCGcHjrTEMM+a3guXaMvbWkxAXxZABKOaI4kNxWGxwvriCDRuiXf6kDyDO8BwrzOQhJ70KxhfrSZdSColTkGJqgA1jqBKZ16IziiINwVupkthHJyZP3n89N6KjNC3nxUgRCJa1AzryV4ZjRYJ6HS5VskYTONw1qk= 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 TYCPR01MB9685.jpnprd01.prod.outlook.com (2603:1096:400:221::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Mon, 5 Aug 2024 00:38:13 +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.7828.023; Mon, 5 Aug 2024 00:38:13 +0000 Message-ID: <87mslrztw2.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH 037/113] ALSA: firewire: dice: use snd_pcm_is_playback/capture() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown <broonie@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-usb@vger.kernel.org, linux-staging@lists.linux.dev, Linux-ALSA <alsa-devel@alsa-project.org> In-Reply-To: <874j7z3j1a.wl-kuninori.morimoto.gx@renesas.com> References: <874j7z3j1a.wl-kuninori.morimoto.gx@renesas.com> Content-Type: text/plain; charset=US-ASCII Date: Mon, 5 Aug 2024 00:38:13 +0000 X-ClientProxiedBy: TYCPR01CA0009.jpnprd01.prod.outlook.com (2603:1096:405::21) To TY3PR01MB10906.jpnprd01.prod.outlook.com (2603:1096:400:3af::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9685:EE_ X-MS-Office365-Filtering-Correlation-Id: c7574b2a-e52b-412d-7830-08dcb4e6e38d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: 5d1fGPFSU+gfVJwdLp+n5E7DRKF3FyWXg9qIh9T20CVLwcfxpNRGXEAbeD+V+wsTGaVHsFc1fBhzerDjoxWH3gJ1THWk8ZMuOrQDdbfKL/EDw1793KdkEuoksYIKtb7zHzcitRWvAyh+3h73gdATPPeE6qNqfqZHGiVSRn0WmdfjHCNomCf9c54TE4MJlME3/yjdZbn8S+q/BipLAqeJZMnr0MGnaNl+K8+7GuN4ymKoAQEMD0KpSdFBmY4z4hkrCJADAH59/xhngOrAl6FmkDyOJvJ8yhRGp1lS8diRAJwKDOGSJ4POM+JxTLhiDk3uPOHmGu2qE9F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3xWNcg+oL93f6kFcA== 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)(366016)(376014)(1800799024)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tvNizW7iq/mOEAHkNicvxfJukZt0k6z0K+DgK/O24VbMoL7cWQ6T2IlyCBE/9fRWI0d6bC63XhynrM6uCzP6Cmd1J9drlr41sT9HixykCB1/ro1Ed5KjR53yDwtJpDrwxtLytOSfmuaiik/TcD02ISQC1ENk9zXacwjoXV54zZCC6VM/RLOf/aVSI9rI7zoPpx+LJbnyHHUwgRtBj/4exaM4rILiJa6TaA5Mo3vRSMgA74P2B2G/j33L3I+gyPkSmJeq/G45uiSDfd31CG3TiSK+jEjBQF8c83ZMWq6ipJMGDxM9Ss3xv5nuQ8vgQK+gtkJ7A9xIJo4byfQvO+waVYBi5osUFByofWxXfl3htYONWfN8i9g0RE0Y98yncrv07byDxLx7ujgg7qNKy95HzLY8zhSfH3D3zIbm7cYvo9goPw2UZ8rvvbXbE7nGy0J4RFe1sLF+FzMOSvNK5M/8hkN7sQnKs1ktogEq/LXyXZ5ePxEeHLqOMF+xJGhicD8ryxPUkxVR/8RR8leAqDpvFtaZ1v3wYIy0EskPy1DvNFGPvLT+OqB0A3ACcs7+G+7tth3ObbKwR+wZleJhNyV9rhwO4UbPkpBCmu0CChg2uoAAXYR6zoAlGp7UY9M6G+CH3VLVx/egIUx8xV3JIsDIK0DmfmHQgK2MIxJNzxxqJ1iji6Zkhjrx+QRK3Ms7ltCv9Crd4d0F2fE860TtBZlqM76GUT+KNMqNVUBGC7NoybZJyaUsvXVA/m8rRFSebTjR38XNkx268/p1gY1bA26dwd+u9KlvGscNhtKaKjjCqsq/rWCTozny4uqV4apUIciqTDLfAGNzqmax2neEZbACqmSnDu+c0gnAj+jDJIcxmZsryQoVpeQb7+oA4aVItJ0TUZ7jy/dkK4lPpYdhlvzix1/7bim/JW++R9rTWJ7p2giHVYUqlHVyZT22SD8m90raMJOrSGx8KtvI6V6wugn3x+3LEJsI4K+oHrusO+7gZoawTyQ5auKmaUvwlp7HMLXVyJ5w4TsT6gDyYy8mp8EE2jG4G72BDXmwWOQt6MdwXQLz4a1D+QXdZWZxmgSIcBWmTzBTtVlgBoF2hVb4Mwv86GJfSWSrTwkL2kJR1ps29UqeuhGadPLNuLxu5L0JUqR41w2n8gHv3yVxI0/Kaj/p+7YfYQzW0g5Ui/g0iH9TyIqZ4XTS1M5nIbcxmzbo4BTT/bNHFi6L4T0xaIk6gHVXfkW9UFN6hXMuoBVbI7pO9v+EOijq93N+33ySnrJJwgvEZIBzY0h3f6bTx0SeHrppIkcyY+FqRFLbjpRqvIQGNgihq6BOblbdht/q8+k9n2yB/jpj43r/eU5PqM8JnWqPxMKjZq1RnbrlWNczBLiYZ4NjrS4ajSuVuBqGqzpFHwAOwBWrce4/jCld4FoGt15QRKb6idEG5qBO5SnsYA3XNChSULRs51Xx2tC+a248t8ZJG2ZJXuNuFF6z0XNIBtK9ntRSuTDJfLcB0+FUZaImpymZgIuISmXpEPD2XOG3/jMHBO/eLiLAGcBgznrQ492zCXt2x29ztWwOuK/8oweGFclZy4AjrhWgcICg+1HI8GMFI6IaQ8TqLKI33y0DY4plG5kxFMdsuB2upy2lyimlpgw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c7574b2a-e52b-412d-7830-08dcb4e6e38d X-MS-Exchange-CrossTenant-AuthSource: TY3PR01MB10906.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 00:38:13.4970 (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: kvLNXruFDlb1pcZPOu2okS2qblOzcURHQsYrLJlzKGlE3Jk2XSNsCS5eNJckrU8Lcbj8zbDJVPFifq7yKN18K2Ow6fiW3s0NX8jOZnMJGd13da+CQxl9yWvPuaiDdx9g X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9685 Message-ID-Hash: LTDR6TMS7ZUQYJXJ2W7ZKYMYG2MOSMBX X-Message-ID-Hash: LTDR6TMS7ZUQYJXJ2W7ZKYMYG2MOSMBX 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" <alsa-devel.alsa-project.org> Archived-At: <https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/LTDR6TMS7ZUQYJXJ2W7ZKYMYG2MOSMBX/> List-Archive: <https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Owner: <mailto:alsa-devel-owner@alsa-project.org> List-Post: <mailto:alsa-devel@alsa-project.org> List-Subscribe: <mailto:alsa-devel-join@alsa-project.org> List-Unsubscribe: <mailto:alsa-devel-leave@alsa-project.org> |
Series |
ALSA: add snd_pcm_is_playback/capture() macro
|
expand
|
diff --git a/sound/firewire/dice/dice-pcm.c b/sound/firewire/dice/dice-pcm.c index d64366217d572..063e16d153fa5 100644 --- a/sound/firewire/dice/dice-pcm.c +++ b/sound/firewire/dice/dice-pcm.c @@ -26,7 +26,7 @@ static int dice_rate_constraint(struct snd_pcm_hw_params *params, enum snd_dice_rate_mode mode; unsigned int i, rate; - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) + if (snd_pcm_is_capture(substream)) pcm_channels = dice->tx_pcm_chs[index]; else pcm_channels = dice->rx_pcm_chs[index]; @@ -64,7 +64,7 @@ static int dice_channels_constraint(struct snd_pcm_hw_params *params, enum snd_dice_rate_mode mode; unsigned int i, rate; - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) + if (snd_pcm_is_capture(substream)) pcm_channels = dice->tx_pcm_chs[index]; else pcm_channels = dice->rx_pcm_chs[index]; @@ -132,7 +132,7 @@ static int init_hw_info(struct snd_dice *dice, struct amdtp_stream *stream; int err; - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { + if (snd_pcm_is_capture(substream)) { hw->formats = AM824_IN_PCM_FORMAT_BITS; dir = AMDTP_IN_STREAM; stream = &dice->tx_stream[index];
We can use snd_pcm_is_playback/capture(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- sound/firewire/dice/dice-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)