blob: 2287adf5ca597b65156f1dbbffca609774b84c00 [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
Takashi Iwaia9bb3622012-11-20 18:32:06 +010019int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, bool can_sleep);
Takashi Iwaib2eb9502012-11-21 08:30:48 +010020void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep);
Takashi Iwaif58161b2012-11-08 08:52:45 +010021void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep);
Daniel Mack8fdff6a2012-04-12 13:51:11 +020022int 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
Eldad Zack98ae4722013-04-03 23:18:52 +020026int snd_usb_endpoint_implicit_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 */