summaryrefslogtreecommitdiff
path: root/sound/usb/usbaudio.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-04-29 18:23:13 +0400
committerJaroslav Kysela <perex@suse.cz>2005-05-29 12:05:37 +0400
commit84957a8ab086377a025e0448fa716ed5983f3c3a (patch)
tree7d405711f0fd2e6eb8c305b7bddf0aaeac22f3e4 /sound/usb/usbaudio.c
parent707e60732fc25fe3760f916d083b262a86a666c0 (diff)
downloadlinux-84957a8ab086377a025e0448fa716ed5983f3c3a.tar.xz
[ALSA] usb-audio - move mixer data into separate struct
USB generic driver Move all data related to audio control interfaces into a separate struct local to usbmixer.c. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/usb/usbaudio.c')
-rw-r--r--sound/usb/usbaudio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index e4b91045ca16..eeb09bb8cbf3 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -3091,6 +3091,7 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
chip->card = card;
INIT_LIST_HEAD(&chip->pcm_list);
INIT_LIST_HEAD(&chip->midi_list);
+ INIT_LIST_HEAD(&chip->mixer_list);
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
snd_usb_audio_free(chip);
@@ -3290,6 +3291,10 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr)
list_for_each(p, &chip->midi_list) {
snd_usbmidi_disconnect(p);
}
+ /* release mixer resources */
+ list_for_each(p, &chip->mixer_list) {
+ snd_usb_mixer_disconnect(p);
+ }
usb_chip[chip->index] = NULL;
up(&register_mutex);
snd_card_free(card);