Message ID | 871q33x0hm.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010067.outbound.protection.outlook.com [52.101.229.67]) (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 DD13F2C6BD for <linux-usb@vger.kernel.org>; Mon, 5 Aug 2024 00:43:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818633; cv=fail; b=ronFlUmV7iOkMeoF0frRtMp45IWGhmFZYrkFunfNI5TqdDPxqfaXOOUwXMDcKTWnJp92OB1/l/A/xYJ+lZwZz5G3VqIEiQp1LKrLF2T2VkFYrzOk10LgIf8yfwD+ZmQr+dq4pFvonaH4jj18wCH3PVu46uHxWrZM4dzEJssAF7E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722818633; c=relaxed/simple; bh=Q81pCqUO4aa7U8lgHwBBj5fc+S+dicndBm3xS5CcBh0=; h=Message-ID:From:Subject:To:Cc:In-Reply-To:References:Content-Type: Date:MIME-Version; b=eThVjYy+Yys+IFBQZQw4Knvbzkr33Xf9RicCMLxGoBq1mzPdDtrpR7QgmkyY0twmj0x3pcZMcV94LzDYDHa1pnNkg6g99hD3WZTkIVgkMyZxFR1ofOkPhj/WcZCUE7I9SVBTrwhQd9tOIV9xmRsP/mqkYmM6iBk7eRVHhtTzKHQ= 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=lfikx99S; arc=fail smtp.client-ip=52.101.229.67 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="lfikx99S" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ngxFxpcuntWFVltYF5WQ3sGBoeWi7TUexSqaUdf7Q+pcFWslKRWoqRwsqgOHxOL0H6zjmPXwn1B+G7NvRGvw8iwgAGPHRzuH68aDxTFUbiec8nnqPVrHyJGc1jBZw/aBA2PxcwaQVYJhw34ZAnN3+HowCZ5QQfu+9O8RYUCbCLbEgtsCZTJ0vPK5CFFkyo6kMgPO2MwgaOEtYLA4ZR5nYyPGx5LiP3AX9osP0Ih9IhviPmZFsv8D3O0adet/xansWdK8LpXMndpWQ33sUrL3PHsTYk/XrNlc9Vbe1ww3FHVu2S/bx90pHLfU7qEP8LeHpVZmpLeeb7743dJQo0kx5w== 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=NHufUcx/MhWFy0eEyzpe2knYlbDXhXmEVUBykvY6yOI=; b=aAyC7agyvO7bSBUkKr5dZkcppFscW9XkWMsdTCpmm/mBKmpKWQ+6w+wRR2muJG6yHUk1mDkBA+HFPrimj6gc7Q15Yh63J4iTKE//Ma0niz/1SW0+HlgwSt0AaxAGULbwBxpRS3Ohku1X3ukkjP/LUZIsaOiIrfBw/gkiLmLifeA4+8pFNnO3zxlsZUK/gn8nJE0SsEzPb0wFdFOhM2ga2B14sQN9siD7aDhMc7gNsHNVGAZZepLl8O03FIF6kh2IfmIhhMK2pyfx5BBx0lrnirDxilnd4vpwxGTMVoa/SaTVLgoutdanMN4sgWgrsbRU0ayI1cighhzZw5hjfThzoA== 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=NHufUcx/MhWFy0eEyzpe2knYlbDXhXmEVUBykvY6yOI=; b=lfikx99SvUNra1K+o5sQlBqeDXUWFrJee6nSyTAgl4+CQSRwvo3ycxQp6bkSAjgQbhaTVtNkn1PBiDNHO4d9ANdfJHWWgm7wvbmVbUlbj9+dk1uRGOVgndumN3jVuBIwRCsxtbeyE7XGnpfYhRQq7/ZwqMdEE2TFG9TIPZTdcB8= 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 TYCPR01MB9685.jpnprd01.prod.outlook.com (2603:1096:400:221::5) 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:43:49 +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:49 +0000 Message-ID: <871q33x0hm.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH 102/113] ASoC: codecs: hdmi-codec: 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:43:49 +0000 X-ClientProxiedBy: TYWP286CA0030.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:262::20) 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_|TYCPR01MB9685:EE_ X-MS-Office365-Filtering-Correlation-Id: c8d6bb71-35f1-40d4-d20d-08dcb4e7abfd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Kh9wCFFH/UBjXHgWXbPFEPc8o91mPwQPRG9kejfBkiyShpPl04TYsdhFghgojIc+NAgKu6qA/OHhPTHkJYh05iwEGNrFX7Sba7W+N1c9+VFOHLOCZHdo3SUpxnBp1h79lWQKZ5y1S+a0kxLKrMYp+ACLP7HoFmPr5l5QuZ2sY1FnSBahydq7/g0bOaaDJhsTOdv8TaElDQP858RAs3CWy/vZV6BQXEUeCno3cAOlkRjwvgprGhHtlDQ+Dk0ScHO0Y8eiIfgrWmNqNyq3C86TsR+YAwhGUSNAOF/RZ/ihsCtqEvCwAWEGJN55XsUfU0Fo/ZNqJCk/yuJ+f7W8EMkBuJv2eEox54epdMeMQcH64AVKwRsIMZsTxoODet3XeJ6EEsV23K6uWqQ0pRJa1hNhyndwS9PsFldlWsQk9emDU6ddh3/N2URYwWkQ5q7Nm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od.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6/zAFN21kODBimZwV3YQQbUCldaWCODHJr6x60KVfbT1hWQaE0XyN8+r8YZPAmXy+G+0SzAvcZiIjmxZWsL+kACfyWhUakxk17hjKDPRJ9U7hz1emPjwD9hBEHazyeicVhEqNvuisWOyeE25pw3CbCJbUYJmcEpXT4Fj+EZWAshsNFlVBTQ+Knb5yOJsIJ/8dyyhnn99tGlfhU+vJxgEOR43zooMH21HALhBRnuVERxdq9QW0koCQjoD1YCmuckiE8Pr8O23eup/cDg5vIvb9SrM27rk0iXDXJwj+AdMiqcE1NH6CQTWwuOQ+9PdMprRvVk6JwMfDDoFPHSGV+fCA8K8JoQaTvRAznM6kbxS6riHfxW/09I9oradbOHhjDC3rBnzNjv/+XuY81AuPjoIxebD7o+ZCq4W05oPJ8wv/DMcwvvs7lwOv+4Ij34BBaJlDpzTTqX6idgE8IisKQ1D4U1LoMspvOEWc4G2fKYfZs3gSIxXiqiyZuVsLzzFIiPgYv9Fk6S+SHwmwz5zeG3099xZULhO4xvWIQ/Uo1mMypZLXxY3HPHgXY43VZXJieiw/h01fXHIaozIhIlb+8RDjB/15Ia6Bl5pc3o8GggImSJEG/xAvn1ojAOP8i1Fw/mohLYEmLd5/4pigrXPSA2z/FZc1WQoittVx+NF7TzRKOGzW62WhF0UdxBKDKZDHd2KHXhDUjy+0Z4NCyCpLBv1EnbmnCpJNrB99l2SdEKDiDJp6EhIFyNoc3P3mTyHfwtYDGWkz2ANkQVv3U8wQx50Np1qhjdT1TBm2jm9FW44oSn3QtUDJxZsFn+Z6uPYKHU8SR0ektNkzuAce9M11vMxqA0Ob+nwWqqTspnRiPQiW0WlLD1oT97bWNVlh76vWPMOfJbuGYallSxD1jTZ7h5GXxbPrp71Cj8/dIOalnuZJCA6noBdQJPK6aFjLH6l743EY96GZ61U2XAsOoQl2MrZZuJ9yNRkBJv/E7He9WHizNCf7YVEoOF1n5tIOznllcbEoG7Tu9aSgEoX5YL3PaEr68UifpTJm5yBTEheg+zM2JBOvaJI/gc15IFmrpbOGizuwAlb9ozn7CvnOXUtILISd5zp7RoAfYjf/w3L0Xn4Eb00PcEk9UJKb60soCd6rV4b1l1j5PKW4PmHXh1VI70RLA/bodq7Eaw4UDZsWdv6D6l/Am71LxxDS15Rx7qWoljz++R9ii+th3IEAKZAMZvfS58hVv8zrglTZd8Y2iENCKU0qclsx1bHgu1VgHXoUdEtvLN+xCAzXP7wKCBXYA0a1RPOY06VQfyOo3taj+2MCJLHhw+BROKEhpbSdT3eQA+FyhnUWfcpBIoLgiGbcQHrxdQUa24bKjwg33KBSemq8UkSH89N8cwaLFAbpH0ZNMuKLM3agPQzpDIAfvWPrkbUFnH6w7PcM1tJR2oLjgPpwDfS1490vHhiwOdT7yGZKwCXoWY4H7mLAzayHhKveLaTe0Xef1Fww5GCjMWWZnWo/osgqRPeNBXOo5PnLYTkc8Zq10R226DRTMsekMBgyqEKfxsieyrX+PwQ7aRifUPe82SKna7SOqKbWSpRlEVupTdbfxuebOc6le/Mtf8CRH8L2zDWYS1b013KxU0+CyTwc+w= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8d6bb71-35f1-40d4-d20d-08dcb4e7abfd 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:49.6463 (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: OKl/Sa4txoC7bC/nRQ9i96+mfeKfnVogolgRA+NVyo7Plw7f5S9JhFwZzXzhfQyDimM81hnfbnnOibu1dKVcfrYCoc1GNkcZFVrmp1mTQrqgcz0gtRuL/Kj8gazZJHEk X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9685 |
Series |
ALSA: add snd_pcm_is_playback/capture() macro
|
expand
|
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c index 74caae52e1273..f8a4a1b62698e 100644 --- a/sound/soc/codecs/hdmi-codec.c +++ b/sound/soc/codecs/hdmi-codec.c @@ -428,7 +428,7 @@ static int hdmi_codec_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai); - bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; + bool tx = snd_pcm_is_playback(substream); bool has_capture = !hcp->hcd.no_i2s_capture; bool has_playback = !hcp->hcd.no_i2s_playback; int ret = 0; @@ -474,7 +474,7 @@ static void hdmi_codec_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai); - bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; + bool tx = snd_pcm_is_playback(substream); bool has_capture = !hcp->hcd.no_i2s_capture; bool has_playback = !hcp->hcd.no_i2s_playback; @@ -699,7 +699,7 @@ static int hdmi_codec_mute(struct snd_soc_dai *dai, int mute, int direction) * snd_soc_dai_digital_mute() */ if (hcp->hcd.ops->mute_stream && - (direction == SNDRV_PCM_STREAM_PLAYBACK || + (snd_pcm_is_playback(direction) || !hcp->hcd.ops->no_capture_mute)) return hcp->hcd.ops->mute_stream(dai->dev->parent, hcp->hcd.data,
We can use snd_pcm_is_playback/capture(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- sound/soc/codecs/hdmi-codec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)