]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ALSA: hda - Disable widget power-save for VIA codecs
authorTakashi Iwai <tiwai@suse.de>
Thu, 25 Jun 2015 06:48:54 +0000 (08:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Jul 2015 17:10:02 +0000 (10:10 -0700)
commit 735c75cf4d434862e38c01dcfb2ce8d2fcb9035f upstream.

The widget power-save that was enabled in 4.1 kernel seems resulting
in the silent output on VIA codecs by some reason.  Some widgets get
wrong power states.

As a quick fix, turn this flag off while keeping power_down_unused
flag.  This will bring back to the state of 4.0.x.

Fixes: 688b12cc3ca8 ('ALSA: hda - Use the new power control for VIA codecs')
Reported-and-tested-by: Harald Dunkel <harri@afaics.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/patch_via.c

index bab6c04932aa050ff63f054bf172acf288f5ee5e..0baeecc2213c56cf3d188ef9346c2aa40271c40b 100644 (file)
@@ -238,7 +238,9 @@ static int via_pin_power_ctl_get(struct snd_kcontrol *kcontrol,
                                 struct snd_ctl_elem_value *ucontrol)
 {
        struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
-       ucontrol->value.enumerated.item[0] = codec->power_save_node;
+       struct via_spec *spec = codec->spec;
+
+       ucontrol->value.enumerated.item[0] = spec->gen.power_down_unused;
        return 0;
 }
 
@@ -249,9 +251,9 @@ static int via_pin_power_ctl_put(struct snd_kcontrol *kcontrol,
        struct via_spec *spec = codec->spec;
        bool val = !!ucontrol->value.enumerated.item[0];
 
-       if (val == codec->power_save_node)
+       if (val == spec->gen.power_down_unused)
                return 0;
-       codec->power_save_node = val;
+       /* codec->power_save_node = val; */ /* widget PM seems yet broken */
        spec->gen.power_down_unused = val;
        analog_low_current_mode(codec);
        return 1;