diff options
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ad7f9528d751..9cf39cecfb3e 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -566,16 +566,18 @@ static int soc_codec_close(struct snd_pcm_substream *substream) platform->pcm_ops->close(substream); cpu_dai->runtime = NULL; - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - /* start delayed pop wq here for playback streams */ - codec_dai->pop_wait = 1; - schedule_delayed_work(&card->delayed_work, - msecs_to_jiffies(card->pmdown_time)); - } else { - /* capture streams can be powered down now */ - snd_soc_dapm_stream_event(codec, - codec_dai->capture.stream_name, - SND_SOC_DAPM_STREAM_STOP); + if (!codec->active) { + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { + /* start delayed pop wq here for playback streams */ + codec_dai->pop_wait = 1; + schedule_delayed_work(&card->delayed_work, + msecs_to_jiffies(card->pmdown_time)); + } else { + /* capture streams can be powered down now */ + snd_soc_dapm_stream_event(codec, + codec_dai->capture.stream_name, + SND_SOC_DAPM_STREAM_STOP); + } } mutex_unlock(&pcm_mutex); @@ -749,8 +751,8 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream) mutex_lock(&pcm_mutex); /* apply codec digital mute */ - if (!codec->active) - snd_soc_dai_digital_mute(codec_dai, 1); + /* Codec to take of no active stream */ + snd_soc_dai_digital_mute(codec_dai, 1); /* free any machine hw params */ if (machine->ops && machine->ops->hw_free) |