firewire.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. #define SNDRV_FIREWIRE_EVENT_DIGI00X_MESSAGE 0x746e736c
  10. #define SNDRV_FIREWIRE_EVENT_MOTU_NOTIFICATION 0x64776479
  11. struct snd_firewire_event_common {
  12. unsigned int type; /* SNDRV_FIREWIRE_EVENT_xxx */
  13. };
  14. struct snd_firewire_event_lock_status {
  15. unsigned int type;
  16. unsigned int status; /* 0/1 = unlocked/locked */
  17. };
  18. struct snd_firewire_event_dice_notification {
  19. unsigned int type;
  20. unsigned int notification; /* DICE-specific bits */
  21. };
  22. #define SND_EFW_TRANSACTION_USER_SEQNUM_MAX ((__u32)((__u16)~0) - 1)
  23. /* each field should be in big endian */
  24. struct snd_efw_transaction {
  25. __be32 length;
  26. __be32 version;
  27. __be32 seqnum;
  28. __be32 category;
  29. __be32 command;
  30. __be32 status;
  31. __be32 params[0];
  32. };
  33. struct snd_firewire_event_efw_response {
  34. unsigned int type;
  35. __be32 response[0]; /* some responses */
  36. };
  37. struct snd_firewire_event_digi00x_message {
  38. unsigned int type;
  39. __u32 message; /* Digi00x-specific message */
  40. };
  41. struct snd_firewire_event_motu_notification {
  42. unsigned int type;
  43. __u32 message; /* MOTU-specific bits. */
  44. };
  45. union snd_firewire_event {
  46. struct snd_firewire_event_common common;
  47. struct snd_firewire_event_lock_status lock_status;
  48. struct snd_firewire_event_dice_notification dice_notification;
  49. struct snd_firewire_event_efw_response efw_response;
  50. struct snd_firewire_event_digi00x_message digi00x_message;
  51. struct snd_firewire_event_motu_notification motu_notification;
  52. };
  53. #define SNDRV_FIREWIRE_IOCTL_GET_INFO _IOR('H', 0xf8, struct snd_firewire_get_info)
  54. #define SNDRV_FIREWIRE_IOCTL_LOCK _IO('H', 0xf9)
  55. #define SNDRV_FIREWIRE_IOCTL_UNLOCK _IO('H', 0xfa)
  56. #define SNDRV_FIREWIRE_TYPE_DICE 1
  57. #define SNDRV_FIREWIRE_TYPE_FIREWORKS 2
  58. #define SNDRV_FIREWIRE_TYPE_BEBOB 3
  59. #define SNDRV_FIREWIRE_TYPE_OXFW 4
  60. #define SNDRV_FIREWIRE_TYPE_DIGI00X 5
  61. #define SNDRV_FIREWIRE_TYPE_TASCAM 6
  62. #define SNDRV_FIREWIRE_TYPE_MOTU 7
  63. #define SNDRV_FIREWIRE_TYPE_FIREFACE 8
  64. struct snd_firewire_get_info {
  65. unsigned int type; /* SNDRV_FIREWIRE_TYPE_xxx */
  66. unsigned int card; /* same as fw_cdev_get_info.card */
  67. unsigned char guid[8];
  68. char device_name[16]; /* device node in /dev */
  69. };
  70. /*
  71. * SNDRV_FIREWIRE_IOCTL_LOCK prevents the driver from streaming.
  72. * Returns -EBUSY if the driver is already streaming.
  73. */
  74. #endif /* _UAPI_SOUND_FIREWIRE_H_INCLUDED */