blob: 3d4c9705041ff5074c609dd2bfb303781a523c4e [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);
Takashi Iwaif58161b2012-11-08 08:52:45 +010022void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep);
Daniel Mack8fdff6a2012-04-12 13:51:11 +020023int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
24int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
25void snd_usb_endpoint_free(struct list_head *head);
26
27int snd_usb_endpoint_implict_feedback_sink(struct snd_usb_endpoint *ep);
Daniel Mack245baf92012-08-30 18:52:30 +020028int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep);
Daniel Mack8fdff6a2012-04-12 13:51:11 +020029
30void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
31 struct snd_usb_endpoint *sender,
32 const struct urb *urb);
33
Daniel Macke5779992010-03-04 19:46:13 +010034#endif /* __USBAUDIO_ENDPOINT_H */