diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_via.c | 21 |
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 | ||
617 | static bool is_smart51_pins(struct hda_codec *codec, hda_nid_t pin); | 617 | static bool is_smart51_pins(struct hda_codec *codec, hda_nid_t pin); |
618 | static void via_hp_automute(struct hda_codec *codec); | ||
618 | 619 | ||
619 | static void via_auto_init_analog_input(struct hda_codec *codec) | 620 | static 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) | |||
1532 | static void via_hp_automute(struct hda_codec *codec) | 1534 | static 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 | ||