firewire.h 2.3 KB

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