endpoint.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef __USBAUDIO_ENDPOINT_H
  2. #define __USBAUDIO_ENDPOINT_H
  3. void snd_usb_init_substream(struct snd_usb_stream *as,
  4. int stream,
  5. struct audioformat *fp);
  6. int snd_usb_init_substream_urbs(struct snd_usb_substream *subs,
  7. unsigned int period_bytes,
  8. unsigned int rate,
  9. unsigned int frame_bits);
  10. void snd_usb_release_substream_urbs(struct snd_usb_substream *subs, int force);
  11. int snd_usb_substream_prepare(struct snd_usb_substream *subs,
  12. struct snd_pcm_runtime *runtime);
  13. #define SND_USB_ENDPOINT_TYPE_DATA 0
  14. #define SND_USB_ENDPOINT_TYPE_SYNC 1
  15. struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip,
  16. struct usb_host_interface *alts,
  17. int ep_num, int direction, int type);
  18. int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
  19. struct snd_pcm_hw_params *hw_params,
  20. struct audioformat *fmt,
  21. struct snd_usb_endpoint *sync_ep);
  22. int snd_usb_endpoint_start(struct snd_usb_endpoint *ep);
  23. void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep,
  24. int force, int can_sleep, int wait);
  25. int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
  26. int snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
  27. void snd_usb_endpoint_free(struct list_head *head);
  28. int snd_usb_endpoint_implict_feedback_sink(struct snd_usb_endpoint *ep);
  29. void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
  30. struct snd_usb_endpoint *sender,
  31. const struct urb *urb);
  32. #endif /* __USBAUDIO_ENDPOINT_H */