diff options
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 70ba45e30414..1b3c89c520c8 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -169,7 +169,7 @@ struct alc_spec { | |||
169 | unsigned int auto_mic_valid_imux:1; /* valid imux for auto-mic */ | 169 | unsigned int auto_mic_valid_imux:1; /* valid imux for auto-mic */ |
170 | unsigned int automute:1; /* HP automute enabled */ | 170 | unsigned int automute:1; /* HP automute enabled */ |
171 | unsigned int detect_line:1; /* Line-out detection enabled */ | 171 | unsigned int detect_line:1; /* Line-out detection enabled */ |
172 | unsigned int automute_lines:1; /* automute line-out as well */ | 172 | unsigned int automute_lines:1; /* automute line-out as well; NOP when automute_hp_lo isn't set */ |
173 | unsigned int automute_hp_lo:1; /* both HP and LO available */ | 173 | unsigned int automute_hp_lo:1; /* both HP and LO available */ |
174 | 174 | ||
175 | /* other flags */ | 175 | /* other flags */ |
@@ -556,7 +556,7 @@ static void update_speakers(struct hda_codec *codec) | |||
556 | if (spec->autocfg.line_out_pins[0] == spec->autocfg.hp_pins[0] || | 556 | if (spec->autocfg.line_out_pins[0] == spec->autocfg.hp_pins[0] || |
557 | spec->autocfg.line_out_pins[0] == spec->autocfg.speaker_pins[0]) | 557 | spec->autocfg.line_out_pins[0] == spec->autocfg.speaker_pins[0]) |
558 | return; | 558 | return; |
559 | if (!spec->automute_lines || !spec->automute) | 559 | if (!spec->automute || (spec->automute_hp_lo && !spec->automute_lines)) |
560 | on = 0; | 560 | on = 0; |
561 | else | 561 | else |
562 | on = spec->jack_present; | 562 | on = spec->jack_present; |
@@ -817,7 +817,7 @@ static int alc_automute_mode_get(struct snd_kcontrol *kcontrol, | |||
817 | unsigned int val; | 817 | unsigned int val; |
818 | if (!spec->automute) | 818 | if (!spec->automute) |
819 | val = 0; | 819 | val = 0; |
820 | else if (!spec->automute_lines) | 820 | else if (!spec->automute_hp_lo || !spec->automute_lines) |
821 | val = 1; | 821 | val = 1; |
822 | else | 822 | else |
823 | val = 2; | 823 | val = 2; |
@@ -838,7 +838,8 @@ static int alc_automute_mode_put(struct snd_kcontrol *kcontrol, | |||
838 | spec->automute = 0; | 838 | spec->automute = 0; |
839 | break; | 839 | break; |
840 | case 1: | 840 | case 1: |
841 | if (spec->automute && !spec->automute_lines) | 841 | if (spec->automute && |
842 | (!spec->automute_hp_lo || !spec->automute_lines)) | ||
842 | return 0; | 843 | return 0; |
843 | spec->automute = 1; | 844 | spec->automute = 1; |
844 | spec->automute_lines = 0; | 845 | spec->automute_lines = 0; |