From patchwork Mon Aug 26 23:41:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13778670 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 (alsa0.perex.cz [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 A1625C5321D for ; Mon, 26 Aug 2024 23:43:53 +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 6FB2FB70; Tue, 27 Aug 2024 01:43:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6FB2FB70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1724715831; bh=Z9HQMCTtjq5jVNbFmJOGI2szu4Why9Xyist5j/hnIdI=; 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=GKjg9Mycq6iuwsUG9jWj0oUt6ntsDN+HSGBjvKtDlq01x79E85KDcU57tCzdVfKW3 B//eBYofWrcasMswyataDPFcAmr/0wSEdic7G0P0uKc9FBQt7dti9PgcmHB9zurNrS Y7iuYtzR016sy3xo7yDGwsELyUnmHW49pvqljKJ8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B35BCF805EE; Tue, 27 Aug 2024 01:42:58 +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 6A50BF805E5; Tue, 27 Aug 2024 01:42:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7B7B2F80494; Tue, 27 Aug 2024 01:42:06 +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 5535EF80087 for ; Tue, 27 Aug 2024 01:41:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5535EF80087 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=Jc2bdloS ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xzTjiJ7cOyMRt2YVZ7v3BkJHp7ocTI5Gud3dqzE8gbUUY7dwu/YujOZByQM04cS3kpELudULd/7//TnCZCbsXNzPBeoIxp3MtUSl1tod5b9CQIEaS1wIahKYbZ2AGcRKeKBtnUmMCqoygfXmuXiMzJHHJckpWx07RaJ7IsupRnAn4x7vOA/8z1pw3qvB3qqP3FG73fHv1FgOrhTQC6Do1w3VOVpoG2hSRlKfYYsv3zgUA4W7XwStHChuvrYAqScmHHdEaTp2mm3PMYP5lRhGT6msiyHKlD0Py9zCU5m2qlxPJSvHhuvOGa0jzvOQmLdoxqx2Gu1U1LZwyiCcSlWm2w== 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=XGirFK46gfKBrPpMgri2VH0OCXwC05M4/9v2mS1WE+c=; b=UiIxiVgXk3PwNRKewB14p5n5PcTzya2krJ63vjSx5XYhnBtsAh5/HI+qb4mjUo1WqBiAuAD0D6gdF9fQAL0iEf4zW5SJ+dgNhZzJd+x3UOSkV1kXcZLpahvYgd2/Te6YQQD+F6Cor33zZK6F1ueWliHXXSqs8+lmgCslnFeVsD9duUcrc9e8dr+x0LKg3yN+b+JHZNrJbyAul/GdDCFLBH+SyG1it+LXLJaCNsTvgZbWvoki6sK8NpKxlqeuMF75m72AdR2uxbH1Z1RvHi/YDcaDtyGntQHSLEKR+lw51FsRF7IwKRiv7aCGheuvtZVTvi+gySlANKFYaaXXya/E2w== 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=XGirFK46gfKBrPpMgri2VH0OCXwC05M4/9v2mS1WE+c=; b=Jc2bdloSol6r0n2eywuLpgASqzJmeCqajikgpu4NLMteoAgEQ6eNtJJOglmXygADUCwKbgtc0YwRJisvTjxceIZGmr7aCVE12LfIsqmlz0fIzXLg5A8UK7ZSaMBBQy0i8o8v0YWvIYI7wT8GAh3GxmoeoHqUkTEnmxfN14v6wUY= 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 OS3PR01MB8522.jpnprd01.prod.outlook.com (2603:1096:604:199::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25; Mon, 26 Aug 2024 23:41:53 +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.7875.016; Mon, 26 Aug 2024 23:41:53 +0000 Message-ID: <87ikvmdf7j.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2-resend 1/2] ASoC: soc-pcm: move snd_soc_dpcm_can_be_xxx() to top User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown Cc: Linux-ALSA In-Reply-To: <87jzg2df7x.wl-kuninori.morimoto.gx@renesas.com> References: <87jzg2df7x.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 26 Aug 2024 23:41:52 +0000 X-ClientProxiedBy: TY2PR06CA0025.apcprd06.prod.outlook.com (2603:1096:404:2e::13) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB8522:EE_ X-MS-Office365-Filtering-Correlation-Id: f3c9475f-2d72-4c21-5467-08dcc628a9c8 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: 8+TcOkZCHMFtZk/eH8s1YBl4oXaoG0JHQ5hSxX07/Zm0/duywny/+Va4nbbD5sV4z22DfP4BWWZoqMSMltiF3OxPF487BHKErMVaE4D/2zu3uzGBW6FBf81sps1aOJ9HauM5lai4aHiixIdSirKRVAR53nbV1NQhPLWiB8ibosEz+C/i3mfuG8nS18OF95+Dd/aaTz+P18RbrVFv8yCJG1VuH6Zq/I9aPF5N72w9fCAqzJ4R1B+X0IMg/8E2Kta6W0VkVxheh2ybfk9/pTFTsIxIaJJDyjFccnI2HGjSSM50wNipodhLCs63N08shYOzogrekaTQJ3YpBlvGoDddf96Z1mgcrq6HPV0h0LpJkXeooDmtHDEcPqBpZW9VglZeSnBb+2H33B/kXa0Dl1XckJ+NIKt0SkeR8iHuLseYrMMlO5btAvet8zrBUvMgqJCcbi5NGCt9DGgrG6BRS1ndJTGDNdc/pTlCUaXsYzoTy6oPyYmziwNAhYyYuStO3YyHWhYlCiGZHypLwyWH/EMHhYFii2bT7T2uzYQAxau77RX88EA1sUa3dWPsvrCkNgLZtFd3EV8zehJLJCJ5i7kmh3nneyYsKrgx6azdvq9NW2e9wJiVBT6ZGa4tGkybJ01Grg8kRGu4Nt95bxEQQ89vL2c3tSRjjTMRGJl2ufHV+vD6sbVj4QaZ6BPuoqe8BckuSUIcaU9nKKm3OQFIpzQMM5b+a9eFvYrj0TNlVmNYGLICup7MHCELWZG/Vwak1kvcw+S6PP2wOEyXAzjL7ZBUTnMl0o6Pn+Cge2t4uH4BtQEEmQTjpl5k7xgbbBbRftnOwI6TRafcd74WukJwDafuCgzlz45RYVficTuJI/rAULSKSdEy6W//njyCRWerwjxdLpHS/1ua3L1rk0K7FVq8QMf2fBGnx3uxv/WMZy8N/klhXEXRT032c75AZQned+L3MlGLyhITB2zKAdCEAxklD9zBsXoECXSfWmHoaTXuMOfxdKmZ1LJtleWHhZaefXfyPCwiXrJrdSBM1OFb7tJfqHz8liJ4QGCArZc41a6X/19WRIlHXpkxgimwDR9h/jFN2vyesxBZCAeO4G9cnyCiOW6WvGFq7crThg3M/CF5FSu6z8B+aFcVRThopTXSyKJyqVe9LsdqXYI7N60kO8uHLtkDbtpRcJUF3nMFfAOJImAtx+otrqIKXTFB41zlfZHKg3/XwzWNvU4Nqw6JxGjTtbSd62WefuABPHSd1N0YnUCS6TpuY5uQlVWgJmlv0t/Ue5buABrvn4Jg6W4Pv69MYNt1ruwKtPcm2uETI1C7M7fw9lhU8oKSgEf0ylyj+yI5SKgAadJYehv7AlIjFcuStXoMXy+5aE1MIQbxC6T23aOdmv+Scdg1SXfguYpAbx5qPdecRXDhkypSCFT0xxpftw== 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: rYouN4kWJWt0XDT36mxwS9C6RsCbp0W6isUAQ/+b5hFYO7ZEE90YCo73MxEE9psXCG+8AAFRzh5mC2W3fJROnsv0qnAnGuJkflhcoiLHNK9NkYP/1qrKhWDfDSClGMf3C2dn8Etzp3gYOYCJQJTV1JMW81B5YcmoNSXCB8cjh2OyzuLuKPixiAKpM59PhVKvcfQqwR+jSJoq4OIzjnb4ngbfSYTLAzWmQGCuF+AVscKgMPEIE8g2bzIfFQKZO+F5TpUsjRZ7DN+D3O5/BASDanoRYUzCVExt0WnZ9iT5/JHGSZG5L7rv8i7xoPto7dC5vLgXEp6wBBoQQu/qyVjh0EzcMUz4xdCawlu26q3rFqfgmZddjycPhxwpOckTIhW+skmVlNiJ36zmFgOPC5gNHSKjY05R1E4bY58lmzYZL52HJLXnbsIIdAZa+odVTYy/BAsWpnG8GPd5Xi1Cbh4QN3amGCQPLDIKU92+eozkiY/9f/4sZzpBz7lqv46jXx1QD/dENR7PXLI+4uiIARiyZPmHgSJc5Sm3JRkSTL2E/Jc9+C4hdzj0HOGhip81uowZFaHZlqZgZodF6ShXNAeMdvHr1YaILuH0CmWrRlFWup+p7hdBib4PZvoBFnTxNbToweijlANo9+UVQrOdhv7nD9SZY0AKEYww6mTyfa5VGlbJbXypAZVuxsilHPhFu0UDr128EXI//FiSqfrJz6DYmq1mulZQJSFkd+DeUHlj/vWeO8qd/DS7P+Yd46jgmyS56VJLcu6C9XFJgJQn8To8gI/xeoVr7J24QZXT+D95vgn+X3ziNDcfIeyQmLVs4Gi3S1NJtS3l6oN1wtYDr06Cno9mLxqbNcWose9z1AvrNXFcWPOGRebTHkNJqcfHiIE1NP7XM+9VaEBmNOQwcLJxltD35fYL3/s4wSbyVbaWsgEHUbkpnytcRcrQ01gx3lxx1FxTLIlmwq9g1hANiF/HX9jhnx8cHVKChjX8fY+9tbEVTq6a5aQ+KACTemNZul8fMiMhU9UVmIJPpcKgm1RoYCyi1eASzxQoHixrplFbVhkL/mfzu8Q4QL86uu9liepCTdhOMJgJAC+zRO6Y14BMjmcjQd/7fHocWpymQCrsRnByi5BTODrv2cKEbKzTvhVQUkoPdVRqKIv4h/ZX3COIhSy77yla0KP/9g0SEPyG7W/jTv4R6XjQ3cw9Slcys46FiC3fA3ADDQO0pmNtoMUQCoj6zOj4xBoijTTkqH5G0RJarw2zi98D/IdkHkcS/aor2m036faSDmxnGZ++mtEAbuG0kIuZaHaHFqRg7KgzzWmR9dtpvWRxTsNGMgmZ2pJdU9dIGgXMQOTJjm58P++9aPYHw9ferFnq2FpmuLh1MwBN9pStwvzFU++7hfRjfzLDLyttp1iFKedfGvO9BZIhVWTcIdck+O1P4iTdLjHhd3nLhzCFwnjoz9rpiJixTmlQR0TfL8bD+baxO0Jeg2kRlflnqJVuYXdQ08tVXoWX8wJGkhU4+uXSFeRvZx1QfkRSf80Xcp33wyNnJgIDYKEZADF2KHM99W1afvuhYYj6DWYCNhrk+8IJrtlVBWswdEpxzU3DG1iroCdbCS6+bvXvGhwcq1gzNgCNJP3HZIfKTME= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3c9475f-2d72-4c21-5467-08dcc628a9c8 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2024 23:41:52.9998 (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: pBkGI55ZUhukX/ZP23hh9isJUo/zq/oey5AV7MWZ/B/vfXehoB1ID5F9da8mh+134QPjOuVVZgxKL0W8DuJwpRndnHgXKqadsf5kALO+c21k3LXrigy4wURx0+K8Vihq X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB8522 Message-ID-Hash: I54A64IDA23OINY3267RJAPWQOY7NWJM X-Message-ID-Hash: I54A64IDA23OINY3267RJAPWQOY7NWJM 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: This patch moves snd_soc_dpcm_can_be_xxx() functions to top of soc-pcm.c This is prepare for cleanup. Signed-off-by: Kuninori Morimoto --- sound/soc/soc-pcm.c | 204 ++++++++++++++++++++++---------------------- 1 file changed, 102 insertions(+), 102 deletions(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index baf8b81e7110..667d8dff1314 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -49,6 +49,108 @@ static inline int _soc_pcm_ret(struct snd_soc_pcm_runtime *rtd, return ret; } +/* is the current PCM operation for this FE ? */ +int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream) +{ + if (fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) + return 1; + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_dpcm_fe_can_update); + +/* is the current PCM operation for this BE ? */ +int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe, + struct snd_soc_pcm_runtime *be, int stream) +{ + if ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) || + ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_BE) && + be->dpcm[stream].runtime_update)) + return 1; + return 0; +} +EXPORT_SYMBOL_GPL(snd_soc_dpcm_be_can_update); + +static int snd_soc_dpcm_check_state(struct snd_soc_pcm_runtime *fe, + struct snd_soc_pcm_runtime *be, + int stream, + const enum snd_soc_dpcm_state *states, + int num_states) +{ + struct snd_soc_dpcm *dpcm; + int state; + int ret = 1; + int i; + + for_each_dpcm_fe(be, stream, dpcm) { + + if (dpcm->fe == fe) + continue; + + state = dpcm->fe->dpcm[stream].state; + for (i = 0; i < num_states; i++) { + if (state == states[i]) { + ret = 0; + break; + } + } + } + + /* it's safe to do this BE DAI */ + return ret; +} + +/* + * We can only hw_free, stop, pause or suspend a BE DAI if any of it's FE + * are not running, paused or suspended for the specified stream direction. + */ +int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, + struct snd_soc_pcm_runtime *be, int stream) +{ + const enum snd_soc_dpcm_state state[] = { + SND_SOC_DPCM_STATE_START, + SND_SOC_DPCM_STATE_PAUSED, + SND_SOC_DPCM_STATE_SUSPEND, + }; + + return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); +} +EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_free_stop); + +/* + * We can only change hw params a BE DAI if any of it's FE are not prepared, + * running, paused or suspended for the specified stream direction. + */ +int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, + struct snd_soc_pcm_runtime *be, int stream) +{ + const enum snd_soc_dpcm_state state[] = { + SND_SOC_DPCM_STATE_START, + SND_SOC_DPCM_STATE_PAUSED, + SND_SOC_DPCM_STATE_SUSPEND, + SND_SOC_DPCM_STATE_PREPARE, + }; + + return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); +} +EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_params); + +/* + * We can only prepare a BE DAI if any of it's FE are not prepared, + * running or paused for the specified stream direction. + */ +int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe, + struct snd_soc_pcm_runtime *be, int stream) +{ + const enum snd_soc_dpcm_state state[] = { + SND_SOC_DPCM_STATE_START, + SND_SOC_DPCM_STATE_PAUSED, + SND_SOC_DPCM_STATE_PREPARE, + }; + + return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); +} +EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_prepared); + #define DPCM_MAX_BE_USERS 8 static inline const char *soc_cpu_dai_name(struct snd_soc_pcm_runtime *rtd) @@ -2960,27 +3062,6 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) return ret; } -/* is the current PCM operation for this FE ? */ -int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream) -{ - if (fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) - return 1; - return 0; -} -EXPORT_SYMBOL_GPL(snd_soc_dpcm_fe_can_update); - -/* is the current PCM operation for this BE ? */ -int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream) -{ - if ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) || - ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_BE) && - be->dpcm[stream].runtime_update)) - return 1; - return 0; -} -EXPORT_SYMBOL_GPL(snd_soc_dpcm_be_can_update); - /* get the substream for this BE */ struct snd_pcm_substream * snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream) @@ -2988,84 +3069,3 @@ struct snd_pcm_substream * return be->pcm->streams[stream].substream; } EXPORT_SYMBOL_GPL(snd_soc_dpcm_get_substream); - -static int snd_soc_dpcm_check_state(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, - int stream, - const enum snd_soc_dpcm_state *states, - int num_states) -{ - struct snd_soc_dpcm *dpcm; - int state; - int ret = 1; - int i; - - for_each_dpcm_fe(be, stream, dpcm) { - - if (dpcm->fe == fe) - continue; - - state = dpcm->fe->dpcm[stream].state; - for (i = 0; i < num_states; i++) { - if (state == states[i]) { - ret = 0; - break; - } - } - } - - /* it's safe to do this BE DAI */ - return ret; -} - -/* - * We can only hw_free, stop, pause or suspend a BE DAI if any of it's FE - * are not running, paused or suspended for the specified stream direction. - */ -int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream) -{ - const enum snd_soc_dpcm_state state[] = { - SND_SOC_DPCM_STATE_START, - SND_SOC_DPCM_STATE_PAUSED, - SND_SOC_DPCM_STATE_SUSPEND, - }; - - return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); -} -EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_free_stop); - -/* - * We can only change hw params a BE DAI if any of it's FE are not prepared, - * running, paused or suspended for the specified stream direction. - */ -int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream) -{ - const enum snd_soc_dpcm_state state[] = { - SND_SOC_DPCM_STATE_START, - SND_SOC_DPCM_STATE_PAUSED, - SND_SOC_DPCM_STATE_SUSPEND, - SND_SOC_DPCM_STATE_PREPARE, - }; - - return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); -} -EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_params); - -/* - * We can only prepare a BE DAI if any of it's FE are not prepared, - * running or paused for the specified stream direction. - */ -int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream) -{ - const enum snd_soc_dpcm_state state[] = { - SND_SOC_DPCM_STATE_START, - SND_SOC_DPCM_STATE_PAUSED, - SND_SOC_DPCM_STATE_PREPARE, - }; - - return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); -} -EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_prepared); From patchwork Mon Aug 26 23:41:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 13778671 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 (alsa0.perex.cz [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 2DF59C5472C for ; Mon, 26 Aug 2024 23:44:06 +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 7D2DF209; Tue, 27 Aug 2024 01:43:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7D2DF209 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1724715844; bh=zIaNtsMOHeUUGN1oP7AezTBOKzD5+O2snnv/zzXjooQ=; 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=ZQzyvL25/SIBfZYi3s8I3Lk8jM3OxTIw9OkQm+WtSY+5pPf6+kozdzFnwvEmOucFG 9gEv2fWOnhCF0/mXNJGvdHCaxuhV9s6g+7YnmhbVyOXnws8ECOR26GJQxPjThjq4qo V7vXRIm1vB6OFGnsMLSGx/MsN1p4t0U0WTqh+aIg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 29ED2F805F0; Tue, 27 Aug 2024 01:43:00 +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 A65A3F805E5; Tue, 27 Aug 2024 01:42:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D1516F80423; Tue, 27 Aug 2024 01:42:07 +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 33525F800AC for ; Tue, 27 Aug 2024 01:42:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 33525F800AC 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=kEHW/cvD ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oOXsPjjW8aQCY9o0Us0pyVa81oWg/ujqZUWr+hGyvwbT4hn/9qWxLPZzv4TgYQszr7Z5BmR4CD3yoLAZa4z6jHnTj9hDdr4dfoTC0tYUSnbQ222FUQDnbD5qk5kfcK1F4EJlMuEk0Sz4xUiwQtYhszvcVCNUIirvz0bL0aUGF5O/gn7Ng/A3gjMgdXx2PHmmAAgqLXn5Mm8jhmDbt88oywN7HpS8ojJ5KL9E8iyJS4kUR9le/B70Z4LD19UTrhB1ikTfZWGIXPDicN+vJ2ufsXyOmVzO3bozx1V0cpsX5AQjPQbkYksNFeTwC7HgkSfDZGAttpM89ndCVuRmJqh9oA== 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=9N7URJglFcbRKOp8/FDpjNEuwFAq7K8FHljQGHY2XC4=; b=eBF89TXLRRE0XJJ+UILp2TI5PxDfXURG5OEeMP03H47obp/5fv5eh/V39ul8HleFV/pTPGFHW2mYkUWujkE4FT2zj4d1jvXwLFStLpch2SmNtBmSrtzidJQSWvtFbQzqKdK+Nr14C3mMn1kUA9geKTMGSBl0sPv/c+p1m453YyMt+o9vwto7xgjf1Ozf73/n2KhpL/xL+rXI8gm98q6Ltu5iSryGsFiOK3JIfP8ezzYdMQNbgvNnzX2m+G0d0eFbIlwIN73cnK3Js88Dvy969ZfOslZ7MrzMk0EUoyTt/LhnE3yG4rIusMSVAmdK7pWQXtqvfSMG9SrxpuSqR7tZlQ== 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=9N7URJglFcbRKOp8/FDpjNEuwFAq7K8FHljQGHY2XC4=; b=kEHW/cvDiYJpraaWOOVSirBJmxy+7FJR3ccH3Jd+OqmnbPEEzHrF8RawCsO5WAm+SuhNJs9vpBrirTUrMsIunK5tHDGun1Kujn6DUTaJ2TMDrSEHwPpkWMJQyhTVJi5oN6nigpb7a5tKjBBjYx0OM3ch85fuNzosTCmb/THS8qI= 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 OS3PR01MB8522.jpnprd01.prod.outlook.com (2603:1096:604:199::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25; Mon, 26 Aug 2024 23:41:57 +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.7875.016; Mon, 26 Aug 2024 23:41:57 +0000 Message-ID: <87h6b6df7e.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2-resend 2/2] ASoC: soc-pcm: makes snd_soc_dpcm_can_be_xxx() local function User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 To: Mark Brown Cc: Linux-ALSA In-Reply-To: <87jzg2df7x.wl-kuninori.morimoto.gx@renesas.com> References: <87jzg2df7x.wl-kuninori.morimoto.gx@renesas.com> Date: Mon, 26 Aug 2024 23:41:57 +0000 X-ClientProxiedBy: TYCPR01CA0163.jpnprd01.prod.outlook.com (2603:1096:400:2b1::8) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|OS3PR01MB8522:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b5fc379-d098-4c7f-d12a-08dcc628acb0 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: NkcEC++IT1575IvglMr2FOpH8LzQviArPfT35JEvvqir0noZBYy1c2bwyNROVkUoV9BeXUQRnmIrE7Np6Qln+E+qZx0jopbrS8kv8fb2oWvMjUCN35GGMt8LWuxiaN+ULJmoSlyoyr9Mo9kO2nQACy4/YBjk+z+7clyQIQxrT7z0dw13qi9oRYYw/xuZc5ZmviVFyzSxuupVCtqPEeLpViobYsjD6Fdza3RAhSRRNRo4Gv0Hri3LaWWcnRmZzftwoWrObIyZd6VqqRGgh7ScSwVrksMyv46NDcm3l7ZzfDE6LjHSsZ/laRdZafTqDNdq33fi42fDhg94GtPYiRylBiubY6Jiri8y4r7Fixkvp9kXIHWPw75HFw8UPyVAVXD6Nuiz9sN9Lfi45htL/PvP6lv91xVCWUCh6rZ0gNQ9AF3KFwupr3hDmKu0B1w3UyFuuorStOvci+5xdS5qeTNr14Yu+U/Kf2QYRSrWVE87oJg7cC0ltiMH7twvAuG9mUj7s6+EiVWn3k6RR4DD2nKj9nLvp1dUCAzotciw7wbnXZLwdoMC86etoh5/iywQjJ9NgakAtt8YJIx4kuSE68lkUSusMyeD1wM5hwVD1y78qDPBNsU8WBnm35vPCbtyKEZaWpJu6oZG01uQYI4AqqC37NbofmO0N1XQP8fKBFYewJbxSMtoBh9xvjKKhywmg92zbIITc1mEEv35xyevfVYmpo23W3BdrQxuh9n4WKO6DtVcGoLmyyOyZbmWw0zDqoC5GDYWYk9juaqYjYsYZXIc7MLXeA5fOWUI1CYW6KWzDSwWktBhJx0FJtXxap1SXF3yhS4o/rcP98oxo1hK2/Ydezewbj77RkH+m9jIfo/3Z2svchTX2hQ+BpzuDR+h6dHAGVHBIxuHbpzq2ZSw7pZjNklNojw/GLjqw2fLWKpimI8U4Mymh4nODfBPgC/+v1ADytPrPMAoBAhoj+fkB2QruhhbV23xhuZDkaI6YiUVwKYiQCLoQotJsh1GCHKpmRdPSSj9QcBycwrKVXNuv+9BFxk0YfJxVXqYDeztTbd6JyAVDJ9hhWt0bCtmJO5EXhhrlYAaZ/y21pyMcBXKPUJS2YCbl6AMADXMG2wFFSjyfn839cxQacUQU9q09xQeKH8cRqrs981Sc1vE3PNwfTMvtN3t/5MJUcDpnLK69zbMeRj56Y5KWo1rkXRUoctlceXtYYmiwZ2spUMrkmYCf91Spa0wc39UnHve68uWzswOz3kWQ1aZqjNz/5kEdmy1FgiGnWXlUXLUCLhg++8RQ1GtVBJOtZajQagKjzQB5PX3+D7xVpw8pnNNbsdqzLI06dr75thHNk6NT9+nOQ5KthmLScFCt/R/S+WV6otMILVMZyXSIM4L1rVZDnfQKynBIS/FZvnzmLhT53BEAwc9lTuOVA== 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: XPy38QbcQLJPDiYx5h204MtIDqhn9gy2QtHFzMQ8aCnzy+N5MVl0r1G3SP6SL+mlOcLkpRYkCKxVBEHswhRa25G8wJ3qRszlgCoJkvkn027kPbZyAo+I6m8SmkqXm58Cb0KpfvGHjrnCLTJhshvG0ZTffu1LlbfmAey8MqOO4FE/hNznZUlO9qM7JY7VcnFX9swwx99HoNIT4Uh5sIszrdxWvKbPEGKW4ZEq7itwc2Qzy7mnmzEAoBLWZt9nyZ4uHpNd+C88+RUuV4IT6fmM7HSjQ1ohj1c8wzz9+IfOoqwX87CYnU9AflB7Zz+khR8oPdt0MOxKIK6KDX3NJ/qhJwVF9eH8Z5+cXVIM4WEr28DVI1ozCRvd5Jz+h5fRfXwVNGK/2EqF+6PHyqo2O1LrKlE6xUkdWQP16mmXgkLLQ4cgZj336rykXXpa28kgGyfRSkwGs3oWC17hTR1qLr7s4FJdGRi0RIElx1eBTl+GzmtuPaDDg4zcbVT1wuB3+gtdt2PvlDIIQ0ilX/ulxPfkvrgn/O3PTCee/NIg8L1nyaD2TPIarLFbRJup20ik5dSku0RlvRfR65NO3PbBi6sF/lncDanlnY9LBki6h91XaPrtwGfp7pE3EDBC1yjGctH5eXOxC+rIEVQKCp/GZ5sAvliUdKiEiWocfCAphhYU6s2oQn1wQN1B52EVUw8ZKmd1sn/NXxd5kpI4BJqy4bjNo2TCh4euivCA3e95iNr8SwrLWUSLX3W22z9CBVNjK9SYUwLMa2HoK7x1+dj0NETy0xC2rxxFxzdNZMKNnM71B3vWBWMBOrgcq1OF0i7S5d42gbX0A0X/fVq2ex+8utH6UFeOU2fGKNx91qC92FczNPb7hGdZg0dFNz8QIkXQb3gNjtlPt9GRztXmPJ9qYFoSXahxoD4MjUSUWgUkvUOrNJqGR8nNRlrCkVD0DLVwK4pEmx5WVAOxDLLl8Uf7Y5jQeuK2XBNKFHlHG8J47pcihCcRr+o15BAz7DrqgIojXPixFXM7SbZvQyOTTaDI8LvqbZJ5bdYv4urQJqDVgKtMSantHj6fwNSTHy4A3dfUHDk9zaKHZjNG4M+6lT5UOkqWosXn17ENWvSO8eCsNrUcIBoaGP7i2HplxQiHcAP6nP+pqmD3OCxVjUGkNZ2wbAEs6KOb3AFmrW60wZKs5paerQYSAd0VIM/1azzSD8V2cZHoKUb3z88ViKT/UTZadqz+2yWw19ntQplXPqvIjnbRII3K9UIYVupGDS6zuw4XfarqjoIGTd7kDYnTPj2vbKApYLXnmc5avoenoG85qW3+zfYvL9peB+3Ia0pvwzYcybjVZEn8KeSdZ4EzjBhsdtk5RDwtKEQOkGchGo9fWjAotR+MPTYVZBS5dVzf8fzzZGKjOtoJoQDSASVPAugTxhlGnoe2QRmXxhaHtRLa4p4E0/PS+/A2WxNqlEwGEhJ9nWpr7MqrqnmRz/woUCjLQXNtmAjyVy4gNAMkV7mXpegPzY0AuZ7w9eP/keDGP4ioQiKeEV3uTHzW8m+SznEBlYKddLDrPAlkod8xtkkAWZ97puXaUs7VaWz2jJl3rjAhNLkRuFW31XpEQUFBYd9geiA/AtPlK+xG0IOYUHRH+ruq8k8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b5fc379-d098-4c7f-d12a-08dcc628acb0 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2024 23:41:57.8874 (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: ZB1H3cDWUf7hvDSbpwJrRBzwdmFJwla57VfaeaYXRemq6Uo22xUmLmtIy7lwXBjgU69DZF5Yku+n23D7L0GGf6jkyLLJ1fJI61VrCroMMQIXNrEbWvtyFF/YEF56bqnx X-MS-Exchange-Transport-CrossTenantHeadersStamped: OS3PR01MB8522 Message-ID-Hash: YKLUYTXNI5CRP2FZ4LE5F5YTQUWTI2FA X-Message-ID-Hash: YKLUYTXNI5CRP2FZ4LE5F5YTQUWTI2FA 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: No driver is calling snd_soc_dpcm_can_be_xxx() functions. We don't need to have EXPORT_SYMBOL_GPL() for them. Let's makes it static function. One note is that snd_soc_dpcm_fe_can_update() is not used in upstream. Use #if-endif and keep it for future support. Signed-off-by: Kuninori Morimoto --- include/sound/soc-dpcm.h | 18 ------------------ sound/soc/soc-pcm.c | 23 ++++++++++------------- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/include/sound/soc-dpcm.h b/include/sound/soc-dpcm.h index 773f2db8c31c..c6fb350b4b06 100644 --- a/include/sound/soc-dpcm.h +++ b/include/sound/soc-dpcm.h @@ -113,24 +113,6 @@ struct snd_soc_dpcm_runtime { #define for_each_dpcm_be_rollback(fe, stream, _dpcm) \ list_for_each_entry_continue_reverse(_dpcm, &(fe)->dpcm[stream].be_clients, list_be) -/* can this BE stop and free */ -int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream); - -/* can this BE perform a hw_params() */ -int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream); - -/* can this BE perform prepare */ -int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream); - -/* is the current PCM operation for this FE ? */ -int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream); - -/* is the current PCM operation for this BE ? */ -int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream); /* get the substream for this BE */ struct snd_pcm_substream * diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 667d8dff1314..c421eb663a3c 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -50,16 +50,17 @@ static inline int _soc_pcm_ret(struct snd_soc_pcm_runtime *rtd, } /* is the current PCM operation for this FE ? */ -int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream) +#if 0 +static int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream) { if (fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) return 1; return 0; } -EXPORT_SYMBOL_GPL(snd_soc_dpcm_fe_can_update); +#endif /* is the current PCM operation for this BE ? */ -int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe, +static int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe, struct snd_soc_pcm_runtime *be, int stream) { if ((fe->dpcm[stream].runtime_update == SND_SOC_DPCM_UPDATE_FE) || @@ -68,7 +69,6 @@ int snd_soc_dpcm_be_can_update(struct snd_soc_pcm_runtime *fe, return 1; return 0; } -EXPORT_SYMBOL_GPL(snd_soc_dpcm_be_can_update); static int snd_soc_dpcm_check_state(struct snd_soc_pcm_runtime *fe, struct snd_soc_pcm_runtime *be, @@ -103,8 +103,8 @@ static int snd_soc_dpcm_check_state(struct snd_soc_pcm_runtime *fe, * We can only hw_free, stop, pause or suspend a BE DAI if any of it's FE * are not running, paused or suspended for the specified stream direction. */ -int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream) +static int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, + struct snd_soc_pcm_runtime *be, int stream) { const enum snd_soc_dpcm_state state[] = { SND_SOC_DPCM_STATE_START, @@ -114,14 +114,13 @@ int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); } -EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_free_stop); /* * We can only change hw params a BE DAI if any of it's FE are not prepared, * running, paused or suspended for the specified stream direction. */ -int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream) +static int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, + struct snd_soc_pcm_runtime *be, int stream) { const enum snd_soc_dpcm_state state[] = { SND_SOC_DPCM_STATE_START, @@ -132,14 +131,13 @@ int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); } -EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_params); /* * We can only prepare a BE DAI if any of it's FE are not prepared, * running or paused for the specified stream direction. */ -int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe, - struct snd_soc_pcm_runtime *be, int stream) +static int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe, + struct snd_soc_pcm_runtime *be, int stream) { const enum snd_soc_dpcm_state state[] = { SND_SOC_DPCM_STATE_START, @@ -149,7 +147,6 @@ int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe, return snd_soc_dpcm_check_state(fe, be, stream, state, ARRAY_SIZE(state)); } -EXPORT_SYMBOL_GPL(snd_soc_dpcm_can_be_prepared); #define DPCM_MAX_BE_USERS 8