From patchwork Wed Aug 21 02:28: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: 821346 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 2E363C531DF for ; Wed, 21 Aug 2024 02:29:46 +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 B3D9B836; Wed, 21 Aug 2024 04:29:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B3D9B836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1724207383; bh=Z9HQMCTtjq5jVNbFmJOGI2szu4Why9Xyist5j/hnIdI=; h=To:Cc:In-Reply-To:References:From:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JSMj/v17LXjQBhy7VTRyp3dJcVovBt2+6u7zkYxrX2Yzr0oUdgHmxJyEnbTmqZQAh +ru4n3W6OdLIVDFtrs9ddZATPPTY8FPQs8XWUrK/bcHu8w9qh6oJScByLx2s/mowRm yikBjSKuSIMyI+TT8iREGvSjfnqZfC2EDYhZSgd8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF0FFF805B1; Wed, 21 Aug 2024 04:29:22 +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 B2942F805A9; Wed, 21 Aug 2024 04:29:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 495EBF8049C; Wed, 21 Aug 2024 04:29:18 +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 B4F7BF8025E for ; Wed, 21 Aug 2024 04:29:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B4F7BF8025E 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=JkbRPw6v ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=niTBRKsITGH8Sd4g7N94BWA/l9zSidxeD5PWNCOa6dZ3lhT9eO3J+sNxgaOh42yQkf82+A7fSr8PZkKl0IBUXzcRMywdSM7YkZjQW+k5nhkIMcIAUPav9Rp5BTsgs0b4tHXXdRdlgxsu/v44epq0OGfP76/XkQI/BfwqQcN9tvrFjmTkyK5ItI0Jm8HoGSuCGgBUV5jh54f5dMfWzqwAnBPtWrrFHqP+R0Iu+L8uDLhg7c/gUGSQ3bP8QFczXebb/AL7tCypnCF+PFlzvWLOD52BbZssb+o+cSqwRQ8CZP+8OUhIuqEukxyupyKFqlSE4SP7J4M2t4i9sns0op46ig== 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=L6E0CPK2j9ERVdDqps9QQHkY2k/N6kWXHE4z4JajeRwpO51nH7ZaIqL0YlxXXCJCxBsg8kb1Se4XRVe8QCGSzfOzf0+lvCsGfWhDwiK/nEJlUXFC54KjB8hGeUUClxxmPHtFMAOvJNqYOJXwbW3u3ByRYaTQt0/0vR+vIKv4U2yuGyPrc9cZXbq7Ao7zPkjunUy6hLVcsuP0BJXfWbFmADnnuIvVbi80bXc0rYLbORb4J5+N85GG04ZdRLYaRXLi7DSab0q1bd+Ypy+yvRdBcEFEY4z6mB1UccLbdW4mOrvfXTYMPqQ5UaNUtBfmtPM+s/D9gv5ZSYIDneCfWEPiCQ== 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=JkbRPw6v6XC0f4e1OgJ3quLWoB0cp6yOQdImqXeMG4aC81fdb7YDwIeIgxUPam/DiQGqtUbuvsRpN0eCfTfNo29kTWML6YNlLExLXujXXrgpS58T6/zJVB/aaC4gOg7XbspU3oYwZS9NFZaOptLBMu0pQKielJy5jh7XKYxKl7g= 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 TYRPR01MB12156.jpnprd01.prod.outlook.com (2603:1096:405:ff::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.19; Wed, 21 Aug 2024 02:28:58 +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; Wed, 21 Aug 2024 02:28:58 +0000 Message-ID: <87jzgaa9sm.wl-kuninori.morimoto.gx@renesas.com> To: Mark Brown Cc: Linux-ALSA In-Reply-To: <87le0qa9tc.wl-kuninori.morimoto.gx@renesas.com> References: <87le0qa9tc.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 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 Date: Wed, 21 Aug 2024 02:28:57 +0000 X-ClientProxiedBy: TYAPR01CA0176.jpnprd01.prod.outlook.com (2603:1096:404:ba::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYRPR01MB12156:EE_ X-MS-Office365-Filtering-Correlation-Id: 92f411d3-ad74-4fef-ac46-08dcc18902a8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|1800799024|376014|38350700014; X-Microsoft-Antispam-Message-Info: higIQck+jRJDFP4gowFmN+MdyGTzcfyYHD8d605u12e0Y/H/jw7IZSj2kyYmBVwzWx5p0SzIXaG7WpKtulSZzJYcwEY+2uStGIBZUx0VHjlqAAEFpEumdbjznsWVpXVytcYcIq7TKsRTf85IiXzL6h+G2qwJOHaz/A6zhjicwGVVOwz9f1X0VeY4jcIiOwgk0SIj51wNzE0lUDk4+g0hX2zVpdYRoRzuhO8r5a7CsWSPrpuPDafa9h/aRbsX1tMg1dfmIbhLl37h5OYGVcOJlPWd60cwk6DIXpOU6V9A9rqAIBk5o0AxHpKIIT2F3lyDHcKRD8CvqFaB047O+DyiOfQn14mtbDW3N2PmBK0i9kP2U30rVxpc3d7dpzEbaS16cvw89MdrnlZelc56jwj0Wi8dSgtIITBT3Z/xe+j5De4Luayp69hbYVO6SGn4vKWWux/ob9TBgR8kLa+3yxe9DZA5X3G3qzKyypBoK3s0VdtQzCikIL6h8EsTiHXZPMYSsZH0sXo2pBVUAprpuvzyisCT2KPy4NymRqPeL1SZG9S7QW67t0af54eGVrVaK95a0C33JfsJPQZFm9+H07T1qMivVa6q1FVGA9mCSmPRlMDm1NKXQ7784CtKlkkPeZSf/keDkyM0tQTmA5FB1mZJV8qmzXoVxxX+0zzd1rvMaT5Pr6P3avCFVV3ZOtIfgdaBTtABY9m3PKsCF0tFHQABczQWXcWTGwSfkqTK2QbSL5mMIv3fpf7p95MBe49wdU/2ZEGEdfzIWu9ritySwxYJrkpw2Y3JHdd56Y4Glc8c4FKhDuLzuwkKTFO/TxG7sro7G9Rc9YdZBw2MjIzGC+MM5Xg54/jS699JrlTSQ4CWaNAXFIV2imLQtctS6ZPx2YcalPQC3dAa3UfQwHd3o8sAx8tK7cfCFJUjk91E/In2mqRC1pZS7Oi8cyY9U2tUoT8nRLRG+iDad8w+m204fyp502PYDPQdHfq2krTb/0eVHquX4FwRTPGu8ptFnNrSKgWjJLBYbFoisE/lsH5EwzPNUPCYD4PRCQlRTl0udYyTFXFrB+dvfxFnISdHZ1jDmpSFjeFJBe+GHnhOJksxs2FVLe0S7QriWdcHsADY7f6lwXdxdgIngfEeogr0FkDooG96fGk0xqr5oD/F+tIM4sn/N1R8RIH2OtJjYjWDwz68NTDQiVn4MTYGcULCUBoFz/Xi5NaMw9tLOYIDAXD39vy5vpU2njuoon32zn9NkMfmeCObM0E5U0WOGBgIKSuaEVNy5vQRmVoCMwGfSEkcvbtnsQIW1rC8LPg9cAgNi3GuuaJbqdIWTXUOLzVBkhmsVHO+GkV8WbFnSryJNqaSmRUJGtvvD1zZphETkxrdozbbV5nUU40dnYBm49am+txAYeYq7vpYkDkShJ2/Ziz+BDd9tw== 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)(52116014)(1800799024)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: iU09FYA7EgFGMj/EwWwvweKjqP25NUbXv19aIesGjUN5zGUYXs1tZtK6fYpboDuIW5lD6lGou1wfu3cBbJrQDO7yX3y22t0nZCYhdk2fO9vWrmsUgcnmu85r2NHdDOkH4AiVv7ZkDASOBa0ynd0N4F4abhdslB/2k4EjdbEAeWh3vHrjs/DfR63a542I81P7GACXFD+hHsco8c8U7lO9Il+1uUGdPoF9MnQFptEx58rsixI/jI5zZsW+WywDhGMI+Vvtx41bNfAZkvaz1neSPiKKDyA9fhObVn/b6YEgkn4nKbQcVsaP4BG87o3srB+fiMnGARkMfix0Dls4RqXEBiRzrmKbButJqj/nd49mjwre7YJNbZaMSQC/WvuZEDg/7Tj0CmisHbqAkwRV/mfwDdE6ZUaS2r+7ID8SzuCDUFxxWi6kLE/qNkD9kC0a35wTvioZezeT9O07I2A/zRzuEtHigooIXxJ+QVTF7krgOLx3PqwfqHqEuKbLNjlsdz7NMRiyGTQpo3IImeH1JLy8v1csEwmfbZuZ9ascNGZKa9zQL7D/+72ghmkZh5+gBzL9D3VbXx7w1/+SqONYc+yZRSCGjGsiUPQ81D5FJqmHx6yyP6BtU/6yUAs3NRyJREoWoTAMZYFtoCtdFLvJJUsrHTthVwncgxjbjv6EWvDdzi6PhnsDzliMypfkC7wfkhiDXl5BGHytQcmWcYjCqXjGMKx85JpKKEbz5rV96Wz5T1oTApMiTtYEhc1KkRCnO5NKxqoe2V0m2Uo/pW8jkSkGLCvDP6h64v4e/yGQ+EDjma7t+9vR02/5emnb77sC1G+pYBl+6Am4ZFS7WdEhGVtZe5UDV28K90xgzeO/I+UscvvZkZ/aQs5Ew6dL7Nb62TyKuoC4zSKOgC3+bHoAhYOPbZuyA19odXB+l88FJWbehc0WAlV58coxe/KTlpRoWVCYq0E1tBMAvIRFAvjbmTZ/GGzHgv1LbnP8IVIWifX6B8Mboplxk9eHjKOM4LGvPVrUJjipJVJ4Cov7b4zug1kL6erN1eJTW8Fazg26dnBRHQmyv32he9bTcxeE/kc3kMcUJKp8emx6Yk11nfMttVigSpd87nV9+pPTi+eBAN45l8aN+D0Ph7ajLctatokAJRpi2lNNrvOl/k6sM8mv0Pl5YU1f4LHwM3LHyRlHat7QWt0m/lxUd2LjLvjOcmxDIeLGNLf7/Q/9ZYVlMKcxV3EfR5jD3w86FyRlP9nrwNY8GDo8k3FWYK5VBP7GkPNF2W14YoxfmdRntrA5j8TqjlDnKe5AZP9LWJqXW+F6QEsG4JRVFsGRG1Vr5wgZchd0mhiXGPEwx6j3XwWw6dcIVYWUjVFZ8OPLUHkcxFW6PrJRxvjAY42eZy7vbCGmqYe17nxKdTEgX6+hmOx58VIv435UWIvdmpvZBXPV+GjfTjMBnJXG/OLMRO1B7o+1js8eL3I9qq/HSP+bf9rBOtiAV4WylJGnc6IuAKwHMeT2ttW/BCEpA2OMdE68ZcT2a4V+gqUVoVcUEIVTTLL+vHTexZz1AlUU/q2miI2LWbifVhM1fQ6zB9xwrxfkecdDPioBWgm9ihvA+09IJSh0pDmM4ngUmyMFancx+Xyu9NORVKWZuZI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 92f411d3-ad74-4fef-ac46-08dcc18902a8 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2024 02:28:57.9622 (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: mrTN1Gfp4RKEjJ04yeNDxk7287ISxxFKk5suxmwO800BLYsL/bBquK7wa3J66Yzxx5YI8X7vvt6UxRNKbcligOlbw0Riik2WC85+PHz0V3j0NIJ/ap+hlVZk5kD2cq17 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYRPR01MB12156 Message-ID-Hash: DMY3NMZLQ3JVADKTSZSAB4BFICIPQBA5 X-Message-ID-Hash: DMY3NMZLQ3JVADKTSZSAB4BFICIPQBA5 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 Wed Aug 21 02:29:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 820997 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 1D2DFC3DA4A for ; Wed, 21 Aug 2024 02:29:58 +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 559ED6C1; Wed, 21 Aug 2024 04:29:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 559ED6C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1724207396; bh=zIaNtsMOHeUUGN1oP7AezTBOKzD5+O2snnv/zzXjooQ=; h=To:Cc:In-Reply-To:References:From:Subject:Date:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JBYtnvlOqgYvfJXdmMiHvC5qt8UU7da0wpim1WADf8AQud9DFJaEzLNmresfvasrQ dIFcmClb+ChZ9/i/k96bw0GOOV2wOQhsLDui7E9/ZyIDkD6joRReFgW/x0FnJ4KgVO T1kdKYFD+aYKflEVn3UwItiXOTBPnJfg2/7X3q2k= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D0FE1F805D9; Wed, 21 Aug 2024 04:29:27 +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 4F9F0F805C1; Wed, 21 Aug 2024 04:29:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6D3D2F805AB; Wed, 21 Aug 2024 04:29:21 +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 B84DFF800F0 for ; Wed, 21 Aug 2024 04:29:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B84DFF800F0 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=Fwfiw+9D ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ohY90jVTR8wDYB4U5zPX1AgUCKuWOdatkfjh78pRhmJTHALNnGik+7vKsmnmQp8dSjOYQZdoWX5wzo6FI0VPh0ID6+VNSprUVOQXmXsKs9IxXlmQpLdp+RkU8d7qZ2B2tLdoKzQvnS5VbsES6an5kTwGqNgIWcNixtNKwin+91T6UWVek59dPZJM/UonhZRMIbPvkoXiOWoKAPqlr6tB2ggXC04Sr9Nmt6w7rnxO6PLVrQ0XsL0y6+gL0EDPnl1pAjkS4TBSCuEE0mOk7uPFEoKmjTQSobiU4jqqRMypZCiyNM5trN//v0dRJRvAgr7e9MQdKBo708dd3YzKcR9qqw== 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=Oa5SMgKdJCnTqszeKWed8gdZFx55i/vfT3wfLo+yyWAAfnHzZ/Eae5z1eJyDEyjXMWwpTkZ7GD+d2Y96xZStTDhdV4Dif5k0ibVv+tZy1dm9h997FFsDTbam3jDMgFRvmakILAikzcnDg0rHbxyCaVv7r+vaovs1l361ZxxKMrGo1e0gzkdEwHIVlqPfoyAcgw+/UN2rww6ND8XRDxa4p1dV6IdQrS8zzH6NWamYL3agFT0+xSlsBCoAFHbkSM6ZCYq/DNwFJlylaF33IEkNA8XaY0w4JzzeAIXhoPzBwMjVSgo6za7GfNfCEX9CAclw3yKeQSgUTBJokSfBgJxFEg== 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=Fwfiw+9DngRSJSR4+KnZAEkMZ53l/7frco38t7MZG01dhY201Vk2LRPIZhc+cnLZu89G0SbE+KBaaamXgCNKuqmpVqvi6jG/Vz6X4JINq12348kGetEKEpl1G17rdiVywjXh2tsOC5SUdZ1+yzD4VDOTKHElMU9Rbz2wzXfdE3g= 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 TYRPR01MB12156.jpnprd01.prod.outlook.com (2603:1096:405:ff::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.19; Wed, 21 Aug 2024 02:29:04 +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; Wed, 21 Aug 2024 02:29:04 +0000 Message-ID: <87ikvua9sf.wl-kuninori.morimoto.gx@renesas.com> To: Mark Brown Cc: Linux-ALSA In-Reply-To: <87le0qa9tc.wl-kuninori.morimoto.gx@renesas.com> References: <87le0qa9tc.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH v2 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 Date: Wed, 21 Aug 2024 02:29:04 +0000 X-ClientProxiedBy: TYCP286CA0221.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:3c5::7) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TYRPR01MB12156:EE_ X-MS-Office365-Filtering-Correlation-Id: 141bab90-ad87-476c-a786-08dcc18906a1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|1800799024|376014|38350700014; X-Microsoft-Antispam-Message-Info: dL2d37kUGLyWDTuiyixCfJM3tGdb4hlPErpCkA6CyYbEeJQUh5b1c7wYLHTsMlgXkiIC4dmg3jr/rXLKVhKZuhPXmNfClIKyl2t+4gr4EPZesoo4C1mBD6CErtes391+kjEighqXFSScyUsizjRiGzSgTwq3Vj/eeobJ9bzYr2r4BYos7ie0xa74YhfSkigK6fn5w7Feh5hVXooM0CvezsB5KVXU3c1Y/Yf1r7RJxn49hwVcnqB6LvN89LTYkVmgQECseMKsU12Eb7KtPhsQjbBw2u8+hOLeWwCXBX9K3ioUloOik/wAkqWYllymR7hC1ZmmuDuaRy5i1H5b8QC+PfiXSSDBskskJ8KT+0/ezJWQ+/znwtVWExSLY1KZ0BA/pvqCTEOvqpJ8fHNSDe5tk67e2tKw8ITTaR+v2eLAu49Wbueiv6lXmPLFI/K0ndLahF+kAkL1ltiAeik528xa/amArThqxuzv41OyI3O7RfiZVKqexqOnFRQ5tgN2VeGbV9b3xZAdocQ9o8NC1nPRsiaMrJj7r69wqzBRD6xPIe84e+id+aRNPiiRXNl88lqQhCzGveOfJpL65Puwtw1tUo/cfZ3qbsx/rH4hvybF6NwgNV7no2D8HwxgxYVt7EChopO1GIbymRZVQj0iKjL3fd+YFPC8157KVcNngzuaUiAy+pPP/pcdX7yu0A0K13gy1nAAoS740YA3UNTR0UD9g2tzDX2hx7ylNnkMH8jckOrn1By4OunWrbntbf77v5P+kubO5J4ZJBbiYJ9WrmLeBbrdRbDp+fsDcjU/939hlr/E4D5ZGiAxIPiu+eV6HiWBLUClBzsGnMHvXJw/MvAxK/L4qjSq+NsYp8aD5y4NmOrvG/1LkdWquLeYwHj6az2bE0Lp4d8vHBCYJlCuzGR7BmAcp+m+8PMtp7StneX2AqWuMMexcUvWgduu2TeGYaLuuNycu8W1ompVUO+VNOW2ZhDvr7ecH1yo23AAYT/lJeWcOBbgh0Uc1v5Kc0/BxX9wNHTM8AkzYSV9DEPepDpplT4Vbbmi5i/LfYh4BRCX9LPr+te7GmKWxcgn5o6hrGcRRK5RMdkIsGgfagKzhvGs9P2XALJemuEDXl8rAg37FWZE9baSh1Wik+BM91aelAFGmcESxP7OAWQH3EPEM/EVEVugY0mAcSqy/yAwTy9unP295U6SKoSo5JsBvJD5Al0sjqE3HQqEgkGLBNKSDlVh3GQHHzO+4e2HraabJaUb6j6S8+gGmxmkZAxwOuzp4biP70Wny6I5tGVqHvwaulu0kibfEN2YJ+89HPVZ0CjOHd0M6vZ4POvxzaRBPtd2qj8JznQC8By8ixKgTTu5JRr+A199eQl8i5zq2RvBMCb8L7IfWRBg46Yz+v4M8gdUg02KMyTwaoGbtJfTcA8+SKxRHg== 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)(52116014)(1800799024)(376014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: S+NIGggjS0p5YokkVDj3PhBdAaJno0UT+dVFnU9CnaeeBOBKU3e0+AS7fbah6md9d5PQcU4PACOQsNKyl9TyMdKJhKZyym1qi7Bh7anvW51KuDQcTFX68OtCEtG5GyoVoJjVDiQPfQe7t1/J4e6Hu+LG7l9IFTwc4wwpIOAVBK54R0tMkz+XfVLxfQ2u+FBYSP6bmM/m+Sg9oiu4mO33J/psJT8NjWbz9YON1rZeB/h/duRuwtSn/wamEMFrkqdrifCM7fAwhS5YNdd3GCsWIRLe8KOla35jRVFuxqSkzJzdQptUg+f2/vKdDhbZEcwaUtDzo/+YYvTY/QPK5pz05orvJw1EHB4DGGM1VssHjqKKt7TfzuDPogXlBltV8kbqXvhfVKlr7VnwuY51T5SFXyQreUTjCMYiTHT/DQ1YDfGZfOM9hpT3Lch/LbNvJMMxiu51q3FWVwG/p0vF7pPN+MJx1u9juTE/gj/sJy34KfwexI/f+5HRCzx+Dnjbt2zkVeMEBtCJ+9o79HXNul4dlJW3rfJcjPjBmh7C2gTaArPz/lNC6ZbtRntFWowjgVcw+RY0xJlP3oOkB+xfh0WOX91HMilzwduTGTnPLm2AfXDrTII4cj4zeChoVMOy0syPfIA0/tjpXvvcmCc+MN6LWhD+KpSSFURF/WzKJ4lBHvUzGDtO/fV637jMleQca0dBIPmw+qGtMjoQvMTxNePTrBHn2DxOFLcD5nGmSf3vKOaehz/oS9wShKiYMO9+AXgJk5BKt644/AEHl+cm5Gcu07AeHA8RLfTX6AkMR//kXLC42CyVU73GfFkthP3Y6kTbnvRmcxfUdCaV2S2094UwXirUYIubLgDah9RKWIAFYMum4Tov44MLnLjOlUgoyQwGHstc8RC9Y2HOjq6sOwkE8n/KqhlW2K/KJjySd1h4y542kuMyyaUMe6kwFlRvyHo1BUkPs8vikv0BkLZVin+Vz3fJIcG7ru6YKCLKO+TnO18UyR3TtCgaMHT1BpXTKw6T39hVKmB8wXtl71/FPXZjAn1nJ8F5v4ce6lAgvuPMapIyBY5iCR43SMEiLKG9dnm7rVitY5lskylL28aervp8wqO7SDEHTwMbVryg3LDn82pbUlFNamZJfmaGyRYI5TOHdUdApT+4IhfqNkn2q8f5MN0olPDW505eLTOFZ20UHTO8adhX0LhUvxsG/HC/6mpJfKK3Bs/mmEklI2/hCMPJf9J5zCqGGXwC9+iVd1arvtfvgnBQM1j/ajKUO3Xk5o0v5HvVdtn/S0r7nf+sr1NqpoamxKxgakab99w7qr4npMR0fuRpYwIjHkJiRHTUZLEOuVH8IkP0Xz3hXbhG/GCAoBjBeAkclv1m8ai9/EH8Jw+kD7AElR/eeAi0m3lzK1PsYz7MZoE/hD8SCmMVPNjPZbeiCKD3nzAwvYa9K+iSLPshz+iTkN+5xKgbEwiRa9Wta90yV6/fQgVjL+T7a45Q6Al658fcXhmRHbmeWRhtJyTgW0MnvkGjhbntAqBAV4M86Ci89i2/usI+PnscB10QoViG7i7z0Dh31bS657edVY0k0qI9BeV4hZE99nrbFj6AS/bvgszRt3SPSDMUEYRQj4NKp6A9yaukpg7z8+jzXS8= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: 141bab90-ad87-476c-a786-08dcc18906a1 X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2024 02:29:04.6430 (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: lAM5KxSYNGqZng0fBVKTrHyeKOHEoUvtm3wUbIGHQuvQ6WynB3+WsdKpE84fhgjb63BsMZcC5lB5bDMPCdm4upIQCzQ+roKcIZ+I6bRsOGws03TQp3C3CPKr4n28OwM4 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYRPR01MB12156 Message-ID-Hash: 4I2XMG4F2U2OX3HUOBSFUJGERVYT42VY X-Message-ID-Hash: 4I2XMG4F2U2OX3HUOBSFUJGERVYT42VY 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