Merge branches 'upstream-fixes' and 'magicmouse' into for-linus
[pandora-kernel.git] / sound / soc / soc-pcm.c
index b575939..2879c88 100644 (file)
@@ -290,6 +290,9 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
        codec_dai->active--;
        codec->active--;
 
+       if (!cpu_dai->active && !codec_dai->active)
+               rtd->rate = 0;
+
        /* Muting the DAC suppresses artifacts caused during digital
         * shutdown, for example from stopping clocks.
         */