Lines Matching full:urbs
689 struct urb **urbs; in alloc_urbs() local
697 urbs = kmalloc_array(N_URBS, sizeof(*urbs), GFP_KERNEL); in alloc_urbs()
698 if (!urbs) { in alloc_urbs()
704 urbs[i] = usb_alloc_urb(FRAMES_PER_URB, GFP_KERNEL); in alloc_urbs()
705 if (!urbs[i]) { in alloc_urbs()
707 return urbs; in alloc_urbs()
710 urbs[i]->transfer_buffer = in alloc_urbs()
713 if (!urbs[i]->transfer_buffer) { in alloc_urbs()
715 return urbs; in alloc_urbs()
720 &urbs[i]->iso_frame_desc[frame]; in alloc_urbs()
726 urbs[i]->dev = usb_dev; in alloc_urbs()
727 urbs[i]->pipe = pipe; in alloc_urbs()
728 urbs[i]->transfer_buffer_length = FRAMES_PER_URB in alloc_urbs()
730 urbs[i]->context = &cdev->data_cb_info[i]; in alloc_urbs()
731 urbs[i]->interval = 1; in alloc_urbs()
732 urbs[i]->number_of_packets = FRAMES_PER_URB; in alloc_urbs()
733 urbs[i]->complete = (dir == SNDRV_PCM_STREAM_CAPTURE) ? in alloc_urbs()
738 return urbs; in alloc_urbs()
741 static void free_urbs(struct urb **urbs) in free_urbs() argument
745 if (!urbs) in free_urbs()
749 if (!urbs[i]) in free_urbs()
752 usb_kill_urb(urbs[i]); in free_urbs()
753 kfree(urbs[i]->transfer_buffer); in free_urbs()
754 usb_free_urb(urbs[i]); in free_urbs()
757 kfree(urbs); in free_urbs()