Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 1 | .. -*- coding: utf-8; mode: rst -*- |
| 2 | |
Mauro Carvalho Chehab | af4a4d0 | 2016-07-01 13:42:29 -0300 | [diff] [blame] | 3 | .. _VIDIOC_ENUM_DV_TIMINGS: |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 4 | |
| 5 | *********************************************************** |
| 6 | ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS |
| 7 | *********************************************************** |
| 8 | |
| 9 | *man VIDIOC_ENUM_DV_TIMINGS(2)* |
| 10 | |
| 11 | VIDIOC_SUBDEV_ENUM_DV_TIMINGS |
| 12 | Enumerate supported Digital Video timings |
| 13 | |
| 14 | |
| 15 | Synopsis |
| 16 | ======== |
| 17 | |
Mauro Carvalho Chehab | b7e67f6 | 2016-07-02 09:49:16 -0300 | [diff] [blame] | 18 | .. cpp:function:: int ioctl( int fd, int request, struct v4l2_enum_dv_timings *argp ) |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 19 | |
| 20 | Arguments |
| 21 | ========= |
| 22 | |
| 23 | ``fd`` |
| 24 | File descriptor returned by :ref:`open() <func-open>`. |
| 25 | |
| 26 | ``request`` |
| 27 | VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS |
| 28 | |
| 29 | ``argp`` |
| 30 | |
| 31 | |
| 32 | Description |
| 33 | =========== |
| 34 | |
| 35 | While some DV receivers or transmitters support a wide range of timings, |
| 36 | others support only a limited number of timings. With this ioctl |
| 37 | applications can enumerate a list of known supported timings. Call |
Mauro Carvalho Chehab | 7347081 | 2016-07-01 13:58:44 -0300 | [diff] [blame] | 38 | :ref:`VIDIOC_DV_TIMINGS_CAP` to check if it |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 39 | also supports other standards or even custom timings that are not in |
| 40 | this list. |
| 41 | |
| 42 | To query the available timings, applications initialize the ``index`` |
| 43 | field, set the ``pad`` field to 0, zero the reserved array of struct |
| 44 | :ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` and call the |
| 45 | ``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 46 | structure. Drivers fill the rest of the structure or return an ``EINVAL`` |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 47 | error code when the index is out of bounds. To enumerate all supported |
| 48 | DV timings, applications shall begin at index zero, incrementing by one |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 49 | until the driver returns ``EINVAL``. Note that drivers may enumerate a |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 50 | different set of DV timings after switching the video input or output. |
| 51 | |
| 52 | When implemented by the driver DV timings of subdevices can be queried |
| 53 | by calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a |
| 54 | subdevice node. The DV timings are specific to inputs (for DV receivers) |
| 55 | or outputs (for DV transmitters), applications must specify the desired |
| 56 | pad number in the struct |
| 57 | :ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` ``pad`` field. |
| 58 | Attempts to enumerate timings on a pad that doesn't support them will |
Mauro Carvalho Chehab | cdb4af0 | 2016-07-03 11:53:09 -0300 | [diff] [blame] | 59 | return an ``EINVAL`` error code. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 60 | |
| 61 | |
| 62 | .. _v4l2-enum-dv-timings: |
| 63 | |
| 64 | .. flat-table:: struct v4l2_enum_dv_timings |
| 65 | :header-rows: 0 |
| 66 | :stub-columns: 0 |
| 67 | :widths: 1 1 2 |
| 68 | |
| 69 | |
| 70 | - .. row 1 |
| 71 | |
| 72 | - __u32 |
| 73 | |
| 74 | - ``index`` |
| 75 | |
| 76 | - Number of the DV timings, set by the application. |
| 77 | |
| 78 | - .. row 2 |
| 79 | |
| 80 | - __u32 |
| 81 | |
| 82 | - ``pad`` |
| 83 | |
| 84 | - Pad number as reported by the media controller API. This field is |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame] | 85 | only used when operating on a subdevice node. When operating on a |
| 86 | video node applications must set this field to zero. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 87 | |
| 88 | - .. row 3 |
| 89 | |
| 90 | - __u32 |
| 91 | |
| 92 | - ``reserved``\ [2] |
| 93 | |
| 94 | - Reserved for future extensions. Drivers and applications must set |
Mauro Carvalho Chehab | 0579e6e | 2016-07-04 16:25:48 -0300 | [diff] [blame] | 95 | the array to zero. |
Markus Heiser | 5377d91 | 2016-06-30 15:18:56 +0200 | [diff] [blame] | 96 | |
| 97 | - .. row 4 |
| 98 | |
| 99 | - struct :ref:`v4l2_dv_timings <v4l2-dv-timings>` |
| 100 | |
| 101 | - ``timings`` |
| 102 | |
| 103 | - The timings. |
| 104 | |
| 105 | |
| 106 | |
| 107 | Return Value |
| 108 | ============ |
| 109 | |
| 110 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 111 | appropriately. The generic error codes are described at the |
| 112 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 113 | |
| 114 | EINVAL |
| 115 | The struct :ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` |
| 116 | ``index`` is out of bounds or the ``pad`` number is invalid. |
| 117 | |
| 118 | ENODATA |
| 119 | Digital video presets are not supported for this input or output. |