firewire.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef _UAPI_SOUND_FIREWIRE_H_INCLUDED
  2. #define _UAPI_SOUND_FIREWIRE_H_INCLUDED
  3. #include <linux/ioctl.h>
  4. #include <linux/types.h>
  5. /* events can be read() from the hwdep device */
  6. #define SNDRV_FIREWIRE_EVENT_LOCK_STATUS 0x000010cc
  7. #define SNDRV_FIREWIRE_EVENT_DICE_NOTIFICATION 0xd1ce004e
  8. #define SNDRV_FIREWIRE_EVENT_EFW_RESPONSE 0x4e617475
  9. struct snd_firewire_event_common {
  10. unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */
  11. };
  12. struct snd_firewire_event_lock_status {
  13. unsigned int type;
  14. unsigned int status; /* 0/1 = unlocked/locked */
  15. };
  16. struct snd_firewire_event_dice_notification {
  17. unsigned int type;
  18. unsigned int notification; /* DICE-specific bits */
  19. };
  20. #define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32)((__u16)~0) - 1)
  21. /* each field should be in big endian */
  22. struct snd_efw_transaction {
  23. __be32 length;
  24. __be32 version;
  25. __be32 seqnum;
  26. __be32 category;
  27. __be32 command;
  28. __be32 status;
  29. __be32 params[0];
  30. };
  31. struct snd_firewire_event_efw_response {
  32. unsigned int type;
  33. __be32 response[0]; /* some responses */
  34. };
  35. union snd_firewire_event {
  36. struct snd_firewire_event_common common;
  37. struct snd_firewire_event_lock_status lock_status;
  38. struct snd_firewire_event_dice_notification dice_notification;
  39. struct snd_firewire_event_efw_response efw_response;
  40. };
  41. #define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info)
  42. #define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9)
  43. #define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa)
  44. #define SNDRV_FIREWIRE_TYPE_DICE 1
  45. #define SNDRV_FIREWIRE_TYPE_FIREWORKS 2
  46. #define SNDRV_FIREWIRE_TYPE_BEBOB 3
  47. #define SNDRV_FIREWIRE_TYPE_OXFW 4
  48. /* RME, MOTU, ... */
  49. struct snd_firewire_get_info {
  50. unsigned int type; /* SNDRV_FIREWIRE_TYPE_xxx */
  51. unsigned int card; /* same as fw_cdev_get_info.card */
  52. unsigned char guid[8];
  53. char device_name[16]; /* device node in /dev */
  54. };
  55. /*
  56. * SNDRV_FIREWIRE_IOCTL_LOCK prevents the driver from streaming.
  57. * Returns -EBUSY if the driver is already streaming.
  58. */
  59. #endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */