From patchwork Mon Aug 5 00:38:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 817106 Return-Path: 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 36DF9C3DA64 for ; Mon, 5 Aug 2024 00:52:28 +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 C864F506F; Mon, 5 Aug 2024 02:50:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C864F506F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722819060; bh=jXgaZdZKOl7qnpPkbnaRcKfMOOayye5uwYZuglSBSJc=; 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=HpHqkmQ5IXw5ZhKIcIoQvjOCyyf4iOqQR/T1vOr0oU3GdPLqr2ne5WUBjMn5Hhfg6 8Dw/WFRPm232zsIOvYBZRqIPqdyCQBMKFAkOXFnlwb2Elo+UvCbUiB31cYnL1ZVycO r53kBy6fiLKSwi8T9LuktMyVy5h92O9fCDurcLXg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AE8C9F8999B; Mon, 5 Aug 2024 02:39:46 +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 3AFA7F8998E; Mon, 5 Aug 2024 02:39:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DC23CF800B0; Mon, 5 Aug 2024 02:38:43 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::1]) (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 7DD6AF800BF for ; Mon, 5 Aug 2024 02:38:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7DD6AF800BF 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=nDzjTtjE ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=jjkH8aq9i/wWh9nf5H8DIt80xsLlLHkPK6qCuDsNAbNJymnHyt34hMC3qARBC8w2uuSleiWw1fN9dfyKnIB1SpFZR6KC4QZNIDg5C9FHmPrvLDGvs8H5ECnmFbmk7IslkTMN7vKzLZIRBbVMEfaa272HMaiMOOYFBBRbI9t7F6kRdYVwOXAyv1li61Wt1JCd3T7R898Y9dbZGg3zeCO8nO1QdQGG/3qAAbaJp9wPlFST7A1HGRurTSlFVTrBBWj3+eBmKfhzBeZoL2XBfwVZrIo9qTHGCo7lm+Bi3w4YeQjgG/Ic8QmLDR06tTw/VHWvzKKssCP/HX0apnyEXc4b8Q== 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=12hFgdz9hQo/9MZP/E11BDxFAIYz5mHJ0vBTVsFlMrM=; b=A5b3FKp2ZDrdnZCN1SW5NR4/BYgE7SzWSCJncwava31aBWyNkjRRP7fZQkVteUfOw8pp8d7/WcOZ1pF3bEHN542RD00aRtKX8gQ4TktnioRIofmsuu2u6LuX2USgzgNmJCMHg5ZifEBUaqK7Lhdpwz120qO5u356WwOIdt6WgUHv+AN3ZBcJmQp5v/8CPrj+KTY4EpXBwKafdEpBxgu8qdtHrIGQ/MZ8EQCdpEV4SHrcNIxGfmvpfotNQXJHDvemBFYtrJpzO41YJmcNg2LIhEVbEDuyL4VxnLFXigIlaPSuyDCHb702qOwumu/MTUVjQTE4GmW8eegPp4oRDjGmlw== 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=12hFgdz9hQo/9MZP/E11BDxFAIYz5mHJ0vBTVsFlMrM=; b=nDzjTtjEbqav7M4QPHVy/UbJgOlVOInSBPVbY4Hq7W7eUSmIQfRto40Xt7+ia9nx69AbgD8MU57yj7lECXMXe+koKyY/LXn9OZnkgEJJTESDbR1fCvk5yJS1zrALYYko7Gsnl7nmzLFmCimREWo/A9S4BjLqc+Sq5N546upVJBQ= 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:37 +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:37 +0000 Message-ID: <87frrjztv7.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 042/113] ALSA: firewire: fireworks: use snd_pcm_is_playback/capture() User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-staging@lists.linux.dev, Linux-ALSA In-Reply-To: <874j7z3j1a.wl-kuninori.morimoto.gx@renesas.com> References: <874j7z3j1a.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 5 Aug 2024 00:38:36 +0000 X-ClientProxiedBy: TY2PR06CA0022.apcprd06.prod.outlook.com (2603:1096:404:42::34) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9685:EE_ X-MS-Office365-Filtering-Correlation-Id: a3464bb0-00d2-49c0-d7de-08dcb4e6f1b3 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: CaXDUwVyGFumdXwx6uLVaC6xZfd5HQIZ1qLQ2LkbhSlfbxOMrDnNyfJMPttyGsHPHUMrTTTkuALZGtSQR8gcSJbv3lSdg7ZCf57iBcmGS/OpeDvF+G6Z5tJUTA2iuosQfYVYwqSQbKFxR+C0o2igbb+dBRoGghfzhGtNDM4zjC3scYzM2YTthxeBKfCxzh8UWEs77XdWvmSE1Jrf8TmiOAMjVRC77AgRe1RiFRZhpWjtMpJpbVPUmwZB4VFQloQ8y+ondvy9zhaWa5MD2mnlcgS6J9hYUYgCbkqCcLgr2bP5zgIT+vnMi91Av7t35ZbWa9VDYRADjNSzDKsDF/Pqp/H3cmxrpWvMw/2MVEuAH+u67ot/4wXCAALwD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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: kdQFXZlq9rC/v9Lu2zeQuY5P01W93r1CgN2a5YKS+5m7nBMUrQTU+1r9z7kFUXOMxGdKogm1XHLvGXTqKF1+yYEcbLCi6qIKZeOPJwM5eDN/ZzOnWLuRQhDlHVXS/FIbpRG5wgHtBqlN+4+9d+895G7+wW5HSpFZxdTLO0EYJWsMzLsJpHV30rxzmqaOxslkdOw5DcOb/IecD8G1p/aAzNoWEo8J3KNaajdfcwa22byre+LOYIulxwQNinf67ruTwVyhgSMWK8ii1+Bpaqz2TFJ9Gat8ahtuO/bkyaV46RFh/3IVFG9p+u253VV26lr93hVdBDapdbziWl4DcuXU9CLNg3vlNrOWcS7P81FGl0Qufut+DsJ4I1fbodWdfWgqzKZflWGQxj6lIVSghLE0aG8pg/TZiCwb3Uy/DrVluvUyqcaiCI9cKNpB1H4AkPA58Dp49ms7ziBqeNVL7YlkMHxAzhXlXUgvqkzD4RWCM1YYOhb6vaj2OAFkRt8uMm2nuhnkjqKangSItRhYx46awzXcZtXIrx4zsaw0/5sHkp75uMrdAgFeiolCIIPmDGaeFuZo8WfXAVfZuF9nCfOfrH7YTEp6wYW9YmpUYM5dU5z3Zp0NZtuqyye0c9ndQduCBmsA0sjQFGVuq450diWxjXmyajg8LGzaIhW1rLv7LuvDc/S61/u0pfMxU17EzXKq97EBr1rA71+ZeUQnfq+rWpxIHjeZVm/ECTcBJz4V0jzbTRZ5z2ZpYJMpUETlhlNQmli6B3t2PgTxjHoR7jr3ZGZSHj3GXCya1jAcnY/tUVHpwXCHpTDx/Lz0OKQ3mi4NI+3abl9/5IcuMpSApZDfbIc3ESwkELM1/wKQSE77POPr4W7tmhchZBXaP8hxas4e/fYsk4Yteh+XinRQ8LoAs9q7Q72fq2AKqlTqz3re/0sOc2XU+01zFkUMKgC5d3+c/WMAIDjY9o7g3UBifrUpR1HSYCZL99H0siAjUB2VG3ez13TwVEDPm7s+72KqgOxd3r8gwKbFZw3r5WAfUo3sMM2+9apE0DOH8wARdUbALhZ5RVjUUdMbtvXL75pHuupdyAzhrxebnIwZKdkCBo+BSesBHWDTYfkMcul4mBOT6n/CP8blScQdYSHZPM6bAQoIBuO2qw2nzdJam50A7aBHwrsQd0OLOfIs7uCWawyCE+qVGK2MibgKN9bkminDVSt4WfCSlCvNy921AkRhw9qJmO0acyMafRVPzt7uH/LqU6sIw9C6uW/AQy5/+V/pNHibdcK5E0TDIR5WHTSvOys+DM5RCosgrj1Hbf52cLTA7yhNYh4rmiI+P5sIzV2EcY393gjGrkhp3y0kETYuJ8+crES9R6yp4V/JOKelrGCqMmBNhlApgw56NbJP0EkyiSzp85sMGuSOSrxoUr6vEOkZBNdE0wgXdwv5JmJuEG4RFShdvJaj6aqd4U07R/3t3c6IbVSwJ2s8Ieoc1HSwnXICjo38YpjUSeYLaRJKCZJ71IE6nc43kY9NKU0QEZCvNyL1p4HvlT9cka/rWTBddkF29mCOkc9eHeFDXjGa4l57qCDI0fpdgQnMOpOUdmCHK9xmxXyyRyunEqlyPD8Pq09mg6stkdwaRf+J664a2+J7x9A= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3464bb0-00d2-49c0-d7de-08dcb4e6f1b3 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Aug 2024 00:38:37.1073 (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: h8TZArFHHtV2khCRq6OqUEGqDiEg/pwSpljCQ4paFjAZVP/bP2EDNuNOs+Idt2+DDqfnTOcZFD1/HWkS8M4ga9GbhuErXPhLNMfCX642JlEWkimBT7vhnJu+EpH9Q588 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9685 Message-ID-Hash: B6EWIOGI2SOEUKN652XHFDIPVJCXNZZV X-Message-ID-Hash: B6EWIOGI2SOEUKN652XHFDIPVJCXNZZV 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" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: We can use snd_pcm_is_playback/capture(). Let's use it. Signed-off-by: Kuninori Morimoto --- sound/firewire/fireworks/fireworks_pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/firewire/fireworks/fireworks_pcm.c b/sound/firewire/fireworks/fireworks_pcm.c index c3c21860b245b..7ab42a6903e40 100644 --- a/sound/firewire/fireworks/fireworks_pcm.c +++ b/sound/firewire/fireworks/fireworks_pcm.c @@ -137,7 +137,7 @@ pcm_init_hw_params(struct snd_efw *efw, unsigned int *pcm_channels; int err; - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { + if (snd_pcm_is_capture(substream)) { runtime->hw.formats = AM824_IN_PCM_FORMAT_BITS; s = &efw->tx_stream; pcm_channels = efw->pcm_capture_channels;