[alsa-devel] [PATCH 084/112] ALSA: hda - Don't skip amp init for activated paths

Takashi Iwai tiwai at suse.de
Tue Jan 8 12:39:17 CET 2013


activate_amp() in the generic parser checks whether the given NID is
included in any active paths and skips it if found.  This was a
workaround for avoiding disabling the widgets in the active paths when
one path is disabled, thus it shouldn't be applied to the case for
path activation.  Due to this wrong check, some analog loopback paths
haven't been initialized correctly.

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/pci/hda/hda_generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index c5a9b84..08eced0 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -463,7 +463,7 @@ static void activate_amp(struct hda_codec *codec, hda_nid_t nid, int dir,
 {
 	int val;
 	if (is_ctl_associated(codec, nid, dir, idx) ||
-	    is_active_nid(codec, nid, dir, idx))
+	    (!enable && is_active_nid(codec, nid, dir, idx)))
 		return;
 	val = get_amp_val_to_activate(codec, nid, dir, enable);
 	snd_hda_codec_amp_stereo(codec, nid, dir, idx, 0xff, val);
-- 
1.8.0.1



More information about the Alsa-devel mailing list