This adds the userspace API to send raw unchecked CEC messages. This will require root permissions.
Unified · Split
| @@ -20,6 +20,11 @@ · 19 unmodified lines | |||
| 20 | /* devnode to cec_adapter */ | 20 | /* devnode to cec_adapter */ |
| 21 | #define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode) | 21 | #define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode) |
| 22 | 22 | ||
| 23 | static inline bool msg_is_raw(const struct cec_msg *msg) | ||
| 24 | { | ||
| 25 | return msg->flags & CEC_MSG_FL_RAW; | ||
| 26 | } | ||
| 27 | |||
| 23 | /* cec-core.c */ | 28 | /* cec-core.c */ |
| 24 | extern int cec_debug; | 29 | extern int cec_debug; |
| 25 | int cec_get_device(struct cec_devnode *devnode); | 30 | int cec_get_device(struct cec_devnode *devnode); |
| @@ -144,6 +144,7 @@ static inline void cec_msg_set_reply_to(struct cec_msg *msg, · 143 unmodified lines | |||
| 144 | 144 | ||
| 145 | /* cec_msg flags field */ | 145 | /* cec_msg flags field */ |
| 146 | #define CEC_MSG_FL_REPLY_TO_FOLLOWERS (1 << 0) | 146 | #define CEC_MSG_FL_REPLY_TO_FOLLOWERS (1 << 0) |
| 147 | #define CEC_MSG_FL_RAW (1 << 1) | ||
| 147 | 148 | ||
| 148 | /* cec_msg tx/rx_status field */ | 149 | /* cec_msg tx/rx_status field */ |
| 149 | #define CEC_TX_STATUS_OK (1 << 0) | 150 | #define CEC_TX_STATUS_OK (1 << 0) |