ieee1394-ioctl.h 3.6 KB

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