[PATCH] ASoC: Consider the codec->active also when changing bias level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Take into account the codec->active (playback/capture activity)
when changing the bias level.

Fixes the following scenario: if during active playback/capture the DAPM
routes has been modified in a way, that there will be no complete route
(for example muting the output) DAPM would set the codec into
BIAS_STANDBY, which could disable the clocks from the codec (codec is
master), which breaks the playback with error since the clocks are
missing from the serial bus and no data is shifted out/in.

With this patch during active use (playback/capture) the DAPM will not
set the bias to STANDBY, thus keeping the playback/capture running.
When no playback/capture is running, the DAPM will handle the complete
paths in a same way it used to: setting the bias to ON/STANDBY based on
complete paths.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxx>
---
 sound/soc/soc-dapm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 9babda5..567be82 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -977,7 +977,7 @@ static int dapm_power_widgets(struct snd_soc_codec *codec, int event)
 				continue;
 
 			power = w->power_check(w);
-			if (power)
+			if (power || codec->active)
 				sys_power = 1;
 
 			if (w->power == power)
-- 
1.6.5.rc1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux