Skip to content

Commit

Permalink
Merge remote-tracking branch 'asoc/fix/core' into asoc-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Brown committed Dec 12, 2013
2 parents 374b105 + 7f62b6e commit 2ff7085
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,12 +600,13 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
struct snd_soc_platform *platform = rtd->platform;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
struct snd_soc_dai *codec_dai = rtd->codec_dai;
struct snd_soc_codec *codec = rtd->codec;
bool playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;

mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);

/* apply codec digital mute */
if (!codec->active)
if ((playback && codec_dai->playback_active == 1) ||
(!playback && codec_dai->capture_active == 1))
snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);

/* free any machine hw params */
Expand Down

0 comments on commit 2ff7085

Please sign in to comment.