]> git.karo-electronics.de Git - linux-beck.git/blobdiff - sound/soc/soc-pcm.c
Merge remote-tracking branch 'asoc/topic/core' into asoc-next
[linux-beck.git] / sound / soc / soc-pcm.c
index 6006b371b79d1ca881092ea993033ce415e0b828..73bb8eefa4913d2b77b468a5dabe22566c61687b 100644 (file)
@@ -383,8 +383,7 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
        /* Muting the DAC suppresses artifacts caused during digital
         * shutdown, for example from stopping clocks.
         */
-       if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-               snd_soc_dai_digital_mute(codec_dai, 1);
+       snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
 
        if (cpu_dai->driver->ops->shutdown)
                cpu_dai->driver->ops->shutdown(substream, cpu_dai);
@@ -488,7 +487,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
        snd_soc_dapm_stream_event(rtd, substream->stream,
                        SND_SOC_DAPM_STREAM_START);
 
-       snd_soc_dai_digital_mute(codec_dai, 0);
+       snd_soc_dai_digital_mute(codec_dai, 0, substream->stream);
 
 out:
        mutex_unlock(&rtd->pcm_mutex);
@@ -586,7 +585,7 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
 
        /* apply codec digital mute */
        if (!codec->active)
-               snd_soc_dai_digital_mute(codec_dai, 1);
+               snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
 
        /* free any machine hw params */
        if (rtd->dai_link->ops && rtd->dai_link->ops->hw_free)
@@ -1243,6 +1242,7 @@ static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
                if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
                    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
                    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
+                   (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) &&
                    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP))
                        continue;