ieee1394-ioctl.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* Base file for all ieee1394 ioctl's. Linux-1394 has allocated base '#'
  2. * with a range of 0x00-0x3f. */
  3. #ifndef __IEEE1394_IOCTL_H
  4. #define __IEEE1394_IOCTL_H
  5. #include <linux/ioctl.h>
  6. #include <linux/types.h>
  7. /* AMDTP Gets 6 */
  8. #define AMDTP_IOC_CHANNEL _IOW('#', 0x00, struct amdtp_ioctl)
  9. #define AMDTP_IOC_PLUG _IOW('#', 0x01, struct amdtp_ioctl)
  10. #define AMDTP_IOC_PING _IOW('#', 0x02, struct amdtp_ioctl)
  11. #define AMDTP_IOC_ZAP _IO ('#', 0x03)
  12. /* DV1394 Gets 10 */
  13. /* Get the driver ready to transmit video. pass a struct dv1394_init* as
  14. * the parameter (see below), or NULL to get default parameters */
  15. #define DV1394_IOC_INIT _IOW('#', 0x06, struct dv1394_init)
  16. /* Stop transmitting video and free the ringbuffer */
  17. #define DV1394_IOC_SHUTDOWN _IO ('#', 0x07)
  18. /* Submit N new frames to be transmitted, where the index of the first new
  19. * frame is first_clear_buffer, and the index of the last new frame is
  20. * (first_clear_buffer + N) % n_frames */
  21. #define DV1394_IOC_SUBMIT_FRAMES _IO ('#', 0x08)
  22. /* Block until N buffers are clear (pass N as the parameter) Because we
  23. * re-transmit the last frame on underrun, there will at most be n_frames
  24. * - 1 clear frames at any time */
  25. #define DV1394_IOC_WAIT_FRAMES _IO ('#', 0x09)
  26. /* Capture new frames that have been received, where the index of the
  27. * first new frame is first_clear_buffer, and the index of the last new
  28. * frame is (first_clear_buffer + N) % n_frames */
  29. #define DV1394_IOC_RECEIVE_FRAMES _IO ('#', 0x0a)
  30. /* Tell card to start receiving DMA */
  31. #define DV1394_IOC_START_RECEIVE _IO ('#', 0x0b)
  32. /* Pass a struct dv1394_status* as the parameter */
  33. #define DV1394_IOC_GET_STATUS _IOR('#', 0x0c, struct dv1394_status)
  34. /* Video1394 Gets 10 */
  35. #define VIDEO1394_IOC_LISTEN_CHANNEL \
  36. _IOWR('#', 0x10, struct video1394_mmap)
  37. #define VIDEO1394_IOC_UNLISTEN_CHANNEL \
  38. _IOW ('#', 0x11, int)
  39. #define VIDEO1394_IOC_LISTEN_QUEUE_BUFFER \
  40. _IOW ('#', 0x12, struct video1394_wait)
  41. #define VIDEO1394_IOC_LISTEN_WAIT_BUFFER \
  42. _IOWR('#', 0x13, struct video1394_wait)
  43. #define VIDEO1394_IOC_TALK_CHANNEL \
  44. _IOWR('#', 0x14, struct video1394_mmap)
  45. #define VIDEO1394_IOC_UNTALK_CHANNEL \
  46. _IOW ('#', 0x15, int)
  47. /*
  48. * This one is broken: it really wanted
  49. * "sizeof (struct video1394_wait) + sizeof (struct video1394_queue_variable)"
  50. * but got just a "size_t"
  51. */
  52. #define VIDEO1394_IOC_TALK_QUEUE_BUFFER \
  53. _IOW ('#', 0x16, size_t)
  54. #define VIDEO1394_IOC_TALK_WAIT_BUFFER \
  55. _IOW ('#', 0x17, struct video1394_wait)
  56. #define VIDEO1394_IOC_LISTEN_POLL_BUFFER \
  57. _IOWR('#', 0x18, struct video1394_wait)
  58. /* Raw1394's ISO interface */
  59. #define RAW1394_IOC_ISO_XMIT_INIT \
  60. _IOW ('#', 0x1a, struct raw1394_iso_status)
  61. #define RAW1394_IOC_ISO_RECV_INIT \
  62. _IOWR('#', 0x1b, struct raw1394_iso_status)
  63. #define RAW1394_IOC_ISO_RECV_START \
  64. _IOC (_IOC_WRITE, '#', 0x1c, sizeof(int) * 3)
  65. #define RAW1394_IOC_ISO_XMIT_START \
  66. _IOC (_IOC_WRITE, '#', 0x1d, sizeof(int) * 2)
  67. #define RAW1394_IOC_ISO_XMIT_RECV_STOP \
  68. _IO ('#', 0x1e)
  69. #define RAW1394_IOC_ISO_GET_STATUS \
  70. _IOR ('#', 0x1f, struct raw1394_iso_status)
  71. #define RAW1394_IOC_ISO_SHUTDOWN \
  72. _IO ('#', 0x20)
  73. #define RAW1394_IOC_ISO_QUEUE_ACTIVITY \
  74. _IO ('#', 0x21)
  75. #define RAW1394_IOC_ISO_RECV_LISTEN_CHANNEL \
  76. _IOW ('#', 0x22, unsigned char)
  77. #define RAW1394_IOC_ISO_RECV_UNLISTEN_CHANNEL \
  78. _IOW ('#', 0x23, unsigned char)
  79. #define RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK \
  80. _IOW ('#', 0x24, __u64)
  81. #define RAW1394_IOC_ISO_RECV_PACKETS \
  82. _IOW ('#', 0x25, struct raw1394_iso_packets)
  83. #define RAW1394_IOC_ISO_RECV_RELEASE_PACKETS \
  84. _IOW ('#', 0x26, unsigned int)
  85. #define RAW1394_IOC_ISO_XMIT_PACKETS \
  86. _IOW ('#', 0x27, struct raw1394_iso_packets)
  87. #define RAW1394_IOC_ISO_XMIT_SYNC \
  88. _IO ('#', 0x28)
  89. #define RAW1394_IOC_ISO_RECV_FLUSH \
  90. _IO ('#', 0x29)
  91. #endif /* __IEEE1394_IOCTL_H */