瀏覽代碼

[ALSA] hda: disable power management on fixed ports

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>
Matthew Ranostay 17 年之前
父節點
當前提交
bce6c2b5b4
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      sound/pci/hda/patch_sigmatel.c

+ 4 - 0
sound/pci/hda/patch_sigmatel.c

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