Commit | Line | Data |
---|---|---|
e5779998 DM |
1 | #ifndef __USBAUDIO_ENDPOINT_H |
2 | #define __USBAUDIO_ENDPOINT_H | |
3 | ||
8fdff6a3 DM |
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, | |
35ec7aa2 DR |
12 | snd_pcm_format_t pcm_format, |
13 | unsigned int channels, | |
14 | unsigned int period_bytes, | |
976b6c06 AS |
15 | unsigned int period_frames, |
16 | unsigned int buffer_periods, | |
35ec7aa2 | 17 | unsigned int rate, |
8fdff6a3 DM |
18 | struct audioformat *fmt, |
19 | struct snd_usb_endpoint *sync_ep); | |
20 | ||
a9bb3626 | 21 | int snd_usb_endpoint_start(struct snd_usb_endpoint *ep, bool can_sleep); |
b2eb950d | 22 | void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep); |
f58161ba | 23 | void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep); |
8fdff6a3 | 24 | int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep); |
9b7c552b | 25 | void snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep); |
92a586bd | 26 | void snd_usb_endpoint_release(struct snd_usb_endpoint *ep); |
a6cece9d | 27 | void snd_usb_endpoint_free(struct snd_usb_endpoint *ep); |
8fdff6a3 | 28 | |
98ae472b | 29 | int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep); |
245baf98 | 30 | int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep); |
8fdff6a3 DM |
31 | |
32 | void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep, | |
33 | struct snd_usb_endpoint *sender, | |
34 | const struct urb *urb); | |
35 | ||
e5779998 | 36 | #endif /* __USBAUDIO_ENDPOINT_H */ |