aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/pci/hda/patch_realtek.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 0383dd8a11df..e125c60fe352 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -895,13 +895,15 @@ static void alc_init_auto_hp(struct hda_codec *codec)
895 if (present == 3) 895 if (present == 3)
896 spec->automute_hp_lo = 1; /* both HP and LO automute */ 896 spec->automute_hp_lo = 1; /* both HP and LO automute */
897 897
898 if (!cfg->speaker_pins[0]) { 898 if (!cfg->speaker_pins[0] &&
899 cfg->line_out_type == AUTO_PIN_SPEAKER_OUT) {
899 memcpy(cfg->speaker_pins, cfg->line_out_pins, 900 memcpy(cfg->speaker_pins, cfg->line_out_pins,
900 sizeof(cfg->speaker_pins)); 901 sizeof(cfg->speaker_pins));
901 cfg->speaker_outs = cfg->line_outs; 902 cfg->speaker_outs = cfg->line_outs;
902 } 903 }
903 904
904 if (!cfg->hp_pins[0]) { 905 if (!cfg->hp_pins[0] &&
906 cfg->line_out_type == AUTO_PIN_HP_OUT) {
905 memcpy(cfg->hp_pins, cfg->line_out_pins, 907 memcpy(cfg->hp_pins, cfg->line_out_pins,
906 sizeof(cfg->hp_pins)); 908 sizeof(cfg->hp_pins));
907 cfg->hp_outs = cfg->line_outs; 909 cfg->hp_outs = cfg->line_outs;
@@ -920,6 +922,7 @@ static void alc_init_auto_hp(struct hda_codec *codec)
920 spec->automute_mode = ALC_AUTOMUTE_PIN; 922 spec->automute_mode = ALC_AUTOMUTE_PIN;
921 } 923 }
922 if (spec->automute && cfg->line_out_pins[0] && 924 if (spec->automute && cfg->line_out_pins[0] &&
925 cfg->speaker_pins[0] &&
923 cfg->line_out_pins[0] != cfg->hp_pins[0] && 926 cfg->line_out_pins[0] != cfg->hp_pins[0] &&
924 cfg->line_out_pins[0] != cfg->speaker_pins[0]) { 927 cfg->line_out_pins[0] != cfg->speaker_pins[0]) {
925 for (i = 0; i < cfg->line_outs; i++) { 928 for (i = 0; i < cfg->line_outs; i++) {