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 | c731bc9 | 2011-09-14 12:46:57 +0200 | [diff] [blame] | 4 | void snd_usb_init_substream(struct snd_usb_stream *as, |
| 5 | int stream, |
| 6 | struct audioformat *fp); |
| 7 | |
| 8 | int snd_usb_init_substream_urbs(struct snd_usb_substream *subs, |
| 9 | unsigned int period_bytes, |
| 10 | unsigned int rate, |
| 11 | unsigned int frame_bits); |
| 12 | |
| 13 | void snd_usb_release_substream_urbs(struct snd_usb_substream *subs, int force); |
| 14 | |
| 15 | int snd_usb_substream_prepare(struct snd_usb_substream *subs, |
| 16 | struct snd_pcm_runtime *runtime); |
| 17 | |
| 18 | int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substream, int cmd); |
| 19 | int snd_usb_substream_capture_trigger(struct snd_pcm_substream *substream, int cmd); |
| 20 | |
Daniel Mack | 8fdff6a | 2012-04-12 13:51:11 +0200 | [diff] [blame^] | 21 | |
| 22 | #define SND_USB_ENDPOINT_TYPE_DATA 0 |
| 23 | #define SND_USB_ENDPOINT_TYPE_SYNC 1 |
| 24 | |
| 25 | struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip, |
| 26 | struct usb_host_interface *alts, |
| 27 | int ep_num, int direction, int type); |
| 28 | |
| 29 | int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep, |
| 30 | struct snd_pcm_hw_params *hw_params, |
| 31 | struct audioformat *fmt, |
| 32 | struct snd_usb_endpoint *sync_ep); |
| 33 | |
| 34 | int snd_usb_endpoint_start(struct snd_usb_endpoint *ep); |
| 35 | void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep, |
| 36 | int force, int can_sleep, int wait); |
| 37 | int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep); |
| 38 | int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep); |
| 39 | void snd_usb_endpoint_free(struct list_head *head); |
| 40 | |
| 41 | int snd_usb_endpoint_implict_feedback_sink(struct snd_usb_endpoint *ep); |
| 42 | |
| 43 | void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep, |
| 44 | struct snd_usb_endpoint *sender, |
| 45 | const struct urb *urb); |
| 46 | |
Daniel Mack | e577999 | 2010-03-04 19:46:13 +0100 | [diff] [blame] | 47 | #endif /* __USBAUDIO_ENDPOINT_H */ |