From patchwork Mon Aug 5 00:43:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13752933 Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011030.outbound.protection.outlook.com [52.101.125.30]) (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 79DC82943F for ; Mon, 5 Aug 2024 00:44:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.30 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818643; cv=fail; b=hMxThjid2jf/VpEmLGYNZTFO+GOJRn+YacSP/Wk/u0afxAxmZKNNJm3kXJa2pauI3SeDxMlBykDyZCeE1w/UT/qKyTdPBB7HY7Zf96axLZwVUPs63Sql2Q1AmoA4jzh0LjGebNqG3h7BNzxgI5WVvHbbYJwcvak+CkL6QcBBC10= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818643; c=relaxed/simple; bh=qn1y+bRPVFaRQn0PoeVFEpDQb7fD/Q05gcVSGm6gl2c=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=CVxnv/5NzAM1y3yESKD72ygM34inS6aWSD1oF9X/ZPkKdQlRMkcARkNq2RnMhQCOw/P8qTJdgTH/KG6vmz3kgYj6QEve1W/44ptdKWLYw36hVcT9WG4Dw2z9TdbgY3xMZhDdOa3QApOB6nbFbEMlsLGQAFw5Tg0lp1tf54D/YSE= 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=Wz7hKFIk; arc=fail smtp.client-ip=52.101.125.30 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="Wz7hKFIk" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iFE6N2uqrYOy3E/dqQwq5zCPCgszgw/bgNFIqWy9ESOD8+W41SzT+MhWMU//W5gFOXFUyFYGIsdWey37gfU1497Pq2zWuvH/ahYsGE080WjsLZfZHDDaCmzxo4etmjZoJHkSWw+5H2b7K10z3JgrBC3RJpcQkXHx6kJiDXtlT9U0HeVfSlWnsDWGsb8bC0sxtxnSYHm1BbKYquoNQIyHZgs9MuDLhM5eDM6WAG97OkHXLYXsCm9/jTnGEHB20NKaUbtHtbCgsOH2/fe2iQqpbXlZC1oZzLnLp841FYTk3LUKyfw4eAwPxCk9aH5B5ppIbkyyhjNCVEgJvQwHOF3fQQ== 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=GT2EO3v4sy6MyUuQ+iNF1x4dP7l3YqiVxHZXWFPqdNY=; b=sW5RKfpHgh9DsG07AP76pc5g3omuep+ZhZGPXsFAeA3HxC5zGDH+ai3WeZyUPDICnHs8LYGQbzc15UU/qvuFUXR/EM50uiuxuUf+abMyEW8ST/I8qHRofqFfP0swmWytcLgQWdjhdwCzoWlUksSd7Ord8FtVxM0wP+UXBCGGa0lV7vsFQhBQWLVkxRTGL0MQaJwGPCiTDUt+rg7/DLk/36+0l52CydVnlHdOL23ELjRAerEteH5FZSwOYk/kNVehyeq8KyLm19ORC5eRJaLdaViTiTsr7Jhdom9ZpPpOzOruaM5DLld+VTlX3tjn9wsREdhQWav+C8ZPUPONOPy8Ug== 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=GT2EO3v4sy6MyUuQ+iNF1x4dP7l3YqiVxHZXWFPqdNY=; b=Wz7hKFIkIpf4nZS1fbpZQLiJAIn5ldEcsCRmSljqK1WRTERTMxnJrMDuPavZov6DWcDuY6jKvvJHqkbRE++vOk+odTAZgGtwzqO+rvpEWV9M8tEu18MO9cQzM+MkNn8a8p+fQdE7IH+C914TMB/MUQjsyrZzvg1cFjTB9eEZnb4= 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 TYWPR01MB11466.jpnprd01.prod.outlook.com (2603:1096:400:400::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Mon, 5 Aug 2024 00:43:58 +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:58 +0000 Message-ID: <87y15bvlwy.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 104/113] ASoC: codecs: framer-codec: 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:57 +0000 X-ClientProxiedBy: TYCP286CA0279.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c9::6) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYWPR01MB11466:EE_ X-MS-Office365-Filtering-Correlation-Id: 4518b8ab-4b2e-4cfd-a971-08dcb4e7b106 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: eha+Iosw7melA0prwlyV6h+s2j5GrJLl/kcv1+Ijq1tydbui7iWPbvP48+W1NDnwaSdXan7ryIEScWXhbmsnyWlveyeyrtNCfDuThaSKDP/7gH62S/NwmT09znFTlPIZwgSiPkPI1Qm/FSr9fpQ99HMZbR51X/eQpFEP/yr1jtebkcSxla1k9dkcwY9N8u/t2OCt89g1OlRejMIGeBciM4+R33jqxGozwYDi5Vowc4x5OvR3WJVK8PxHRf5q5NmoPz7yH+WT2XZnOL7rwxDgpzyeW47Trzh4+cTOFG0yQ9WxaThrwsY2sOFJGdR55taOSrwT4MYqTgPHKE3Zlf8qjewmbIBSUpc1kldWbJJHxn3juxdv1CBtQbJCgU3HcLoauKIoltMaWr4LV9FHfb1sEZM0GOa7NkjkCqCukW/2OHoEF8rGg1paQ1TRhLavQxi2SBiP5sRfWJ55EjF3lEpzwUzxM+vN45tdEM9H9GJhcjwJ2dRRpXn5El41mDf5yZpco4DWuNCkP5OjiXYxKBmqM/3obYhxYfv+00G2/ILZ2o95CWWKVGf/2Xd3tlLBBodPhxtM+gw2dOyJUIe1gLMnvuM22h/h+8xgLAo6VPPhKrkD7dFEJUfXJnliOl713BgsmWe+caivwxfqlgUXXOTktqpP2JBXcMzizrJ4BCCEHwyRMKDM5R6OpeJLHUzumdQ3rcmEUI2pnAgv3Gg1gDsaaw1Gi3Jbv4PXz77hz45jHI2yEgSM7ceExV9+hFYfwlKnzqvq/oyhqX6PwLJD4fMOpShp0YekElEnba4L+J1Es3UbJsCjQSo2rd440Zy7mcJOCRy7rdDpPalqPY1uP9n1uzMAgblAEwORpK8hge8gL3oJKpHG7+mlTdXoy9Eej2QfxF3/M+pH+QogvcfCulafCxUc6vIdaJm5IsczdpakNMz5mCQljus+7gkCAfG6u5ZVBTHe3nnSkNZXK3JzOBJwUMAAc/u+LoYKzlnk++DbQ91/PjTOEHVu+N2C76QetKTgeU2rPEFhhS309eIkCNvlTXX7ZXyLlfgXu+eVwyEvY/nMplsHGw7VUh45U98PZJPBOGqfmpsytarstranZ6jiRi3Lr+MQ1vJg7n0vucNLdATtk5YZvmbC16kmgrvWo6ieWmmrYxRtz9VOyYtpptgyOYDrs9vEGODIF2chhYQFrmHZ+p+jzxiMFJBHpt0sdFYY7sZ7H8kuRvgBpjO228IGRZUGlGI/0BuRNquSvoi2zyJ6PAPbxQ6owq3xyhero1Z+1ulzFLNkcnl48DYxZZ0xuZjAsBxpSav3E2qet7QF2SmN3yVrY6AqW97Z3i/LD/qrSQnfmcACotGrFSPFi6OuBk8RUBeyJ3c44e3j0wLEjfr/tqhMgGLdO1blU6e0mu1lRDSyAXXp+ukShlMyi8Cbuw== 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)(1800799024)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: J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Vi4XG+rprcWDbnpKYj/ysY5tPN7IizsAA8B9CxIEQ0Rfh9bK19ULyBq4W0DuMqcdKfBXxO3NklD6wcsAyTxwOGBcCvpf8jZNrgkh+n1NvKFgYy86jgklFyvJTgmOVPqLsEtC5aku7UylKRgSM8Dg+rX4npyR7Oo+2g5j5BsZt7gNO02O5LnaOKY9qSgHanvS4baDeZdg095sBPg8beJ4nRHu65hbQ8XND9olhh2tDwUSpuMSC30dmhRIoEcmxdkwI+xXnbxE+pVk2pN3cEJu224hDFV0yScXuattlbGR0Dc25H8YU/yfFAohdSFE/pAcyrFkfVe7Jj4+BEx7lGK36Lq8OHfVh4A8HIgxlm6QKpNQPXuyNqmfTXmMLqXrcQzRC268aBGpmQ1kEzTPrPYWrbb4bb1Od2dQWMumivWmJKUI/H4u4yDMTRaWy3ZBJyAU7dw0q2S9ybLdY0vyRDIUAjxKxIujBrCjOHofjsVpMxpio69nWN7Lhcz13jR9vZdhzhNml+FhWQRbJWJzzb+edcuzeDYXx+LyYylpl0wcqBR1Gfw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4518b8ab-4b2e-4cfd-a971-08dcb4e7b106 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:58.1055 (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: 7OnAgHKtsWbuksOICrUIxsts4UJnccQTVX3GOEMXDxeKNc/sKxfI1vWK4UjOM3TCmMCCzR/inPMy4slzPHp60js/5nlTh8AaBZ3woGz98NTyxTC/errM7IWszqzIp9KF X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB11466 We can use snd_pcm_is_playback/capture(). Let's use it. Signed-off-by: Kuninori Morimoto --- sound/soc/codecs/framer-codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/framer-codec.c b/sound/soc/codecs/framer-codec.c index 6f57a3aeecc89..10ad78e87a7cd 100644 --- a/sound/soc/codecs/framer-codec.c +++ b/sound/soc/codecs/framer-codec.c @@ -192,7 +192,7 @@ static int framer_dai_startup(struct snd_pcm_substream *substream, u64 format; int ret; - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) { + if (snd_pcm_is_capture(substream)) { format = framer_formats(framer->max_chan_capture); hw_rule_channels_by_format = framer_dai_hw_rule_capture_channels_by_format; hw_rule_format_by_channels = framer_dai_hw_rule_capture_format_by_channels;