Daniel Mack | e577999 | 2010-03-04 19:46:13 +0100 | [diff] [blame] | 1 | #ifndef __USBAUDIO_ENDPOINT_H |
| 2 | #define __USBAUDIO_ENDPOINT_H |
| 3 | |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 4 | #define SND_USB_ENDPOINT_TYPE_DATA 0 |
| 5 | #define SND_USB_ENDPOINT_TYPE_SYNC 1 |
| 6 | |
| 7 | struct 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 | |
| 11 | int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep, |
Dylan Reid | 35ec7aa2 | 2012-09-18 09:49:47 -0700 | [diff] [blame] | 12 | snd_pcm_format_t pcm_format, |
| 13 | unsigned int channels, |
| 14 | unsigned int period_bytes, |
| 15 | unsigned int rate, |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 16 | struct audioformat *fmt, |
| 17 | struct snd_usb_endpoint *sync_ep); |
| 18 | |
Daniel Mack | 015618b | 2012-08-29 13:17:05 +0200 | [diff] [blame] | 19 | int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, int can_sleep); |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 20 | void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, |
| 21 | int force, int can_sleep, int wait); |
Takashi Iwai | f58161b | 2012-11-08 08:52:45 +0100 | [diff] [blame] | 22 | void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep); |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 23 | int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep); |
| 24 | int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep); |
| 25 | void snd_usb_endpoint_free(struct list_head *head); |
| 26 | |
| 27 | int snd_usb_endpoint_implict_feedback_sink(struct snd_usb_endpoint *ep); |
Daniel Mack | 245baf9 | 2012-08-30 18:52:30 +0200 | [diff] [blame] | 28 | int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep); |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 29 | |
| 30 | void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep, |
| 31 | struct snd_usb_endpoint *sender, |
| 32 | const struct urb *urb); |
| 33 | |
Daniel Mack | e577999 | 2010-03-04 19:46:13 +0100 | [diff] [blame] | 34 | #endif /* __USBAUDIO_ENDPOINT_H */ |