ASoC: soc-pcm: Don't reconnect an already active BE
[linux-2.6-microblaze.git] / sound / soc / soc-pcm.c
index 48f71bb..e30cb5a 100644 (file)
@@ -1395,6 +1395,10 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
                if (!fe->dpcm[stream].runtime && !fe->fe_compr)
                        continue;
 
+               if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_NEW) &&
+                   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_CLOSE))
+                       continue;
+
                /* newly connected FE and BE */
                err = dpcm_be_connect(fe, be, stream);
                if (err < 0) {