ALSA: hda - Fix multi-io pin assignment in create_multi_out_ctls()
authorTakashi Iwai <tiwai@suse.de>
Fri, 4 Jan 2013 14:00:02 +0000 (15:00 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 12 Jan 2013 07:43:35 +0000 (08:43 +0100)
The multi-io pins are calculated with a blind assumption of
cfg->line_outs = 1.  This isn't always true.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_generic.c

index f9d3ea3..93db021 100644 (file)
@@ -1368,7 +1368,7 @@ static int create_multi_out_ctls(struct hda_codec *codec,
                if (!dac)
                        continue;
                if (i >= cfg->line_outs) {
-                       pin = spec->multi_io[i - 1].pin;
+                       pin = spec->multi_io[i - cfg->line_outs].pin;
                        index = 0;
                        name = channel_name[i];
                } else {