From patchwork Mon Aug 5 00:35:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 817123 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 D2AC5C3DA64 for ; Mon, 5 Aug 2024 00:43:23 +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 488533B52; Mon, 5 Aug 2024 02:42:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 488533B52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1722818531; bh=wAfWU8RkK6TrMQ7T6BAsuBLFYiMxEi1X8L0d9gUJ9AU=; 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=FioI1jbijTagVom0daCLFQJ837nQ0JHzfsoIbj7EItccbv0g5GfqSV3D4ynvsRGQ9 PAPwbAy5k1KNMP72n9r46dEXiDGhiLB/oZnNOgPu7/7ytIrAtVsCRi7mxFwfb1wghC jdI6J/i0rEoy/bZshNasUE7WcB6RIGKZKCQi9/s8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 59C56F80845; Mon, 5 Aug 2024 02:39:01 +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 AC046F80803; Mon, 5 Aug 2024 02:39:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 60B52F802DB; Mon, 5 Aug 2024 02:35:33 +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 45EB0F800BF for ; Mon, 5 Aug 2024 02:35:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 45EB0F800BF 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=ePxbwkDu ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yc7w+ix64ogXoQosvpBpcA3b6e1jvXtv7bEjWLU/sKVMCnxujaT9hFKlDs+WhBSp54mNc3oZfT470ZUa99bmYHburQ6jJNxfrCzoz4aP7gEfvoieR1PPUd+ikdHMtwQkqPfcy5xP0RaqJcwAaQA8CNUWeD5ZQlOHPzv7yaqsFTkzgcdyT0rSjCHWwT5oKBki4gjtmQ2TdKy002qtdBK/XaD0R+vpFjnWSSLtOV+7F3ve9DaouVqdJ+q+XeEsP75z+x/opblMTJ89NyghYQJMHv0k2SR+1lUGG2P+eJrnV91vmTWWml5GAtPC6JuCk35hysBlQqtvl50mbqFVhzWHvQ== 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=aHtKcixYAPzw/V1vmXMcbeb42Ti40TDFqqHPKnKUnXQ=; b=vgpCk4kYtG1x4Ws4OZBoMEV3rTGFYGhnbpn26qv/uV5s3H0yvbmBuxbBXyw01wtG68GkAJxkFIGKuJ0eM37+JxW8jdVXVa4PSJ5EN4f3rAAg/sbGpyDqPJphFHKNmX3XeJvh+4p7FHBOZBw2Pc8EUMSU5rm6we3NsvQXNP2h6NkPP1tnT6qGFcwAFVkQMRZBWQ27OMdh8IKR3iVakxj8NydygwPsLyHGx0qc8nvoXaZ5N5CyzALNbnrVqBcKReK6VN22jdalX32jhPXkN3dCgHrr+dGsXLq4IXr8v/PsNYqA13eC2x0+rKX2Yka2+mGGFr/kOfXZz/OvAr1jbDnCbQ== 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=aHtKcixYAPzw/V1vmXMcbeb42Ti40TDFqqHPKnKUnXQ=; b=ePxbwkDuYKFisR9VcDfodHMUtHiAw8DSDbhqQX4zPtFVlYAgCjnsTNLeSY0+O0uMBxajPhlifoscZpaihQH5kccgopnCRU/PyQnCRXrPT8FErQfifUGhnEj1YPI774lutvwm7VF4MEULuzwx17r9d3VPHA2cKzZarnCTLzfajFs= 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 OS3PR01MB7994.jpnprd01.prod.outlook.com (2603:1096:604:163::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:35:27 +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:35:27 +0000 Message-ID: <87mslr24dt.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 012/113] ALSA: xen: 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:35:27 +0000 X-ClientProxiedBy: TYAPR01CA0214.jpnprd01.prod.outlook.com (2603:1096:404:29::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_|OS3PR01MB7994:EE_ X-MS-Office365-Filtering-Correlation-Id: ca25e829-ef2c-4c42-cb58-08dcb4e680c7 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: dUH3Agndhk4BqxYICWtT4bSNbGXKoREWJHQCgx+KvPk/WDV+ZoxcMZTekFPaWwuN+P282CfsTyMfuaLdeeZMwbuWw83+tSyC69dX+rdBe5xNkGqDX2hA2LpBL9lktz/jftXDaTyXQaTiWXM9/qKO1di0bSs1lEYHPlMLBiW0708F0xcB52hPUn5ic3V6ZiUB8KTrFUHAgLEx3m47ocqI+1aWIM6tsoh71VLvv70ZxAIsTlDEYDgEuBFP9xgrCuUUjJ4cLrT3TCQOFK3bPBTEqH8JTrk1Osodt5WV5EpC6IuPlZazNJRzgr5SikbkybHJ+PJ9TH/nZOySbeXcQxJNHj/m0edFB7IswQdMjr3nbPzyrYHSHBw+s9yDD1rhPoyYKk1+paLD9osKFm/Rq+CY/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:; 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: Wx7hg79TRQzycSDUkjO6VwYPsZQEAHc6819eOezJNObh6bs1gbD5qiuL69fz2+lUCTKeIocRWGPFf90I9WSlCXpGuB21F/0hAnWCn4juyBTRs+tU3Rpwmr1rF4vzZrLYbBfrOagTO0Lgc2bzbFewLrOBm4kt7Mvzwj0zLz9jE4tCovNuRA5XJBdcg7Jh9Yyo5BnAgD8E1TlWjJQJC748QxVFqXDQRjvP+QCGsauTK0R9+h8eek/ibx46zHFDr7jelOwnBPrVSbnHukQJm3owOYQJakvk7CtmdR9oxZmoQ3JXf11g1ZybZP78OlPumHKVoZVkqLJ6k/QnOTqTCTIQHMsjTb1o7i+2RjGj1Z9kn7GyagcvOCIcCKft4EQrn6OMt/diXQu7kJ4rhRMRJNuaSL0TwLBd/aBpA2Fni9PZ/ZDV5R/lBHWH7hXfgP6ezlBwyqvsosNRsZMCG23JU/Uu1RC3v/1ScHPh8xhlYMK+TglGC+ZhSqWc3h38hqLDH/2C+aqLhNHTfkDhPgrXPAQIVL7jgaA6hXf9GzewQvs8QTBe6XOLCI0kB9JhPmdv3WhT6KUPX0jzkT8dynHpx+hI7R+MZM9otrcprXQl/6FnIzTdNojtgxccVQaRm7Vzze2pUtoNPcqxQPfxqax6aVKGcaEZs2D161KQLZxwXYlzMV4hcK4iDbyR6hxnHJgEwchk6XU5lO+fR70c3yddPcuSdVJcsALOykFGqygphiTsMQrCaLOCAIz7Wn4KOllc2FCi2wThDLx9Dd9U3qqB+nvPuxf0SniA3eal54WBD/XQj+bj5kjR98Ca9Zx2SsgyAj1iV5iPIw5tu6chi0LtKXeU0sajG1J/O4DbYHYZJc5RXobhPpEhn00qSBmtt5fs8XqytA3ldiAyzsSJXs0N+VUxNqtRdlUvDAxSYDyi19l2Z73Na4QJDEPMmRs8doWEnN7LLvavUaMDINLlNw0Donv+7SbDSGdbbSOIG3ZmFkXWWliFPP38Pbh83Xkm255ZqSwMyqJ8qNpNjlKbImX3U5m1z/fG3GHcouncsCEOnoF0VQ9IslTOtbzANaboqvsVk88xFuDPXGIjuEFK3+Oe/Dg755916YOv3fOeLXgqN78foN7tRhbzvMwIquzl0IT7deptojFSntwxhrWq8pNhs04gaTDWG8Qz31mW9Rk3WogOaIGwcvRsEYIG6hlgGYmPQVySQ1MPxU0yEIAFhne19HcDf8pbU1RrWmG7xhyKDQHaC8aFVPEYpJCiNHmXWmXWT8CEDV5/X6yXbUtwWBh3akpdhSLJnfC+TbjBKDAtJ88VgghNGv6cHfmwZxQ5+LFHCECFGRR6gmAn9y//G7vM8KemhoO1D1FOqpQ9HCx7e8dPE+QZsSEruUfmVeHB0I4DJ2ieV97o5CCZIP6h9gY3aPiG2LsIkmSCbaK6/yl7IzDze+Gqci2PEzKr3HewDigleF9dnJSqkSriAa2274X/6iVBi0knSvo2ixdYvGeIIexlzHIJWssxfuKP6pIB2EyR6ychzHzCEg4/PNoqHN1d1iDkNvrJKS2NRkPueHMAWGUB75uI0UUWKsjvSlwO8Cd7m5WUxSt2P6ZSB+Y5sORBWoPIe1sV5Fdbt2+ns/tF0oqa1mg= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca25e829-ef2c-4c42-cb58-08dcb4e680c7 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:35:27.6473 (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: 2cqhvLeBNiDwIVQkfjdN6sQ4BfXmUUra2G0pWhBO7vXxnlfc+zW/w91YHKL/STLUKxO0hImkRDh9Nz4wP1fZmOKPDkSs17kx8YOhcALeYtdZ2p27DH2MlGDBhtco/Gf+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB7994 Message-ID-Hash: R4AYBVYWP2TAXD3X3G3K6DWWZCPEF7L4 X-Message-ID-Hash: R4AYBVYWP2TAXD3X3G3K6DWWZCPEF7L4 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/xen/xen_snd_front_alsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/xen/xen_snd_front_alsa.c b/sound/xen/xen_snd_front_alsa.c index b229eb6f70571..0f4f849bd20b3 100644 --- a/sound/xen/xen_snd_front_alsa.c +++ b/sound/xen/xen_snd_front_alsa.c @@ -240,7 +240,7 @@ stream_get(struct snd_pcm_substream *substream) snd_pcm_substream_chip(substream); struct xen_snd_front_pcm_stream_info *stream; - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + if (snd_pcm_is_playback(substream)) stream = &pcm_instance->streams_pb[substream->number]; else stream = &pcm_instance->streams_cap[substream->number];