Skip to content

Commit

Permalink
ASoC: Fix active count tracking for CODEC to CODEC links
Browse files Browse the repository at this point in the history
For CODEC to CODEC links we need to make sure to also manage the 'active' field
of the cpu_dai CODEC.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Mar 6, 2014
1 parent 24894b7 commit a1a0cc0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ void snd_soc_runtime_activate(struct snd_soc_pcm_runtime *rtd, int stream)

cpu_dai->active++;
codec_dai->active++;
rtd->codec->active++;
if (cpu_dai->codec)
cpu_dai->codec->active++;
codec_dai->codec->active++;
}

/**
Expand Down Expand Up @@ -91,7 +93,9 @@ void snd_soc_runtime_deactivate(struct snd_soc_pcm_runtime *rtd, int stream)

cpu_dai->active--;
codec_dai->active--;
rtd->codec->active--;
if (cpu_dai->codec)
cpu_dai->codec->active--;
codec_dai->codec->active--;
}

/**
Expand Down

0 comments on commit a1a0cc0

Please sign in to comment.