blob: 96b6eaca755c2433110f8b19b23a8c4291cff7a3 [file] [log] [blame]
Markus Heiser5377d912016-06-30 15:18:56 +02001.. -*- coding: utf-8; mode: rst -*-
2
Mauro Carvalho Chehabaf4a4d02016-07-01 13:42:29 -03003.. _VIDIOC_G_EXT_CTRLS:
Markus Heiser5377d912016-06-30 15:18:56 +02004
5******************************************************************
6ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, VIDIOC_TRY_EXT_CTRLS
7******************************************************************
8
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -03009Name
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030010====
Markus Heiser5377d912016-06-30 15:18:56 +020011
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030012VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the value of several controls, try control values
Markus Heiser5377d912016-06-30 15:18:56 +020013
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030014
15Synopsis
Markus Heiser5377d912016-06-30 15:18:56 +020016========
17
Mauro Carvalho Chehabb7e67f62016-07-02 09:49:16 -030018.. cpp:function:: int ioctl( int fd, int request, struct v4l2_ext_controls *argp )
Markus Heiser5377d912016-06-30 15:18:56 +020019
Mauro Carvalho Chehab586027c2016-07-05 07:58:48 -030020
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030021Arguments
Markus Heiser5377d912016-06-30 15:18:56 +020022=========
23
24``fd``
25 File descriptor returned by :ref:`open() <func-open>`.
26
27``request``
28 VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS,
29 VIDIOC_TRY_EXT_CTRLS
30
31``argp``
32
33
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -030034Description
Markus Heiser5377d912016-06-30 15:18:56 +020035===========
36
37These ioctls allow the caller to get or set multiple controls
38atomically. Control IDs are grouped into control classes (see
39:ref:`ctrl-class`) and all controls in the control array must belong
40to the same control class.
41
42Applications must always fill in the ``count``, ``which``, ``controls``
43and ``reserved`` fields of struct
44:ref:`v4l2_ext_controls <v4l2-ext-controls>`, and initialize the
45struct :ref:`v4l2_ext_control <v4l2-ext-control>` array pointed to
46by the ``controls`` fields.
47
48To get the current value of a set of controls applications initialize
49the ``id``, ``size`` and ``reserved2`` fields of each struct
50:ref:`v4l2_ext_control <v4l2-ext-control>` and call the
Mauro Carvalho Chehab4e03cb72016-07-03 10:02:29 -030051:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. String controls controls must also set the
Markus Heiser5377d912016-06-30 15:18:56 +020052``string`` field. Controls of compound types
53(``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set) must set the ``ptr`` field.
54
55If the ``size`` is too small to receive the control result (only
56relevant for pointer-type controls like strings), then the driver will
Mauro Carvalho Chehabcdb4af02016-07-03 11:53:09 -030057set ``size`` to a valid value and return an ``ENOSPC`` error code. You
Markus Heiser5377d912016-06-30 15:18:56 +020058should re-allocate the memory to this new size and try again. For the
59string type it is possible that the same issue occurs again if the
60string has grown in the meantime. It is recommended to call
Mauro Carvalho Chehab73470812016-07-01 13:58:44 -030061:ref:`VIDIOC_QUERYCTRL` first and use
Markus Heiser5377d912016-06-30 15:18:56 +020062``maximum``\ +1 as the new ``size`` value. It is guaranteed that that is
63sufficient memory.
64
65N-dimensional arrays are set and retrieved row-by-row. You cannot set a
66partial array, all elements have to be set or retrieved. The total size
67is calculated as ``elems`` * ``elem_size``. These values can be obtained
Mauro Carvalho Chehabaf4a4d02016-07-01 13:42:29 -030068by calling :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`.
Markus Heiser5377d912016-06-30 15:18:56 +020069
70To change the value of a set of controls applications initialize the
71``id``, ``size``, ``reserved2`` and ``value/value64/string/ptr`` fields
72of each struct :ref:`v4l2_ext_control <v4l2-ext-control>` and call
Mauro Carvalho Chehab2212ff22016-07-01 14:33:56 -030073the :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. The controls will only be set if *all*
Markus Heiser5377d912016-06-30 15:18:56 +020074control values are valid.
75
76To check if a set of controls have correct values applications
77initialize the ``id``, ``size``, ``reserved2`` and
78``value/value64/string/ptr`` fields of each struct
79:ref:`v4l2_ext_control <v4l2-ext-control>` and call the
Mauro Carvalho Chehab2212ff22016-07-01 14:33:56 -030080:ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. It is up to the driver whether wrong
Markus Heiser5377d912016-06-30 15:18:56 +020081values are automatically adjusted to a valid value or if an error is
82returned.
83
Mauro Carvalho Chehabcdb4af02016-07-03 11:53:09 -030084When the ``id`` or ``which`` is invalid drivers return an ``EINVAL`` error
Markus Heiser5377d912016-06-30 15:18:56 +020085code. When the value is out of bounds drivers can choose to take the
Mauro Carvalho Chehabcdb4af02016-07-03 11:53:09 -030086closest valid value or return an ``ERANGE`` error code, whatever seems more
Markus Heiser5377d912016-06-30 15:18:56 +020087appropriate. In the first case the new value is set in struct
88:ref:`v4l2_ext_control <v4l2-ext-control>`. If the new control value
89is inappropriate (e.g. the given menu index is not supported by the menu
Mauro Carvalho Chehabcdb4af02016-07-03 11:53:09 -030090control), then this will also result in an ``EINVAL`` error code error.
Markus Heiser5377d912016-06-30 15:18:56 +020091
92The driver will only set/get these controls if all control values are
93correct. This prevents the situation where only some of the controls
94were set/get. Only low-level errors (e. g. a failed i2c command) can
95still cause this situation.
96
97
98.. _v4l2-ext-control:
99
100.. flat-table:: struct v4l2_ext_control
101 :header-rows: 0
102 :stub-columns: 0
103 :widths: 1 1 1 2
104
105
106 - .. row 1
107
108 - __u32
109
110 - ``id``
111
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300112 -
Markus Heiser5377d912016-06-30 15:18:56 +0200113 - Identifies the control, set by the application.
114
115 - .. row 2
116
117 - __u32
118
119 - ``size``
120
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300121 -
Markus Heiser5377d912016-06-30 15:18:56 +0200122 - The total size in bytes of the payload of this control. This is
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300123 normally 0, but for pointer controls this should be set to the
124 size of the memory containing the payload, or that will receive
125 the payload. If :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` finds that this value is
126 less than is required to store the payload result, then it is set
127 to a value large enough to store the payload result and ``ENOSPC`` is
128 returned. Note that for string controls this ``size`` field should
129 not be confused with the length of the string. This field refers
130 to the size of the memory that contains the string. The actual
131 *length* of the string may well be much smaller.
Markus Heiser5377d912016-06-30 15:18:56 +0200132
133 - .. row 3
134
135 - __u32
136
137 - ``reserved2``\ [1]
138
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300139 -
Markus Heiser5377d912016-06-30 15:18:56 +0200140 - Reserved for future extensions. Drivers and applications must set
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300141 the array to zero.
Markus Heiser5377d912016-06-30 15:18:56 +0200142
143 - .. row 4
144
145 - union
146
147 - (anonymous)
148
149 - .. row 5
150
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300151 -
Markus Heiser5377d912016-06-30 15:18:56 +0200152 - __s32
153
154 - ``value``
155
156 - New value or current value. Valid if this control is not of type
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300157 ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is
158 not set.
Markus Heiser5377d912016-06-30 15:18:56 +0200159
160 - .. row 6
161
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300162 -
Markus Heiser5377d912016-06-30 15:18:56 +0200163 - __s64
164
165 - ``value64``
166
167 - New value or current value. Valid if this control is of type
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300168 ``V4L2_CTRL_TYPE_INTEGER64`` and ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is
169 not set.
Markus Heiser5377d912016-06-30 15:18:56 +0200170
171 - .. row 7
172
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300173 -
Markus Heiser5377d912016-06-30 15:18:56 +0200174 - char *
175
176 - ``string``
177
178 - A pointer to a string. Valid if this control is of type
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300179 ``V4L2_CTRL_TYPE_STRING``.
Markus Heiser5377d912016-06-30 15:18:56 +0200180
181 - .. row 8
182
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300183 -
Markus Heiser5377d912016-06-30 15:18:56 +0200184 - __u8 *
185
186 - ``p_u8``
187
188 - A pointer to a matrix control of unsigned 8-bit values. Valid if
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300189 this control is of type ``V4L2_CTRL_TYPE_U8``.
Markus Heiser5377d912016-06-30 15:18:56 +0200190
191 - .. row 9
192
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300193 -
Markus Heiser5377d912016-06-30 15:18:56 +0200194 - __u16 *
195
196 - ``p_u16``
197
198 - A pointer to a matrix control of unsigned 16-bit values. Valid if
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300199 this control is of type ``V4L2_CTRL_TYPE_U16``.
Markus Heiser5377d912016-06-30 15:18:56 +0200200
201 - .. row 10
202
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300203 -
Markus Heiser5377d912016-06-30 15:18:56 +0200204 - __u32 *
205
206 - ``p_u32``
207
208 - A pointer to a matrix control of unsigned 32-bit values. Valid if
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300209 this control is of type ``V4L2_CTRL_TYPE_U32``.
Markus Heiser5377d912016-06-30 15:18:56 +0200210
211 - .. row 11
212
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300213 -
Markus Heiser5377d912016-06-30 15:18:56 +0200214 - void *
215
216 - ``ptr``
217
218 - A pointer to a compound type which can be an N-dimensional array
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300219 and/or a compound type (the control's type is >=
220 ``V4L2_CTRL_COMPOUND_TYPES``). Valid if
221 ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control.
Markus Heiser5377d912016-06-30 15:18:56 +0200222
223
224
225.. _v4l2-ext-controls:
226
227.. flat-table:: struct v4l2_ext_controls
228 :header-rows: 0
229 :stub-columns: 0
230 :widths: 1 1 2 1
231
232
233 - .. row 1
234
235 - union
236
237 - (anonymous)
238
239 - .. row 2
240
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300241 -
Markus Heiser5377d912016-06-30 15:18:56 +0200242 - __u32
243
244 - ``ctrl_class``
245
246 - The control class to which all controls belong, see
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300247 :ref:`ctrl-class`. Drivers that use a kernel framework for
248 handling controls will also accept a value of 0 here, meaning that
249 the controls can belong to any control class. Whether drivers
250 support this can be tested by setting ``ctrl_class`` to 0 and
251 calling :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` with a ``count`` of 0. If that
252 succeeds, then the driver supports this feature.
Markus Heiser5377d912016-06-30 15:18:56 +0200253
254 - .. row 3
255
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300256 -
Markus Heiser5377d912016-06-30 15:18:56 +0200257 - __u32
258
259 - ``which``
260
261 - Which value of the control to get/set/try.
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300262 ``V4L2_CTRL_WHICH_CUR_VAL`` will return the current value of the
263 control and ``V4L2_CTRL_WHICH_DEF_VAL`` will return the default
264 value of the control. Please note that you can only get the
265 default value of the control, you cannot set or try it.
Markus Heiser5377d912016-06-30 15:18:56 +0200266
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300267 For backwards compatibility you can also use a control class here
268 (see :ref:`ctrl-class`). In that case all controls have to
269 belong to that control class. This usage is deprecated, instead
270 just use ``V4L2_CTRL_WHICH_CUR_VAL``. There are some very old
271 drivers that do not yet support ``V4L2_CTRL_WHICH_CUR_VAL`` and
272 that require a control class here. You can test for such drivers
273 by setting ctrl_class to ``V4L2_CTRL_WHICH_CUR_VAL`` and calling
274 VIDIOC_TRY_EXT_CTRLS with a count of 0. If that fails, then the
275 driver does not support ``V4L2_CTRL_WHICH_CUR_VAL``.
Markus Heiser5377d912016-06-30 15:18:56 +0200276
277 - .. row 4
278
279 - __u32
280
281 - ``count``
282
283 - The number of controls in the controls array. May also be zero.
284
285 - .. row 5
286
287 - __u32
288
289 - ``error_idx``
290
291 - Set by the driver in case of an error. If the error is associated
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300292 with a particular control, then ``error_idx`` is set to the index
293 of that control. If the error is not related to a specific
294 control, or the validation step failed (see below), then
295 ``error_idx`` is set to ``count``. The value is undefined if the
296 ioctl returned 0 (success).
Markus Heiser5377d912016-06-30 15:18:56 +0200297
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300298 Before controls are read from/written to hardware a validation
299 step takes place: this checks if all controls in the list are
300 valid controls, if no attempt is made to write to a read-only
301 control or read from a write-only control, and any other up-front
302 checks that can be done without accessing the hardware. The exact
303 validations done during this step are driver dependent since some
304 checks might require hardware access for some devices, thus making
305 it impossible to do those checks up-front. However, drivers should
306 make a best-effort to do as many up-front checks as possible.
Markus Heiser5377d912016-06-30 15:18:56 +0200307
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300308 This check is done to avoid leaving the hardware in an
309 inconsistent state due to easy-to-avoid problems. But it leads to
310 another problem: the application needs to know whether an error
311 came from the validation step (meaning that the hardware was not
312 touched) or from an error during the actual reading from/writing
313 to hardware.
Markus Heiser5377d912016-06-30 15:18:56 +0200314
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300315 The, in hindsight quite poor, solution for that is to set
316 ``error_idx`` to ``count`` if the validation failed. This has the
317 unfortunate side-effect that it is not possible to see which
318 control failed the validation. If the validation was successful
319 and the error happened while accessing the hardware, then
320 ``error_idx`` is less than ``count`` and only the controls up to
321 ``error_idx-1`` were read or written correctly, and the state of
322 the remaining controls is undefined.
Markus Heiser5377d912016-06-30 15:18:56 +0200323
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300324 Since :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` does not access hardware there is
325 also no need to handle the validation step in this special way, so
326 ``error_idx`` will just be set to the control that failed the
327 validation step instead of to ``count``. This means that if
328 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` fails with ``error_idx`` set to ``count``,
329 then you can call :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` to try to discover the
330 actual control that failed the validation step. Unfortunately,
331 there is no ``TRY`` equivalent for :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`.
Markus Heiser5377d912016-06-30 15:18:56 +0200332
333 - .. row 6
334
335 - __u32
336
337 - ``reserved``\ [2]
338
339 - Reserved for future extensions. Drivers and applications must set
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300340 the array to zero.
Markus Heiser5377d912016-06-30 15:18:56 +0200341
342 - .. row 7
343
344 - struct :ref:`v4l2_ext_control <v4l2-ext-control>` *
345
346 - ``controls``
347
348 - Pointer to an array of ``count`` v4l2_ext_control structures.
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300349 Ignored if ``count`` equals zero.
Markus Heiser5377d912016-06-30 15:18:56 +0200350
351
352
353.. _ctrl-class:
354
355.. flat-table:: Control classes
356 :header-rows: 0
357 :stub-columns: 0
358 :widths: 3 1 4
359
360
361 - .. row 1
362
363 - ``V4L2_CTRL_CLASS_USER``
364
365 - 0x980000
366
367 - The class containing user controls. These controls are described
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300368 in :ref:`control`. All controls that can be set using the
369 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and
370 :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this
371 class.
Markus Heiser5377d912016-06-30 15:18:56 +0200372
373 - .. row 2
374
375 - ``V4L2_CTRL_CLASS_MPEG``
376
377 - 0x990000
378
379 - The class containing MPEG compression controls. These controls are
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300380 described in :ref:`mpeg-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200381
382 - .. row 3
383
384 - ``V4L2_CTRL_CLASS_CAMERA``
385
386 - 0x9a0000
387
388 - The class containing camera controls. These controls are described
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300389 in :ref:`camera-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200390
391 - .. row 4
392
393 - ``V4L2_CTRL_CLASS_FM_TX``
394
395 - 0x9b0000
396
397 - The class containing FM Transmitter (FM TX) controls. These
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300398 controls are described in :ref:`fm-tx-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200399
400 - .. row 5
401
402 - ``V4L2_CTRL_CLASS_FLASH``
403
404 - 0x9c0000
405
406 - The class containing flash device controls. These controls are
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300407 described in :ref:`flash-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200408
409 - .. row 6
410
411 - ``V4L2_CTRL_CLASS_JPEG``
412
413 - 0x9d0000
414
415 - The class containing JPEG compression controls. These controls are
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300416 described in :ref:`jpeg-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200417
418 - .. row 7
419
420 - ``V4L2_CTRL_CLASS_IMAGE_SOURCE``
421
422 - 0x9e0000
423
424 - The class containing image source controls. These controls are
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300425 described in :ref:`image-source-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200426
427 - .. row 8
428
429 - ``V4L2_CTRL_CLASS_IMAGE_PROC``
430
431 - 0x9f0000
432
433 - The class containing image processing controls. These controls are
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300434 described in :ref:`image-process-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200435
436 - .. row 9
437
438 - ``V4L2_CTRL_CLASS_FM_RX``
439
440 - 0xa10000
441
442 - The class containing FM Receiver (FM RX) controls. These controls
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300443 are described in :ref:`fm-rx-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200444
445 - .. row 10
446
447 - ``V4L2_CTRL_CLASS_RF_TUNER``
448
449 - 0xa20000
450
451 - The class containing RF tuner controls. These controls are
Mauro Carvalho Chehab0579e6e2016-07-04 16:25:48 -0300452 described in :ref:`rf-tuner-controls`.
Markus Heiser5377d912016-06-30 15:18:56 +0200453
454
Mauro Carvalho Chehab15e7d612016-07-05 15:14:35 -0300455Return Value
Markus Heiser5377d912016-06-30 15:18:56 +0200456============
457
458On success 0 is returned, on error -1 and the ``errno`` variable is set
459appropriately. The generic error codes are described at the
460:ref:`Generic Error Codes <gen-errors>` chapter.
461
462EINVAL
463 The struct :ref:`v4l2_ext_control <v4l2-ext-control>` ``id`` is
464 invalid, the struct :ref:`v4l2_ext_controls <v4l2-ext-controls>`
465 ``which`` is invalid, or the struct
466 :ref:`v4l2_ext_control <v4l2-ext-control>` ``value`` was
467 inappropriate (e.g. the given menu index is not supported by the
468 driver). This error code is also returned by the
Mauro Carvalho Chehab2212ff22016-07-01 14:33:56 -0300469 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctls if two or
Markus Heiser5377d912016-06-30 15:18:56 +0200470 more control values are in conflict.
471
472ERANGE
473 The struct :ref:`v4l2_ext_control <v4l2-ext-control>` ``value``
474 is out of bounds.
475
476EBUSY
477 The control is temporarily not changeable, possibly because another
478 applications took over control of the device function this control
479 belongs to.
480
481ENOSPC
482 The space reserved for the control's payload is insufficient. The
483 field ``size`` is set to a value that is enough to store the payload
484 and this error code is returned.
485
486EACCES
487 Attempt to try or set a read-only control or to get a write-only
488 control.