dpcm->be = be;
dpcm->fe = fe;
- be->dpcm[stream].runtime = fe->dpcm[stream].runtime;
dpcm->state = SND_SOC_DPCM_LINK_STATE_NEW;
snd_soc_dpcm_stream_lock_irq(fe, stream);
list_add(&dpcm->list_be, &fe->dpcm[stream].be_clients);
struct snd_soc_dapm_widget_list *list = *list_;
struct snd_soc_pcm_runtime *be;
struct snd_soc_dapm_widget *widget;
+ struct snd_pcm_substream *fe_substream = snd_soc_dpcm_get_substream(fe, stream);
int i, new = 0, err;
/* don't connect if FE is not running */
- if (!fe->dpcm[stream].runtime && !fe->fe_compr)
+ if (!fe_substream->runtime && !fe->fe_compr)
return new;
/* Create any new FE <--> BE connections */
int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream)
{
+ struct snd_pcm_substream *fe_substream = snd_soc_dpcm_get_substream(fe, stream);
struct snd_soc_pcm_runtime *be;
struct snd_soc_dpcm *dpcm;
int err, count = 0;
dev_dbg(be->dev, "ASoC: open %s BE %s\n",
stream ? "capture" : "playback", be->dai_link->name);
- be_substream->runtime = be->dpcm[stream].runtime;
+ be_substream->runtime = fe_substream->runtime;
err = __soc_pcm_open(be, be_substream);
if (err < 0) {
be->dpcm[stream].users--;
dpcm->state = SND_SOC_DPCM_LINK_STATE_FREE;
dpcm_be_disconnect(fe, stream);
-
- fe->dpcm[stream].runtime = NULL;
}
static int dpcm_fe_dai_close(struct snd_pcm_substream *fe_substream)
int stream = fe_substream->stream;
snd_soc_dpcm_mutex_lock(fe);
- fe->dpcm[stream].runtime = fe_substream->runtime;
ret = dpcm_path_get(fe, stream, &list);
if (ret < 0)