From patchwork Mon Aug 5 00:36:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 817114 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 12BECC3DA7F for ; Mon, 5 Aug 2024 00:47: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 F38654D5B; Mon, 5 Aug 2024 02:46:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F38654D5B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722818791; bh=Zf0N4JmGAnOLoh1BoriMrjrvUgifTzRyh2cB/qWe8uM=; 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=EdUaeNa17aIH6Q8pfn7nUjKEZ27IB0LyOOiv8W8dZhGMk4buoT4Kv5Acw8XEUd0S8 WM0qrukU6MCFGZUiQatM3JUqZDogug94IQaFs5PEkYQT0Yn5MNAbGorhAlYsJtyNzp vP0YAZX9qmHJGegnPs2m0+UntnLiv0xaOVMkcxyY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A4885F8987D; Mon, 5 Aug 2024 02:39:16 +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 6F707F896ED; Mon, 5 Aug 2024 02:39:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4158CF802DB; Mon, 5 Aug 2024 02:36: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 EA1D0F800BF for ; Mon, 5 Aug 2024 02:36:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EA1D0F800BF 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=iB+GHvTk ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Lr+arYGdTWoxGijZ+xnPwu8yrarCka95CeXtqbCVdeoiyN+9Bm9+vPKTWPr+beCXTABW3h4k/K7gUTDIch01o0wjYnUBrNRyt7o7KDnAL+m6rAlHIPCtKqq/xjc/OGsGBYN8R+jJIG/7Pig6KStDWbB5t7OAxsrE5h0VbELzNO7conCEhbL7qYrFAQ85d9n+j74/SChmO3OJQSOjFo+AzdpMGEC2QBUHilKIbswaNA1ElRdqFXaZ5WJ45ZA4VPWvC3SkA1FpquBEWjRwb3yZR4ckbpzTUo//xLf6XPdne2qL8jUs55OiBCvq9gzfNpbAUAbY3EepEdX5+c3d3CsDvg== 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=o9sSF6Gr9RkUcV5wPZ5OOdlEGW1/a6F1orDus/TdiZI=; b=WKQEn6M+PQIQ7Eqlgg35YCgYKae25auw/sAlZzfvg2jajv0qJUBH8wphQnf7gga1YqGBUMr6aa/fbOTl50X9mbXtXWFUr1YwflVpVoaW2UQNkDtAJdWgrNa3FvR4XVjEJbBkFMdxkFgPIBRa1CGhm4aX6SaRMqdZusZaKlOdrjXt3AYHqJtoY2Z4pElqbZkl++twnFzDICS1En2E7md4/Ri9efYUvobu1R8JGf2LrLWgbSDgIHrRrBQCO/f7FYAE4gNW+vSYVIDOW2R5Cj+53NcsmNcp7VC4xyBVbTaiQUbWljYE0feXf86xYKmboM7T5VixxHMKXGvcRUywSCo8zw== 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=o9sSF6Gr9RkUcV5wPZ5OOdlEGW1/a6F1orDus/TdiZI=; b=iB+GHvTkYiwPpRxyfBluj7K7SaM1oZ3wyMXTJlUtmGJVsDVYArXwkC7/0tx+pcWT/cMJFYwHerEG7wZfGbZIFN9hlTPDSYn02/mtNfY0ds2BM/FYXxjZobXcKi7iLkEMMijhfLlmmlOPS1xP9jUJ6zKm/lTHF+WulpahDj40O40= 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 TYCPR01MB6318.jpnprd01.prod.outlook.com (2603:1096:400:7a::9) 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:36:21 +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:36:21 +0000 Message-ID: <878qxb24ca.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 022/113] ALSA: pci: emu10k1: 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:36:21 +0000 X-ClientProxiedBy: TYCP301CA0015.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:386::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_|TYCPR01MB6318:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d434ece-4546-4605-d4d3-08dcb4e6a0e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|1800799024|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Q1VHNuFOPkXWu0LVLwrdS/7E8fHnPmKte+ykPUsGzAOwqkQ0xLuOA0ndQNv3R2nRzn0NYzn7FGxarbtljLaXXtNBeN3pwmKj4FZIk0kNXvDZ1cpLIJDc//YSs1M5mcbOs9fQ/B6qefsegucHZOynUFaajUTbotrKArOhoduo4ib+ObxGDusatF1AdqtuJIbmoHnR87TyxvIWnyjg7NSJqm1fVcetEevZ/iMkadx35Vz+4sGsc2K4AjWi7vlakDU8wCGbSmCFmm3ad4qzcFezHsAny33Zp3X5aoiRDpQfUtiIcA1sq3oHmSNZdUO6P075UYeuD93bbyM4MnQqpuWC7behjJkCbBLX+SRbJkzyWsmmVSpLx8jhwUjYDzyeqOWY6BpXvl+L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en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYCPR01MB10914.jpnprd01.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: shcu+zRHWLUHebNvLxtHvClt9Ksep0ib56WO9tUQ7DoHmOegX6YeCSk/IZ71+NnbydJnhwUP0hHQ3e4TDfs3OufUF1cinKu8aeRsnHgKbgeXYv/UmvtYL6E4XCBbgkp7hJU7XUQB6248RZKYRDR66kwJoCsxxGCCwwzxYLoCyHr6oUYd/rQfL3Juce2VF0EXost+Qr0VOVbvkp+pzdICf4DN0rnYw5TpmPuzbMqujg1F4WCrGOUC46CXnXfQLO0YCp9ALVd/uzNUSeeo1muiugjQXd34nP7MJYTASD8egp31ULt1bkIFagMgmKC32E7iCqnNb3e7GY0ZXCtpHwgGxoSIOEbkeWSHs5ecCxUVbrS/1OqyZHTYwZAzofYfaVvr8TA3rwFu9IMaaA3OWZ19KAT6whNWF6gR2K9jytUtFC3YeGG/l9SDAPGuboZHmvTSilDvsYOmi10ycB0G0MVKZf1yUmLG+Zd7RHJT7eeJGx27vRSUYe1JTrT0IshCghzq+3TsjS8oXloTFizgUitzyY4589MNA5osVLCp4D2aOJJr8AZBYbAiJJJfBCCtgC/pMYBUmvMrjmg276117gZ7NpjqFUxlhvKTsXwS2xsUG3KOlJ5I0BD26i94sDuSrGbNrgYc+PUQH2sX38EepQ32WjkfvWvV/Aqr8N/NtM9YAjC4mIR18Mvf4zBVKuZDqJljVj2Odg04P4kEvEiZ1j/TJ5G+FwbCoHs7xf1TqmHHxk4Ntpx63NU88gOW5I8SZhFKmJazCqoyXpcFqMTFLY00IWEh9XBMk6DA5umcf+TuymSRNKjbc16MqL/CsbMo/ZE7V3t6iF83YW9FGQdiK/xl/CBedJAWs5lS0SKwd+YLiWUHFpKn2qrvdkRPuH/4vOsTKc3324kufd0Kk2L+DeOKlwaRfi3AxYq5nugFQMsA45s5e5WfZAA7VvTvoT1BG6n02BqWzAl5695G0o5SW2xyZoUq6Ioxs0ohC6vtbevViX5JfxnqWNrbua99UAArDaYTz9jpQQFXvqnxCSp9wud11Y7CK8M+UMsUTy7yo9evOCfIiKxrb9iXSyvHNqCPj62+I9CvGQ08MMPtW7xwB3HSCe41+EUQgM3JYwjSKiYgbSBtoxzZU+t/t2M6bOlSnmus3ERRoa8ibbfvkHOLodrHH3XI83u/gE+cBYCPGmPlFqaM050+eSKjPWLCDlVnbF2NLNW4U9eNNTB2hg2gyEfdQV/NMx2Q64SeJnXvDnQySA0XKmOYW7ebJ6tjTQGfIA6C1IROlzps2Vz0bFNodr1kPFPB4To8UwREHBrkzXrQhwv94yCvs4rx9PFBHKo0jvU9IYBjNoRMwOQBctIXWk3DSXaVRu5r0nXJPNGdjdwhfyC9IE6+6EtIm2Uzle2y26oRrwlGWOjDJ6YL9sXeR+PICDZYpyrV2aDhrKhGCCOtxpk2mSwJGJ06Tp0SwthpyOHHtv6/k2f5iontIIw5wjr3RrFDr4rHSERbNOeEjXBsoH5bsqw+v7K1eNZC1Xa5/cHSpiIWyNduL9k5jEt8fb++oG1+2hCDKriL4rAuI+Feg5/r211VT4ioOiO7/Ww6jZXe7nlpmiWqpb/2LkgG2gFzEtUMHmoLQrLhlYJ8qBQ7+vE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d434ece-4546-4605-d4d3-08dcb4e6a0e7 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:36:21.5866 (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: V3oO+4PQmBOBUcgCT+mUQIoy0hZQFfH9MP+qOveooHXR9WpKdSrzEFEpxfZyjmcEe8zEXoyZe54w3dkKxfMgAZH6zHhD0JtSK0h9tvrpogpapJtP5zfmgm0brlAD619O X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB6318 Message-ID-Hash: 2FP7P2GK7X5HPABJXPEQNPN4UICNX66N X-Message-ID-Hash: 2FP7P2GK7X5HPABJXPEQNPN4UICNX66N 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/pci/emu10k1/p16v.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index a9a75891f1da4..b174b392b6aee 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c @@ -422,7 +422,7 @@ static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream, } snd_pcm_group_for_each_entry(s, substream) { if (snd_pcm_substream_chip(s) != emu || - s->stream != SNDRV_PCM_STREAM_PLAYBACK) + !snd_pcm_is_playback(s)) continue; runtime = s->runtime; channel = substream->pcm->device-emu->p16v_device_offset;