diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-20 08:58:57 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-20 08:58:57 -0400 |
commit | e1ca7b4ea29707920650d86b22afdb7e94ad5986 (patch) | |
tree | 9bb57f41bb67e931df46eb5edaf602a489cfc6b6 /sound | |
parent | f6837bbd599c2a4e1f621441f84286434bcc91ae (diff) |
ALSA: hda - Fix initialization of multiple output pins for ALC268/269
When multiple pins are assigned to headphones or speakers, they haven't
been initialized properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bb3cf3b7282b..c4d9ad70fde7 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -13484,8 +13484,10 @@ static void alc268_auto_set_output_and_unmute(struct hda_codec *codec, | |||
13484 | static void alc268_auto_init_multi_out(struct hda_codec *codec) | 13484 | static void alc268_auto_init_multi_out(struct hda_codec *codec) |
13485 | { | 13485 | { |
13486 | struct alc_spec *spec = codec->spec; | 13486 | struct alc_spec *spec = codec->spec; |
13487 | hda_nid_t nid = spec->autocfg.line_out_pins[0]; | 13487 | int i; |
13488 | if (nid) { | 13488 | |
13489 | for (i = 0; i < spec->autocfg.line_outs; i++) { | ||
13490 | hda_nid_t nid = spec->autocfg.line_out_pins[i]; | ||
13489 | int pin_type = get_pin_type(spec->autocfg.line_out_type); | 13491 | int pin_type = get_pin_type(spec->autocfg.line_out_type); |
13490 | alc268_auto_set_output_and_unmute(codec, nid, pin_type); | 13492 | alc268_auto_set_output_and_unmute(codec, nid, pin_type); |
13491 | } | 13493 | } |
@@ -13495,13 +13497,19 @@ static void alc268_auto_init_hp_out(struct hda_codec *codec) | |||
13495 | { | 13497 | { |
13496 | struct alc_spec *spec = codec->spec; | 13498 | struct alc_spec *spec = codec->spec; |
13497 | hda_nid_t pin; | 13499 | hda_nid_t pin; |
13500 | int i; | ||
13498 | 13501 | ||
13499 | pin = spec->autocfg.hp_pins[0]; | 13502 | for (i = 0; i < spec->autocfg.hp_outs; i++) { |
13500 | if (pin) | 13503 | pin = spec->autocfg.hp_pins[i]; |
13501 | alc268_auto_set_output_and_unmute(codec, pin, PIN_HP); | 13504 | alc268_auto_set_output_and_unmute(codec, pin, PIN_HP); |
13502 | pin = spec->autocfg.speaker_pins[0]; | 13505 | } |
13503 | if (pin) | 13506 | for (i = 0; i < spec->autocfg.speaker_outs; i++) { |
13507 | pin = spec->autocfg.speaker_pins[i]; | ||
13504 | alc268_auto_set_output_and_unmute(codec, pin, PIN_OUT); | 13508 | alc268_auto_set_output_and_unmute(codec, pin, PIN_OUT); |
13509 | } | ||
13510 | if (spec->autocfg.mono_out_pin) | ||
13511 | snd_hda_codec_write(codec, spec->autocfg.mono_out_pin, 0, | ||
13512 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); | ||
13505 | } | 13513 | } |
13506 | 13514 | ||
13507 | static void alc268_auto_init_mono_speaker_out(struct hda_codec *codec) | 13515 | static void alc268_auto_init_mono_speaker_out(struct hda_codec *codec) |