Message ID | 87a5hrx0ib.wl-kuninori.morimoto.gx@renesas.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <alsa-devel-bounces@alsa-project.org> 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 ECC55C3DA7F for <alsa-devel@archiver.kernel.org>; Mon, 5 Aug 2024 01:09:04 +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 AB29C5A3F; Mon, 5 Aug 2024 03:04:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AB29C5A3F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722819908; bh=CfKC7ucYZUgmhH9qqQ7MrhL0Yz+WS3M7gXpn3TRIyL0=; 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=WsfaJe81O4qAJ/kANo7S3JtqlGq17fHKExiVMiRQ0m8x2WYN98O1owH4Cq9TyBfaQ jRjKL6bON7isB/fsQ2g70nF/Dl+x+yf7qr9w2RYwJuUjG/WpqL7Ucing8zYguA3nXM airPL7Icxw/QrKxqSOkndh10Ee9UPI/UahnInWyE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A751DF89E6A; Mon, 5 Aug 2024 02:43:33 +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 D893BF89E58; Mon, 5 Aug 2024 02:43:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 16B54F896F9; Mon, 5 Aug 2024 02:43:29 +0200 (CEST) Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazlp170100001.outbound.protection.outlook.com [IPv6:2a01:111:f403:c405::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 D6A74F89E4B for <alsa-devel@alsa-project.org>; Mon, 5 Aug 2024 02:43:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D6A74F89E4B 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=SAmxFpIW ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=RpKuET4/u/j4GSvENMSHpMmR0epsGZFcW1DuYbywuhHcVMdJOk109EjUch/Qhnj2QxCtGPw6jNVUYgQBtCzLYKhIPPi2+h2gK4t1pQ0YoS2fW3w/Y6JmqerWrDhgN50i3PdSwUXWR34upqCQHSsUFnXKzqpTNTO4RTiZndDNzePyyGWVnuBidg703HP6Z1JYy+7t0V31yJqItUWlv7pcV1Mxu/bEWZ3ncYgZ2mwHJf6snsT1e2Y5IpMsdLeo5KjRUpaYwXqNbCxyXy9Rbqx0o2X5QBqmj9dNpfFBN23dauW4x2ijCP40svljuEH7I5twUK/zQTQxGiTmexz2iovvYA== 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=+AUjMNrMae3oBTS1wVIBv0t49HWKpOSxadA4q1tB/jU=; b=ypGFVuP2jzwu0LHzDWA7HF4ydVJGHu9nOvYy+RTioeXX8FqNvg2kJp7m2waxFlkesC6CAco/gBzudn0K1iQUfNNJo7X7qq4ubDZnSQbI13DJO4g4i0kGxmVNirpX6/8qSBWzDnUghvzCGrq7B8ZkvPcvRuJuT9Sl5pxCItC5N9+0oZlpR1cuzJOkyi+LBqpodDg7VLTXEhctICJJkhR9KxPKo02kZoyjvvIr1g+YZ7cmLwSGUwvHWv8tZcH2XRHM6P8ZYu7atMO1CmoW3WsDvaFDF0E6OX11tH95fC0HqqNFSP+K301SCAw9QDGIkieQ9UB3oMPpPRcok/gOgWQ0sw== 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=+AUjMNrMae3oBTS1wVIBv0t49HWKpOSxadA4q1tB/jU=; b=SAmxFpIWff9x4TTOefu3cDzqzzsSxhz9AbiGW1T+2fl7NiJYXaam2VjuEaMAtCo+hiPZoM/Rm4Xo38d62zlJ3Muhnn2GSZPbTkWJ6IiEdz+3IatXE3qIMDTh6uAn5J4Tr8cu2N2l4agCM7Aii5OATJe1MJWQPa+m/eFBgruyLSU= 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:24 +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:24 +0000 Message-ID: <87a5hrx0ib.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Subject: [PATCH 096/113] ASoC: codecs: max983xx: 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:24 +0000 X-ClientProxiedBy: TYCPR01CA0088.jpnprd01.prod.outlook.com (2603:1096:405:3::28) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYCPR01MB9685:EE_ X-MS-Office365-Filtering-Correlation-Id: ccd502e7-b2c4-4936-2618-08dcb4e79d27 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: vgBj08hobTSgj+X1898VIXsag/bbmX43fLfkzw6q6nMKZHexlfcKlf2VvsPyLPbXVVJnhqv0PbOBh/ugWfYR1LJ18y9l/tyKaX3xu1O3N9gc+V01SNthpZLiADv4vo0zx2uMogMQoj0t2qsEwXxmqFzprwcBij8F34EdNaHth/bVf8rlpkSJqyqUqJM10FXQzQMfqJCEmGO3tIdBAQtf8EmUn4KdN0VL8YKDKH/pEqJ5eI7G98V6DyoDO/wn/1onzd1u61fcPhiQXt6SfPw5pwMIT8YJ2XpNASPfrHwA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BpXN5UV9rDF2oelbKxlquvSLCu1Zb9nv7GlhEdD+TJt61I1mAtu9cd+B/w== 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)(376014)(1800799024)(52116014)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hLUw9oJf2t1bhfiUt2VOHin8d5yO4QyO8Wc/ojp6DD0bzAWj32UcdQOvkagrxxvyYmI1uBUTCSZTyHs7QlbVOw67wFSK6DU5N382I8u6e+/F99NgRLRw6DUDR5zOgbf1YngTTKqcvAfraWYgxnEacwS5t52OYoKhlWMGAywEOtDYwStoirLxt9l69kitOJQgQfj8MzyxAhxTJpymJZHzXFcKEZZfgmPcjg7yVynBr01KEGpcb6zQsyJJfBjWgNReiax11pKyLTtyW7OAr/KHLyF3wY6fNOPP3Lpm0WyPhkgFVoO7UwtTl7LWsY7rpPEaxYNytDaBb0YxIEhI2W+e9Ke8LEVctV6Yd6yMMhGEkkFnRB+S8sDjMmaL77i0HFOB10e1UGa73tPCJsSU2Y7NYIPIwzsmcy5LSlvNJ9+Tjq+wNtS810fu6dhQiFgyOhar4OJIXj1oUCTwSHWNZPIYtO42OAmCSPvaxrcAqiaTeSkZwXIuWTJpGojCd2XQOOWtQAjPfxqgl3rKnVMaqSzWyN5hOHZmTPds56eqKgMevLhjwxeLBM+lfvia8xo+BVZXDAxRVQXKXLZC57hyLyWNyhUqEaYlbrrZd5rk8cEqf2qVN4RdqRa2hcWK6YdhLUTd5lS282U/QYxM2bfZwJZXjEg0CMmfAb6OMNchbF/Pa4ejW98Mb8D/Czi0KJ9nvnU9PcpARM6RtN8akBDmsSrrc79GnNY5suySG8iTjqFF6WOHK8wuiovHXhjeny1Yh4A03zzyM2SARrCIMUDKV5QaSWp/DW3NXYn1T4P30zALl3cNZUB85+O+EFTnl2Ae9STUUHg8+cZEnFIDzhb3VlxKfc9QeZpI2DCVhd3ATg+4wknfslZgRag10ybJp/eNtw9C1cs0B3DEO9vUv9k8Cb056yPeEktUrxxyZ/1GXSASWskBJaRUPAkR+Md2V0bzTIDVzXG7VfDmLvzs0qNYzrhye3LcOPs4y/YxNihQCoRHglXASL6NHtBRO7T1GAJLBaoJiBqFuS5nawXrD3CuURG11Jrd0g47gpE37wYADM7DPPD8UY+DQdDjtK+71DlU+X6vyNNLQjXuJzitfpI3pXC6bwsqovxizgshOtCXWRo7cD+9gxQLr2EomMnB6HGVJTd2QU0HOvVP9JGwIGOLX1X3MdX5DZ3wtIqT/p5B1v+9yFrjV8iEcUGqO4dN1OICDJlC6fKV47WIHKyKsehaDMjpeWfDuKHrRfyM6+NCsWZMWj6eUxK4HVSQEOIES5KhA6JkDQ9ZboxO2hzVeZk/3T+z0hYiiK+VYy71wyIMxCH3KsQtzC/n/mpnOeYHfXfvXDga7LjREt3StbtAjSYSQkkEakZLieya1MVvgrS2TRpfhpl3bSF/3I31UiwM3RoTDHaEDvM8xSHw3RgRoPe0rR/5OJv2eznFR2x33qfE9fOHUGJL3RsCdf75cYHk+hi13gPjKdnJonNMwZW0XaGQ1a/4diZrz+yskhAronlwmYbq+UunOKVLuB5AXPlotR8vKtGxB8nT1i78YobnWEWmcjogD8eGKLoUgaQi45LUH8FYDvpAM72A8uYhHMfGEpCs3X6ghyh+9NlZmCgpKjNa+rdpjLOA4wGgj6CRKRGdeLDTpfM= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccd502e7-b2c4-4936-2618-08dcb4e79d27 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:24.7408 (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: Tg1/mGSuuj2EH8e8ZwBuUL96lxY6zO7xtZomb6+8jj38KUTo+d5fUZouAacHgbkPx9JXZcC6QLDFguTpWmPK54LXUN41ORJGZEj+bMgo3PFtfKirQtzw099wnWEJIeHh X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9685 Message-ID-Hash: Q4MS4BGIBFFIO654OL4KHGNAQNZYABSO X-Message-ID-Hash: Q4MS4BGIBFFIO654OL4KHGNAQNZYABSO 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" <alsa-devel.alsa-project.org> Archived-At: <https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/message/Q4MS4BGIBFFIO654OL4KHGNAQNZYABSO/> List-Archive: <https://mailman.alsa-project.org/hyperkitty/list/alsa-devel@alsa-project.org/> List-Help: <mailto:alsa-devel-request@alsa-project.org?subject=help> List-Owner: <mailto:alsa-devel-owner@alsa-project.org> List-Post: <mailto:alsa-devel@alsa-project.org> List-Subscribe: <mailto:alsa-devel-join@alsa-project.org> List-Unsubscribe: <mailto:alsa-devel-leave@alsa-project.org> |
Series |
ALSA: add snd_pcm_is_playback/capture() macro
|
expand
|
diff --git a/sound/soc/codecs/max98363.c b/sound/soc/codecs/max98363.c index 950105e5bffdc..5ea6b36941355 100644 --- a/sound/soc/codecs/max98363.c +++ b/sound/soc/codecs/max98363.c @@ -221,7 +221,7 @@ static int max98363_sdw_dai_hw_params(struct snd_pcm_substream *substream, if (!max98363->slave) return -EINVAL; - if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) + if (!snd_pcm_is_playback(substream)) return -EINVAL; direction = SDW_DATA_DIR_RX; diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index 26860882fd91a..531c67023f922 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -534,7 +534,7 @@ static int max98373_sdw_dai_hw_params(struct snd_pcm_substream *substream, snd_sdw_params_to_config(substream, params, &stream_config, &port_config); - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + if (snd_pcm_is_playback(substream)) { port_config.num = 1; if (max98373->slot) {
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/max98363.c | 2 +- sound/soc/codecs/max98373-sdw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)