firewire.h 2.6 KB

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