From patchwork Mon Aug 5 00:37:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13752966 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 195B3C3DA64 for ; Mon, 5 Aug 2024 00:49:39 +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 625704E3E; Mon, 5 Aug 2024 02:47:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 625704E3E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722818889; bh=1yEQuyHIzoT2eoAhdru3hXRTCu2g+dQM5Ell5eKAl8c=; 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=ad46ZM0ai+RzUM5iY8jSTBCWjlktb9vmrof6cbZUh80mScaovlV+jOxd9vWcsK8Y3 OhjLkzooHGW5woKTt1MLBRR7iRX5GiNAKsUDl1l27SNOd2gjm+Md/zrpLJqEpOdx9z svc7ozasoSq/3xu7DgYEGL7Rp6TSVaSFMvnirXQM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1E350F80616; Mon, 5 Aug 2024 02:39:36 +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 27A1DF898CA; Mon, 5 Aug 2024 02:39:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 84732F802DB; Mon, 5 Aug 2024 02:38:00 +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 3880AF800B0 for ; Mon, 5 Aug 2024 02:37:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3880AF800B0 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=DziOK/V2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OlHVtYHJ0Zobg9p4gdtfLsYQidHmRS19HZvDcaiAKnLRNnkB5lUkN7X8dfsD4eZ4xwtJM8PU41CG8PIKSoEeKx7fQmeHqFmnslfFJmn4ahW+Ewwuc80bsUUm6bMHnqgmSrVP295eKVoOZDhU2japg0AapUKrFmjnUCZjxRmVYKzdluyhCqpmMPqvjJabztsIpd2IsglW4x0SPFPfCrJWcul3EZ5Fk6e4ZBQ/ldYwa/Mxjry5Mux3RSk3/gDYVNawvHbGbRcrstgD1c/bobZLBQ/Cfg4hTs0I/SkrCYa8yJZQiJ3M4Hzuo9eMESM/U0vAVGcM0Eu4bCjUfz5T/9iyAQ== 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=od4JF1EE18ALyLXED/p+4+5yxyPsJ4a+WL1HygEqqrA=; b=vCNxHK2GO7PhZxKYhyBaVh2/f010fMAsoj8Ut835KtzZEKBQLMJCiHv8/yRc5RAcF8gTVDA1pIEAiyKDUs2lJy4C7IIA2n3ftB06vPSKR91hDbExN8Afbqo7wx5lULqbYLLOwZ2Tf4CUU4IBvRyRICCKV7uX+WoBNFtn0x9JJi49niN4iVhr60AGbZLK4VZR/zvMRgLlpJz2jqV9Qy5IqHB/lSCSSGsulELLK1i1Ktkce0QZ50pMiLxTyNztfs1gM87R8qm6rEaBArjCdN71TrH5UVgEd10hdDEZp2jGXBGGLLpQNhI6DWEnAqLrmHKrbR7WsjNGr1CBzpIM93w+Gw== 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=od4JF1EE18ALyLXED/p+4+5yxyPsJ4a+WL1HygEqqrA=; b=DziOK/V2niv9pesDO7qFoNTzzkCZEAmVxSv8mSF9pk3AsB7f6l9AVZY+44LUMmpJ3+ZahuaMO+f7A0+MgZC2wU2x1IfbXIwb5sjlIZ+joe5wTHbVjUAZ9CW3tLt/i7k5DuH+c6Gm3N54ROp56JE/poDlEb1oFFVg8rsZmKJ+tMs= 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:37:55 +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:37:55 +0000 Message-ID: <87plqnztwd.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 035/113] ALSA: firewire: motu: 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:37:54 +0000 X-ClientProxiedBy: TYAPR01CA0053.jpnprd01.prod.outlook.com (2603:1096:404:2b::17) 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: b5af83df-f2d3-4b14-4ef8-08dcb4e6d893 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: gujUsG68Z3GuAwiFkrZnL/mHyvXgojAcIP5/Idid+TxPjeqCn4nKX05+/Au5hdstwHEJ1j2oqaxKbtt67xQuMqjSpn7LPj8Z5k7W0qQL/iKvROu/5f5wyZz+jt4JkowNB/kCCt2hGyGZ0MHOmBLUiwtofmc6AqVygaacRDQ7pHcgSqQRUaUhGX8VVT7o0baCpbvr0OXeA8fDwMPYoWcHH2qU5k7I0NIylAATJf7p8aY6cBOR7Q8H6tLMYO4dIj0MB0pQWN4KCQoz3cgCkFkW7whoTo3q+fNregtmbMuhq/Mq7j6hFB/hRGdTXoI1wb9ARnyRMcKHZRSuR0sYBNpks+keQZfmT7VmpulA819ADf1TAGNSAUtKMaBTos2W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RY:;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: wxve3N1lrD4Nlr19LGvcxifevHMwNQStD5QMZEuiVEeZPEjSSVN6NAWIKN02rRsfdirC73jWtIPnsWdTTDEvEnI6G2KI5+sfdJ8CPm2aY32gCmTniHIQbL+dm8ixdo5jBR/KhlWUiojojL1r+owlPJJp2kU530REhLFDLX2+wUenHPxkDNz8RXDvbP8IdXckt/YEcN5prpx7CKL3m5dMDfj0CK8CqeJZxUT88BtT+JNsgLd8adEtukkDRl6gjVVDDNTdjfkB92pr4tn8XH1JfQSGU5NqAHceddG5l1ILN3eGpzcSo/kfJC13g8pc3kHTwzecaQIlScfabteEcQHdr6b5gcn0v7eBnSQyGYdWuMm/lbIXLt15KKbrpPCwH4ovRZQsXsujc53kZzOCbPPrjiAfvEiQf3Yij/w7k7hxDkCth/YKQCEYtzkFBSV+CJTsrY4UYzrfLdCSHXxz4DtGX6ASm0mJGgCJfXRzZXav7FdbuYmZdGRMjPd5SiqjZkSODdWJzb19VjrldjChUpG2oZXa3ReB3DxxtLu8Rn6ovCbpjQlP8j4uba0+vcznN19Atc/T8/6v0FRNhPLaavxbVgBfyyc4OLyfee18Xj+EOuqyXsQMIQmdire7RhHzEgH/7ktAKA3nc8YroRN9IDHQ2gaD0dDiBtkhtAa8Ppcg9g/+Hr9GSmp0aJHexDYdjtRbuepgNxAftspQWFWRJEspgYyLSeyk9YOGDf01LjuAFMZUK7QWWRvQbCN2yMlSOL88Lo6UiExxLOYr+L6ntUKgyWyjmv5dgxoL1+Pb/3zuPcS1rj36WlJs4utprN3yRTydNT6+Rs/eDEhgV3VPRFXGzFFDvZmbf8Y0/0sEQGMmCcNrCPuJ8pjoy3xBAs9WztLq6qj9fbwV5UZER1U8H5RfrqjRqLwQKvx9o+Dgf31cQ2Ge9AI4pXTLpkx19cPFV3gruGQGdK3Hkvl30quvU4PKrJfnNG2INpeMoqdDYP7bRrRn0FRChWOuxaBK2GHAouwelGuJdgvV0bE0RxCd0yU/4XWiHHFwHhcgSJSzpgnFScVXqvrv405zMh/UeljFYFcxkGf9nZLsbBywpDi/9cw4pLaWAiHlfRarzQn0YG4+EMeQjIHQq+qW+9jj5df3pKBFzD/5iy4+H/aO/HIoXMlZabSVZtHN1llPi4V6hNLdAfTLdhqyTpGDJ6HBQfrhmxFdU/3LnyFXmos1W1SXt1R3c+qk62Isvml3KBaVjOXVfEs4Dd0cA3KYppkthwx0N+wqc0K6sWb9kUjB0lyj8+XTw6sQcx1HB+2YBulptUZEElXIpczja0UpFHtmWprwzDqTiU6z1o1LV8i7st1yHjYfwUxgfDMPf34cnXLEaZWUXOHcV0u5NroiOarzmrxrEQd/aeRpMwW+nSv9I+QjPJ0b7k6fyQiXAMYhwg4XFNsAeo3BUwOpqlPDcKnnGQ9AtjUX2DuZQr8SEmgTTEVJa2r1tT0MNqeMyzJuLSl+WPVmRskolb1kbx9m5hMIU4wwRjZRwtr4JpFs3I7Dt7CdQ5HOUxkWzjxl/DHrIY7pXrmqTDLWYCeVg3CvvImWJsnAZwthmioxa4fKRabhGrzmPJ4KwhkuT+44MwgLkBkSyM0H9io= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5af83df-f2d3-4b14-4ef8-08dcb4e6d893 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:37:54.9494 (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: u0g0ZEdnN2BUoIavW7FSOMMKN+76Ipt/pG10ygmM44MCF+q2dc14u6SHlK66+YURzHKFLgF7SEql3lZGxmj8MxEiQYuGSn4y87tDNx03hFPOj4Bj3e5iS0wS03fqdFUU X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9685 Message-ID-Hash: 26O4DSZNZYRG6NLU66CK3XHIOT6RJGJO X-Message-ID-Hash: 26O4DSZNZYRG6NLU66CK3XHIOT6RJGJO 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/motu/motu-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/firewire/motu/motu-pcm.c b/sound/firewire/motu/motu-pcm.c index d410c2efbde57..411d2b3dccbb8 100644 --- a/sound/firewire/motu/motu-pcm.c +++ b/sound/firewire/motu/motu-pcm.c @@ -101,7 +101,7 @@ static int init_hw_info(struct snd_motu *motu, struct snd_motu_packet_format *formats; int err; - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { + if (snd_pcm_is_capture(substream)) { hw->formats = SNDRV_PCM_FMTBIT_S32; stream = &motu->tx_stream; formats = &motu->tx_packet_formats;