ALSA: hda/realtek - Fix missing inits of item indices for auto-mic
authorTakashi Iwai <tiwai@suse.de>
Wed, 23 Nov 2011 06:38:59 +0000 (07:38 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 16:54:16 +0000 (08:54 -0800)
commit45445147b0cf1c398b370aa064dc2fb7f9b5128e
tree804e8ab638cd962c485822ac59bf887dfc4f724b
parent30444a763d652293e36f38ca43de13d6cf5ec3b0
ALSA: hda/realtek - Fix missing inits of item indices for auto-mic

commit 6759dc323826c2c806c998cd93945c5476688dd2 upstream.

When the imux entries are rebuilt in alc_rebuild_imux_for_auto_mic(),
the initialization of index field is missing.  It may work without it
casually when the original imux was created by the auto-parser, but
it's definitely broken in the case of static configs where no imux was
parsed beforehand.  Because of this, the auto-mic switching doesn't
work properly on some model options.

This patch adds the missing initialization of index field.

Reported-by: Dmitry Nezhevenko <dion@inhex.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/hda/patch_realtek.c