23 #ifndef __ANALOGY_CMD__
24 #define __ANALOGY_CMD__
42 #define A4L_CMD_SIMUL 0x1
46 #define A4L_CMD_BULK 0x2
50 #define A4L_CMD_WRITE 0x4
63 #define TRIG_NONE 0x00000001
67 #define TRIG_NOW 0x00000002
71 #define TRIG_FOLLOW 0x00000004
75 #define TRIG_TIME 0x00000008
79 #define TRIG_TIMER 0x00000010
83 #define TRIG_COUNT 0x00000020
87 #define TRIG_EXT 0x00000040
91 #define TRIG_INT 0x00000080
95 #define TRIG_OTHER 0x00000100
99 #define TRIG_WAKE_EOS 0x0020
103 #define TRIG_ROUND_MASK 0x00030000
107 #define TRIG_ROUND_NEAREST 0x00000000
111 #define TRIG_ROUND_DOWN 0x00010000
115 #define TRIG_ROUND_UP 0x00020000
119 #define TRIG_ROUND_UP_NEXT 0x00030000
133 #define CHAN(a) ((a) & 0xffff)
137 #define RNG(a) (((a) & 0xff) << 16)
141 #define AREF(a) (((a) & 0xf) << 24)
145 #define FLAGS(a) ((a) & CR_FLAGS_MASK)
149 #define PACK(a, b, c) (CHAN(a) | RNG(b) | AREF(c))
153 #define PACK_FLAGS(a, b, c, d) (CHAN(a) | RNG(b) | AREF(c) | FLAGS(d))
158 #define AREF_GROUND 0x00
162 #define AREF_COMMON 0x01
166 #define AREF_DIFF 0x02
170 #define AREF_OTHER 0x03
174 #if !defined(DOXYGEN_CPP)
176 #define CR_FLAGS_MASK 0xfc000000
177 #define CR_ALT_FILTER (1<<26)
178 #define CR_DITHER CR_ALT_FILTER
179 #define CR_DEGLITCH CR_ALT_FILTER
180 #define CR_ALT_SOURCE (1<<27)
181 #define CR_EDGE (1<<28)
182 #define CR_INVERT (1<<29)
184 #if defined(__KERNEL__)
186 #define CR_CHAN(a) CHAN(a)
187 #define CR_RNG(a) (((a)>>16)&0xff)
188 #define CR_AREF(a) (((a)>>24)&0xf)
242 #if defined(__KERNEL__) && !defined(DOXYGEN_CPP)
248 int a4l_check_cmddesc(a4l_cxt_t * cxt,
a4l_cmd_t * desc);
249 int a4l_ioctl_cmd(a4l_cxt_t * cxt,
void *arg);
unsigned int scan_begin_arg
Scan begin trigger argument.
Definition: command.h:212
unsigned int stop_arg
Stop trigger argument.
Definition: command.h:224
sampl_t * data
Driver specific buffer pointer.
Definition: command.h:235
Analogy for Linux, context structure / macros declarations.
Structure describing the asynchronous instruction.
Definition: command.h:198
unsigned char idx_subd
Subdevice to which the command will be applied.
Definition: command.h:199
unsigned long flags
Command flags.
Definition: command.h:202
unsigned int scan_begin_src
Scan begin trigger type.
Definition: command.h:210
unsigned int convert_src
Convert trigger type.
Definition: command.h:214
unsigned int * chan_descs
Tab containing channels descriptors.
Definition: command.h:229
unsigned int start_arg
Start trigger argument.
Definition: command.h:208
unsigned int scan_end_arg
Scan end trigger argument.
Definition: command.h:220
unsigned int scan_end_src
Scan end trigger type.
Definition: command.h:218
unsigned int start_src
Start trigger type.
Definition: command.h:206
unsigned int convert_arg
Convert trigger argument.
Definition: command.h:216
unsigned char nb_chan
Count of channels related with the command.
Definition: command.h:227
unsigned int data_len
Driver specific buffer size.
Definition: command.h:233
unsigned int stop_src
Stop trigger type.
Definition: command.h:222