ALSA: hda - Fix the logic to detect VIA analog low-current mode
authorTakashi Iwai <tiwai@suse.de>
Tue, 24 Jan 2012 12:58:36 +0000 (13:58 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 2 Feb 2012 09:16:32 +0000 (10:16 +0100)
The analog low-current mode must be enabled when the no stream is
running but the current detection checks it in a wrong way.

Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=741128

Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_via.c

index fb1f0ff..de43cd9 100644 (file)
@@ -1051,7 +1051,7 @@ static void analog_low_current_mode(struct hda_codec *codec)
        bool enable;
        unsigned int verb, parm;
 
-       enable = is_aa_path_mute(codec) && (spec->opened_streams != 0);
+       enable = is_aa_path_mute(codec) && !spec->opened_streams;
 
        /* decide low current mode's verb & parameter */
        switch (spec->codec_type) {