OSDN Git Service

ALSA: hda - Don't add elements of other codecs to vmaster slave
authorTakashi Iwai <tiwai@suse.de>
Thu, 10 Nov 2011 11:28:38 +0000 (12:28 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Nov 2011 22:31:14 +0000 (14:31 -0800)
commitfd6f075d1e29791d0e4b42da2e6962665f90de1b
treef4a93d3b83e901fc167e302567efbaab0ef67ed9
parent999c1d6bc999d67657033ec780a561aa172c75a9
ALSA: hda - Don't add elements of other codecs to vmaster slave

commit aeb4b88ec0a948efce8e3a23a8f964d3560a7308 upstream.

When a virtual mater control is created, the driver looks for slave
elements from the assigned card instance.  But this may include the
elements of other codecs when multiple codecs are on the same HD-audio
bus.  This works at the first time, but it'll give Oops when it's once
freed and re-created via reconfig sysfs.

This patch changes the element-look-up strategy to limit only to the
mixer elements of the same codec.

Reported-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/pci/hda/hda_codec.c