Message ID | 87le1bvlvw.wl-kuninori.morimoto.gx@renesas.com |
---|---|
State | New |
Headers | show
Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011041.outbound.protection.outlook.com [52.101.125.41]) (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 F0B0A38F91 for <linux-usb@vger.kernel.org>; Mon, 5 Aug 2024 00:44:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818679; cv=fail; b=ZKk42N5PVAVRYv/S4pLbTtUtpcewFXNqaC2H0H7FBPaYdarA1jhRBh7gmL+QyJE3kKbcPkudPovfpaKTSN2Cen8o8gktkfZcloKvaeeRbxFuGK/ml8Cn44ZW1YPtYPSQXyZWKKQx4C2bgEp/sfaoHaRHJ53ZyhSyYLvQUvKa/J8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818679; c=relaxed/simple; bh=a9ztpP3vFeEIvYnFOeBXW+2SNbCTx95QARjsD7c+wCI=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=nUK/KqYi9B0WydzronIWU3VeiCEayhxN0KMPYbJ7CbzFzxHMFUW0LdI1x6HZzDJhyoHtj2tsbTxpi1Ziad8cDjPVUYZudU8eREKZhWYdNU++zQ3yKYWxaIlrqOsf7gYZ9Lv9QxrlSYQi6R9ism46c2U6j4MOGC6YxhWBIrz4tZk= 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=WNUXUQdK; arc=fail smtp.client-ip=52.101.125.41 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="WNUXUQdK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KvvYe/+rGiGiXPtvNE2Jqod7DpJN/U3klqp0agWacW8aHoSETrU8BtLxB/a0MrG4/K7Ceb4HINkb2caTBj7G8eaYy39Y3FIaspLYgRGYUk3lPGytTSosO8ws92GAzvxHI/4pxGD5FF6RF9aOKmZQr08hbNK/TkxZyzsYBaTH4T9+3auf/EcROKLM51m58BYoXHj3459gPoeF/ehMowejNWAf/qJT54FPKyqyhYkwIgwebPUc4xrb+yV0hwPIaB4BLe7rv6aEYjJVx8oequb+7u/pnxT/AiWvwKzRhHTufKBFN5B04D7ygW2XVxal6AimuFI2W+0cjfTQ04NTsZ4q5w== 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=blaxdQ8XtGclL2ZIJhWZL0YNMNXebqSKX/sRc8bPS3c=; b=SRXAfbC4iY/0TA5Ccr8KKLMMXHqFPZdsjOC/ySC2GTsq0NZIabl/bbxEP/1RTujfMUWvtgPEtY+KGS3k2tRqTprlT2mZvC7exXLrreFOSE1jCnhgvkOT2E6u/BO7wekuiYVQxfn2ehFezD9aQoCGGUnZ6ZFfVE3LCoFeb/+LpzXaLRDqx4GbKGAbKfMflpSsZM6/ISZNEHrt9Vn0Dz2n8M1l5yIGo1r6jevWeoTq7IbxM2WdcUpZravn2rLMS6THuFeKbrhmXmX9GVgItys53gk8ZGLQPLFWvOkuzQtqEB38O2wn8u9BlVttTT/tjiJiyJMeN4hKvK/fbKZI3oed7w== 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=blaxdQ8XtGclL2ZIJhWZL0YNMNXebqSKX/sRc8bPS3c=; b=WNUXUQdK6dOt5/C+IuKW/HKhYseKSKmEzXAeK/I0IahFQQlK30dksrPIwSSVQsp/5wKyNDGvHBSVi1m3eImM8wQ3DfIZq+KpGEgnF56s1MkJ9dCUfjUN0AEW2kXqEvzqtBDk2pSMYC8T5rYFH/l9YHtaodr2x1E/UJol2qHwatQ= 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:44: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:44:35 +0000 Message-ID: <87le1bvlvw.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH 113/113] ASoC: sdw_utils: 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:44:35 +0000 X-ClientProxiedBy: TYCP286CA0238.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c7::11) 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_|TYWPR01MB11466:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a55f330-2b66-41d5-611f-08dcb4e7c754 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: U3x9d0jTpJUctPGxIropl3Q/ItfqzKfW1cu6spnPOehI5FOHWpsclGQ72FZX1phUPA4e+nrIImctngL3vg+3dOpxxg7Gvdrh2bSGw5ftMyW8PWZnxIavKiNJaJHBUxqybgZb1fTZo1zYhCaDaXEN7ZoyDplkSM1essA3fuqVdOQmCWGJ0NtMv0fwVL7dWaC2K/WdJfWtFDKFGkajLr5vvnyNiYKSBTOPZHlh07OIL6oV3IoEFoOIGoGI+mz5NlHIgB7EYK6v8+VaxmhRAvHvNSaWWjVCYfdcTsHNO1Pm28BikyVumObW79V55rLaeAmiRfsciVplAc2BsmVhw6Es8u0niwdQqo9vh2vsWMn6ecJmiDrzvygl/OifB8fQCAGn3VNexmJ0S0xyEZRYyx0dQFbHoAg8Pr9XAskhV+fs1Jhmx68HQZceuHbfnliVd0+ROGtEWaQqlnMnuPxqZ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R:;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: wrR/JPOAT1OMa6DTecG+O4mbND0T2niAMxJi3kVE8Ml9oxzOcOO8lgBOI3t1WlDMqHb51yv+AporJTbnpaaq1Cn3grpWS9Ff4KlTwie1EeY+w/xKkaVbKSQiHqOuvgQGg1Utw1g9HC/U5O9TtzHsg2DIyn9vHT9uxGHtNG68L1GMg1YjwvL5uur4f6lmL9AU0GF9MvsCq5bvDH7Nz4FqJlh9rlkUbq2rz4GIsI1hD4pvppQDd8vseC2W58cAe/2ErEgCHl7J4egw+Z2fkGQIY2I8TS1rYw5Z88LGMFXw0JDEijSZYb6c44e/gDV2Yqy10bQAMi4d/qOQCln8maoH6RqEi+D0Zfz1V5jLlAcpEXIkJ7h8EJ+L6FklNTp7DlKzN6CiOvn69kuJm0+0xFvzF3JSzDnfbBX2fuuESr2m56ibfk+SGGueDU8BF7Bb3d+jP2xU4TUGULOR79J+4UeJ13bGsX+XsxpaLkVGcDM+YYrFyqcEytpk+peJpaqFLMr4T678gaYKEe2iPKHl3CAZ2KcHVwYlPcvBFByhKPDlReMv2BYgxqPSKrQTVRdOXh9ta3bVbyCFBKvDwA1Mvb4fLe+F9efztUse2XCOPJoJdUEz9moV5jQtiewlTlCANpwkPtApL6pro7DEIdUHHlcJtiouer75rpZBH71fWW7fZExYNsuerB79GlzJlOP8saZpU5GRQsDws78RvZT41gZCJWlJSQN0hTllWGWtIOGsLJHHWaUvNdCzv74kR3lGEd7RYDY5HZXoLgBwo13hpinIeMRFG6vC2Mp/3n93gcCPp/VL2w6OUUJ4X6aDgerBvXoE/6tJ/vbrsgzMBdMsR5xm9bTWQqBfXTSs25Ly0Fm0oiCBaaLyCnau0wMnF1Y4Ng7/FxcUQdAKZtG+gUmOCmqd5CpNe0fsSLYBfesqpNSqeO22HjmOzi7QVQYq9LWtfLiybFhAEzDsC0BMZujIfQwxkS/dAIxXHhv+EwsgiGyiYGvgma03aSbb8vFqfJ2r+Sbd7vbr+uicXtJSvuFMb+P8gCZEf3oWkxW88TNqN9UfT+lubEyoYypzuLuabVf3tSFNvywzDLwBAby2vs13k6BU9NxpRNdMWjXbIuJ5wvGn0/gk7QehGGSDAVsJ/lWram9WE6zkrXijdU6d01+4gkdWDt/t5fevZNIKRCemtVSmRu2oebwH/6AdQvsITsR8itJOjCUBvrMfZXdqTkW6sjrVVZXE354ibrXTaiD+2bZ9gOHOsTUZIRkz9icZRbTrQas0A+X/D6K0nOM2O7LEbrgcfgdRGYCnsiQm1nCgh60/gCbxMzhyge/eR1rYEjv7iLVFPF/FeRP9kixtu7q4k1CsFvm6VoztcFkeBk6Q7V9ProdAswn9rXmuNPD6t4Y4Bbp3OC0lXJyX3UtVtUQ22a05v8xIMNNkqTG0hDiGaMtTvhl4oXYLBX7bTMYXw/hap+S/s7zuWO+ANZQowZ3CiBX3yaoNE0AiqOpzLmMHCITnh/DX3wryj1wRxPWdLQJGgQJyAZyZkvYILWbzmbE3OkwZdQFl9J7hxC/yQipcAziWvJ7iOi/a4p5boQ90dP7+BMQiM7F45w+HXceGJVLF0A4ohVZ3pBPRPux3euECqonGCnA= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a55f330-2b66-41d5-611f-08dcb4e7c754 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:44:35.5582 (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: AnHYKSM6WIXV5velbyFKWSCQcB0flOciGVAVdp9dz5cg7lpxYyvpliapCckOCb0h8AFOI7XmEVDgKC/13QGr5ghUJynrlSmCzPr1qHmRCnvtZz/ewcwXAjO9aE59VnV3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB11466 |
Series |
[001/113] ALSA: add snd_pcm_is_playback/capture() macro
|
expand
|
diff --git a/sound/soc/sdw_utils/soc_sdw_maxim.c b/sound/soc/sdw_utils/soc_sdw_maxim.c index cdcd8df37e1d3..714dadd75eedd 100644 --- a/sound/soc/sdw_utils/soc_sdw_maxim.c +++ b/sound/soc/sdw_utils/soc_sdw_maxim.c @@ -54,7 +54,7 @@ static int asoc_sdw_mx8373_enable_spk_pin(struct snd_pcm_substream *substream, b int j; /* set spk pin by playback only */ - if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) + if (snd_pcm_is_capture(substream)) return 0; cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); diff --git a/sound/soc/sdw_utils/soc_sdw_utils.c b/sound/soc/sdw_utils/soc_sdw_utils.c index 6183629d1754c..2b8f058450b25 100644 --- a/sound/soc/sdw_utils/soc_sdw_utils.c +++ b/sound/soc/sdw_utils/soc_sdw_utils.c @@ -750,7 +750,7 @@ int asoc_sdw_hw_params(struct snd_pcm_substream *substream, return 0; /* Identical data will be sent to all codecs in playback */ - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + if (snd_pcm_is_playback(substream)) { ch_mask = GENMASK(ch - 1, 0); step = 0; } else {
We can use snd_pcm_is_playback/capture(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- sound/soc/sdw_utils/soc_sdw_maxim.c | 2 +- sound/soc/sdw_utils/soc_sdw_utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)