]> err.no Git - linux-2.6/commitdiff
[ALSA] hda: disable power management on fixed ports
authorMatthew Ranostay <mranostay@embeddedalley.com>
Fri, 29 Feb 2008 11:07:43 +0000 (12:07 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 24 Apr 2008 10:00:19 +0000 (12:00 +0200)
Power management can't be enabled on fixed ports, since the presence
will always return false and prevent output.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_sigmatel.c

index 47d3536a6576564d282862e20d0d445907b7b154..9b242a2636375855c5b8fc59d360e853cc148aa4 100644 (file)
@@ -3016,12 +3016,16 @@ static int stac92xx_init(struct hda_codec *codec)
                                        ? STAC_HP_EVENT : STAC_PWR_EVENT;
                int pinctl = snd_hda_codec_read(codec, spec->pwr_nids[i],
                                        0, AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
+               int def_conf = snd_hda_codec_read(codec, spec->pwr_nids[i],
+                                       0, AC_VERB_GET_CONFIG_DEFAULT, 0);
                /* outputs are only ports capable of power management
                 * any attempts on powering down a input port cause the
                 * referenced VREF to act quirky.
                 */
                if (pinctl & AC_PINCTL_IN_EN)
                        continue;
+               if (get_defcfg_connect(def_conf) != AC_JACK_PORT_FIXED)
+                       continue;
                enable_pin_detect(codec, spec->pwr_nids[i], event | i);
                codec->patch_ops.unsol_event(codec, (event | i) << 26);
        }