1059b1c5bSMauro Carvalho Chehab.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 201fae02dSMauro Carvalho Chehab.. c:namespace:: CEC 354f38fcaSMauro Carvalho Chehab 454f38fcaSMauro Carvalho Chehab.. _CEC_MODE: 554f38fcaSMauro Carvalho Chehab.. _CEC_G_MODE: 654f38fcaSMauro Carvalho Chehab.. _CEC_S_MODE: 754f38fcaSMauro Carvalho Chehab 854f38fcaSMauro Carvalho Chehab******************************** 954f38fcaSMauro Carvalho Chehabioctls CEC_G_MODE and CEC_S_MODE 1054f38fcaSMauro Carvalho Chehab******************************** 1154f38fcaSMauro Carvalho Chehab 1254f38fcaSMauro Carvalho ChehabCEC_G_MODE, CEC_S_MODE - Get or set exclusive use of the CEC adapter 1354f38fcaSMauro Carvalho Chehab 1454f38fcaSMauro Carvalho ChehabSynopsis 1554f38fcaSMauro Carvalho Chehab======== 1654f38fcaSMauro Carvalho Chehab 1701fae02dSMauro Carvalho Chehab.. c:macro:: CEC_G_MODE 1854f38fcaSMauro Carvalho Chehab 1901fae02dSMauro Carvalho Chehab``int ioctl(int fd, CEC_G_MODE, __u32 *argp)`` 2001fae02dSMauro Carvalho Chehab 2101fae02dSMauro Carvalho Chehab.. c:macro:: CEC_S_MODE 2201fae02dSMauro Carvalho Chehab 2301fae02dSMauro Carvalho Chehab``int ioctl(int fd, CEC_S_MODE, __u32 *argp)`` 2454f38fcaSMauro Carvalho Chehab 2554f38fcaSMauro Carvalho ChehabArguments 2654f38fcaSMauro Carvalho Chehab========= 2754f38fcaSMauro Carvalho Chehab 2854f38fcaSMauro Carvalho Chehab``fd`` 2901fae02dSMauro Carvalho Chehab File descriptor returned by :c:func:`open()`. 3054f38fcaSMauro Carvalho Chehab 3154f38fcaSMauro Carvalho Chehab``argp`` 3254f38fcaSMauro Carvalho Chehab Pointer to CEC mode. 3354f38fcaSMauro Carvalho Chehab 3454f38fcaSMauro Carvalho ChehabDescription 3554f38fcaSMauro Carvalho Chehab=========== 3654f38fcaSMauro Carvalho Chehab 3754f38fcaSMauro Carvalho ChehabBy default any filehandle can use :ref:`CEC_TRANSMIT`, but in order to prevent 3854f38fcaSMauro Carvalho Chehabapplications from stepping on each others toes it must be possible to 3954f38fcaSMauro Carvalho Chehabobtain exclusive access to the CEC adapter. This ioctl sets the 4054f38fcaSMauro Carvalho Chehabfilehandle to initiator and/or follower mode which can be exclusive 4154f38fcaSMauro Carvalho Chehabdepending on the chosen mode. The initiator is the filehandle that is 4254f38fcaSMauro Carvalho Chehabused to initiate messages, i.e. it commands other CEC devices. The 4354f38fcaSMauro Carvalho Chehabfollower is the filehandle that receives messages sent to the CEC 4454f38fcaSMauro Carvalho Chehabadapter and processes them. The same filehandle can be both initiator 4554f38fcaSMauro Carvalho Chehaband follower, or this role can be taken by two different filehandles. 4654f38fcaSMauro Carvalho Chehab 4754f38fcaSMauro Carvalho ChehabWhen a CEC message is received, then the CEC framework will decide how 4854f38fcaSMauro Carvalho Chehabit will be processed. If the message is a reply to an earlier 4954f38fcaSMauro Carvalho Chehabtransmitted message, then the reply is sent back to the filehandle that 5054f38fcaSMauro Carvalho Chehabis waiting for it. In addition the CEC framework will process it. 5154f38fcaSMauro Carvalho Chehab 5254f38fcaSMauro Carvalho ChehabIf the message is not a reply, then the CEC framework will process it 5354f38fcaSMauro Carvalho Chehabfirst. If there is no follower, then the message is just discarded and a 5454f38fcaSMauro Carvalho Chehabfeature abort is sent back to the initiator if the framework couldn't 5554f38fcaSMauro Carvalho Chehabprocess it. If there is a follower, then the message is passed on to the 5654f38fcaSMauro Carvalho Chehabfollower who will use :ref:`ioctl CEC_RECEIVE <CEC_RECEIVE>` to dequeue 5754f38fcaSMauro Carvalho Chehabthe new message. The framework expects the follower to make the right 5854f38fcaSMauro Carvalho Chehabdecisions. 5954f38fcaSMauro Carvalho Chehab 6054f38fcaSMauro Carvalho ChehabThe CEC framework will process core messages unless requested otherwise 6154f38fcaSMauro Carvalho Chehabby the follower. The follower can enable the passthrough mode. In that 6254f38fcaSMauro Carvalho Chehabcase, the CEC framework will pass on most core messages without 6354f38fcaSMauro Carvalho Chehabprocessing them and the follower will have to implement those messages. 6454f38fcaSMauro Carvalho ChehabThere are some messages that the core will always process, regardless of 6554f38fcaSMauro Carvalho Chehabthe passthrough mode. See :ref:`cec-core-processing` for details. 6654f38fcaSMauro Carvalho Chehab 6754f38fcaSMauro Carvalho ChehabIf there is no initiator, then any CEC filehandle can use 6854f38fcaSMauro Carvalho Chehab:ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. If there is an exclusive 6954f38fcaSMauro Carvalho Chehabinitiator then only that initiator can call 7054f38fcaSMauro Carvalho Chehab:ref:`CEC_TRANSMIT`. The follower can of course 7154f38fcaSMauro Carvalho Chehabalways call :ref:`ioctl CEC_TRANSMIT <CEC_TRANSMIT>`. 7254f38fcaSMauro Carvalho Chehab 7354f38fcaSMauro Carvalho ChehabAvailable initiator modes are: 7454f38fcaSMauro Carvalho Chehab 75*fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{10.8cm}| 7654f38fcaSMauro Carvalho Chehab 7754f38fcaSMauro Carvalho Chehab.. _cec-mode-initiator_e: 7854f38fcaSMauro Carvalho Chehab 7954f38fcaSMauro Carvalho Chehab.. flat-table:: Initiator Modes 8054f38fcaSMauro Carvalho Chehab :header-rows: 0 8154f38fcaSMauro Carvalho Chehab :stub-columns: 0 8254f38fcaSMauro Carvalho Chehab :widths: 3 1 16 8354f38fcaSMauro Carvalho Chehab 8454f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-NO-INITIATOR`: 8554f38fcaSMauro Carvalho Chehab 8654f38fcaSMauro Carvalho Chehab - ``CEC_MODE_NO_INITIATOR`` 8754f38fcaSMauro Carvalho Chehab - 0x0 8854f38fcaSMauro Carvalho Chehab - This is not an initiator, i.e. it cannot transmit CEC messages or 8954f38fcaSMauro Carvalho Chehab make any other changes to the CEC adapter. 9054f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-INITIATOR`: 9154f38fcaSMauro Carvalho Chehab 9254f38fcaSMauro Carvalho Chehab - ``CEC_MODE_INITIATOR`` 9354f38fcaSMauro Carvalho Chehab - 0x1 9454f38fcaSMauro Carvalho Chehab - This is an initiator (the default when the device is opened) and 9554f38fcaSMauro Carvalho Chehab it can transmit CEC messages and make changes to the CEC adapter, 9654f38fcaSMauro Carvalho Chehab unless there is an exclusive initiator. 9754f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-EXCL-INITIATOR`: 9854f38fcaSMauro Carvalho Chehab 9954f38fcaSMauro Carvalho Chehab - ``CEC_MODE_EXCL_INITIATOR`` 10054f38fcaSMauro Carvalho Chehab - 0x2 10154f38fcaSMauro Carvalho Chehab - This is an exclusive initiator and this file descriptor is the 10254f38fcaSMauro Carvalho Chehab only one that can transmit CEC messages and make changes to the 10354f38fcaSMauro Carvalho Chehab CEC adapter. If someone else is already the exclusive initiator 10454f38fcaSMauro Carvalho Chehab then an attempt to become one will return the ``EBUSY`` error code 10554f38fcaSMauro Carvalho Chehab error. 10654f38fcaSMauro Carvalho Chehab 10754f38fcaSMauro Carvalho ChehabAvailable follower modes are: 10854f38fcaSMauro Carvalho Chehab 109*fea13a69SMauro Carvalho Chehab.. tabularcolumns:: |p{6.6cm}|p{0.9cm}|p{9.8cm}| 11054f38fcaSMauro Carvalho Chehab 11154f38fcaSMauro Carvalho Chehab.. _cec-mode-follower_e: 11254f38fcaSMauro Carvalho Chehab 11354f38fcaSMauro Carvalho Chehab.. cssclass:: longtable 11454f38fcaSMauro Carvalho Chehab 11554f38fcaSMauro Carvalho Chehab.. flat-table:: Follower Modes 11654f38fcaSMauro Carvalho Chehab :header-rows: 0 11754f38fcaSMauro Carvalho Chehab :stub-columns: 0 11854f38fcaSMauro Carvalho Chehab :widths: 3 1 16 11954f38fcaSMauro Carvalho Chehab 12054f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-NO-FOLLOWER`: 12154f38fcaSMauro Carvalho Chehab 12254f38fcaSMauro Carvalho Chehab - ``CEC_MODE_NO_FOLLOWER`` 12354f38fcaSMauro Carvalho Chehab - 0x00 12454f38fcaSMauro Carvalho Chehab - This is not a follower (the default when the device is opened). 12554f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-FOLLOWER`: 12654f38fcaSMauro Carvalho Chehab 12754f38fcaSMauro Carvalho Chehab - ``CEC_MODE_FOLLOWER`` 12854f38fcaSMauro Carvalho Chehab - 0x10 12954f38fcaSMauro Carvalho Chehab - This is a follower and it will receive CEC messages unless there 13054f38fcaSMauro Carvalho Chehab is an exclusive follower. You cannot become a follower if 13154f38fcaSMauro Carvalho Chehab :ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>` is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>` 13254f38fcaSMauro Carvalho Chehab was specified, the ``EINVAL`` error code is returned in that case. 13354f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-EXCL-FOLLOWER`: 13454f38fcaSMauro Carvalho Chehab 13554f38fcaSMauro Carvalho Chehab - ``CEC_MODE_EXCL_FOLLOWER`` 13654f38fcaSMauro Carvalho Chehab - 0x20 13754f38fcaSMauro Carvalho Chehab - This is an exclusive follower and only this file descriptor will 13854f38fcaSMauro Carvalho Chehab receive CEC messages for processing. If someone else is already 13954f38fcaSMauro Carvalho Chehab the exclusive follower then an attempt to become one will return 14054f38fcaSMauro Carvalho Chehab the ``EBUSY`` error code. You cannot become a follower if 14154f38fcaSMauro Carvalho Chehab :ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>` is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>` 14254f38fcaSMauro Carvalho Chehab was specified, the ``EINVAL`` error code is returned in that case. 14354f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-EXCL-FOLLOWER-PASSTHRU`: 14454f38fcaSMauro Carvalho Chehab 14554f38fcaSMauro Carvalho Chehab - ``CEC_MODE_EXCL_FOLLOWER_PASSTHRU`` 14654f38fcaSMauro Carvalho Chehab - 0x30 14754f38fcaSMauro Carvalho Chehab - This is an exclusive follower and only this file descriptor will 14854f38fcaSMauro Carvalho Chehab receive CEC messages for processing. In addition it will put the 14954f38fcaSMauro Carvalho Chehab CEC device into passthrough mode, allowing the exclusive follower 15054f38fcaSMauro Carvalho Chehab to handle most core messages instead of relying on the CEC 15154f38fcaSMauro Carvalho Chehab framework for that. If someone else is already the exclusive 15254f38fcaSMauro Carvalho Chehab follower then an attempt to become one will return the ``EBUSY`` error 15354f38fcaSMauro Carvalho Chehab code. You cannot become a follower if :ref:`CEC_CAP_TRANSMIT <CEC-CAP-TRANSMIT>` 15454f38fcaSMauro Carvalho Chehab is not set or if :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>` was specified, 15554f38fcaSMauro Carvalho Chehab the ``EINVAL`` error code is returned in that case. 15654f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-MONITOR-PIN`: 15754f38fcaSMauro Carvalho Chehab 15854f38fcaSMauro Carvalho Chehab - ``CEC_MODE_MONITOR_PIN`` 15954f38fcaSMauro Carvalho Chehab - 0xd0 16054f38fcaSMauro Carvalho Chehab - Put the file descriptor into pin monitoring mode. Can only be used in 16154f38fcaSMauro Carvalho Chehab combination with :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`, 16254f38fcaSMauro Carvalho Chehab otherwise the ``EINVAL`` error code will be returned. 16354f38fcaSMauro Carvalho Chehab This mode requires that the :ref:`CEC_CAP_MONITOR_PIN <CEC-CAP-MONITOR-PIN>` 16454f38fcaSMauro Carvalho Chehab capability is set, otherwise the ``EINVAL`` error code is returned. 16554f38fcaSMauro Carvalho Chehab While in pin monitoring mode this file descriptor can receive the 16654f38fcaSMauro Carvalho Chehab ``CEC_EVENT_PIN_CEC_LOW`` and ``CEC_EVENT_PIN_CEC_HIGH`` events to see the 16754f38fcaSMauro Carvalho Chehab low-level CEC pin transitions. This is very useful for debugging. 16854f38fcaSMauro Carvalho Chehab This mode is only allowed if the process has the ``CAP_NET_ADMIN`` 16954f38fcaSMauro Carvalho Chehab capability. If that is not set, then the ``EPERM`` error code is returned. 17054f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-MONITOR`: 17154f38fcaSMauro Carvalho Chehab 17254f38fcaSMauro Carvalho Chehab - ``CEC_MODE_MONITOR`` 17354f38fcaSMauro Carvalho Chehab - 0xe0 17454f38fcaSMauro Carvalho Chehab - Put the file descriptor into monitor mode. Can only be used in 17554f38fcaSMauro Carvalho Chehab combination with :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`, 17654f38fcaSMauro Carvalho Chehab otherwise the ``EINVAL`` error code will be returned. 17754f38fcaSMauro Carvalho Chehab In monitor mode all messages this CEC 17854f38fcaSMauro Carvalho Chehab device transmits and all messages it receives (both broadcast 17954f38fcaSMauro Carvalho Chehab messages and directed messages for one its logical addresses) will 18054f38fcaSMauro Carvalho Chehab be reported. This is very useful for debugging. This is only 18154f38fcaSMauro Carvalho Chehab allowed if the process has the ``CAP_NET_ADMIN`` capability. If 18254f38fcaSMauro Carvalho Chehab that is not set, then the ``EPERM`` error code is returned. 18354f38fcaSMauro Carvalho Chehab * .. _`CEC-MODE-MONITOR-ALL`: 18454f38fcaSMauro Carvalho Chehab 18554f38fcaSMauro Carvalho Chehab - ``CEC_MODE_MONITOR_ALL`` 18654f38fcaSMauro Carvalho Chehab - 0xf0 18754f38fcaSMauro Carvalho Chehab - Put the file descriptor into 'monitor all' mode. Can only be used 18854f38fcaSMauro Carvalho Chehab in combination with :ref:`CEC_MODE_NO_INITIATOR <CEC-MODE-NO-INITIATOR>`, otherwise 18954f38fcaSMauro Carvalho Chehab the ``EINVAL`` error code will be returned. In 'monitor all' mode all messages 19054f38fcaSMauro Carvalho Chehab this CEC device transmits and all messages it receives, including 191e5c0cd26SHans Verkuil directed messages for other CEC devices, will be reported. This is 19254f38fcaSMauro Carvalho Chehab very useful for debugging, but not all devices support this. This 19354f38fcaSMauro Carvalho Chehab mode requires that the :ref:`CEC_CAP_MONITOR_ALL <CEC-CAP-MONITOR-ALL>` capability is set, 19454f38fcaSMauro Carvalho Chehab otherwise the ``EINVAL`` error code is returned. This is only allowed if 19554f38fcaSMauro Carvalho Chehab the process has the ``CAP_NET_ADMIN`` capability. If that is not 19654f38fcaSMauro Carvalho Chehab set, then the ``EPERM`` error code is returned. 19754f38fcaSMauro Carvalho Chehab 19854f38fcaSMauro Carvalho ChehabCore message processing details: 19954f38fcaSMauro Carvalho Chehab 20054f38fcaSMauro Carvalho Chehab.. tabularcolumns:: |p{6.6cm}|p{10.9cm}| 20154f38fcaSMauro Carvalho Chehab 20254f38fcaSMauro Carvalho Chehab.. _cec-core-processing: 20354f38fcaSMauro Carvalho Chehab 20454f38fcaSMauro Carvalho Chehab.. flat-table:: Core Message Processing 20554f38fcaSMauro Carvalho Chehab :header-rows: 0 20654f38fcaSMauro Carvalho Chehab :stub-columns: 0 20754f38fcaSMauro Carvalho Chehab :widths: 1 8 20854f38fcaSMauro Carvalho Chehab 20954f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-GET-CEC-VERSION`: 21054f38fcaSMauro Carvalho Chehab 21154f38fcaSMauro Carvalho Chehab - ``CEC_MSG_GET_CEC_VERSION`` 21254f38fcaSMauro Carvalho Chehab - The core will return the CEC version that was set with 21354f38fcaSMauro Carvalho Chehab :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`, 21454f38fcaSMauro Carvalho Chehab except when in passthrough mode. In passthrough mode the core 21554f38fcaSMauro Carvalho Chehab does nothing and this message has to be handled by a follower 21654f38fcaSMauro Carvalho Chehab instead. 21754f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-GIVE-DEVICE-VENDOR-ID`: 21854f38fcaSMauro Carvalho Chehab 21954f38fcaSMauro Carvalho Chehab - ``CEC_MSG_GIVE_DEVICE_VENDOR_ID`` 22054f38fcaSMauro Carvalho Chehab - The core will return the vendor ID that was set with 22154f38fcaSMauro Carvalho Chehab :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`, 22254f38fcaSMauro Carvalho Chehab except when in passthrough mode. In passthrough mode the core 22354f38fcaSMauro Carvalho Chehab does nothing and this message has to be handled by a follower 22454f38fcaSMauro Carvalho Chehab instead. 22554f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-ABORT`: 22654f38fcaSMauro Carvalho Chehab 22754f38fcaSMauro Carvalho Chehab - ``CEC_MSG_ABORT`` 22854f38fcaSMauro Carvalho Chehab - The core will return a Feature Abort message with reason 22954f38fcaSMauro Carvalho Chehab 'Feature Refused' as per the specification, except when in 23054f38fcaSMauro Carvalho Chehab passthrough mode. In passthrough mode the core does nothing 23154f38fcaSMauro Carvalho Chehab and this message has to be handled by a follower instead. 23254f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-GIVE-PHYSICAL-ADDR`: 23354f38fcaSMauro Carvalho Chehab 23454f38fcaSMauro Carvalho Chehab - ``CEC_MSG_GIVE_PHYSICAL_ADDR`` 23554f38fcaSMauro Carvalho Chehab - The core will report the current physical address, except when 23654f38fcaSMauro Carvalho Chehab in passthrough mode. In passthrough mode the core does nothing 23754f38fcaSMauro Carvalho Chehab and this message has to be handled by a follower instead. 23854f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-GIVE-OSD-NAME`: 23954f38fcaSMauro Carvalho Chehab 24054f38fcaSMauro Carvalho Chehab - ``CEC_MSG_GIVE_OSD_NAME`` 24154f38fcaSMauro Carvalho Chehab - The core will report the current OSD name that was set with 24254f38fcaSMauro Carvalho Chehab :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`, 24354f38fcaSMauro Carvalho Chehab except when in passthrough mode. In passthrough mode the core 24454f38fcaSMauro Carvalho Chehab does nothing and this message has to be handled by a follower 24554f38fcaSMauro Carvalho Chehab instead. 24654f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-GIVE-FEATURES`: 24754f38fcaSMauro Carvalho Chehab 24854f38fcaSMauro Carvalho Chehab - ``CEC_MSG_GIVE_FEATURES`` 24954f38fcaSMauro Carvalho Chehab - The core will do nothing if the CEC version is older than 2.0, 25054f38fcaSMauro Carvalho Chehab otherwise it will report the current features that were set with 25154f38fcaSMauro Carvalho Chehab :ref:`ioctl CEC_ADAP_S_LOG_ADDRS <CEC_ADAP_S_LOG_ADDRS>`, 25254f38fcaSMauro Carvalho Chehab except when in passthrough mode. In passthrough mode the core 25354f38fcaSMauro Carvalho Chehab does nothing (for any CEC version) and this message has to be handled 25454f38fcaSMauro Carvalho Chehab by a follower instead. 25554f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-USER-CONTROL-PRESSED`: 25654f38fcaSMauro Carvalho Chehab 25754f38fcaSMauro Carvalho Chehab - ``CEC_MSG_USER_CONTROL_PRESSED`` 25854f38fcaSMauro Carvalho Chehab - If :ref:`CEC_CAP_RC <CEC-CAP-RC>` is set and if 25954f38fcaSMauro Carvalho Chehab :ref:`CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU <CEC-LOG-ADDRS-FL-ALLOW-RC-PASSTHRU>` 26054f38fcaSMauro Carvalho Chehab is set, then generate a remote control key 26154f38fcaSMauro Carvalho Chehab press. This message is always passed on to the follower(s). 26254f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-USER-CONTROL-RELEASED`: 26354f38fcaSMauro Carvalho Chehab 26454f38fcaSMauro Carvalho Chehab - ``CEC_MSG_USER_CONTROL_RELEASED`` 26554f38fcaSMauro Carvalho Chehab - If :ref:`CEC_CAP_RC <CEC-CAP-RC>` is set and if 26654f38fcaSMauro Carvalho Chehab :ref:`CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU <CEC-LOG-ADDRS-FL-ALLOW-RC-PASSTHRU>` 26754f38fcaSMauro Carvalho Chehab is set, then generate a remote control key 26854f38fcaSMauro Carvalho Chehab release. This message is always passed on to the follower(s). 26954f38fcaSMauro Carvalho Chehab * .. _`CEC-MSG-REPORT-PHYSICAL-ADDR`: 27054f38fcaSMauro Carvalho Chehab 27154f38fcaSMauro Carvalho Chehab - ``CEC_MSG_REPORT_PHYSICAL_ADDR`` 27254f38fcaSMauro Carvalho Chehab - The CEC framework will make note of the reported physical address 27354f38fcaSMauro Carvalho Chehab and then just pass the message on to the follower(s). 27454f38fcaSMauro Carvalho Chehab 27554f38fcaSMauro Carvalho Chehab 27654f38fcaSMauro Carvalho ChehabReturn Value 27754f38fcaSMauro Carvalho Chehab============ 27854f38fcaSMauro Carvalho Chehab 27954f38fcaSMauro Carvalho ChehabOn success 0 is returned, on error -1 and the ``errno`` variable is set 28054f38fcaSMauro Carvalho Chehabappropriately. The generic error codes are described at the 28154f38fcaSMauro Carvalho Chehab:ref:`Generic Error Codes <gen-errors>` chapter. 28254f38fcaSMauro Carvalho Chehab 28354f38fcaSMauro Carvalho ChehabThe :ref:`ioctl CEC_S_MODE <CEC_S_MODE>` can return the following 28454f38fcaSMauro Carvalho Chehaberror codes: 28554f38fcaSMauro Carvalho Chehab 28654f38fcaSMauro Carvalho ChehabEINVAL 28754f38fcaSMauro Carvalho Chehab The requested mode is invalid. 28854f38fcaSMauro Carvalho Chehab 28954f38fcaSMauro Carvalho ChehabEPERM 29054f38fcaSMauro Carvalho Chehab Monitor mode is requested, but the process does have the ``CAP_NET_ADMIN`` 29154f38fcaSMauro Carvalho Chehab capability. 29254f38fcaSMauro Carvalho Chehab 29354f38fcaSMauro Carvalho ChehabEBUSY 29454f38fcaSMauro Carvalho Chehab Someone else is already an exclusive follower or initiator. 295