Граф коммитов

8 Коммитов

Автор SHA1 Сообщение Дата
Hans Verkuil 4808f72162 [media] cec-funcs.h: add missing vendor-specific messages
The cec-funcs.h header was missing support for these three vendor-specific messages:

CEC_MSG_VENDOR_COMMAND
CEC_MSG_VENDOR_COMMAND_WITH_ID
CEC_MSG_VENDOR_REMOTE_BUTTON_DOWN

Add wrappers for these messages.

I originally postponed adding these wrappers due to the fact that the argument is
just a byte array which cec-ctl couldn't handle at the time, and then I just forgot
to add them once the CEC framework was finalized.

It wasn't until an attempt to transmit a vendor specific command was made that I
realized that these wrappers were missing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 14:05:49 -03:00
Hans Verkuil 31dc8b7302 [media] cec-funcs.h: add reply argument for Record On/Off
A reply parameter is added to the cec_msg_record_on/off functions in
cec-funcs.h. The standard mandates that Record Status shall be replied
to Record On, and it may be replied to Record Off.

Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 13:16:52 -03:00
Hans Verkuil 9ebf1945d7 [media] cec-funcs.h: fix typo: && should be &
Fix typo where logical AND was used instead of bitwise AND.

Reported-by: David Binderman <linuxdev.baldrick@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 13:14:56 -03:00
Hans Verkuil 9ad52b4db7 [media] cec-funcs.h: add missing 'reply' for short audio descriptor
The cec_msg_request_short_audio_descriptor function was missing the reply
argument. That's needed if you want the framework to wait for the reply
message.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08 18:35:42 -03:00
Hans Verkuil 0c1f856994 [media] cec-funcs.h: add missing const modifier
The cec_ops_* functions never touch cec_msg, so mark it as const.

This was done for some of the cec_ops_ functions, but not all.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08 18:35:17 -03:00
Hans Verkuil 0cb1f1e44c [media] cec-funcs.h: add length checks
Add msg->len sanity checks to fix static checker warning:

	include/linux/cec-funcs.h:1154 cec_ops_set_osd_string()
	warn: setting length 'msg->len - 3' to negative one

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08 18:34:42 -03:00
Hans Verkuil 12655445a2 [media] cec.h/cec-funcs.h: add option to use BSD license
Like the videodev2.h and other headers, explicitly allow these headers
to be used with the BSD license.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-08 18:31:33 -03:00
Hans Verkuil 50f7d5a65e [media] cec-funcs.h: static inlines to pack/unpack CEC messages
This public header contains static inlines to pack and unpack CEC
messages. It is for use in both the kernel and in userspace.

Since the CEC framework will initially be in staging this header is
not yet in include/uapi. Once the framework is moved out of staging
this header should be moved to uapi at the same time.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-06-28 09:57:12 -03:00