diff options
author | Daniel Mack <zonque@gmail.com> | 2012-04-12 07:51:12 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-04-13 04:24:08 -0400 |
commit | edcd3633e72a1590c4cf46befe5e6cd03b5aec3e (patch) | |
tree | 57aab87190179ba8995d05a93c3ece3a91f870ae /sound/usb/card.c | |
parent | 8fdff6a319e7dac757c558bd283dc4577e68cde7 (diff) |
ALSA: snd-usb: switch over to new endpoint streaming logic
With the previous commit that added the new streaming model, all
endpoint and streaming related code is now in endpoint.c, and pcm.c
only acts as a wrapper for handling the packet's payload.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r-- | sound/usb/card.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 6bc88b7ce4fd..d5b5c3388e28 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c | |||
@@ -131,8 +131,9 @@ static void snd_usb_stream_disconnect(struct list_head *head) | |||
131 | subs = &as->substream[idx]; | 131 | subs = &as->substream[idx]; |
132 | if (!subs->num_formats) | 132 | if (!subs->num_formats) |
133 | continue; | 133 | continue; |
134 | snd_usb_release_substream_urbs(subs, 1); | ||
135 | subs->interface = -1; | 134 | subs->interface = -1; |
135 | subs->data_endpoint = NULL; | ||
136 | subs->sync_endpoint = NULL; | ||
136 | } | 137 | } |
137 | } | 138 | } |
138 | 139 | ||
@@ -350,6 +351,7 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx, | |||
350 | chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor), | 351 | chip->usb_id = USB_ID(le16_to_cpu(dev->descriptor.idVendor), |
351 | le16_to_cpu(dev->descriptor.idProduct)); | 352 | le16_to_cpu(dev->descriptor.idProduct)); |
352 | INIT_LIST_HEAD(&chip->pcm_list); | 353 | INIT_LIST_HEAD(&chip->pcm_list); |
354 | INIT_LIST_HEAD(&chip->ep_list); | ||
353 | INIT_LIST_HEAD(&chip->midi_list); | 355 | INIT_LIST_HEAD(&chip->midi_list); |
354 | INIT_LIST_HEAD(&chip->mixer_list); | 356 | INIT_LIST_HEAD(&chip->mixer_list); |
355 | 357 | ||
@@ -567,6 +569,10 @@ static void snd_usb_audio_disconnect(struct usb_device *dev, | |||
567 | list_for_each(p, &chip->pcm_list) { | 569 | list_for_each(p, &chip->pcm_list) { |
568 | snd_usb_stream_disconnect(p); | 570 | snd_usb_stream_disconnect(p); |
569 | } | 571 | } |
572 | /* release the endpoint resources */ | ||
573 | list_for_each(p, &chip->ep_list) { | ||
574 | snd_usb_endpoint_free(p); | ||
575 | } | ||
570 | /* release the midi resources */ | 576 | /* release the midi resources */ |
571 | list_for_each(p, &chip->midi_list) { | 577 | list_for_each(p, &chip->midi_list) { |
572 | snd_usbmidi_disconnect(p); | 578 | snd_usbmidi_disconnect(p); |