static void init_multi_out(struct hda_codec *codec)
{
struct hda_gen_spec *spec = codec->spec;
+ hda_nid_t nid, dac;
int pin_type;
int i;
else
pin_type = PIN_OUT;
- for (i = 0; i <= HDA_SIDE; i++) {
- hda_nid_t nid = spec->autocfg.line_out_pins[i];
- if (nid)
- set_output_and_unmute(codec, nid, pin_type,
- spec->multiout.dac_nids[i]);
-
+ for (i = 0; i < spec->autocfg.line_outs; i++) {
+ nid = spec->autocfg.line_out_pins[i];
+ if (nid) {
+ dac = spec->multiout.dac_nids[i];
+ if (!dac)
+ dac = spec->multiout.dac_nids[0];
+ set_output_and_unmute(codec, nid, pin_type, dac);
+ }
}
}