it will go back to the unconfigured state. If this flag is set, then it will
fallback to the Unregistered logical address. Note that if the Unregistered
logical address was explicitly requested, then this flag has no effect.
+ * .. _`CEC-LOG-ADDRS-FL-ALLOW-RC-PASSTHRU`:
+
+ - ``CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU``
+ - 2
+ - By default the ``CEC_MSG_USER_CONTROL_PRESSED`` and ``CEC_MSG_USER_CONTROL_RELEASED``
+ messages are only passed on to the follower(s), if any. If this flag is set,
+ then these messages are also passed on to the remote control input subsystem
+ and will appear as keystrokes. This features needs to be enabled explicitly.
+ If CEC is used to enter e.g. passwords, then you may not want to enable this
+ to avoid trivial snooping of the keystrokes.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
Other TODOs:
- There are two possible replies to CEC_MSG_INITIATE_ARC. How to handle that?
-- Add a flag to inhibit passing CEC RC messages to the rc subsystem.
- Applications should be able to choose this when calling S_LOG_ADDRS.
- If the reply field of cec_msg is set then when the reply arrives it
is only sent to the filehandle that transmitted the original message
and not to any followers. Should this behavior change or perhaps
}
case CEC_MSG_USER_CONTROL_PRESSED:
- if (!(adap->capabilities & CEC_CAP_RC))
+ if (!(adap->capabilities & CEC_CAP_RC) ||
+ !(adap->log_addrs.flags & CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU))
break;
#if IS_REACHABLE(CONFIG_RC_CORE)
break;
case CEC_MSG_USER_CONTROL_RELEASED:
- if (!(adap->capabilities & CEC_CAP_RC))
+ if (!(adap->capabilities & CEC_CAP_RC) ||
+ !(adap->log_addrs.flags & CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU))
break;
#if IS_REACHABLE(CONFIG_RC_CORE)
rc_keyup(adap->rc);
return -ENOTTY;
if (copy_from_user(&log_addrs, parg, sizeof(log_addrs)))
return -EFAULT;
- log_addrs.flags &= CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK;
+ log_addrs.flags &= CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK |
+ CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU;
mutex_lock(&adap->lock);
if (!adap->is_configuring &&
(!log_addrs.num_log_addrs || !adap->is_configured) &&
/* Allow a fallback to unregistered */
#define CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK (1 << 0)
+/* Passthrough RC messages to the input subsystem */
+#define CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU (1 << 1)
/* Events */