diff options
-rw-r--r-- | sound/pci/hda/patch_via.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 27de53fb331e..77df2bedfb81 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1509,10 +1509,18 @@ static void toggle_output_mutes(struct hda_codec *codec, int num_pins, | |||
1509 | hda_nid_t *pins, bool mute) | 1509 | hda_nid_t *pins, bool mute) |
1510 | { | 1510 | { |
1511 | int i; | 1511 | int i; |
1512 | for (i = 0; i < num_pins; i++) | 1512 | for (i = 0; i < num_pins; i++) { |
1513 | unsigned int parm = snd_hda_codec_read(codec, pins[i], 0, | ||
1514 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
1515 | if (parm & AC_PINCTL_IN_EN) | ||
1516 | continue; | ||
1517 | if (mute) | ||
1518 | parm &= ~AC_PINCTL_OUT_EN; | ||
1519 | else | ||
1520 | parm |= AC_PINCTL_OUT_EN; | ||
1513 | snd_hda_codec_write(codec, pins[i], 0, | 1521 | snd_hda_codec_write(codec, pins[i], 0, |
1514 | AC_VERB_SET_PIN_WIDGET_CONTROL, | 1522 | AC_VERB_SET_PIN_WIDGET_CONTROL, parm); |
1515 | mute ? 0 : PIN_OUT); | 1523 | } |
1516 | } | 1524 | } |
1517 | 1525 | ||
1518 | /* mute internal speaker if line-out is plugged */ | 1526 | /* mute internal speaker if line-out is plugged */ |