Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 1 | .. -*- coding: utf-8; mode: rst -*- |
| 2 | |
Markus Heiser | 21c6269 | 2016-07-08 20:55:43 +0200 | [diff] [blame] | 3 | .. _CEC_ADAP_LOG_ADDRS: |
| 4 | .. _CEC_ADAP_G_LOG_ADDRS: |
| 5 | .. _CEC_ADAP_S_LOG_ADDRS: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 6 | |
Hans Verkuil | 1267c60 | 2016-07-13 08:48:54 -0300 | [diff] [blame] | 7 | **************************************************** |
| 8 | ioctls CEC_ADAP_G_LOG_ADDRS and CEC_ADAP_S_LOG_ADDRS |
| 9 | **************************************************** |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 10 | |
Markus Heiser | 21c6269 | 2016-07-08 20:55:43 +0200 | [diff] [blame] | 11 | Name |
| 12 | ==== |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 13 | |
Markus Heiser | 21c6269 | 2016-07-08 20:55:43 +0200 | [diff] [blame] | 14 | CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS - Get or set the logical addresses |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 15 | |
| 16 | |
| 17 | Synopsis |
| 18 | ======== |
| 19 | |
Markus Heiser | 21c6269 | 2016-07-08 20:55:43 +0200 | [diff] [blame] | 20 | .. cpp:function:: int ioctl( int fd, int request, struct cec_log_addrs *argp ) |
| 21 | |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 22 | |
| 23 | Arguments |
| 24 | ========= |
| 25 | |
| 26 | ``fd`` |
| 27 | File descriptor returned by :ref:`open() <cec-func-open>`. |
| 28 | |
| 29 | ``request`` |
| 30 | CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS |
| 31 | |
| 32 | ``argp`` |
| 33 | |
| 34 | |
| 35 | Description |
| 36 | =========== |
| 37 | |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 38 | .. note:: This documents the proposed CEC API. This API is not yet finalized |
| 39 | and is currently only available as a staging kernel module. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 40 | |
Hans Verkuil | 1267c60 | 2016-07-13 08:48:54 -0300 | [diff] [blame] | 41 | To query the current CEC logical addresses, applications call |
| 42 | :ref:`ioctl CEC_ADAP_G_LOG_ADDRS <CEC_ADAP_G_LOG_ADDRS>` with a pointer to a |
| 43 | :c:type:`struct cec_log_addrs` where the driver stores the logical addresses. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 44 | |
Hans Verkuil | 1267c60 | 2016-07-13 08:48:54 -0300 | [diff] [blame] | 45 | To set new logical addresses, applications fill in |
| 46 | :c:type:`struct cec_log_addrs` and call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` |
| 47 | with a pointer to this struct. The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 48 | is only available if ``CEC_CAP_LOG_ADDRS`` is set (the ``ENOTTY`` error code is |
| 49 | returned otherwise). The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` |
| 50 | can only be called by a file descriptor in initiator mode (see :ref:`CEC_S_MODE`), if not |
| 51 | the ``EBUSY`` error code will be returned. |
| 52 | |
| 53 | To clear existing logical addresses set ``num_log_addrs`` to 0. All other fields |
| 54 | will be ignored in that case. The adapter will go to the unconfigured state. |
| 55 | |
| 56 | If the physical address is valid (see :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`), |
| 57 | then this ioctl will block until all requested logical |
| 58 | addresses have been claimed. If the file descriptor is in non-blocking mode then it will |
| 59 | not wait for the logical addresses to be claimed, instead it just returns 0. |
| 60 | |
| 61 | A :ref:`CEC_EVENT_STATE_CHANGE <CEC-EVENT-STATE-CHANGE>` event is sent when the |
| 62 | logical addresses are claimed or cleared. |
| 63 | |
| 64 | Attempting to call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` when |
| 65 | logical address types are already defined will return with error ``EBUSY``. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 66 | |
| 67 | |
| 68 | .. _cec-log-addrs: |
| 69 | |
| 70 | .. flat-table:: struct cec_log_addrs |
| 71 | :header-rows: 0 |
| 72 | :stub-columns: 0 |
Mauro Carvalho Chehab | b2a5843 | 2016-07-08 17:59:27 -0300 | [diff] [blame] | 73 | :widths: 1 1 16 |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 74 | |
| 75 | |
| 76 | - .. row 1 |
| 77 | |
| 78 | - __u8 |
| 79 | |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 80 | - ``log_addr[CEC_MAX_LOG_ADDRS]`` |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 81 | |
| 82 | - The actual logical addresses that were claimed. This is set by the |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 83 | driver. If no logical address could be claimed, then it is set to |
| 84 | ``CEC_LOG_ADDR_INVALID``. If this adapter is Unregistered, then |
Mauro Carvalho Chehab | 8968da9 | 2016-07-13 08:43:30 -0300 | [diff] [blame] | 85 | ``log_addr[0]`` is set to 0xf and all others to |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 86 | ``CEC_LOG_ADDR_INVALID``. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 87 | |
| 88 | - .. row 2 |
| 89 | |
| 90 | - __u16 |
| 91 | |
| 92 | - ``log_addr_mask`` |
| 93 | |
| 94 | - The bitmask of all logical addresses this adapter has claimed. If |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 95 | this adapter is Unregistered then ``log_addr_mask`` sets bit 15 |
| 96 | and clears all other bits. If this adapter is not configured at |
| 97 | all, then ``log_addr_mask`` is set to 0. Set by the driver. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 98 | |
| 99 | - .. row 3 |
| 100 | |
| 101 | - __u8 |
| 102 | |
| 103 | - ``cec_version`` |
| 104 | |
| 105 | - The CEC version that this adapter shall use. See |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 106 | :ref:`cec-versions`. Used to implement the |
| 107 | ``CEC_MSG_CEC_VERSION`` and ``CEC_MSG_REPORT_FEATURES`` messages. |
| 108 | Note that :ref:`CEC_OP_CEC_VERSION_1_3A <CEC-OP-CEC-VERSION-1-3A>` is not allowed by the CEC |
| 109 | framework. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 110 | |
| 111 | - .. row 4 |
| 112 | |
| 113 | - __u8 |
| 114 | |
| 115 | - ``num_log_addrs`` |
| 116 | |
| 117 | - Number of logical addresses to set up. Must be ≤ |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 118 | ``available_log_addrs`` as returned by |
| 119 | :ref:`CEC_ADAP_G_CAPS`. All arrays in |
| 120 | this structure are only filled up to index |
| 121 | ``available_log_addrs``-1. The remaining array elements will be |
| 122 | ignored. Note that the CEC 2.0 standard allows for a maximum of 2 |
| 123 | logical addresses, although some hardware has support for more. |
| 124 | ``CEC_MAX_LOG_ADDRS`` is 4. The driver will return the actual |
| 125 | number of logical addresses it could claim, which may be less than |
| 126 | what was requested. If this field is set to 0, then the CEC |
| 127 | adapter shall clear all claimed logical addresses and all other |
| 128 | fields will be ignored. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 129 | |
| 130 | - .. row 5 |
| 131 | |
| 132 | - __u32 |
| 133 | |
| 134 | - ``vendor_id`` |
| 135 | |
| 136 | - The vendor ID is a 24-bit number that identifies the specific |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 137 | vendor or entity. Based on this ID vendor specific commands may be |
| 138 | defined. If you do not want a vendor ID then set it to |
| 139 | ``CEC_VENDOR_ID_NONE``. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 140 | |
| 141 | - .. row 6 |
| 142 | |
| 143 | - __u32 |
| 144 | |
| 145 | - ``flags`` |
| 146 | |
| 147 | - Flags. No flags are defined yet, so set this to 0. |
| 148 | |
| 149 | - .. row 7 |
| 150 | |
| 151 | - char |
| 152 | |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 153 | - ``osd_name[15]`` |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 154 | |
| 155 | - The On-Screen Display name as is returned by the |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 156 | ``CEC_MSG_SET_OSD_NAME`` message. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 157 | |
| 158 | - .. row 8 |
| 159 | |
| 160 | - __u8 |
| 161 | |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 162 | - ``primary_device_type[CEC_MAX_LOG_ADDRS]`` |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 163 | |
| 164 | - Primary device type for each logical address. See |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 165 | :ref:`cec-prim-dev-types` for possible types. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 166 | |
| 167 | - .. row 9 |
| 168 | |
| 169 | - __u8 |
| 170 | |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 171 | - ``log_addr_type[CEC_MAX_LOG_ADDRS]`` |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 172 | |
| 173 | - Logical address types. See :ref:`cec-log-addr-types` for |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 174 | possible types. The driver will update this with the actual |
| 175 | logical address type that it claimed (e.g. it may have to fallback |
| 176 | to :ref:`CEC_LOG_ADDR_TYPE_UNREGISTERED <CEC-LOG-ADDR-TYPE-UNREGISTERED>`). |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 177 | |
| 178 | - .. row 10 |
| 179 | |
| 180 | - __u8 |
| 181 | |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 182 | - ``all_device_types[CEC_MAX_LOG_ADDRS]`` |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 183 | |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 184 | - CEC 2.0 specific: the bit mask of all device types. See |
| 185 | :ref:`cec-all-dev-types-flags`. It is used in the CEC 2.0 |
| 186 | ``CEC_MSG_REPORT_FEATURES`` message. For CEC 1.4 you can either leave |
| 187 | this field to 0, or fill it in according to the CEC 2.0 guidelines to |
| 188 | give the CEC framework more information about the device type, even |
| 189 | though the framework won't use it directly in the CEC message. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 190 | |
| 191 | - .. row 11 |
| 192 | |
| 193 | - __u8 |
| 194 | |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 195 | - ``features[CEC_MAX_LOG_ADDRS][12]`` |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 196 | |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 197 | - Features for each logical address. It is used in the CEC 2.0 |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 198 | ``CEC_MSG_REPORT_FEATURES`` message. The 12 bytes include both the |
Hans Verkuil | e5208ed | 2016-07-19 06:26:13 -0300 | [diff] [blame^] | 199 | RC Profile and the Device Features. For CEC 1.4 you can either leave |
| 200 | this field to all 0, or fill it in according to the CEC 2.0 guidelines to |
| 201 | give the CEC framework more information about the device type, even |
| 202 | though the framework won't use it directly in the CEC message. |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 203 | |
| 204 | .. _cec-versions: |
| 205 | |
| 206 | .. flat-table:: CEC Versions |
| 207 | :header-rows: 0 |
| 208 | :stub-columns: 0 |
| 209 | :widths: 3 1 4 |
| 210 | |
| 211 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 212 | - .. _`CEC-OP-CEC-VERSION-1-3A`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 213 | |
| 214 | - ``CEC_OP_CEC_VERSION_1_3A`` |
| 215 | |
| 216 | - 4 |
| 217 | |
| 218 | - CEC version according to the HDMI 1.3a standard. |
| 219 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 220 | - .. _`CEC-OP-CEC-VERSION-1-4B`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 221 | |
| 222 | - ``CEC_OP_CEC_VERSION_1_4B`` |
| 223 | |
| 224 | - 5 |
| 225 | |
| 226 | - CEC version according to the HDMI 1.4b standard. |
| 227 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 228 | - .. _`CEC-OP-CEC-VERSION-2-0`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 229 | |
| 230 | - ``CEC_OP_CEC_VERSION_2_0`` |
| 231 | |
| 232 | - 6 |
| 233 | |
| 234 | - CEC version according to the HDMI 2.0 standard. |
| 235 | |
| 236 | |
| 237 | |
| 238 | .. _cec-prim-dev-types: |
| 239 | |
| 240 | .. flat-table:: CEC Primary Device Types |
| 241 | :header-rows: 0 |
| 242 | :stub-columns: 0 |
| 243 | :widths: 3 1 4 |
| 244 | |
| 245 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 246 | - .. _`CEC-OP-PRIM-DEVTYPE-TV`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 247 | |
| 248 | - ``CEC_OP_PRIM_DEVTYPE_TV`` |
| 249 | |
| 250 | - 0 |
| 251 | |
| 252 | - Use for a TV. |
| 253 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 254 | - .. _`CEC-OP-PRIM-DEVTYPE-RECORD`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 255 | |
| 256 | - ``CEC_OP_PRIM_DEVTYPE_RECORD`` |
| 257 | |
| 258 | - 1 |
| 259 | |
| 260 | - Use for a recording device. |
| 261 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 262 | - .. _`CEC-OP-PRIM-DEVTYPE-TUNER`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 263 | |
| 264 | - ``CEC_OP_PRIM_DEVTYPE_TUNER`` |
| 265 | |
| 266 | - 3 |
| 267 | |
| 268 | - Use for a device with a tuner. |
| 269 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 270 | - .. _`CEC-OP-PRIM-DEVTYPE-PLAYBACK`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 271 | |
| 272 | - ``CEC_OP_PRIM_DEVTYPE_PLAYBACK`` |
| 273 | |
| 274 | - 4 |
| 275 | |
| 276 | - Use for a playback device. |
| 277 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 278 | - .. _`CEC-OP-PRIM-DEVTYPE-AUDIOSYSTEM`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 279 | |
| 280 | - ``CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM`` |
| 281 | |
| 282 | - 5 |
| 283 | |
| 284 | - Use for an audio system (e.g. an audio/video receiver). |
| 285 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 286 | - .. _`CEC-OP-PRIM-DEVTYPE-SWITCH`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 287 | |
| 288 | - ``CEC_OP_PRIM_DEVTYPE_SWITCH`` |
| 289 | |
| 290 | - 6 |
| 291 | |
| 292 | - Use for a CEC switch. |
| 293 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 294 | - .. _`CEC-OP-PRIM-DEVTYPE-VIDEOPROC`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 295 | |
| 296 | - ``CEC_OP_PRIM_DEVTYPE_VIDEOPROC`` |
| 297 | |
| 298 | - 7 |
| 299 | |
| 300 | - Use for a video processor device. |
| 301 | |
| 302 | |
| 303 | |
| 304 | .. _cec-log-addr-types: |
| 305 | |
| 306 | .. flat-table:: CEC Logical Address Types |
| 307 | :header-rows: 0 |
| 308 | :stub-columns: 0 |
Mauro Carvalho Chehab | b2a5843 | 2016-07-08 17:59:27 -0300 | [diff] [blame] | 309 | :widths: 3 1 16 |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 310 | |
| 311 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 312 | - .. _`CEC-LOG-ADDR-TYPE-TV`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 313 | |
| 314 | - ``CEC_LOG_ADDR_TYPE_TV`` |
| 315 | |
| 316 | - 0 |
| 317 | |
| 318 | - Use for a TV. |
| 319 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 320 | - .. _`CEC-LOG-ADDR-TYPE-RECORD`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 321 | |
| 322 | - ``CEC_LOG_ADDR_TYPE_RECORD`` |
| 323 | |
| 324 | - 1 |
| 325 | |
| 326 | - Use for a recording device. |
| 327 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 328 | - .. _`CEC-LOG-ADDR-TYPE-TUNER`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 329 | |
| 330 | - ``CEC_LOG_ADDR_TYPE_TUNER`` |
| 331 | |
| 332 | - 2 |
| 333 | |
| 334 | - Use for a tuner device. |
| 335 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 336 | - .. _`CEC-LOG-ADDR-TYPE-PLAYBACK`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 337 | |
| 338 | - ``CEC_LOG_ADDR_TYPE_PLAYBACK`` |
| 339 | |
| 340 | - 3 |
| 341 | |
| 342 | - Use for a playback device. |
| 343 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 344 | - .. _`CEC-LOG-ADDR-TYPE-AUDIOSYSTEM`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 345 | |
| 346 | - ``CEC_LOG_ADDR_TYPE_AUDIOSYSTEM`` |
| 347 | |
| 348 | - 4 |
| 349 | |
| 350 | - Use for an audio system device. |
| 351 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 352 | - .. _`CEC-LOG-ADDR-TYPE-SPECIFIC`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 353 | |
| 354 | - ``CEC_LOG_ADDR_TYPE_SPECIFIC`` |
| 355 | |
| 356 | - 5 |
| 357 | |
| 358 | - Use for a second TV or for a video processor device. |
| 359 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 360 | - .. _`CEC-LOG-ADDR-TYPE-UNREGISTERED`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 361 | |
| 362 | - ``CEC_LOG_ADDR_TYPE_UNREGISTERED`` |
| 363 | |
| 364 | - 6 |
| 365 | |
| 366 | - Use this if you just want to remain unregistered. Used for pure |
Mauro Carvalho Chehab | 706f8a9 | 2016-07-10 11:57:43 -0300 | [diff] [blame] | 367 | CEC switches or CDC-only devices (CDC: Capability Discovery and |
| 368 | Control). |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 369 | |
| 370 | |
| 371 | |
| 372 | .. _cec-all-dev-types-flags: |
| 373 | |
| 374 | .. flat-table:: CEC All Device Types Flags |
| 375 | :header-rows: 0 |
| 376 | :stub-columns: 0 |
| 377 | :widths: 3 1 4 |
| 378 | |
| 379 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 380 | - .. _`CEC-OP-ALL-DEVTYPE-TV`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 381 | |
| 382 | - ``CEC_OP_ALL_DEVTYPE_TV`` |
| 383 | |
| 384 | - 0x80 |
| 385 | |
| 386 | - This supports the TV type. |
| 387 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 388 | - .. _`CEC-OP-ALL-DEVTYPE-RECORD`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 389 | |
| 390 | - ``CEC_OP_ALL_DEVTYPE_RECORD`` |
| 391 | |
| 392 | - 0x40 |
| 393 | |
| 394 | - This supports the Recording type. |
| 395 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 396 | - .. _`CEC-OP-ALL-DEVTYPE-TUNER`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 397 | |
| 398 | - ``CEC_OP_ALL_DEVTYPE_TUNER`` |
| 399 | |
| 400 | - 0x20 |
| 401 | |
| 402 | - This supports the Tuner type. |
| 403 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 404 | - .. _`CEC-OP-ALL-DEVTYPE-PLAYBACK`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 405 | |
| 406 | - ``CEC_OP_ALL_DEVTYPE_PLAYBACK`` |
| 407 | |
| 408 | - 0x10 |
| 409 | |
| 410 | - This supports the Playback type. |
| 411 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 412 | - .. _`CEC-OP-ALL-DEVTYPE-AUDIOSYSTEM`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 413 | |
| 414 | - ``CEC_OP_ALL_DEVTYPE_AUDIOSYSTEM`` |
| 415 | |
| 416 | - 0x08 |
| 417 | |
| 418 | - This supports the Audio System type. |
| 419 | |
Mauro Carvalho Chehab | 96f69e0 | 2016-07-09 10:25:05 -0300 | [diff] [blame] | 420 | - .. _`CEC-OP-ALL-DEVTYPE-SWITCH`: |
Markus Heiser | e2460b1 | 2016-07-08 20:55:42 +0200 | [diff] [blame] | 421 | |
| 422 | - ``CEC_OP_ALL_DEVTYPE_SWITCH`` |
| 423 | |
| 424 | - 0x04 |
| 425 | |
| 426 | - This supports the CEC Switch or Video Processing type. |
| 427 | |
| 428 | |
| 429 | |
| 430 | Return Value |
| 431 | ============ |
| 432 | |
| 433 | On success 0 is returned, on error -1 and the ``errno`` variable is set |
| 434 | appropriately. The generic error codes are described at the |
| 435 | :ref:`Generic Error Codes <gen-errors>` chapter. |
| 436 | |