Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353198
b: refs/heads/master
c: 92603c5
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Jan 22, 2013
1 parent 501ac7e commit da2ba17
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a607148ff3b9f40427c0f0d5fa039a3a758735c7
refs/heads/master: 92603c594579e744a13b06efbbebb126db254655
19 changes: 16 additions & 3 deletions trunk/sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1889,6 +1889,13 @@ static int indep_hp_put(struct snd_kcontrol *kcontrol,
*dacp = 0;
else
*dacp = spec->alt_dac_nid;

/* update HP auto-mute state too */
if (spec->hp_automute_hook)
spec->hp_automute_hook(codec, NULL);
else
snd_hda_gen_hp_automute(codec, NULL);

ret = 1;
}
unlock:
Expand Down Expand Up @@ -3467,10 +3474,16 @@ static void call_update_outputs(struct hda_codec *codec)
void snd_hda_gen_hp_automute(struct hda_codec *codec, struct hda_jack_tbl *jack)
{
struct hda_gen_spec *spec = codec->spec;
hda_nid_t *pins = spec->autocfg.hp_pins;
int num_pins = ARRAY_SIZE(spec->autocfg.hp_pins);

/* No detection for the first HP jack during indep-HP mode */
if (spec->indep_hp_enabled) {
pins++;
num_pins--;
}

spec->hp_jack_present =
detect_jacks(codec, ARRAY_SIZE(spec->autocfg.hp_pins),
spec->autocfg.hp_pins);
spec->hp_jack_present = detect_jacks(codec, num_pins, pins);
if (!spec->detect_hp || (!spec->automute_speaker && !spec->automute_lo))
return;
call_update_outputs(codec);
Expand Down

0 comments on commit da2ba17

Please sign in to comment.