diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2005-04-29 10:23:13 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-05-29 04:05:37 -0400 |
commit | 84957a8ab086377a025e0448fa716ed5983f3c3a (patch) | |
tree | 7d405711f0fd2e6eb8c305b7bddf0aaeac22f3e4 /sound/usb/usbaudio.c | |
parent | 707e60732fc25fe3760f916d083b262a86a666c0 (diff) |
[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.c | 5 |
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, | |||
3091 | chip->card = card; | 3091 | chip->card = card; |
3092 | INIT_LIST_HEAD(&chip->pcm_list); | 3092 | INIT_LIST_HEAD(&chip->pcm_list); |
3093 | INIT_LIST_HEAD(&chip->midi_list); | 3093 | INIT_LIST_HEAD(&chip->midi_list); |
3094 | INIT_LIST_HEAD(&chip->mixer_list); | ||
3094 | 3095 | ||
3095 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { | 3096 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { |
3096 | snd_usb_audio_free(chip); | 3097 | snd_usb_audio_free(chip); |
@@ -3290,6 +3291,10 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, void *ptr) | |||
3290 | list_for_each(p, &chip->midi_list) { | 3291 | list_for_each(p, &chip->midi_list) { |
3291 | snd_usbmidi_disconnect(p); | 3292 | snd_usbmidi_disconnect(p); |
3292 | } | 3293 | } |
3294 | /* release mixer resources */ | ||
3295 | list_for_each(p, &chip->mixer_list) { | ||
3296 | snd_usb_mixer_disconnect(p); | ||
3297 | } | ||
3293 | usb_chip[chip->index] = NULL; | 3298 | usb_chip[chip->index] = NULL; |
3294 | up(®ister_mutex); | 3299 | up(®ister_mutex); |
3295 | snd_card_free(card); | 3300 | snd_card_free(card); |