Skip to content

Commit

Permalink
ASoC: Fix bias power down of non-DAPM codec
Browse files Browse the repository at this point in the history
Currently bias of non-DAPM codec will be powered down (standby/off) whenever
there is a stream stop. This is wrong in simultaneous playback/capture since
the bias is put down immediately after stopping the first stream.

Fix this by using the codec->active count when figuring out the needed bias
level after stream stop.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Jarkko Nikula authored and Mark Brown committed Dec 13, 2010
1 parent a096862 commit 862af8a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,9 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
case SND_SOC_DAPM_STREAM_RESUME:
sys_power = 1;
break;
case SND_SOC_DAPM_STREAM_STOP:
sys_power = !!codec->active;
break;
case SND_SOC_DAPM_STREAM_SUSPEND:
sys_power = 0;
break;
Expand Down

0 comments on commit 862af8a

Please sign in to comment.