Message ID | 87o767ztw8.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazon11010037.outbound.protection.outlook.com [52.101.228.37]) (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 2E3EC111A1 for <linux-usb@vger.kernel.org>; Mon, 5 Aug 2024 00:38:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.228.37 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818283; cv=fail; b=bKyABmukqYyAl8guPBYyjPNksq1PxGdtDMhaZVbI8jqWgqRJ02Koc/HGSbo1dGS7FOPItBLVgqGO7kvKeJaA1YNypaq2Vdoim8N/KEJjQlTgExnSvl0be3FSl0FhsMRDZ5AJmjg49YwrK34DtEhjObJMep3tHumzyziF05BA9i8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818283; c=relaxed/simple; bh=s4ttF09PIwfgLQmzw9LZqIwH70GVJX8Aei/bs+/cH+Q=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=QZYNu5oianbHEPwvhzYdbYFVfkSu3D8689trhLBrHE0wkAuLd1Kfb0KUwIoE7VcqU/Hos1/c29D+w4YkR3F0tffispPSwoWCM6ZZsZLq/jCdj9HGt/4PtXYl1Xn7ZZWxfLEmDsM9mSA0xYg6dB7/guGGI7CpeCm2wZbeAQYdg5o= 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=kWnUkkni; arc=fail smtp.client-ip=52.101.228.37 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="kWnUkkni" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=mdlzyEXNPKkK45qAdzRt273gWB3ZcENUp21qM3cllHUwXk4iHWOr3e0y36ycmRa3fBwlsHLWtIwFJmfFKWdFfp9x9KzAIaRLgkPre7eeCx4lQiH60iix+1tEWTg+30YYfY6o3AkQ+50mVw35KNmyXgrDeCXuB9xYOZwbFJlG+ihqoS/0YGQM0sjQ+ceeMjBOOfWlQDD19ztDXJv8C4iOnrICJbuOuTB07wUyy3wKRxQssT/deEXqM4Pn30JyY48+ahl6d/3KfAByEgPwVmj0mVoUGrEjiSRpAx3hlWmJIUH9Cg0UY50kGxR0msLggUt66wRRMWPjdPfchAwIOosqcw== 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=jovqRBzEtXrZT+MXCP4/uH2eQxe35LQMDQmD4cxTZ20=; b=y+Nz2UbaNAt2CSYDhIbNTLTTf5I3qfthbaFadZvDtcpkE9SPpg97nxSxNGHJ1rPFbehePy5p/IzQ990JTX1DEuV9/geNbccXgFIqO2fFhfpBTO+TW42qA9bOZZyAfzst4ZFzHvVvzG8DTYr47BllzKkGsrAnzD7fRlksH4I56w7UM/C1XhkQnRUHGeZqHM+EiZJfsRxp15IYJsCts837puoy7xXPnHP89YKZqYIHES7GfbJI9yonAybY+Ktom6kHwcWV87AbCmpo9Fsi6jmdrTWmsyPta0Q4B8/bq8psUKcGQd88BNOFJ+mbZoIatH4JOKEJJIVvusqLaaL3WzVO4A== 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=jovqRBzEtXrZT+MXCP4/uH2eQxe35LQMDQmD4cxTZ20=; b=kWnUkkniaR82tRG9rv6w4VQeNxFvBoaHq/eEFHNrl7XWUCG38IGCozdA7wy18YiDx/EmDkMKL3Ur1UgnqeTkDmi6LNIX6S7EXJ1bcMmoeWKy833b+qCwy6ktXvk/76QTpikwj7l0NxJy280JC3sK3pHN++BSXcETWMKC1WGmNX4= 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:59 +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:59 +0000 Message-ID: <87o767ztw8.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH 036/113] ALSA: firewire: oxfw: 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:37:59 +0000 X-ClientProxiedBy: TYCP286CA0212.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c5::16) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: <linux-usb.vger.kernel.org> List-Subscribe: <mailto:linux-usb+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-usb+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9685:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c69c696-cdd3-4dbf-8514-08dcb4e6db64 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: KRo3ZJ8AfL65lb+ElgEEVZcFfcXtVR3CO6BxK0SHBD8p932mJLgkcfiBlCOoGfoma1jdW878/H/m2IAktJON0tx6s7eLcymyWsiKkzS+HlAwLWkw7x5KkYLlWEOQqxMn8DTsXloWpFsdSpypbKsm49Gix/9LLiGFWLoLLViirIs7jac6TJ67Boso02UM5w0b6HyOhd/Yo44xI9VwyZ5fAPR1FQKj94P6VW4cVzbXiUpzLQtUwm9R15QryErE9KmBiFuyEnXHP767+fSjgYTotEqG91bLcsfhILQgOZcVLKR2nlF/A/Px6HPpbjmS1jCsS0aok1ARPO3ydDsrqW02Rty5KCgp18ZYPJoE/HBmx9dWLCut6ClGQJ82z0v0yDYilbsap6vu28Jf21DYaapog6S3i/zXQrJGaLW/OBZqlUUYNCv3X0v5oobJ+AaF+VM/u5TN44bebc1pVed8R3mNiZWyQCKANfX8DRNgEow7aFfJV5pC9kpduWQ83NQt2NwdgSb37LRCbQRYHg2qs0G4E3PiBTVrCKD109tVpxeImqox9dx4tOyBLRWOdGo7K7DPd89betVy+T8GJPJTT1nYVuHw/qYTepe1wswR5utJQrxr96uSv/tJK1wSGpw5q0+JI1GPqFlznVsUg9ziHPtZ5oSOsaCdozIm8WJfQXqiPMMUT0PiBp2Re67ZwnNlQ9esF8fuH/V4NKE9hDmths8ZyygyCS5//udUf9OTWe2Bl9Y5dZnNtjtko95CgH4WCUE5lenqvMZttDiDKmgVIRmKlLWn3l6fgjo0gVI6QfWVchWt7JJxRf/STzCT1LLSqJ7B2WcqctdTzjIIfrD1CogU7ioJDVVX6R6jQu99B3N8/diXVqoi0XmYx+h/WScBtcHEpqTBhywJjk448OWH7Yq+/agzmBObIX+e1O9vqwe265zutbco0IqTSgfABaId7f1GPGdS3eQErBDs7iO8CqfFy7IZw79KeAOd8k6V6TFyHew8kaJDdTMyI2e7Lfgj9M1WSCGHL4QUoWOacti9LKxq2CcFyh2NPYM/dFTRMg36QaiCGcsYPm3BDumrJRaC823qcT7DLNbD8r3HOihtH7XemUis/+eI/MR3WW3WY6DX+mYBMOeTjXBbZyrZydMvoQ4dD7ze6g4y+oLE/pwkRSjztF/KorPoJik5QcBhGWEm7DmpHYCftfrT8orgEEi4QZYtXQwVIG7BxJrAqv7BOyOYqLsNdo6bhLTTI9Gqhzxx3QfRVOlvnGwlVvtlRSJC/muJVVjEqF6Oe91sDkmCGOGTP4GX7grG/mytqmXhxRLS9J5EEOfsief1nI+QQm1n/GekjcO4cOraliY7jPl4fovue8KytFYFhUwZjcXGsY5i1E3RxFBfcefj9M2tLElXq2TJfZrLgyN43QMjRVGh2WT8WA== 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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zIQG9/Bx1Y4lanGHftfOzeb+1l38cdnJnni2SgYxD+wQkoNTmhH1fLAt/pg7JxalAS8GGpIN9MZji3tACFxBzIBuGYfMr3D9hADQS4n6vC7nISJPdMCLfKJVLkjhWqVdfpFLXuVoh78BrSJidECDEqWdNzubAEbog5prmoRp1tXYvD/rTJNqozi82gp4/6D1jq5nWmM1RomvwR9noaae/pdkNQWdsUOOF+EhGMMRrXG1B4qoP/6PobPpjIG4oFIcSad8VePTCvDnMfYPHuisofRmlwHQJ8WcnBvF0Mrb9uXQLUpkd0X/WEVa6MSU9nXy5eAI5CRLToTMKp3hUMgG/juIaWM4rwPKzHAwcBR/DIngyKIZ5IW+rrBNZDr8ElX3Z1njDO/txK7zv5wLCbb2lpbD8DJ3SN+dK4sJfAFVn4d6j0Gu35C+86Z+e8pmRcJlVsC0wULd+w5+TvtQDtCnHFTWkq8FDzmGzSE2Aw+pfvzURBBNDMBmW3k4NvM5H2JnvLgzfH4b4IHGHZegTbcewpzv2BCxPbJuSACxxmY/yl8txJR+lvyvdFvjkPa5On0ku0TsDdtxi5RDSoq+7tK3QmNghfiEyfubAelH229+wPW4Akl1K2TeKgnhs0Ceak7sWI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3c69c696-cdd3-4dbf-8514-08dcb4e6db64 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:59.6812 (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: odP4ActdDrgr5sxL8W+KSbWuZzfXLkZ9K429x4kSyjfe/AY2MEmqBUxl+6yucL79HyfMOdMNzxBeS93ZYNuTI/oEDHw3JwKkmWw1pomlEqYhgn6NhkP7SAttiYv2cfaG X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9685 |
Series |
ALSA: add snd_pcm_is_playback/capture() macro
|
expand
|
diff --git a/sound/firewire/oxfw/oxfw-pcm.c b/sound/firewire/oxfw/oxfw-pcm.c index 5f43a0b826d2e..c0e67a0d10f1b 100644 --- a/sound/firewire/oxfw/oxfw-pcm.c +++ b/sound/firewire/oxfw/oxfw-pcm.c @@ -114,7 +114,7 @@ static int init_hw_params(struct snd_oxfw *oxfw, struct amdtp_stream *stream; int err; - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { + if (snd_pcm_is_capture(substream)) { runtime->hw.formats = AM824_IN_PCM_FORMAT_BITS; stream = &oxfw->tx_stream; formats = oxfw->tx_stream_formats; @@ -150,7 +150,7 @@ static int limit_to_current_params(struct snd_pcm_substream *substream) enum avc_general_plug_dir dir; int err; - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) + if (snd_pcm_is_capture(substream)) dir = AVC_GENERAL_PLUG_DIR_OUT; else dir = AVC_GENERAL_PLUG_DIR_IN;
We can use snd_pcm_is_playback/capture(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- sound/firewire/oxfw/oxfw-pcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)