ASoC: snd_soc_component_driver has pmdown_time
[sfrench/cifs-2.6.git] / sound / soc / soc-pcm.c
index daaa670ee9b767bca5e305a1f85232912b55a951..8075856668c23b10e0f16eebb78cb59b8c7a233a 100644 (file)
@@ -133,16 +133,25 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream)
  */
 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)
                return true;
 
+       for_each_rtdcom(rtd, rtdcom) {
+               component = rtdcom->component;
+
+               ignore &= !component->driver->pmdown_time;
+       }
+
+       /* this will be removed */
        for (i = 0; i < rtd->num_codecs; i++)
                ignore &= rtd->codec_dais[i]->component->ignore_pmdown_time;
 
-       return rtd->cpu_dai->component->ignore_pmdown_time && ignore;
+       return ignore;
 }
 
 /**