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, |
Alan Stern | 976b6c0 | 2013-09-24 15:51:58 -0400 | [diff] [blame] | 15 | unsigned int period_frames, |
| 16 | unsigned int buffer_periods, |
Dylan Reid | 35ec7aa2 | 2012-09-18 09:49:47 -0700 | [diff] [blame] | 17 | unsigned int rate, |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 18 | struct audioformat *fmt, |
| 19 | struct snd_usb_endpoint *sync_ep); |
| 20 | |
Ioan-Adrian Ratiu | 1d0f953 | 2017-01-05 00:37:46 +0200 | [diff] [blame] | 21 | int snd_usb_endpoint_start(struct snd_usb_endpoint *ep); |
Takashi Iwai | b2eb950 | 2012-11-21 08:30:48 +0100 | [diff] [blame] | 22 | void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep); |
Takashi Iwai | f58161b | 2012-11-08 08:52:45 +0100 | [diff] [blame] | 23 | void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep); |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 24 | int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep); |
Eldad Zack | 9b7c552 | 2013-10-06 22:31:10 +0200 | [diff] [blame] | 25 | void snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep); |
Takashi Iwai | 92a586b | 2014-06-25 14:24:47 +0200 | [diff] [blame] | 26 | void snd_usb_endpoint_release(struct snd_usb_endpoint *ep); |
Takashi Iwai | a6cece9 | 2014-10-31 11:24:32 +0100 | [diff] [blame] | 27 | void snd_usb_endpoint_free(struct snd_usb_endpoint *ep); |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 28 | |
Eldad Zack | 98ae472 | 2013-04-03 23:18:52 +0200 | [diff] [blame] | 29 | int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep); |
Daniel Mack | 245baf9 | 2012-08-30 18:52:30 +0200 | [diff] [blame] | 30 | int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep); |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame] | 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 | |
Daniel Mack | e577999 | 2010-03-04 19:46:13 +0100 | [diff] [blame] | 36 | #endif /* __USBAUDIO_ENDPOINT_H */ |