]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - sound/soc/soc-pcm.c
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[linux.git] / sound / soc / soc-pcm.c
index 3f6375499102068a5549121a902da3f109f531e2..5e7ae47a9658c3200241007b02d11b63bb45d429 100644 (file)
@@ -135,7 +135,6 @@ bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_rtdcom_list *rtdcom;
        struct snd_soc_component *component;
-       int i;
        bool ignore = true;
 
        if (!rtd->pmdown_time || rtd->dai_link->ignore_pmdown_time)
@@ -147,10 +146,6 @@ bool snd_soc_runtime_ignore_pmdown_time(struct snd_soc_pcm_runtime *rtd)
                ignore &= !component->driver->use_pmdown_time;
        }
 
-       /* this will be removed */
-       for (i = 0; i < rtd->num_codecs; i++)
-               ignore &= rtd->codec_dais[i]->component->ignore_pmdown_time;
-
        return ignore;
 }
 
@@ -503,7 +498,7 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
                if (__ret < 0) {
                        dev_err(component->dev,
                                "ASoC: can't open component %s: %d\n",
-                               component->name, ret);
+                               component->name, __ret);
                        ret = __ret;
                }
        }
@@ -961,7 +956,7 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
                if (__ret < 0) {
                        dev_err(component->dev,
                                "ASoC: %s hw params failed: %d\n",
-                               component->name, ret);
+                               component->name, __ret);
                        ret = __ret;
                }
        }
@@ -1784,14 +1779,15 @@ static int dpcm_apply_symmetry(struct snd_pcm_substream *fe_substream,
 
                /* Symmetry only applies if we've got an active stream. */
                if (rtd->cpu_dai->active) {
-                       err = soc_pcm_apply_symmetry(be_substream, rtd->cpu_dai);
+                       err = soc_pcm_apply_symmetry(fe_substream,
+                                                    rtd->cpu_dai);
                        if (err < 0)
                                return err;
                }
 
                for (i = 0; i < rtd->num_codecs; i++) {
                        if (rtd->codec_dais[i]->active) {
-                               err = soc_pcm_apply_symmetry(be_substream,
+                               err = soc_pcm_apply_symmetry(fe_substream,
                                                             rtd->codec_dais[i]);
                                if (err < 0)
                                        return err;
@@ -1871,8 +1867,10 @@ int dpcm_be_dai_shutdown(struct snd_soc_pcm_runtime *fe, int stream)
                        continue;
 
                if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
-                   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN))
-                       continue;
+                   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_OPEN)) {
+                       soc_pcm_hw_free(be_substream);
+                       be->dpcm[stream].state = SND_SOC_DPCM_STATE_HW_FREE;
+               }
 
                dev_dbg(be->dev, "ASoC: close BE %s\n",
                        be->dai_link->name);