From patchwork Mon Aug 5 00:42:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 816950 Received: from TYVP286CU001.outbound.protection.outlook.com (mail-japaneastazon11011045.outbound.protection.outlook.com [52.101.125.45]) (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 52B8D1D52D for ; Mon, 5 Aug 2024 00:42:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.125.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818557; cv=fail; b=W2iSSD5A0AQIdwnIZRCKqFjx170Pbj96SrM3vUO1ky9piSkQ5ZA/I53D1qomXBpZjQamATohBU/EL6/36wVL8K7/MCuk2dL/1o5cUUH6dNDoxglGMJSZGERZdY/tQgCrKt8hVDcQ7O/OLZYTrbJHMxnrcZdN7FMyohIrCLTPw2c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818557; c=relaxed/simple; bh=eUF616s6zXlMAKRt36vKj8LWNVNVLsDTreD1RGWU/LU=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=gfoRGFW+JLGEi686kcXnz5DKRrJDoMcRjlYmVvE9Uf9BPm1M3W9bKSet9g0LoyZOIIsstubGt4PGq/Ls4ZlPUFiFkcHLMc9Z5PwMsoMdVjUqkwCAZy5afXyU/FilUo2xKJAwPOcecB4h+IepTBIRXA4jG7fwjJDdTQAjFSkmyr0= 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=oP05d66g; arc=fail smtp.client-ip=52.101.125.45 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="oP05d66g" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n4h/1pQzCGekQ/1fZk7IQFrk4czoVupRHOcpJr+/z8QzT/bUxAMCzLEt4M8rI6FRtDTpPLJ7lywdgztkabuHPZXGGcU+Ry4XjSFMPXMOaEe/daNezEWwl3aOJJ7IP3uaajqXHXOXeOfOjAv7L5oNNCgKZrwi0Hu7MFN/4Th/CmrHSg8C6JW4msQhPHN/nw59WDZepX77ItOqvkGyvYXeD5luV4VsSltIIGQyp/p43dm5aw1loSc90xP/nKn+Q1SFBo9Hf9XwySN9QjO/bdm4zfmfaLvc1DPzJcU7J+8cTRmiBs1PVWt9k7n6/NjvYRiz0/syXca4Sl8VYq1xdMFRIg== 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=SljpfhQ7BBWinue7aOjkv6qpnUwf50Sk/54Z6Keh9HU=; b=pIes9Y1UkXz4PgFeGp9JLstKPV6aLdrwStheGVuYkcDiGcf56fDV9G6faNIwh7q4XDHtZOfbKoWQ+TfyY/CehQkVe2jfLonNYiLS0cw4L+V1hnQWlp51lQuBcmERH3FJDkjBepTr5YhSFDYBSRXelBWXlgi7Lg8E0x09s/3P9CqTg5DvOqQTgHQRBwJjp7zjXYd7Brnui4vWCbI9Fq5hMf4fnQaf9q4sVG0VzF0/WIYby/c0Ty+FlqR9zO0rQ0/+yk1BeGgjjH9FLf2vDq2wR4N61KWXYWgvSbsWP+xn13/s2Tdu55hzMEBQIyFB4ODGj22AL6ZBBryqKOFG35sYdA== 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=SljpfhQ7BBWinue7aOjkv6qpnUwf50Sk/54Z6Keh9HU=; b=oP05d66gNA/rIHtfUqZW/N1xVoAp4lh0BSCCFmBFZ3oEgyySJy3sB2hMc/9ySwFLNmICVxDCCKz+4L160LXAHpqphXvYGFhkGyD/SuTNTPK2cas1tyx29ASreTzB817st0HSN6+fd8q8YeYnSL0kzcRqTOK/f9IEQ84r1PaFu4o= 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 OS3PR01MB9302.jpnprd01.prod.outlook.com (2603:1096:604:1cf::11) 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:42:33 +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:42:33 +0000 Message-ID: <87plqnx0jr.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 085/113] ASoC: codecs: mc13783: 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:42:33 +0000 X-ClientProxiedBy: TYCP301CA0035.JPNP301.PROD.OUTLOOK.COM (2603:1096:400:380::11) 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_|OS3PR01MB9302:EE_ X-MS-Office365-Filtering-Correlation-Id: 78216c4e-0510-4230-4fb8-08dcb4e77e76 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: bTIstk3gSbTeBAy0lAhSA1x42Y7pSoA0Ak/bBZHNJq8QXN4HpTxeeG7u2i3RPDBr9MGCjgB0FeQJBAndDMOua9aXVyiankqz5uSNOKl1XcjZKrOwKxn8/AFiCoOiPpdTzhAxrtebgI8D+Rll35dx8JHZMmB7Cm5OFfQJQiT9vEM+dzwS3bRQfytln4nq6CcGB8tHJs4KHE4NVeJ70k1LxDi1pHmB/06Ik54+VnFMZG4xNDKEHnIwk6dWIab5IcNrFvlT2f7+BwqAVQ5jYcJPo8czk5NkftV+gOFeTObRDZCJnbBguprmzC5gERgzfn+wOY94EJ6BclpDixqbs6DUlqzE0VHa6JPPg4h1+WfJHR/5AACR/+uUiEzu+dIwHd090be7plo0pnWE8g68P3Ldw2rkOsWNrgILcAZf+PHCzJg46lhKkYI2pVr+/iYBFZnWI9BFCOibU/NCM5ltNiycR+XVQPWAX1QXG9ID+qAYG9226LnXBITvjWOAH6tFlEADMUvixaKoJ9WUBWQnReSjCvuMj+MzgL0tPsYjIG27LHpu02Kz4uNAncBnUHD+YSbxooh2L90JX6NU26ocVOApMpbBRHh6A0uiw4HYzT/HFW6/gXBRjBD4VyMi6XEkkRYI98CNLkXfTzT92S/j5LdabW6icoIqjSop3k0xQK0/kXGayMwrIy5+wFF471LCZ2gPK61x3M5Jad/LfHqBJbh2xAaqccWS0mKDf4ELfCTibl3jHWwoaSFFTDalN8hqu7PkVA/eEUxxa7Xegmf4TzmPqtjE0XlrtD1L9+DrlM8FAC9wBVr3Mk3OnJOQes2Kjzo1fJ8q7FyvOSkD9Xnh2ZH2NJG8SJPzhVgIuM4k1131NOv+2FenME1CTJgT8yOwL9lghDC9IdVSiLnabhQNWQr+WsLcooHD3ajYyfCNZ3q9+LasoCQhOwQHHMqwhPxLiQFrW2I1dQ7LE2QvH+6KeLORbi39h/iJ/jzERKs8m+PC7wty0EoWNuF2SjkEu6lMMfyjrNeWSi6lDHXcDrVbier54v9yWa6hgdQD0r1g0AopCoESc7KrwVN+KkTXyLeAqTWJ3A8FkLMa+OT80/CGgLPHD9HH4iUdcpJZy9RcMNCPtDfQtSkLNcT6VNegVlnAh42xSImtZ4KMf5jnzuOGPBBp5zqlYQIe/ZSv59+OkBxLWs0K1emHxWLcEvDmelYibTL6Dcmk56rzCds1fTgDcRYWxfC/1TxG+8LHDGvGinV8PTxyjPzWE2/7iK607nltqOVnCf/F9QOSX25Hh8oKz6jB4+aiu0icQwqbiIp4aebb9hRSYfyAZvzEDXjNMEtjBL+v3D6ltNX1LkG3u0Y95DNTmpsb1/vvRnljIjoaaHGr0vcanr7ZhGGRcMRN8KLcym4A+4iKzxZjWeyljxYdZi5OOQ== 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: EP5Vk0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5OWYHQRkQyAkMZs0DWzTpExzv27Xe9bZx+sjRoKByu8KEXRjQvYJwdK9lZC2EfiyxKfbVrqWx1xSk3Qbu5oXRyxF4Dhku/UfUx/xWQNmU3zp9dPuysR0TB7gt/joF1tRl3OaMtO6EWsxyJJMf19VNAGW3J1X4nzNXnDlhIYRJRPPPagIpiH2iLBMJ5SMOCFL67VKAeJXJ30FdTS3AfmsjwHXSrHFD3XKoinotxTpa5XxNs2LJV9umf4cg1ubmGklVtQSTGTcfIUiiFwmrW/nmS48CB0nfz5YIW4rTj4bONM2DJNHDBQASTAkN8aO3SjUtMcxPFQIo/t3nnEcImkaHRA6KgnOecLa4gBKntVs7V/Fsr9lJoxZwmJdAPhQHYEqGIy8xrxdeWHNpQV/fUmwH8M5ULzQbJeRRm7mUOCwbFOqtPHDmtllEsdKwXwdjl2eKbYoZqlSc4twKnEGRUeuR6nq0Cu35LIlgyUXI7RvPLj/SC6pLn6zzOXAVA8pCmzXzvBpgT6oOz2ULqj5meRQRZq5NVRdbaYrwRDe5xunn9RRylsCvDupAg2EODg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78216c4e-0510-4230-4fb8-08dcb4e77e76 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:42:33.3027 (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: v/zEmF/nCErEH02s8m+DBzws4D05z1S/Z09N+gF2tdF7sabRjqekae+n/25cDLWHcbEN8+c5p1ln8/YrqNBKeEx47ns/7Fvt0q2vSEpeWjOXtzu3XgRoPpneU8UXqdx5 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB9302 We can use snd_pcm_is_playback/capture(). Let's use it. Signed-off-by: Kuninori Morimoto --- sound/soc/codecs/mc13783.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c index 086ac97e83866..77f9215699dbd 100644 --- a/sound/soc/codecs/mc13783.c +++ b/sound/soc/codecs/mc13783.c @@ -138,7 +138,7 @@ static int mc13783_pcm_hw_params_sync(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + if (snd_pcm_is_playback(substream)) return mc13783_pcm_hw_params_dac(substream, params, dai); else return mc13783_pcm_hw_params_codec(substream, params, dai);