midi.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef __USBMIDI_H
  2. #define __USBMIDI_H
  3. /* maximum number of endpoints per interface */
  4. #define MIDI_MAX_ENDPOINTS 2
  5. /* data for QUIRK_MIDI_FIXED_ENDPOINT */
  6. struct snd_usb_midi_endpoint_info {
  7. int8_t out_ep; /* ep number, 0 autodetect */
  8. uint8_t out_interval; /* interval for interrupt endpoints */
  9. int8_t in_ep;
  10. uint8_t in_interval;
  11. uint16_t out_cables; /* bitmask */
  12. uint16_t in_cables; /* bitmask */
  13. };
  14. /* for QUIRK_MIDI_YAMAHA, data is NULL */
  15. /* for QUIRK_MIDI_MIDIMAN, data points to a snd_usb_midi_endpoint_info
  16. * structure (out_cables and in_cables only) */
  17. /* for QUIRK_COMPOSITE, data points to an array of snd_usb_audio_quirk
  18. * structures, terminated with .ifnum = -1 */
  19. /* for QUIRK_AUDIO_FIXED_ENDPOINT, data points to an audioformat structure */
  20. /* for QUIRK_AUDIO/MIDI_STANDARD_INTERFACE, data is NULL */
  21. /* for QUIRK_AUDIO_EDIROL_UA700_UA25/UA1000, data is NULL */
  22. /* for QUIRK_IGNORE_INTERFACE, data is NULL */
  23. /* for QUIRK_MIDI_NOVATION and _RAW, data is NULL */
  24. /* for QUIRK_MIDI_EMAGIC, data points to a snd_usb_midi_endpoint_info
  25. * structure (out_cables and in_cables only) */
  26. /* for QUIRK_MIDI_CME, data is NULL */
  27. /* for QUIRK_MIDI_AKAI, data is NULL */
  28. int snd_usbmidi_create(struct snd_card *card,
  29. struct usb_interface *iface,
  30. struct list_head *midi_list,
  31. const struct snd_usb_audio_quirk *quirk);
  32. void snd_usbmidi_input_stop(struct list_head *p);
  33. void snd_usbmidi_input_start(struct list_head *p);
  34. void snd_usbmidi_disconnect(struct list_head *p);
  35. void snd_usbmidi_suspend(struct list_head *p);
  36. void snd_usbmidi_resume(struct list_head *p);
  37. #endif /* __USBMIDI_H */