diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-08-23 09:16:22 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-08-23 09:16:22 -0400 |
commit | 8cd0775da2e884cf01f0649402dd725224b308bf (patch) | |
tree | c22010c350c69eed6b6aade401eb783784073b70 | |
parent | 5fa9b1511216282e27e048defae78c0f44c148d1 (diff) |
ALSA: hda - Fix initialization of multi-speaker output paths for Realtek
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c3e5af955620..f79a6d1cf524 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -3223,6 +3223,7 @@ static void alc_auto_init_multi_out(struct hda_codec *codec) | |||
3223 | static void alc_auto_init_extra_out(struct hda_codec *codec) | 3223 | static void alc_auto_init_extra_out(struct hda_codec *codec) |
3224 | { | 3224 | { |
3225 | struct alc_spec *spec = codec->spec; | 3225 | struct alc_spec *spec = codec->spec; |
3226 | int i; | ||
3226 | hda_nid_t pin, dac; | 3227 | hda_nid_t pin, dac; |
3227 | 3228 | ||
3228 | pin = spec->autocfg.hp_pins[0]; | 3229 | pin = spec->autocfg.hp_pins[0]; |
@@ -3232,11 +3233,17 @@ static void alc_auto_init_extra_out(struct hda_codec *codec) | |||
3232 | dac = spec->multiout.dac_nids[0]; | 3233 | dac = spec->multiout.dac_nids[0]; |
3233 | alc_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); | 3234 | alc_auto_set_output_and_unmute(codec, pin, PIN_HP, dac); |
3234 | } | 3235 | } |
3235 | pin = spec->autocfg.speaker_pins[0]; | 3236 | for (i = 0; i < spec->autocfg.speaker_outs; i++) { |
3236 | if (pin) { | 3237 | pin = spec->autocfg.speaker_pins[i]; |
3237 | dac = spec->multiout.extra_out_nid[0]; | 3238 | if (!pin) |
3238 | if (!dac) | 3239 | break; |
3239 | dac = spec->multiout.dac_nids[0]; | 3240 | dac = spec->multiout.extra_out_nid[i]; |
3241 | if (!dac) { | ||
3242 | if (i > 0 && spec->multiout.extra_out_nid[0]) | ||
3243 | dac = spec->multiout.extra_out_nid[0]; | ||
3244 | else | ||
3245 | dac = spec->multiout.dac_nids[0]; | ||
3246 | } | ||
3240 | alc_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac); | 3247 | alc_auto_set_output_and_unmute(codec, pin, PIN_OUT, dac); |
3241 | } | 3248 | } |
3242 | } | 3249 | } |