soc-pcm.c (bcb1fd1fcd6507ba5a1f8610550135dc367aedb7) soc-pcm.c (d2e24d64652bf9d272e5496ae8a562bc64facff3)
1// SPDX-License-Identifier: GPL-2.0+
2//
3// soc-pcm.c -- ALSA SoC PCM
4//
5// Copyright 2005 Wolfson Microelectronics PLC.
6// Copyright 2005 Openedhand Ltd.
7// Copyright (C) 2010 Slimlogic Ltd.
8// Copyright (C) 2010 Texas Instruments Inc.

--- 1238 unchanged lines hidden (view full) ---

1247 struct snd_pcm_substream *fe_substream, *be_substream;
1248
1249 /* reparent if BE is connected to other FEs */
1250 if (!be->dpcm[stream].users)
1251 return;
1252
1253 be_substream = snd_soc_dpcm_get_substream(be, stream);
1254
1// SPDX-License-Identifier: GPL-2.0+
2//
3// soc-pcm.c -- ALSA SoC PCM
4//
5// Copyright 2005 Wolfson Microelectronics PLC.
6// Copyright 2005 Openedhand Ltd.
7// Copyright (C) 2010 Slimlogic Ltd.
8// Copyright (C) 2010 Texas Instruments Inc.

--- 1238 unchanged lines hidden (view full) ---

1247 struct snd_pcm_substream *fe_substream, *be_substream;
1248
1249 /* reparent if BE is connected to other FEs */
1250 if (!be->dpcm[stream].users)
1251 return;
1252
1253 be_substream = snd_soc_dpcm_get_substream(be, stream);
1254
1255 list_for_each_entry(dpcm, &be->dpcm[stream].fe_clients, list_fe) {
1255 for_each_dpcm_fe(be, stream, dpcm) {
1256 if (dpcm->fe == fe)
1257 continue;
1258
1259 dev_dbg(fe->dev, "reparent %s path %s %s %s\n",
1260 stream ? "capture" : "playback",
1261 dpcm->fe->dai_link->name,
1262 stream ? "<-" : "->", dpcm->be->dai_link->name);
1263

--- 1950 unchanged lines hidden (view full) ---

3214 * are not running, paused or suspended for the specified stream direction.
3215 */
3216int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe,
3217 struct snd_soc_pcm_runtime *be, int stream)
3218{
3219 struct snd_soc_dpcm *dpcm;
3220 int state;
3221
1256 if (dpcm->fe == fe)
1257 continue;
1258
1259 dev_dbg(fe->dev, "reparent %s path %s %s %s\n",
1260 stream ? "capture" : "playback",
1261 dpcm->fe->dai_link->name,
1262 stream ? "<-" : "->", dpcm->be->dai_link->name);
1263

--- 1950 unchanged lines hidden (view full) ---

3214 * are not running, paused or suspended for the specified stream direction.
3215 */
3216int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe,
3217 struct snd_soc_pcm_runtime *be, int stream)
3218{
3219 struct snd_soc_dpcm *dpcm;
3220 int state;
3221
3222 list_for_each_entry(dpcm, &be->dpcm[stream].fe_clients, list_fe) {
3222 for_each_dpcm_fe(be, stream, dpcm) {
3223
3224 if (dpcm->fe == fe)
3225 continue;
3226
3227 state = dpcm->fe->dpcm[stream].state;
3228 if (state == SND_SOC_DPCM_STATE_START ||
3229 state == SND_SOC_DPCM_STATE_PAUSED ||
3230 state == SND_SOC_DPCM_STATE_SUSPEND)

--- 10 unchanged lines hidden (view full) ---

3241 * running, paused or suspended for the specified stream direction.
3242 */
3243int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe,
3244 struct snd_soc_pcm_runtime *be, int stream)
3245{
3246 struct snd_soc_dpcm *dpcm;
3247 int state;
3248
3223
3224 if (dpcm->fe == fe)
3225 continue;
3226
3227 state = dpcm->fe->dpcm[stream].state;
3228 if (state == SND_SOC_DPCM_STATE_START ||
3229 state == SND_SOC_DPCM_STATE_PAUSED ||
3230 state == SND_SOC_DPCM_STATE_SUSPEND)

--- 10 unchanged lines hidden (view full) ---

3241 * running, paused or suspended for the specified stream direction.
3242 */
3243int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe,
3244 struct snd_soc_pcm_runtime *be, int stream)
3245{
3246 struct snd_soc_dpcm *dpcm;
3247 int state;
3248
3249 list_for_each_entry(dpcm, &be->dpcm[stream].fe_clients, list_fe) {
3249 for_each_dpcm_fe(be, stream, dpcm) {
3250
3251 if (dpcm->fe == fe)
3252 continue;
3253
3254 state = dpcm->fe->dpcm[stream].state;
3255 if (state == SND_SOC_DPCM_STATE_START ||
3256 state == SND_SOC_DPCM_STATE_PAUSED ||
3257 state == SND_SOC_DPCM_STATE_SUSPEND ||

--- 148 unchanged lines hidden ---
3250
3251 if (dpcm->fe == fe)
3252 continue;
3253
3254 state = dpcm->fe->dpcm[stream].state;
3255 if (state == SND_SOC_DPCM_STATE_START ||
3256 state == SND_SOC_DPCM_STATE_PAUSED ||
3257 state == SND_SOC_DPCM_STATE_SUSPEND ||

--- 148 unchanged lines hidden ---