Merge CV, ver=5.1; ops/methods from HV, and interface from CV where possible
[goodguy/history.git] / cinelerra-5.1 / cinelerra / ieee1394-ioctl.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  * 
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.
10  * 
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.
15  * 
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
19  * 
20  */
21
22 /* Base file for all ieee1394 ioctl's. Linux-1394 has allocated base '#'
23  * with a range of 0x00-0x3f. */
24
25 #ifndef __IEEE1394_IOCTL_H
26 #define __IEEE1394_IOCTL_H
27
28 #include <linux/ioctl.h>
29 #include <linux/types.h>
30
31
32 /* AMDTP Gets 6 */
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)
37
38
39 /* DV1394 Gets 10 */
40
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)
44
45 /* Stop transmitting video and free the ringbuffer */
46 #define DV1394_IOC_SHUTDOWN             _IO ('#', 0x07)
47
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)
52
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)
57
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)
62
63 /* Tell card to start receiving DMA */
64 #define DV1394_IOC_START_RECEIVE        _IO ('#', 0x0b)
65
66 /* Pass a struct dv1394_status* as the parameter */
67 #define DV1394_IOC_GET_STATUS           _IOR('#', 0x0c, struct dv1394_status)
68
69
70 /* Video1394 Gets 10 */
71
72 #define VIDEO1394_IOC_LISTEN_CHANNEL            \
73         _IOWR('#', 0x10, struct video1394_mmap)
74 #define VIDEO1394_IOC_UNLISTEN_CHANNEL          \
75         _IOW ('#', 0x11, int)
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            \
83         _IOW ('#', 0x15, int)
84 /*
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"
88  */
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)
95
96
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          \
107         _IO  ('#', 0x1e)
108 #define RAW1394_IOC_ISO_GET_STATUS              \
109         _IOR ('#', 0x1f, struct raw1394_iso_status)
110 #define RAW1394_IOC_ISO_SHUTDOWN                \
111         _IO  ('#', 0x20)
112 #define RAW1394_IOC_ISO_QUEUE_ACTIVITY          \
113         _IO  ('#', 0x21)
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               \
127         _IO  ('#', 0x28)
128 #define RAW1394_IOC_ISO_RECV_FLUSH              \
129         _IO  ('#', 0x29)
130
131
132 #endif /* __IEEE1394_IOCTL_H */