This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: v4l-utils: improve touch support Author: Hans Verkuil <hans.verk...@cisco.com> Date: Thu Aug 25 12:44:26 2016 +0200 Extend several utilities to improve the support for the new touch devices. Signed-off-by: Hans Verkuil <hans.verk...@cisco.com> utils/common/v4l-helpers.h | 5 +++++ utils/v4l2-compliance/v4l2-compliance.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl-io.cpp | 36 ++++++++++++++++++++++++++++--- utils/v4l2-ctl/v4l2-ctl.cpp | 2 ++ utils/v4l2-dbg/v4l2-dbg.cpp | 2 ++ 5 files changed, 43 insertions(+), 4 deletions(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=c360d62199d032bd4c5e77b16109709914e5614f diff --git a/utils/common/v4l-helpers.h b/utils/common/v4l-helpers.h index a1c9af3d0ef8..c2d48975dee2 100644 --- a/utils/common/v4l-helpers.h +++ b/utils/common/v4l-helpers.h @@ -389,6 +389,11 @@ static inline bool v4l_has_sdr_out(const struct v4l_fd *f) return v4l_g_caps(f) & V4L2_CAP_SDR_OUTPUT; } +static inline bool v4l_has_touch(const struct v4l_fd *f) +{ + return v4l_g_caps(f) & V4L2_CAP_TOUCH; +} + static inline bool v4l_has_hwseek(const struct v4l_fd *f) { return v4l_g_caps(f) & V4L2_CAP_HW_FREQ_SEEK; diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp index 82777773a810..c46647f9f743 100644 --- a/utils/v4l2-compliance/v4l2-compliance.cpp +++ b/utils/v4l2-compliance/v4l2-compliance.cpp @@ -215,7 +215,7 @@ std::string cap2s(unsigned cap) if (cap & V4L2_CAP_SDR_OUTPUT) s += "\t\tSDR Output\n"; if (cap & V4L2_CAP_TOUCH) - s += "\t\tTouch Capture\n"; + s += "\t\tTouch Device\n"; if (cap & V4L2_CAP_TUNER) s += "\t\tTuner\n"; if (cap & V4L2_CAP_HW_FREQ_SEEK) diff --git a/utils/v4l2-ctl/v4l2-ctl-io.cpp b/utils/v4l2-ctl/v4l2-ctl-io.cpp index 12bc8e15d539..e778569670e1 100644 --- a/utils/v4l2-ctl/v4l2-ctl-io.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-io.cpp @@ -69,6 +69,34 @@ static std::string status2s(__u32 status) return status ? flags2s(status, in_status_def) : "ok"; } +static const char *inputtype2s(__u32 type) +{ + switch (type) { + case V4L2_INPUT_TYPE_TUNER: + return "Tuner"; + case V4L2_INPUT_TYPE_CAMERA: + return "Camera"; + case V4L2_INPUT_TYPE_TOUCH: + return "Touch"; + default: + return "Unknown"; + } +} + +static const char *outputtype2s(__u32 type) +{ + switch (type) { + case V4L2_OUTPUT_TYPE_MODULATOR: + return "Modulator"; + case V4L2_OUTPUT_TYPE_ANALOG: + return "Analog"; + case V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY: + return "Analog VGA Overlay"; + default: + return "Unknown"; + } +} + static const flag_def input_cap_def[] = { { V4L2_IN_CAP_DV_TIMINGS, "DV timings" }, @@ -121,7 +149,9 @@ void io_set(int fd) printf("Video input set to %d", input); vin.index = input; if (test_ioctl(fd, VIDIOC_ENUMINPUT, &vin) >= 0) - printf(" (%s: %s)", vin.name, status2s(vin.status).c_str()); + printf(" (%s: %s, %s)", vin.name, + inputtype2s(vin.type), + status2s(vin.status).c_str()); printf("\n"); } } @@ -192,7 +222,7 @@ void io_list(int fd) printf("\n"); printf("\tInput : %d\n", vin.index); printf("\tName : %s\n", vin.name); - printf("\tType : 0x%08X\n", vin.type); + printf("\tType : 0x%08X (%s)\n", vin.type, inputtype2s(vin.type)); printf("\tAudioset : 0x%08X\n", vin.audioset); printf("\tTuner : 0x%08X\n", vin.tuner); printf("\tStandard : 0x%016llX (%s)\n", (unsigned long long)vin.std, @@ -213,7 +243,7 @@ void io_list(int fd) printf("\n"); printf("\tOutput : %d\n", vout.index); printf("\tName : %s\n", vout.name); - printf("\tType : 0x%08X\n", vout.type); + printf("\tType : 0x%08X (%s)\n", vout.type, outputtype2s(vout.type)); printf("\tAudioset : 0x%08X\n", vout.audioset); printf("\tStandard : 0x%016llX (%s)\n", (unsigned long long)vout.std, std2s(vout.std).c_str()); diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index 1de2116cd126..8a2b3e6d186e 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -687,6 +687,8 @@ static std::string cap2s(unsigned cap) s += "\t\tSDR Output\n"; if (cap & V4L2_CAP_TUNER) s += "\t\tTuner\n"; + if (cap & V4L2_CAP_TOUCH) + s += "\t\tTouch Device\n"; if (cap & V4L2_CAP_HW_FREQ_SEEK) s += "\t\tHW Frequency Seek\n"; if (cap & V4L2_CAP_MODULATOR) diff --git a/utils/v4l2-dbg/v4l2-dbg.cpp b/utils/v4l2-dbg/v4l2-dbg.cpp index b0d0976b96f5..82669b987899 100644 --- a/utils/v4l2-dbg/v4l2-dbg.cpp +++ b/utils/v4l2-dbg/v4l2-dbg.cpp @@ -224,6 +224,8 @@ static std::string cap2s(unsigned cap) s += "\t\tRDS Output\n"; if (cap & V4L2_CAP_SDR_CAPTURE) s += "\t\tSDR Capture\n"; + if (cap & V4L2_CAP_TOUCH) + s += "\t\tTouch Device\n"; if (cap & V4L2_CAP_TUNER) s += "\t\tTuner\n"; if (cap & V4L2_CAP_HW_FREQ_SEEK) _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits