blob: 6376ccf10fd470688daf103b37ff74bcf67af3ea [file] [log] [blame]
Daniel Macke5779992010-03-04 19:46:13 +01001#ifndef __USBAUDIO_ENDPOINT_H
2#define __USBAUDIO_ENDPOINT_H
3
Daniel Mack8fdff6a2012-04-12 13:51:11 +02004#define SND_USB_ENDPOINT_TYPE_DATA 0
5#define SND_USB_ENDPOINT_TYPE_SYNC 1
6
7struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip,
8 struct usb_host_interface *alts,
9 int ep_num, int direction, int type);
10
11int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
Dylan Reid35ec7aa22012-09-18 09:49:47 -070012 snd_pcm_format_t pcm_format,
13 unsigned int channels,
14 unsigned int period_bytes,
15 unsigned int rate,
Daniel Mack8fdff6a2012-04-12 13:51:11 +020016 struct audioformat *fmt,
17 struct snd_usb_endpoint *sync_ep);
18
Daniel Mack015618b2012-08-29 13:17:05 +020019int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep);
Daniel Mack8fdff6a2012-04-12 13:51:11 +020020void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep,
21 int force, int can_sleep, int wait);
22int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
23int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
24void snd_usb_endpoint_free(struct list_head *head);
25
26int snd_usb_endpoint_implict_feedback_sink(struct snd_usb_endpoint *ep);
Daniel Mack245baf92012-08-30 18:52:30 +020027int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep);
Daniel Mack8fdff6a2012-04-12 13:51:11 +020028
29void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
30 struct snd_usb_endpoint *sender,
31 const struct urb *urb);
32
Daniel Macke5779992010-03-04 19:46:13 +010033#endif /* __USBAUDIO_ENDPOINT_H */