From patchwork Mon Aug 5 00:41:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13753011 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 22B51C3DA64 for ; Mon, 5 Aug 2024 01:03:53 +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 B5391573D; Mon, 5 Aug 2024 03:00:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B5391573D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722819613; bh=Yp4xMGekwNxROV+Qe25e4LfJLZJF7rQdfRHuhAHnmo8=; 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=Lj5wztupn1qzQF22FevYDrwy7LadQ2LNBiH/y1LYBlP7hudTGWQIF6mUGhJ6me353 CR8bkZWSJV/sY56hCM4IyPUawfNNMfv90+JySTmOS4YjRrHsKIWqnJOX5dHboOW4pT 2+kZiHSXrfNi8GbrLtdCQ+za3yTXNlmucd7H/IrM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5D062F89D08; Mon, 5 Aug 2024 02:41:53 +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 17319F89D06; Mon, 5 Aug 2024 02:41:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B2E8EF80709; Mon, 5 Aug 2024 02:41:47 +0200 (CEST) Received: from OS0P286CU011.outbound.protection.outlook.com (mail-japanwestazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c406::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 5E995F80852 for ; Mon, 5 Aug 2024 02:41:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5E995F80852 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=PhMivvB/ ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tVj+JklJb0ei0xlX8eAJ4RYfvB7tESuLKniDL3XyrwACUXbE0EMY4rRCxmNHojT8Ut3JKQa+ifk9FCfaNLC0Q2onDrr9eif+/93hiZPvS02i63hGgD8tVn8xh3SBaJ5hkKq328iFldXk6lH5sVNSD1yLCtqruwALhLw4OsDSuxUl2NUoW6C6YBzlJ8boB0rdl8KzZTByVe1MCj8OesPXWD4+hFc9yUocZH9XW02bFfZATb7oQNiD5noO4uq+pJW2wxPAdP5Qk7JEqWoFVTKmpwRD8nAjjp6BT29dSc3gpt34DgCAIJtOYtgBQm0/gvKDaTNGRW8F/qNVT10vwHoMdQ== 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=xkJQcmzUII00v2DqKXCg3TSr4cN/9Yrc9HHtUggOspw=; b=sweA7+48dJ5S9qkBn8nEBfwpL6iMNUApkz90m9CCrMcdMEQnKrbM3Nij0p3qSpn+KRZ0ISWBchMEwzxMAhcarJSYJTSXlF5QYcrBtBt2MBn3rynK80W6DfADQdpYuBTsj6DSRbILXT8DDZeAtn85vEckx/EsKLhuwkaFxk+LMqvn8+Zlf4+yM4HlOBc4Ggc0q4IN7/VUM8Eqi9n12Doz1mXsrFsOOdOZ/N5iPutpYpb3zsAL8+8/ltzXhSRRGJqnDfC0pwt3IKj9uFLsQ4M6iWmPaRPs9wshO+pU+HZdFJny1cQecja2mMa1wgQmp7hlZioxMIayR93b2qdts7BBjw== 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=xkJQcmzUII00v2DqKXCg3TSr4cN/9Yrc9HHtUggOspw=; b=PhMivvB/XCyRiJzQy+uz9pttMpwTpnualYt6Bh7s8dLEuB0XPmwzEe+r2Wkx5oqys7nO6mqbeUo+8HQAxjIXJAY53PV57hUXQBHmi3gxHDkOuDKmIsGkWZq5EGj0bBruDRAWIqN082zEwXg3zA6/cG9EtW0yzFjZc66QUMqaOyU= 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 TYCPR01MB8678.jpnprd01.prod.outlook.com (2603:1096:400:15a::12) 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:41:35 +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:41:35 +0000 Message-ID: <87zfprx0ld.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 078/113] ASoC: codecs: ad193x: 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:41:34 +0000 X-ClientProxiedBy: TYAPR01CA0142.jpnprd01.prod.outlook.com (2603:1096:404:2d::34) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB8678:EE_ X-MS-Office365-Filtering-Correlation-Id: 35bc20cb-8d00-4bfb-ca59-08dcb4e75bba 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: 5Xv+47CLAaztOvC65YrcDvfGrShsWC5sk1+SXsM2EGOKmboVPxRQuL/TIYiShfNTf9HejNrYQwzpw4yCDQTtSD+ipeGVaP9/vsOHN5PVdIsCkuflN1X89Uz0hNtdClZDccN0MPx28vE9/ej4i+JAxnHEqlDzIqC5IocM6BHfc7juSZeYe/Z+YLPCSRyDrT/3HvEcgQT46D0NO7pxftv+eS0R5uwqjd450VdYAsB9I4ZAt0dlKHY7ni6eC7E538YB5zIRFzdkGycKC0muhgLWwBHNIuRZhvNO8p7baNs6N+nHSXNDBxPpDwMR3wWCwxOWeDVKR8X3+ltJh7Qyhech0QBUtLcxl3ZvxmrHG6r3aOhAmN+g8O3LML3agLiYs97eOtRTlLduh6/Xz4z+yjpN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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: VzSbs9X8TDGOOh4F32hi+N646K7EuplMexL2eGmg7IdW1LowhtAaSbnoUycQ5FeBhcyUeZgV8jkxpSN/1KOBUMS8/kevE6eY7CWL2Zuw7LqVwNd4jQCerIiug5TbYqaZ7v3l2Jef5Tq1T7Xs8OETm8ssbQKqU7scXn/WPX60N7VYohWs+xTdUom6c/iu9BnlxhY5geoqxopPXQyk/ZCxciYN3qCLs6BIXchXOFcju6d4Nqpb4gy+DbyIujxQXWHo7z4GAea0bZ6833SCyJ25bUhz3cteEHkwk5cANXQR2NpExbct1+nB2E7loGgQxU+d8xoKmRo4CCvsxSlpbcgdEdrr5k+sDuDdTUcbMFt2+xCoDah6fw/LS9cyBv0IiT1H3aiBMo4NjOKPEtYWbmp94pQ9fui94S5dhieEerM06B1X5S2hNxqWjzGK+BR+OdssQNmwFy9TNfjiwFmjevqDui/OfzxTN/g326zSi6P7a7OAXcf1vyzKDZgh9KanK8hbGQkYTZjLSjEZXi7dn8sLHJaHarFduiy4JYTTstIucqvAE8NM0imhX55/qajuGAk6qKWGU76ri+SVwpoQLkt9KfBZWRox2WxOpDwuWV/GR9vQc3GnR2wv7U0RZCRa3uMCpEg/zkSHDVhtEXCn8HAwGXYb8eJ7436G/x05OgEKBIQoiyc707IRiNSpd5QN1oCm/8LtLhQ/9jgu0rkOyigObYAPzDm/F5IVigVqURPTgFFITtpWG6QiaZajhjIFoCwBxVXIe7N6pJmXmdrodEMJuY3tKBr90ZmKrlFIZech+LYreOlaeMDBcOL6dh/dGqj7EslHFLi7EbmrVknuS1aIE/eiGSUTDv+wy53MLX6yVYciemBy9gVdjHhFfss24GyjqHSIIJJBG7Rv6M6B4jKsXTb5OlhkPlhEB35Lkm3pDpWpwev7PrWG45zykORLuN5m3NlRjQV15xTEyIMI2NR0uCj3rC3Fac8FWFHpE8803Zzvx4w2z4lpR34MI5LN9QXYx13rbWiQXZMexkFDJC6PQpFOuWuWeHOfOuUxMj2HVmdwCnBUlPbPP+WPn8lG5DZ7BMPYyWZRYR0/V0Y6moZm/4KcLA++k3L0qTRBYw7vyQfLeWTy1BCzJ0o9ZOgHz0jjvk3yxMZWkOekZhFrf15sVdY9i+ARf3zhwm9QFJhnASQj2rj3nCNApBVr3J0g5Jp6yGRitXHgd8twyvl7YdiC2o1s4sFyhUAMjI15k7OO9zAAPOEMXMPSip7V3OHqlEIkaqOxc7ZMx9mXF4zshxChSMv7jHtTQNV/YRGyaxsv/W27HPLnQv+MZmLNz73q+40kC6ewGZNU2TO+0cZh/e+Yvzfv0mW5ioxLIFRQQfRcONrJYiL3/1JCuGfaUChAbbo0bp6SmmeYHVp3LZFYNVfbbpjskeWULdswm7HLQuwQ78z+RxA9GrWa5fQ9VjBI47CRPsHNTbzcbXYC9Ix9hhefxKkpiOAJP9Fy55m68XinyW1+nWpigqrvTNd6KwZzMLVM93K61JNbsUyTOHCpzE/tnvEL686rbxlQsAmyeDyqVQ11brlKLbASh2W9Krv9DTtJvckQKqHvkJ87gr5fzEAQ6pwsZW1sDapaTvLcyXDuwjs= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35bc20cb-8d00-4bfb-ca59-08dcb4e75bba 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:41:35.0256 (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: 7QM2mQXDp+z89x28zi9Za4XRF7cbN+pbIVL0gBtwcr26t9LPkBxmowavAqBt+eyyCIoY98RKl0BZc9t3ZkYz7ehECc2DoQObjhodCJtOGMC1EU+1VgPWFipfQ0sxyMX/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB8678 Message-ID-Hash: XHIPKIFRVMYSC37SY7RVADXXLSWZHPNR X-Message-ID-Hash: XHIPKIFRVMYSC37SY7RVADXXLSWZHPNR 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/ad193x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c index 1d3c4d94b4ae9..34c309c0d96ff 100644 --- a/sound/soc/codecs/ad193x.c +++ b/sound/soc/codecs/ad193x.c @@ -316,7 +316,7 @@ static int ad193x_hw_params(struct snd_pcm_substream *substream, int word_len = 0, master_rate = 0; struct snd_soc_component *component = dai->component; struct ad193x_priv *ad193x = snd_soc_component_get_drvdata(component); - bool is_playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; + bool is_playback = snd_pcm_is_playback(substream); u8 dacc0; dev_dbg(dai->dev, "%s() rate=%u format=%#x width=%u channels=%u\n",