Skip to content

Commit

Permalink
ALSA: hda - Fix power-map regression for HP dv6 & co
Browse files Browse the repository at this point in the history
The recent fix for power-map controls (commit b0791dd) caused
regressions on some other HP laptops.  They have fixed pins but these
pins are exposed as jack-detectable.  Thus the driver tries to control
the power-map dynamically per jack detection where it never gets on.

This patch adds the check of connection and it assumes the no jack
detection is available for fixed pins no matter what pin capability
says.

BugLink: http://bugs.launchpad.net/bugs/1013183
Reported-by: Luis Henriques <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jun 26, 2012
1 parent 09a6071 commit 6e1c39c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -4367,7 +4367,7 @@ static int stac92xx_init(struct hda_codec *codec)
AC_PINCTL_IN_EN);
for (i = 0; i < spec->num_pwrs; i++) {
hda_nid_t nid = spec->pwr_nids[i];
int pinctl, def_conf;
unsigned int pinctl, def_conf;

def_conf = snd_hda_codec_get_pincfg(codec, nid);
def_conf = get_defcfg_connect(def_conf);
Expand All @@ -4376,6 +4376,11 @@ static int stac92xx_init(struct hda_codec *codec)
stac_toggle_power_map(codec, nid, 0);
continue;
}
if (def_conf == AC_JACK_PORT_FIXED) {
/* no need for jack detection for fixed pins */
stac_toggle_power_map(codec, nid, 1);
continue;
}
/* power on when no jack detection is available */
/* or when the VREF is used for controlling LED */
if (!spec->hp_detect ||
Expand Down

0 comments on commit 6e1c39c

Please sign in to comment.