1*4882a593Smuzhiyun.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2*4882a593Smuzhiyun.. c:namespace:: CEC 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun.. _CEC_ADAP_LOG_ADDRS: 5*4882a593Smuzhiyun.. _CEC_ADAP_G_LOG_ADDRS: 6*4882a593Smuzhiyun.. _CEC_ADAP_S_LOG_ADDRS: 7*4882a593Smuzhiyun 8*4882a593Smuzhiyun**************************************************** 9*4882a593Smuzhiyunioctls CEC_ADAP_G_LOG_ADDRS and CEC_ADAP_S_LOG_ADDRS 10*4882a593Smuzhiyun**************************************************** 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunName 13*4882a593Smuzhiyun==== 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunCEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS - Get or set the logical addresses 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunSynopsis 18*4882a593Smuzhiyun======== 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun.. c:macro:: CEC_ADAP_G_LOG_ADDRS 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun``int ioctl(int fd, CEC_ADAP_G_LOG_ADDRS, struct cec_log_addrs *argp)`` 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun.. c:macro:: CEC_ADAP_S_LOG_ADDRS 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun``int ioctl(int fd, CEC_ADAP_S_LOG_ADDRS, struct cec_log_addrs *argp)`` 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunArguments 29*4882a593Smuzhiyun========= 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun``fd`` 32*4882a593Smuzhiyun File descriptor returned by :c:func:`open()`. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun``argp`` 35*4882a593Smuzhiyun Pointer to struct :c:type:`cec_log_addrs`. 36*4882a593Smuzhiyun 37*4882a593SmuzhiyunDescription 38*4882a593Smuzhiyun=========== 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunTo query the current CEC logical addresses, applications call 41*4882a593Smuzhiyun:ref:`ioctl CEC_ADAP_G_LOG_ADDRS <CEC_ADAP_G_LOG_ADDRS>` with a pointer to a 42*4882a593Smuzhiyunstruct :c:type:`cec_log_addrs` where the driver stores the logical addresses. 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunTo set new logical addresses, applications fill in 45*4882a593Smuzhiyunstruct :c:type:`cec_log_addrs` and call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` 46*4882a593Smuzhiyunwith a pointer to this struct. The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` 47*4882a593Smuzhiyunis only available if ``CEC_CAP_LOG_ADDRS`` is set (the ``ENOTTY`` error code is 48*4882a593Smuzhiyunreturned otherwise). The :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` 49*4882a593Smuzhiyuncan only be called by a file descriptor in initiator mode (see :ref:`CEC_S_MODE`), if not 50*4882a593Smuzhiyunthe ``EBUSY`` error code will be returned. 51*4882a593Smuzhiyun 52*4882a593SmuzhiyunTo clear existing logical addresses set ``num_log_addrs`` to 0. All other fields 53*4882a593Smuzhiyunwill be ignored in that case. The adapter will go to the unconfigured state and the 54*4882a593Smuzhiyun``cec_version``, ``vendor_id`` and ``osd_name`` fields are all reset to their default 55*4882a593Smuzhiyunvalues (CEC version 2.0, no vendor ID and an empty OSD name). 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunIf the physical address is valid (see :ref:`ioctl CEC_ADAP_S_PHYS_ADDR <CEC_ADAP_S_PHYS_ADDR>`), 58*4882a593Smuzhiyunthen this ioctl will block until all requested logical 59*4882a593Smuzhiyunaddresses have been claimed. If the file descriptor is in non-blocking mode then it will 60*4882a593Smuzhiyunnot wait for the logical addresses to be claimed, instead it just returns 0. 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunA :ref:`CEC_EVENT_STATE_CHANGE <CEC-EVENT-STATE-CHANGE>` event is sent when the 63*4882a593Smuzhiyunlogical addresses are claimed or cleared. 64*4882a593Smuzhiyun 65*4882a593SmuzhiyunAttempting to call :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` when 66*4882a593Smuzhiyunlogical address types are already defined will return with error ``EBUSY``. 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun.. c:type:: cec_log_addrs 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun.. tabularcolumns:: |p{1.0cm}|p{8.0cm}|p{7.5cm}| 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun.. cssclass:: longtable 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun.. flat-table:: struct cec_log_addrs 75*4882a593Smuzhiyun :header-rows: 0 76*4882a593Smuzhiyun :stub-columns: 0 77*4882a593Smuzhiyun :widths: 1 1 16 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun * - __u8 80*4882a593Smuzhiyun - ``log_addr[CEC_MAX_LOG_ADDRS]`` 81*4882a593Smuzhiyun - The actual logical addresses that were claimed. This is set by the 82*4882a593Smuzhiyun driver. If no logical address could be claimed, then it is set to 83*4882a593Smuzhiyun ``CEC_LOG_ADDR_INVALID``. If this adapter is Unregistered, then 84*4882a593Smuzhiyun ``log_addr[0]`` is set to 0xf and all others to 85*4882a593Smuzhiyun ``CEC_LOG_ADDR_INVALID``. 86*4882a593Smuzhiyun * - __u16 87*4882a593Smuzhiyun - ``log_addr_mask`` 88*4882a593Smuzhiyun - The bitmask of all logical addresses this adapter has claimed. If 89*4882a593Smuzhiyun this adapter is Unregistered then ``log_addr_mask`` sets bit 15 90*4882a593Smuzhiyun and clears all other bits. If this adapter is not configured at 91*4882a593Smuzhiyun all, then ``log_addr_mask`` is set to 0. Set by the driver. 92*4882a593Smuzhiyun * - __u8 93*4882a593Smuzhiyun - ``cec_version`` 94*4882a593Smuzhiyun - The CEC version that this adapter shall use. See 95*4882a593Smuzhiyun :ref:`cec-versions`. Used to implement the 96*4882a593Smuzhiyun ``CEC_MSG_CEC_VERSION`` and ``CEC_MSG_REPORT_FEATURES`` messages. 97*4882a593Smuzhiyun Note that :ref:`CEC_OP_CEC_VERSION_1_3A <CEC-OP-CEC-VERSION-1-3A>` is not allowed by the CEC 98*4882a593Smuzhiyun framework. 99*4882a593Smuzhiyun * - __u8 100*4882a593Smuzhiyun - ``num_log_addrs`` 101*4882a593Smuzhiyun - Number of logical addresses to set up. Must be ≤ 102*4882a593Smuzhiyun ``available_log_addrs`` as returned by 103*4882a593Smuzhiyun :ref:`CEC_ADAP_G_CAPS`. All arrays in 104*4882a593Smuzhiyun this structure are only filled up to index 105*4882a593Smuzhiyun ``available_log_addrs``-1. The remaining array elements will be 106*4882a593Smuzhiyun ignored. Note that the CEC 2.0 standard allows for a maximum of 2 107*4882a593Smuzhiyun logical addresses, although some hardware has support for more. 108*4882a593Smuzhiyun ``CEC_MAX_LOG_ADDRS`` is 4. The driver will return the actual 109*4882a593Smuzhiyun number of logical addresses it could claim, which may be less than 110*4882a593Smuzhiyun what was requested. If this field is set to 0, then the CEC 111*4882a593Smuzhiyun adapter shall clear all claimed logical addresses and all other 112*4882a593Smuzhiyun fields will be ignored. 113*4882a593Smuzhiyun * - __u32 114*4882a593Smuzhiyun - ``vendor_id`` 115*4882a593Smuzhiyun - The vendor ID is a 24-bit number that identifies the specific 116*4882a593Smuzhiyun vendor or entity. Based on this ID vendor specific commands may be 117*4882a593Smuzhiyun defined. If you do not want a vendor ID then set it to 118*4882a593Smuzhiyun ``CEC_VENDOR_ID_NONE``. 119*4882a593Smuzhiyun * - __u32 120*4882a593Smuzhiyun - ``flags`` 121*4882a593Smuzhiyun - Flags. See :ref:`cec-log-addrs-flags` for a list of available flags. 122*4882a593Smuzhiyun * - char 123*4882a593Smuzhiyun - ``osd_name[15]`` 124*4882a593Smuzhiyun - The On-Screen Display name as is returned by the 125*4882a593Smuzhiyun ``CEC_MSG_SET_OSD_NAME`` message. 126*4882a593Smuzhiyun * - __u8 127*4882a593Smuzhiyun - ``primary_device_type[CEC_MAX_LOG_ADDRS]`` 128*4882a593Smuzhiyun - Primary device type for each logical address. See 129*4882a593Smuzhiyun :ref:`cec-prim-dev-types` for possible types. 130*4882a593Smuzhiyun * - __u8 131*4882a593Smuzhiyun - ``log_addr_type[CEC_MAX_LOG_ADDRS]`` 132*4882a593Smuzhiyun - Logical address types. See :ref:`cec-log-addr-types` for 133*4882a593Smuzhiyun possible types. The driver will update this with the actual 134*4882a593Smuzhiyun logical address type that it claimed (e.g. it may have to fallback 135*4882a593Smuzhiyun to :ref:`CEC_LOG_ADDR_TYPE_UNREGISTERED <CEC-LOG-ADDR-TYPE-UNREGISTERED>`). 136*4882a593Smuzhiyun * - __u8 137*4882a593Smuzhiyun - ``all_device_types[CEC_MAX_LOG_ADDRS]`` 138*4882a593Smuzhiyun - CEC 2.0 specific: the bit mask of all device types. See 139*4882a593Smuzhiyun :ref:`cec-all-dev-types-flags`. It is used in the CEC 2.0 140*4882a593Smuzhiyun ``CEC_MSG_REPORT_FEATURES`` message. For CEC 1.4 you can either leave 141*4882a593Smuzhiyun this field to 0, or fill it in according to the CEC 2.0 guidelines to 142*4882a593Smuzhiyun give the CEC framework more information about the device type, even 143*4882a593Smuzhiyun though the framework won't use it directly in the CEC message. 144*4882a593Smuzhiyun * - __u8 145*4882a593Smuzhiyun - ``features[CEC_MAX_LOG_ADDRS][12]`` 146*4882a593Smuzhiyun - Features for each logical address. It is used in the CEC 2.0 147*4882a593Smuzhiyun ``CEC_MSG_REPORT_FEATURES`` message. The 12 bytes include both the 148*4882a593Smuzhiyun RC Profile and the Device Features. For CEC 1.4 you can either leave 149*4882a593Smuzhiyun this field to all 0, or fill it in according to the CEC 2.0 guidelines to 150*4882a593Smuzhiyun give the CEC framework more information about the device type, even 151*4882a593Smuzhiyun though the framework won't use it directly in the CEC message. 152*4882a593Smuzhiyun 153*4882a593Smuzhiyun.. tabularcolumns:: |p{7.8cm}|p{1.0cm}|p{8.7cm}| 154*4882a593Smuzhiyun 155*4882a593Smuzhiyun.. _cec-log-addrs-flags: 156*4882a593Smuzhiyun 157*4882a593Smuzhiyun.. flat-table:: Flags for struct cec_log_addrs 158*4882a593Smuzhiyun :header-rows: 0 159*4882a593Smuzhiyun :stub-columns: 0 160*4882a593Smuzhiyun :widths: 3 1 4 161*4882a593Smuzhiyun 162*4882a593Smuzhiyun * .. _`CEC-LOG-ADDRS-FL-ALLOW-UNREG-FALLBACK`: 163*4882a593Smuzhiyun 164*4882a593Smuzhiyun - ``CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK`` 165*4882a593Smuzhiyun - 1 166*4882a593Smuzhiyun - By default if no logical address of the requested type can be claimed, then 167*4882a593Smuzhiyun it will go back to the unconfigured state. If this flag is set, then it will 168*4882a593Smuzhiyun fallback to the Unregistered logical address. Note that if the Unregistered 169*4882a593Smuzhiyun logical address was explicitly requested, then this flag has no effect. 170*4882a593Smuzhiyun * .. _`CEC-LOG-ADDRS-FL-ALLOW-RC-PASSTHRU`: 171*4882a593Smuzhiyun 172*4882a593Smuzhiyun - ``CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU`` 173*4882a593Smuzhiyun - 2 174*4882a593Smuzhiyun - By default the ``CEC_MSG_USER_CONTROL_PRESSED`` and ``CEC_MSG_USER_CONTROL_RELEASED`` 175*4882a593Smuzhiyun messages are only passed on to the follower(s), if any. If this flag is set, 176*4882a593Smuzhiyun then these messages are also passed on to the remote control input subsystem 177*4882a593Smuzhiyun and will appear as keystrokes. This features needs to be enabled explicitly. 178*4882a593Smuzhiyun If CEC is used to enter e.g. passwords, then you may not want to enable this 179*4882a593Smuzhiyun to avoid trivial snooping of the keystrokes. 180*4882a593Smuzhiyun * .. _`CEC-LOG-ADDRS-FL-CDC-ONLY`: 181*4882a593Smuzhiyun 182*4882a593Smuzhiyun - ``CEC_LOG_ADDRS_FL_CDC_ONLY`` 183*4882a593Smuzhiyun - 4 184*4882a593Smuzhiyun - If this flag is set, then the device is CDC-Only. CDC-Only CEC devices 185*4882a593Smuzhiyun are CEC devices that can only handle CDC messages. 186*4882a593Smuzhiyun 187*4882a593Smuzhiyun All other messages are ignored. 188*4882a593Smuzhiyun 189*4882a593Smuzhiyun.. tabularcolumns:: |p{7.8cm}|p{1.0cm}|p{8.7cm}| 190*4882a593Smuzhiyun 191*4882a593Smuzhiyun.. _cec-versions: 192*4882a593Smuzhiyun 193*4882a593Smuzhiyun.. flat-table:: CEC Versions 194*4882a593Smuzhiyun :header-rows: 0 195*4882a593Smuzhiyun :stub-columns: 0 196*4882a593Smuzhiyun :widths: 3 1 4 197*4882a593Smuzhiyun 198*4882a593Smuzhiyun * .. _`CEC-OP-CEC-VERSION-1-3A`: 199*4882a593Smuzhiyun 200*4882a593Smuzhiyun - ``CEC_OP_CEC_VERSION_1_3A`` 201*4882a593Smuzhiyun - 4 202*4882a593Smuzhiyun - CEC version according to the HDMI 1.3a standard. 203*4882a593Smuzhiyun * .. _`CEC-OP-CEC-VERSION-1-4B`: 204*4882a593Smuzhiyun 205*4882a593Smuzhiyun - ``CEC_OP_CEC_VERSION_1_4B`` 206*4882a593Smuzhiyun - 5 207*4882a593Smuzhiyun - CEC version according to the HDMI 1.4b standard. 208*4882a593Smuzhiyun * .. _`CEC-OP-CEC-VERSION-2-0`: 209*4882a593Smuzhiyun 210*4882a593Smuzhiyun - ``CEC_OP_CEC_VERSION_2_0`` 211*4882a593Smuzhiyun - 6 212*4882a593Smuzhiyun - CEC version according to the HDMI 2.0 standard. 213*4882a593Smuzhiyun 214*4882a593Smuzhiyun.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 215*4882a593Smuzhiyun 216*4882a593Smuzhiyun.. _cec-prim-dev-types: 217*4882a593Smuzhiyun 218*4882a593Smuzhiyun.. flat-table:: CEC Primary Device Types 219*4882a593Smuzhiyun :header-rows: 0 220*4882a593Smuzhiyun :stub-columns: 0 221*4882a593Smuzhiyun :widths: 3 1 4 222*4882a593Smuzhiyun 223*4882a593Smuzhiyun * .. _`CEC-OP-PRIM-DEVTYPE-TV`: 224*4882a593Smuzhiyun 225*4882a593Smuzhiyun - ``CEC_OP_PRIM_DEVTYPE_TV`` 226*4882a593Smuzhiyun - 0 227*4882a593Smuzhiyun - Use for a TV. 228*4882a593Smuzhiyun * .. _`CEC-OP-PRIM-DEVTYPE-RECORD`: 229*4882a593Smuzhiyun 230*4882a593Smuzhiyun - ``CEC_OP_PRIM_DEVTYPE_RECORD`` 231*4882a593Smuzhiyun - 1 232*4882a593Smuzhiyun - Use for a recording device. 233*4882a593Smuzhiyun * .. _`CEC-OP-PRIM-DEVTYPE-TUNER`: 234*4882a593Smuzhiyun 235*4882a593Smuzhiyun - ``CEC_OP_PRIM_DEVTYPE_TUNER`` 236*4882a593Smuzhiyun - 3 237*4882a593Smuzhiyun - Use for a device with a tuner. 238*4882a593Smuzhiyun * .. _`CEC-OP-PRIM-DEVTYPE-PLAYBACK`: 239*4882a593Smuzhiyun 240*4882a593Smuzhiyun - ``CEC_OP_PRIM_DEVTYPE_PLAYBACK`` 241*4882a593Smuzhiyun - 4 242*4882a593Smuzhiyun - Use for a playback device. 243*4882a593Smuzhiyun * .. _`CEC-OP-PRIM-DEVTYPE-AUDIOSYSTEM`: 244*4882a593Smuzhiyun 245*4882a593Smuzhiyun - ``CEC_OP_PRIM_DEVTYPE_AUDIOSYSTEM`` 246*4882a593Smuzhiyun - 5 247*4882a593Smuzhiyun - Use for an audio system (e.g. an audio/video receiver). 248*4882a593Smuzhiyun * .. _`CEC-OP-PRIM-DEVTYPE-SWITCH`: 249*4882a593Smuzhiyun 250*4882a593Smuzhiyun - ``CEC_OP_PRIM_DEVTYPE_SWITCH`` 251*4882a593Smuzhiyun - 6 252*4882a593Smuzhiyun - Use for a CEC switch. 253*4882a593Smuzhiyun * .. _`CEC-OP-PRIM-DEVTYPE-VIDEOPROC`: 254*4882a593Smuzhiyun 255*4882a593Smuzhiyun - ``CEC_OP_PRIM_DEVTYPE_VIDEOPROC`` 256*4882a593Smuzhiyun - 7 257*4882a593Smuzhiyun - Use for a video processor device. 258*4882a593Smuzhiyun 259*4882a593Smuzhiyun.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 260*4882a593Smuzhiyun 261*4882a593Smuzhiyun.. _cec-log-addr-types: 262*4882a593Smuzhiyun 263*4882a593Smuzhiyun.. flat-table:: CEC Logical Address Types 264*4882a593Smuzhiyun :header-rows: 0 265*4882a593Smuzhiyun :stub-columns: 0 266*4882a593Smuzhiyun :widths: 3 1 16 267*4882a593Smuzhiyun 268*4882a593Smuzhiyun * .. _`CEC-LOG-ADDR-TYPE-TV`: 269*4882a593Smuzhiyun 270*4882a593Smuzhiyun - ``CEC_LOG_ADDR_TYPE_TV`` 271*4882a593Smuzhiyun - 0 272*4882a593Smuzhiyun - Use for a TV. 273*4882a593Smuzhiyun * .. _`CEC-LOG-ADDR-TYPE-RECORD`: 274*4882a593Smuzhiyun 275*4882a593Smuzhiyun - ``CEC_LOG_ADDR_TYPE_RECORD`` 276*4882a593Smuzhiyun - 1 277*4882a593Smuzhiyun - Use for a recording device. 278*4882a593Smuzhiyun * .. _`CEC-LOG-ADDR-TYPE-TUNER`: 279*4882a593Smuzhiyun 280*4882a593Smuzhiyun - ``CEC_LOG_ADDR_TYPE_TUNER`` 281*4882a593Smuzhiyun - 2 282*4882a593Smuzhiyun - Use for a tuner device. 283*4882a593Smuzhiyun * .. _`CEC-LOG-ADDR-TYPE-PLAYBACK`: 284*4882a593Smuzhiyun 285*4882a593Smuzhiyun - ``CEC_LOG_ADDR_TYPE_PLAYBACK`` 286*4882a593Smuzhiyun - 3 287*4882a593Smuzhiyun - Use for a playback device. 288*4882a593Smuzhiyun * .. _`CEC-LOG-ADDR-TYPE-AUDIOSYSTEM`: 289*4882a593Smuzhiyun 290*4882a593Smuzhiyun - ``CEC_LOG_ADDR_TYPE_AUDIOSYSTEM`` 291*4882a593Smuzhiyun - 4 292*4882a593Smuzhiyun - Use for an audio system device. 293*4882a593Smuzhiyun * .. _`CEC-LOG-ADDR-TYPE-SPECIFIC`: 294*4882a593Smuzhiyun 295*4882a593Smuzhiyun - ``CEC_LOG_ADDR_TYPE_SPECIFIC`` 296*4882a593Smuzhiyun - 5 297*4882a593Smuzhiyun - Use for a second TV or for a video processor device. 298*4882a593Smuzhiyun * .. _`CEC-LOG-ADDR-TYPE-UNREGISTERED`: 299*4882a593Smuzhiyun 300*4882a593Smuzhiyun - ``CEC_LOG_ADDR_TYPE_UNREGISTERED`` 301*4882a593Smuzhiyun - 6 302*4882a593Smuzhiyun - Use this if you just want to remain unregistered. Used for pure 303*4882a593Smuzhiyun CEC switches or CDC-only devices (CDC: Capability Discovery and 304*4882a593Smuzhiyun Control). 305*4882a593Smuzhiyun 306*4882a593Smuzhiyun 307*4882a593Smuzhiyun.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 308*4882a593Smuzhiyun 309*4882a593Smuzhiyun.. _cec-all-dev-types-flags: 310*4882a593Smuzhiyun 311*4882a593Smuzhiyun.. flat-table:: CEC All Device Types Flags 312*4882a593Smuzhiyun :header-rows: 0 313*4882a593Smuzhiyun :stub-columns: 0 314*4882a593Smuzhiyun :widths: 3 1 4 315*4882a593Smuzhiyun 316*4882a593Smuzhiyun * .. _`CEC-OP-ALL-DEVTYPE-TV`: 317*4882a593Smuzhiyun 318*4882a593Smuzhiyun - ``CEC_OP_ALL_DEVTYPE_TV`` 319*4882a593Smuzhiyun - 0x80 320*4882a593Smuzhiyun - This supports the TV type. 321*4882a593Smuzhiyun * .. _`CEC-OP-ALL-DEVTYPE-RECORD`: 322*4882a593Smuzhiyun 323*4882a593Smuzhiyun - ``CEC_OP_ALL_DEVTYPE_RECORD`` 324*4882a593Smuzhiyun - 0x40 325*4882a593Smuzhiyun - This supports the Recording type. 326*4882a593Smuzhiyun * .. _`CEC-OP-ALL-DEVTYPE-TUNER`: 327*4882a593Smuzhiyun 328*4882a593Smuzhiyun - ``CEC_OP_ALL_DEVTYPE_TUNER`` 329*4882a593Smuzhiyun - 0x20 330*4882a593Smuzhiyun - This supports the Tuner type. 331*4882a593Smuzhiyun * .. _`CEC-OP-ALL-DEVTYPE-PLAYBACK`: 332*4882a593Smuzhiyun 333*4882a593Smuzhiyun - ``CEC_OP_ALL_DEVTYPE_PLAYBACK`` 334*4882a593Smuzhiyun - 0x10 335*4882a593Smuzhiyun - This supports the Playback type. 336*4882a593Smuzhiyun * .. _`CEC-OP-ALL-DEVTYPE-AUDIOSYSTEM`: 337*4882a593Smuzhiyun 338*4882a593Smuzhiyun - ``CEC_OP_ALL_DEVTYPE_AUDIOSYSTEM`` 339*4882a593Smuzhiyun - 0x08 340*4882a593Smuzhiyun - This supports the Audio System type. 341*4882a593Smuzhiyun * .. _`CEC-OP-ALL-DEVTYPE-SWITCH`: 342*4882a593Smuzhiyun 343*4882a593Smuzhiyun - ``CEC_OP_ALL_DEVTYPE_SWITCH`` 344*4882a593Smuzhiyun - 0x04 345*4882a593Smuzhiyun - This supports the CEC Switch or Video Processing type. 346*4882a593Smuzhiyun 347*4882a593Smuzhiyun 348*4882a593SmuzhiyunReturn Value 349*4882a593Smuzhiyun============ 350*4882a593Smuzhiyun 351*4882a593SmuzhiyunOn success 0 is returned, on error -1 and the ``errno`` variable is set 352*4882a593Smuzhiyunappropriately. The generic error codes are described at the 353*4882a593Smuzhiyun:ref:`Generic Error Codes <gen-errors>` chapter. 354*4882a593Smuzhiyun 355*4882a593SmuzhiyunThe :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>` can return the following 356*4882a593Smuzhiyunerror codes: 357*4882a593Smuzhiyun 358*4882a593SmuzhiyunENOTTY 359*4882a593Smuzhiyun The ``CEC_CAP_LOG_ADDRS`` capability wasn't set, so this ioctl is not supported. 360*4882a593Smuzhiyun 361*4882a593SmuzhiyunEBUSY 362*4882a593Smuzhiyun The CEC adapter is currently configuring itself, or it is already configured and 363*4882a593Smuzhiyun ``num_log_addrs`` is non-zero, or another filehandle is in exclusive follower or 364*4882a593Smuzhiyun initiator mode, or the filehandle is in mode ``CEC_MODE_NO_INITIATOR``. 365*4882a593Smuzhiyun 366*4882a593SmuzhiyunEINVAL 367*4882a593Smuzhiyun The contents of struct :c:type:`cec_log_addrs` is invalid. 368