4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 /* Base file for all ieee1394 ioctl's. Linux-1394 has allocated base '#'
23 * with a range of 0x00-0x3f. */
25 #ifndef __IEEE1394_IOCTL_H
26 #define __IEEE1394_IOCTL_H
28 #include <linux/ioctl.h>
29 #include <linux/types.h>
33 #define AMDTP_IOC_CHANNEL _IOW('#', 0x00, struct amdtp_ioctl)
34 #define AMDTP_IOC_PLUG _IOW('#', 0x01, struct amdtp_ioctl)
35 #define AMDTP_IOC_PING _IOW('#', 0x02, struct amdtp_ioctl)
36 #define AMDTP_IOC_ZAP _IO ('#', 0x03)
41 /* Get the driver ready to transmit video. pass a struct dv1394_init* as
42 * the parameter (see below), or NULL to get default parameters */
43 #define DV1394_IOC_INIT _IOW('#', 0x06, struct dv1394_init)
45 /* Stop transmitting video and free the ringbuffer */
46 #define DV1394_IOC_SHUTDOWN _IO ('#', 0x07)
48 /* Submit N new frames to be transmitted, where the index of the first new
49 * frame is first_clear_buffer, and the index of the last new frame is
50 * (first_clear_buffer + N) % n_frames */
51 #define DV1394_IOC_SUBMIT_FRAMES _IO ('#', 0x08)
53 /* Block until N buffers are clear (pass N as the parameter) Because we
54 * re-transmit the last frame on underrun, there will at most be n_frames
55 * - 1 clear frames at any time */
56 #define DV1394_IOC_WAIT_FRAMES _IO ('#', 0x09)
58 /* Capture new frames that have been received, where the index of the
59 * first new frame is first_clear_buffer, and the index of the last new
60 * frame is (first_clear_buffer + N) % n_frames */
61 #define DV1394_IOC_RECEIVE_FRAMES _IO ('#', 0x0a)
63 /* Tell card to start receiving DMA */
64 #define DV1394_IOC_START_RECEIVE _IO ('#', 0x0b)
66 /* Pass a struct dv1394_status* as the parameter */
67 #define DV1394_IOC_GET_STATUS _IOR('#', 0x0c, struct dv1394_status)
70 /* Video1394 Gets 10 */
72 #define VIDEO1394_IOC_LISTEN_CHANNEL \
73 _IOWR('#', 0x10, struct video1394_mmap)
74 #define VIDEO1394_IOC_UNLISTEN_CHANNEL \
76 #define VIDEO1394_IOC_LISTEN_QUEUE_BUFFER \
77 _IOW ('#', 0x12, struct video1394_wait)
78 #define VIDEO1394_IOC_LISTEN_WAIT_BUFFER \
79 _IOWR('#', 0x13, struct video1394_wait)
80 #define VIDEO1394_IOC_TALK_CHANNEL \
81 _IOWR('#', 0x14, struct video1394_mmap)
82 #define VIDEO1394_IOC_UNTALK_CHANNEL \
85 * This one is broken: it really wanted
86 * "sizeof (struct video1394_wait) + sizeof (struct video1394_queue_variable)"
87 * but got just a "size_t"
89 #define VIDEO1394_IOC_TALK_QUEUE_BUFFER \
90 _IOW ('#', 0x16, size_t)
91 #define VIDEO1394_IOC_TALK_WAIT_BUFFER \
92 _IOW ('#', 0x17, struct video1394_wait)
93 #define VIDEO1394_IOC_LISTEN_POLL_BUFFER \
94 _IOWR('#', 0x18, struct video1394_wait)
97 /* Raw1394's ISO interface */
98 #define RAW1394_IOC_ISO_XMIT_INIT \
99 _IOW ('#', 0x1a, struct raw1394_iso_status)
100 #define RAW1394_IOC_ISO_RECV_INIT \
101 _IOWR('#', 0x1b, struct raw1394_iso_status)
102 #define RAW1394_IOC_ISO_RECV_START \
103 _IOC (_IOC_WRITE, '#', 0x1c, sizeof(int) * 3)
104 #define RAW1394_IOC_ISO_XMIT_START \
105 _IOC (_IOC_WRITE, '#', 0x1d, sizeof(int) * 2)
106 #define RAW1394_IOC_ISO_XMIT_RECV_STOP \
108 #define RAW1394_IOC_ISO_GET_STATUS \
109 _IOR ('#', 0x1f, struct raw1394_iso_status)
110 #define RAW1394_IOC_ISO_SHUTDOWN \
112 #define RAW1394_IOC_ISO_QUEUE_ACTIVITY \
114 #define RAW1394_IOC_ISO_RECV_LISTEN_CHANNEL \
115 _IOW ('#', 0x22, unsigned char)
116 #define RAW1394_IOC_ISO_RECV_UNLISTEN_CHANNEL \
117 _IOW ('#', 0x23, unsigned char)
118 #define RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK \
119 _IOW ('#', 0x24, __u64)
120 #define RAW1394_IOC_ISO_RECV_PACKETS \
121 _IOW ('#', 0x25, struct raw1394_iso_packets)
122 #define RAW1394_IOC_ISO_RECV_RELEASE_PACKETS \
123 _IOW ('#', 0x26, unsigned int)
124 #define RAW1394_IOC_ISO_XMIT_PACKETS \
125 _IOW ('#', 0x27, struct raw1394_iso_packets)
126 #define RAW1394_IOC_ISO_XMIT_SYNC \
128 #define RAW1394_IOC_ISO_RECV_FLUSH \
132 #endif /* __IEEE1394_IOCTL_H */