Skip to content

Commit aa50acc

Browse files
Hans Verkuilmchehab
authored andcommitted
media: cec: add CEC_MSG_FL_RAW flag and msg_is_raw helper function
This adds the userspace API to send raw unchecked CEC messages. This will require root permissions. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
1 parent e76cbec commit aa50acc

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/media/cec/cec-priv.h‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
/* devnode to cec_adapter */
2121
#define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode)
2222

23+
static inline bool msg_is_raw(const struct cec_msg *msg)
24+
{
25+
return msg->flags & CEC_MSG_FL_RAW;
26+
}
27+
2328
/* cec-core.c */
2429
extern int cec_debug;
2530
int cec_get_device(struct cec_devnode *devnode);

‎include/uapi/linux/cec.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ static inline void cec_msg_set_reply_to(struct cec_msg *msg,
144144

145145
/* cec_msg flags field */
146146
#define CEC_MSG_FL_REPLY_TO_FOLLOWERS (1 << 0)
147+
#define CEC_MSG_FL_RAW (1 << 1)
147148

148149
/* cec_msg tx/rx_status field */
149150
#define CEC_TX_STATUS_OK (1 << 0)

0 commit comments

Comments
 (0)