blob: e61ee5c356a3d3cbbc3d9ad6e1c6fa6f9d0d10d4 [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,
Alan Stern976b6c02013-09-24 15:51:58 -040015 unsigned int period_frames,
16 unsigned int buffer_periods,
Dylan Reid35ec7aa22012-09-18 09:49:47 -070017 unsigned int rate,
Daniel Mack8fdff6a2012-04-12 13:51:11 +020018 struct audioformat *fmt,
19 struct snd_usb_endpoint *sync_ep);
20
Takashi Iwaia9bb3622012-11-20 18:32:06 +010021int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, bool can_sleep);
Takashi Iwaib2eb9502012-11-21 08:30:48 +010022void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep);
Takashi Iwaif58161b2012-11-08 08:52:45 +010023void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep);
Daniel Mack8fdff6a2012-04-12 13:51:11 +020024int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
Eldad Zack9b7c5522013-10-06 22:31:10 +020025void snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
Takashi Iwai92a586b2014-06-25 14:24:47 +020026void snd_usb_endpoint_release(struct snd_usb_endpoint *ep);
Daniel Mack8fdff6a2012-04-12 13:51:11 +020027void snd_usb_endpoint_free(struct list_head *head);
28
Eldad Zack98ae4722013-04-03 23:18:52 +020029int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep);
Daniel Mack245baf92012-08-30 18:52:30 +020030int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep);
Daniel Mack8fdff6a2012-04-12 13:51:11 +020031
32void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
33 struct snd_usb_endpoint *sender,
34 const struct urb *urb);
35
Daniel Macke5779992010-03-04 19:46:13 +010036#endif /* __USBAUDIO_ENDPOINT_H */