From patchwork Mon Aug 5 00:43:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 816762 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 CC68AC3DA64 for ; Mon, 5 Aug 2024 01:08:46 +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 993E059EC; Mon, 5 Aug 2024 03:04:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 993E059EC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722819889; bh=u6tIJFDkXh1OP5nlFWrzz6DqfeS5FEcmwonep8FKSfE=; 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=fUUY/1NL98aVOIa99SKEa5mKb7thBaikeM/4OQbYG0iXk0o2jZpy4ENZgC5Wy2gS/ 7RzLpCGh1CTE4i3eMShcTeyoTPzHDg2mtpP4F/ActUXAgndv9P5qTtJu+VT/N3XQ82 wsdK98kMzaGEh6/GiGbI/Ztg491wBLQGovTZhd0w= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 16817F80C76; Mon, 5 Aug 2024 02:43:32 +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 DCDD2F89E61; Mon, 5 Aug 2024 02:43:31 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E6725F89E4F; Mon, 5 Aug 2024 02:43:27 +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 8EDBDF89E19 for ; Mon, 5 Aug 2024 02:43:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8EDBDF89E19 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=RJ2imFv1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dz5MS0j7rdYatYNwjr8Z1C8iEmC7ktYkWOzaOsIwcQ1NKVUhnx/crZkDtz9/5sdYIoa1BMr23dXVbkjhKPPyIoKo7m4PVItcR1XhmcHs4SSB3o/SutdYJMLSZd/ES5yVJqVeSctDXl0a+pTG1p9VJOw0bjLvl+Ya4zJCzzP6E8WAPi+We7xLbRG1upzUtD6bw7tPSzllDJfzMHXBpwJrRWPYTTP3Id82oj0xEtUgmzsQ63/Ota3NKbei+MC64PX0Sb55M7m+hXYxkRdpaHX8rPrGhr7vtVCRFYQK7tsiVc/S5BeuU1ReF1Mpg7qkeWDW+IsaKO0E+qac2QWcKOhOqQ== 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=8dr4G+0sYwrd0WHD2Il3ADwYOpp02ml/lfpQOzekkaU=; b=udXeyr0eHrD6jZy2xtVMM9Csn69ew62I5tzNXNdKAFJmB/QpoU+7nXezXkVZS0ixHmdnPn8KSv6ZKeF8we2x+5XaY5JZWvwVnpIHG+qUS96rrXPD56ZJZcS9x6367N/XuuvZbmWtJV5nSuZ0y2Bl0Pj90LXOSCQhf46h5fwVdeAxETgY3PcsIVZESAEYPqvKX8b5XwSUxWVeLZCVIWN5rPOgaVxAuLCOMSc5T/FBD1XJyt4qOXKmpBHqzrSVCZfuuHsaaCnHn9ZIOTM8KRkiIDV/9pnLeLQiJulHsfb3sZx8+Z3N36ayqzA+FgByZLL8iWRybA3a9NaA/K2cAS0ylg== 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=8dr4G+0sYwrd0WHD2Il3ADwYOpp02ml/lfpQOzekkaU=; b=RJ2imFv18sSKOTfmvEQcFeuhp+Ut0192rbEE06qt/fUeLzWqLjWxRYRfle+23fEyeAdlFr+rPHNOrep/uRGSkzadepbhZiJHjvuFeiP6FqjGeF4eBXg9o/zheZ6+SC2d42boo+2l8JUM9b4p9u4lWcnhxB4og0Y8xt11EbzvHrw= 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:43: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.7828.023; Mon, 5 Aug 2024 00:43:20 +0000 Message-ID: <87bk27x0ig.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 095/113] ASoC: codecs: hdac_hda: 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:43:19 +0000 X-ClientProxiedBy: TYCP286CA0192.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:382::18) 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: 0fb16494-a9ad-4362-a830-08dcb4e79a54 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: 7FbEV7a0vP+CI8HI6S7qSdjs7harDfaP6v0AoEcbBLssEKuh/IZQLIP/W+oA9K9YaKj6vMI3qc7zOqMYs5ghhVHrmAI8opjYMVb1ij6rWhJj03tXAhXSxy8Ouec0uobSgp8JLPeJAQmdvQFxoHwMcMb1g0Wlf121aQeCLQwaJejZgSj8Tn4B9F9NTTJ0PqA12PydH9lPOV3/QYmZt5fZPIO7Xzg8oW6FWmve85H3RTKxWm6nSXjAgQGzV+IBLcWhgKZlNuSIyPcerN3jKyDphsqv9tAz1kDSITYxaLP4wZ/EZxC6aw0QkgrjldRo3Vn/RQFsWN1y9/2bVag6YgeqRH4dUr8t6zwy6qRuPAjsx8oPN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: 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: 9e2QWo/jkArR27pmUzTni7ZgzDkjdeWccLisBV8e7gxSuADEt0iXg1buQVMYqIc+s7q8fFroo6/Rkl/1O/jK5GXS+vfrNbHNYxTuUrj427rGDuAQQo1zoik40/7LU50seNSgO7Bq+FgRtSqFSaGqg1zWKHk83Ay/j8KYB4mHwBOJ9zGHtoeYAh9ZPH5wJxwTdvxuoXBSsN2OduEde6A+LhR4zUPO3hSaRde8XcJUc2GtIHbhdoPwIioSwLPy6k2eH/4kWIZLff+fuuFFWcQUtuhIpfwNSKq0okhkZvAobekimolgShbzYg18qgpYa11saLQK+A571u5+mJGBg3cAoxJ5N3bTyDwQILAGRzeAbYYEI5rA+64Z4O09d0w/Ivcj0Fyb9q0ysEiTYrQFCK92h+EFZx1M0EZYj2Wc8rbbG1FHeFH+k0nFnWLv6RRP+43mf9B4PzOh+d+a0OgABVlHNUXeMv6sF5rd2fcW4xpKGqgHotRtJMPlJahb6MfWDhJXjNMnOL2yyZn/jtQR3SvmeDqtGMcYP3NMm5MSfH5vGU2CGpcnlWaqVAb4FFgjpqOKSJ/cqTlBAnuJkNJkXSD1EapxhkKO8H0lxP8uioLh+nAHM7+JHSUu/fc+vIRCtvPgRHSTf4P/BMQw/+k9R1+5S6opNRj5A+IsCxPreBV/zgffgT/sdMxYQatea4hAPVZTrKr2OuLP35CeNNccpd+g+tg06jeKTjQGFeS+fyrXjVKjl5Y3NG9bS+M8rwr7ZqlyYDlJ2M9BTLF/lL1EfoYwzisGhTAbj9dU67RYLf0KJUo6gurREHtsOpexeUzrC4CRkZOgAGCuEL+yVRExvgX0fxy54ZscGMhE3+XNz1IVrhVHofSYf2YTY9yP9PsGGQwe7QLABe8VsIr+CKfwodlQJ0FZSHJogrmmQOuEdE6yykUpYBZqZDnP3SfHan22JQaFinzjrpYhWccKxJvLhRR3tx+1x6hyfGXTw239mt0qFRjp948FGVPH0Md7Kk7nL1Ep1t+eEl4AQKFxWpKQ2E5il5VtCs/cbxit0mHC6hGLSw0o5nkZfKOuEIwAmsHm2P5Snrq24E5Sp7G01FxiNde5UhCdfhAj5tk/fPR2yuLU3huxGi/34LCc1eMO46j0uGhLzSClE5Sg9ZaSnl6NMR5telmtlsXrKRkfN35cJwKHrNVLdV6SFXuzVuzBcWi+wG11lDv53IIxv9KqcLQB5bWBJLBK7a7tDYw1Ab5RhymiYJg/GqTX7cAQ4eJe1hrXBBrI+E//+0Gz3e/dhTmmaDLwXTIkCXR7mjk5qKyyCM8y2uUoy2xb4Ynw0XhlxCTtYGBuB1L8AN+RwYI7QVHPwMlrjNz2cdVJIwQ4QRZfdrUaQrpAtyZJYOCJgxLz6P64VgyJ7cOp1dlAJdYqX8xFcZRB4ho+DmTggo82pVsEmIa7pGqtISNUyOM5/7elJY4NZSRdy3hkHFTTsO85Id8x1H5Scx3+MFoc8o+LSk63o4dUPerABt1LUXL2HLzZlPU0L8RED2ypxBuC6sM0VaQGFhHhPKvgcNuVsn/SsxaCVJfm/Prf/zg3HcACu5kjF8/C3UUNGhwZpF7X0TGT+T6Kdpx5D9htzc1D/pa7xlBwCYgNBgk= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0fb16494-a9ad-4362-a830-08dcb4e79a54 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:43:20.0214 (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: CeO3AnC7Jl/Z0XEHtg+30lijfdALLLAlvo4aYg4jn+bY+v6F2BFMcLZOOD7vE+eselYRlV07bWRF+QZQ/Cuus67jla6QX4OW4qSn5FKMwSBgzd3zb9azu0TILobKkJ7k X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9685 Message-ID-Hash: RZWDAAMLEW5Z4ALQC6XEIJQFCVFSNY3Z X-Message-ID-Hash: RZWDAAMLEW5Z4ALQC6XEIJQFCVFSNY3Z 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/soc/codecs/hdac_hda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c index 29c88de5508b8..d5b72afd82709 100644 --- a/sound/soc/codecs/hdac_hda.c +++ b/sound/soc/codecs/hdac_hda.c @@ -220,7 +220,7 @@ static int hdac_hda_dai_hw_params(struct snd_pcm_substream *substream, unsigned int maxbps; unsigned int bits; - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + if (snd_pcm_is_playback(substream)) maxbps = dai->driver->playback.sig_bits; else maxbps = dai->driver->capture.sig_bits;