diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2016-02-05 12:44:21 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-06-28 11:31:16 -0300 |
commit | 6f8adea2b64f7e1215a99935ea079284488736d5 (patch) | |
tree | f941ecbeea7f62f85abf8345581e1823b1bd02f6 /drivers/media/platform/vivid/vivid-kthread-cap.c | |
parent | 1bcbf6f4b6b050eaf8f1fb1adf5c4779a3623c5b (diff) |
[media] vivid: add CEC emulation
The vivid driver has been extended to provide CEC adapters for the HDMI
input and HDMI outputs in order to test CEC applications.
This CEC emulation is faithful to the CEC timings (i.e., it all at a
snail's pace).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vivid/vivid-kthread-cap.c')
-rw-r--r-- | drivers/media/platform/vivid/vivid-kthread-cap.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/platform/vivid/vivid-kthread-cap.c b/drivers/media/platform/vivid/vivid-kthread-cap.c index 3b8c10108dfa..6ca71aabb576 100644 --- a/drivers/media/platform/vivid/vivid-kthread-cap.c +++ b/drivers/media/platform/vivid/vivid-kthread-cap.c @@ -552,6 +552,19 @@ static void vivid_fillbuff(struct vivid_dev *dev, struct vivid_buffer *buf) snprintf(str, sizeof(str), " button pressed!"); tpg_gen_text(tpg, basep, line++ * line_height, 16, str); } + if (dev->osd[0]) { + if (vivid_is_hdmi_cap(dev)) { + snprintf(str, sizeof(str), + " OSD \"%s\"", dev->osd); + tpg_gen_text(tpg, basep, line++ * line_height, + 16, str); + } + if (dev->osd_jiffies && + time_is_before_jiffies(dev->osd_jiffies + 5 * HZ)) { + dev->osd[0] = 0; + dev->osd_jiffies = 0; + } + } } /* |