aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-07-11 05:28:13 -0400
committerTakashi Iwai <tiwai@suse.de>2011-07-11 05:28:13 -0400
commit6e969d9155a4ee7bce800dfbee02099105ca5b97 (patch)
tree9a6ca0b2c73295cfd990350a38c665bd4f365e0a /sound/pci
parent21ce0b65272b85f122455818b0c69740945b451a (diff)
ALSA: hda - Set line-out pin-ctls properly when indep-HP mode changes
When Independent-HP mode is changed for VIA, the driver needs to re-issue the auto-mute check so that the line-out pins are set properly without influence of HP pin state. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_via.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index be2e57b44507..27de53fb331e 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -615,6 +615,7 @@ static void via_auto_init_speaker_out(struct hda_codec *codec)
615} 615}
616 616
617static bool is_smart51_pins(struct hda_codec *codec, hda_nid_t pin); 617static bool is_smart51_pins(struct hda_codec *codec, hda_nid_t pin);
618static void via_hp_automute(struct hda_codec *codec);
618 619
619static void via_auto_init_analog_input(struct hda_codec *codec) 620static void via_auto_init_analog_input(struct hda_codec *codec)
620{ 621{
@@ -801,6 +802,7 @@ static int via_independent_hp_put(struct snd_kcontrol *kcontrol,
801 802
802 /* update jack power state */ 803 /* update jack power state */
803 set_widgets_power_state(codec); 804 set_widgets_power_state(codec);
805 via_hp_automute(codec);
804 return 1; 806 return 1;
805} 807}
806 808
@@ -1532,19 +1534,18 @@ static void via_line_automute(struct hda_codec *codec, int present)
1532static void via_hp_automute(struct hda_codec *codec) 1534static void via_hp_automute(struct hda_codec *codec)
1533{ 1535{
1534 int present = 0; 1536 int present = 0;
1537 int nums;
1535 struct via_spec *spec = codec->spec; 1538 struct via_spec *spec = codec->spec;
1536 1539
1537 if (!spec->hp_independent_mode && spec->autocfg.hp_pins[0]) { 1540 if (!spec->hp_independent_mode && spec->autocfg.hp_pins[0])
1538 int nums;
1539 present = snd_hda_jack_detect(codec, spec->autocfg.hp_pins[0]); 1541 present = snd_hda_jack_detect(codec, spec->autocfg.hp_pins[0]);
1540 if (spec->smart51_enabled) 1542
1541 nums = spec->autocfg.line_outs + spec->smart51_nums; 1543 if (spec->smart51_enabled)
1542 else 1544 nums = spec->autocfg.line_outs + spec->smart51_nums;
1543 nums = spec->autocfg.line_outs; 1545 else
1544 toggle_output_mutes(codec, nums, 1546 nums = spec->autocfg.line_outs;
1545 spec->autocfg.line_out_pins, 1547 toggle_output_mutes(codec, nums, spec->autocfg.line_out_pins, present);
1546 present); 1548
1547 }
1548 via_line_automute(codec, present); 1549 via_line_automute(codec, present);
1549} 1550}
1550 1551