From: Seth Forshee Date: Mon, 16 Apr 2007 13:36:42 +0000 (+0200) Subject: [ALSA] ASoC DAPM switching for reentrant codec paths X-Git-Tag: v2.6.22-rc1~22^2~49 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e39221eba72e4af37b40e71749b0c18bb16b9a6;p=linux-2.6 [ALSA] ASoC DAPM switching for reentrant codec paths This patch fixes an issue whereby power was applied to any inactive analog path that would leave and reenter a codec (e.g. ACOP -> ACIN on WM8753). This change now checks for such paths and DAPM will power them down when not in use. Signed-off-by: Seth Forshee Signed-off-by: Liam Girdwood Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c index 7caf8c7b0a..96bce55572 100644 --- a/sound/soc/soc-dapm.c +++ b/sound/soc/soc-dapm.c @@ -882,13 +882,15 @@ int snd_soc_dapm_connect_input(struct snd_soc_codec *codec, const char *sink, if (wsink->id == snd_soc_dapm_input) { if (wsource->id == snd_soc_dapm_micbias || wsource->id == snd_soc_dapm_mic || - wsink->id == snd_soc_dapm_line) + wsink->id == snd_soc_dapm_line || + wsink->id == snd_soc_dapm_output) wsink->ext = 1; } if (wsource->id == snd_soc_dapm_output) { if (wsink->id == snd_soc_dapm_spk || wsink->id == snd_soc_dapm_hp || - wsink->id == snd_soc_dapm_line) + wsink->id == snd_soc_dapm_line || + wsink->id == snd_soc_dapm_input) wsource->ext = 1; }