endpoint.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __USBAUDIO_ENDPOINT_H
  2. #define __USBAUDIO_ENDPOINT_H
  3. #define SND_USB_ENDPOINT_TYPE_DATA 0
  4. #define SND_USB_ENDPOINT_TYPE_SYNC 1
  5. struct snd_usb_endpoint *snd_usb_add_endpoint(struct snd_usb_audio *chip,
  6. struct usb_host_interface *alts,
  7. int ep_num, int direction, int type);
  8. int snd_usb_endpoint_set_params(struct snd_usb_endpoint *ep,
  9. snd_pcm_format_t pcm_format,
  10. unsigned int channels,
  11. unsigned int period_bytes,
  12. unsigned int period_frames,
  13. unsigned int buffer_periods,
  14. unsigned int rate,
  15. struct audioformat *fmt,
  16. struct snd_usb_endpoint *sync_ep);
  17. int snd_usb_endpoint_start(struct snd_usb_endpoint *ep);
  18. void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep);
  19. void snd_usb_endpoint_sync_pending_stop(struct snd_usb_endpoint *ep);
  20. int snd_usb_endpoint_activate(struct snd_usb_endpoint *ep);
  21. void snd_usb_endpoint_deactivate(struct snd_usb_endpoint *ep);
  22. void snd_usb_endpoint_release(struct snd_usb_endpoint *ep);
  23. void snd_usb_endpoint_free(struct snd_usb_endpoint *ep);
  24. int snd_usb_endpoint_implicit_feedback_sink(struct snd_usb_endpoint *ep);
  25. int snd_usb_endpoint_next_packet_size(struct snd_usb_endpoint *ep);
  26. void snd_usb_handle_sync_urb(struct snd_usb_endpoint *ep,
  27. struct snd_usb_endpoint *sender,
  28. const struct urb *urb);
  29. #endif /* __USBAUDIO_ENDPOINT_H */