[PATCH v2] v4l2: Add support for interpreting remaining fields in VIDIOC_ENUMINPUT struct v4l2_input
Marek Vasut
marex at denx.de
Fri Feb 25 06:07:52 UTC 2022
Interpret $audioset as flags, $tuner as integer. Add ID list for
v4l2_std_id. Add flags for status and capabilities and interpret
them.
This is based off Linux 5.15.y:
https://www.kernel.org/doc/html/v5.15/userspace-api/media/v4l/vidioc-enuminput.html
Signed-off-by: Marek Vasut <marex at denx.de>
---
V2: Fill in tests/ioctl_v4l2-success.c so make check would pass
and to test the new field decoding
---
src/v4l2.c | 16 +
src/xlat/v4l2_input_capabilities_flags.h | 77 +++++
src/xlat/v4l2_input_capabilities_flags.in | 4 +
src/xlat/v4l2_input_status_flags.h | 245 +++++++++++++
src/xlat/v4l2_input_status_flags.in | 16 +
src/xlat/v4l2_std_ids.h | 399 ++++++++++++++++++++++
src/xlat/v4l2_std_ids.in | 27 ++
tests/ioctl_v4l2-success.c | 71 +++-
8 files changed, 842 insertions(+), 13 deletions(-)
create mode 100644 src/xlat/v4l2_input_capabilities_flags.h
create mode 100644 src/xlat/v4l2_input_capabilities_flags.in
create mode 100644 src/xlat/v4l2_input_status_flags.h
create mode 100644 src/xlat/v4l2_input_status_flags.in
create mode 100644 src/xlat/v4l2_std_ids.h
create mode 100644 src/xlat/v4l2_std_ids.in
diff --git a/src/v4l2.c b/src/v4l2.c
index c4031aa6a..a23fa3978 100644
--- a/src/v4l2.c
+++ b/src/v4l2.c
@@ -755,7 +755,10 @@ print_v4l2_standard(struct tcb *const tcp, const kernel_ulong_t arg)
return RVAL_IOCTL_DECODED;
}
+#include "xlat/v4l2_input_capabilities_flags.h"
+#include "xlat/v4l2_input_status_flags.h"
#include "xlat/v4l2_input_types.h"
+#include "xlat/v4l2_std_ids.h"
static int
print_v4l2_input(struct tcb *const tcp, const kernel_ulong_t arg)
@@ -779,6 +782,19 @@ print_v4l2_input(struct tcb *const tcp, const kernel_ulong_t arg)
tprint_struct_next();
PRINT_FIELD_XVAL(i, type, v4l2_input_types,
"V4L2_INPUT_TYPE_???");
+ tprint_struct_next();
+ PRINT_FIELD_X(i, audioset);
+ tprint_struct_next();
+ PRINT_FIELD_U(i, tuner);
+ tprint_struct_next();
+ PRINT_FIELD_FLAGS(i, std, v4l2_std_ids, "V4L2_STD_???");
+ tprint_struct_next();
+ PRINT_FIELD_FLAGS(i, status, v4l2_input_status_flags,
+ "V4L2_IN_ST_???");
+ tprint_struct_next();
+ PRINT_FIELD_FLAGS(i, capabilities,
+ v4l2_input_capabilities_flags,
+ "V4L2_IN_CAP_???");
}
tprint_struct_end();
diff --git a/src/xlat/v4l2_input_capabilities_flags.h b/src/xlat/v4l2_input_capabilities_flags.h
new file mode 100644
index 000000000..78a4ad19c
--- /dev/null
+++ b/src/xlat/v4l2_input_capabilities_flags.h
@@ -0,0 +1,77 @@
+/* Generated by ./src/xlat/gen.sh from ./src/xlat/v4l2_input_capabilities_flags.in; do not edit. */
+
+#include "gcc_compat.h"
+#include "static_assert.h"
+
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_CAP_DV_TIMINGS) == (0x00000002), "V4L2_IN_CAP_DV_TIMINGS != 0x00000002");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_CAP_STD) == (0x00000004), "V4L2_IN_CAP_STD != 0x00000004");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_CAP_NATIVE_SIZE) == (0x00000008), "V4L2_IN_CAP_NATIVE_SIZE != 0x00000008");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#undef XLAT_PREV_VAL
+
+#ifndef XLAT_MACROS_ONLY
+
+# ifdef IN_MPERS
+
+extern const struct xlat v4l2_input_capabilities_flags[];
+
+# else
+
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
+static const struct xlat_data v4l2_input_capabilities_flags_xdata[] = {
+ XLAT(V4L2_IN_CAP_DV_TIMINGS),
+ #define XLAT_VAL_0 ((unsigned) (V4L2_IN_CAP_DV_TIMINGS))
+ #define XLAT_STR_0 STRINGIFY(V4L2_IN_CAP_DV_TIMINGS)
+ XLAT(V4L2_IN_CAP_STD),
+ #define XLAT_VAL_1 ((unsigned) (V4L2_IN_CAP_STD))
+ #define XLAT_STR_1 STRINGIFY(V4L2_IN_CAP_STD)
+ XLAT(V4L2_IN_CAP_NATIVE_SIZE),
+ #define XLAT_VAL_2 ((unsigned) (V4L2_IN_CAP_NATIVE_SIZE))
+ #define XLAT_STR_2 STRINGIFY(V4L2_IN_CAP_NATIVE_SIZE)
+};
+# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
+static
+# endif
+const struct xlat v4l2_input_capabilities_flags[1] = { {
+ .data = v4l2_input_capabilities_flags_xdata,
+ .size = ARRAY_SIZE(v4l2_input_capabilities_flags_xdata),
+ .type = XT_NORMAL,
+ .flags_mask = 0
+# ifdef XLAT_VAL_0
+ | XLAT_VAL_0
+# endif
+# ifdef XLAT_VAL_1
+ | XLAT_VAL_1
+# endif
+# ifdef XLAT_VAL_2
+ | XLAT_VAL_2
+# endif
+ ,
+ .flags_strsz = 0
+# ifdef XLAT_STR_0
+ + sizeof(XLAT_STR_0)
+# endif
+# ifdef XLAT_STR_1
+ + sizeof(XLAT_STR_1)
+# endif
+# ifdef XLAT_STR_2
+ + sizeof(XLAT_STR_2)
+# endif
+ ,
+} };
+DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
+
+# undef XLAT_STR_0
+# undef XLAT_VAL_0
+# undef XLAT_STR_1
+# undef XLAT_VAL_1
+# undef XLAT_STR_2
+# undef XLAT_VAL_2
+# endif /* !IN_MPERS */
+
+#endif /* !XLAT_MACROS_ONLY */
diff --git a/src/xlat/v4l2_input_capabilities_flags.in b/src/xlat/v4l2_input_capabilities_flags.in
new file mode 100644
index 000000000..cd7a13467
--- /dev/null
+++ b/src/xlat/v4l2_input_capabilities_flags.in
@@ -0,0 +1,4 @@
+#unconditional
+V4L2_IN_CAP_DV_TIMINGS 0x00000002
+V4L2_IN_CAP_STD 0x00000004
+V4L2_IN_CAP_NATIVE_SIZE 0x00000008
diff --git a/src/xlat/v4l2_input_status_flags.h b/src/xlat/v4l2_input_status_flags.h
new file mode 100644
index 000000000..073d3a91b
--- /dev/null
+++ b/src/xlat/v4l2_input_status_flags.h
@@ -0,0 +1,245 @@
+/* Generated by ./src/xlat/gen.sh from ./src/xlat/v4l2_input_status_flags.in; do not edit. */
+
+#include "gcc_compat.h"
+#include "static_assert.h"
+
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_POWER) == (0x00000001), "V4L2_IN_ST_NO_POWER != 0x00000001");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_SIGNAL) == (0x00000002), "V4L2_IN_ST_NO_SIGNAL != 0x00000002");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_COLOR) == (0x00000004), "V4L2_IN_ST_NO_COLOR != 0x00000004");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_HFLIP) == (0x00000010), "V4L2_IN_ST_HFLIP != 0x00000010");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_VFLIP) == (0x00000020), "V4L2_IN_ST_VFLIP != 0x00000020");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_H_LOCK) == (0x00000100), "V4L2_IN_ST_NO_H_LOCK != 0x00000100");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_COLOR_KILL) == (0x00000200), "V4L2_IN_ST_COLOR_KILL != 0x00000200");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_V_LOCK) == (0x00000400), "V4L2_IN_ST_NO_V_LOCK != 0x00000400");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_STD_LOCK) == (0x00000800), "V4L2_IN_ST_NO_STD_LOCK != 0x00000800");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_SYNC) == (0x00010000), "V4L2_IN_ST_NO_SYNC != 0x00010000");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_EQU) == (0x00020000), "V4L2_IN_ST_NO_EQU != 0x00020000");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_CARRIER) == (0x00040000), "V4L2_IN_ST_NO_CARRIER != 0x00040000");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_MACROVISION) == (0x01000000), "V4L2_IN_ST_MACROVISION != 0x01000000");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_NO_ACCESS) == (0x02000000), "V4L2_IN_ST_NO_ACCESS != 0x02000000");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_IN_ST_VTR) == (0x04000000), "V4L2_IN_ST_VTR != 0x04000000");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#undef XLAT_PREV_VAL
+
+#ifndef XLAT_MACROS_ONLY
+
+# ifdef IN_MPERS
+
+extern const struct xlat v4l2_input_status_flags[];
+
+# else
+
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
+static const struct xlat_data v4l2_input_status_flags_xdata[] = {
+ XLAT(V4L2_IN_ST_NO_POWER),
+ #define XLAT_VAL_0 ((unsigned) (V4L2_IN_ST_NO_POWER))
+ #define XLAT_STR_0 STRINGIFY(V4L2_IN_ST_NO_POWER)
+ XLAT(V4L2_IN_ST_NO_SIGNAL),
+ #define XLAT_VAL_1 ((unsigned) (V4L2_IN_ST_NO_SIGNAL))
+ #define XLAT_STR_1 STRINGIFY(V4L2_IN_ST_NO_SIGNAL)
+ XLAT(V4L2_IN_ST_NO_COLOR),
+ #define XLAT_VAL_2 ((unsigned) (V4L2_IN_ST_NO_COLOR))
+ #define XLAT_STR_2 STRINGIFY(V4L2_IN_ST_NO_COLOR)
+ XLAT(V4L2_IN_ST_HFLIP),
+ #define XLAT_VAL_3 ((unsigned) (V4L2_IN_ST_HFLIP))
+ #define XLAT_STR_3 STRINGIFY(V4L2_IN_ST_HFLIP)
+ XLAT(V4L2_IN_ST_VFLIP),
+ #define XLAT_VAL_4 ((unsigned) (V4L2_IN_ST_VFLIP))
+ #define XLAT_STR_4 STRINGIFY(V4L2_IN_ST_VFLIP)
+ XLAT(V4L2_IN_ST_NO_H_LOCK),
+ #define XLAT_VAL_5 ((unsigned) (V4L2_IN_ST_NO_H_LOCK))
+ #define XLAT_STR_5 STRINGIFY(V4L2_IN_ST_NO_H_LOCK)
+ XLAT(V4L2_IN_ST_COLOR_KILL),
+ #define XLAT_VAL_6 ((unsigned) (V4L2_IN_ST_COLOR_KILL))
+ #define XLAT_STR_6 STRINGIFY(V4L2_IN_ST_COLOR_KILL)
+ XLAT(V4L2_IN_ST_NO_V_LOCK),
+ #define XLAT_VAL_7 ((unsigned) (V4L2_IN_ST_NO_V_LOCK))
+ #define XLAT_STR_7 STRINGIFY(V4L2_IN_ST_NO_V_LOCK)
+ XLAT(V4L2_IN_ST_NO_STD_LOCK),
+ #define XLAT_VAL_8 ((unsigned) (V4L2_IN_ST_NO_STD_LOCK))
+ #define XLAT_STR_8 STRINGIFY(V4L2_IN_ST_NO_STD_LOCK)
+ XLAT(V4L2_IN_ST_NO_SYNC),
+ #define XLAT_VAL_9 ((unsigned) (V4L2_IN_ST_NO_SYNC))
+ #define XLAT_STR_9 STRINGIFY(V4L2_IN_ST_NO_SYNC)
+ XLAT(V4L2_IN_ST_NO_EQU),
+ #define XLAT_VAL_10 ((unsigned) (V4L2_IN_ST_NO_EQU))
+ #define XLAT_STR_10 STRINGIFY(V4L2_IN_ST_NO_EQU)
+ XLAT(V4L2_IN_ST_NO_CARRIER),
+ #define XLAT_VAL_11 ((unsigned) (V4L2_IN_ST_NO_CARRIER))
+ #define XLAT_STR_11 STRINGIFY(V4L2_IN_ST_NO_CARRIER)
+ XLAT(V4L2_IN_ST_MACROVISION),
+ #define XLAT_VAL_12 ((unsigned) (V4L2_IN_ST_MACROVISION))
+ #define XLAT_STR_12 STRINGIFY(V4L2_IN_ST_MACROVISION)
+ XLAT(V4L2_IN_ST_NO_ACCESS),
+ #define XLAT_VAL_13 ((unsigned) (V4L2_IN_ST_NO_ACCESS))
+ #define XLAT_STR_13 STRINGIFY(V4L2_IN_ST_NO_ACCESS)
+ XLAT(V4L2_IN_ST_VTR),
+ #define XLAT_VAL_14 ((unsigned) (V4L2_IN_ST_VTR))
+ #define XLAT_STR_14 STRINGIFY(V4L2_IN_ST_VTR)
+};
+# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
+static
+# endif
+const struct xlat v4l2_input_status_flags[1] = { {
+ .data = v4l2_input_status_flags_xdata,
+ .size = ARRAY_SIZE(v4l2_input_status_flags_xdata),
+ .type = XT_NORMAL,
+ .flags_mask = 0
+# ifdef XLAT_VAL_0
+ | XLAT_VAL_0
+# endif
+# ifdef XLAT_VAL_1
+ | XLAT_VAL_1
+# endif
+# ifdef XLAT_VAL_2
+ | XLAT_VAL_2
+# endif
+# ifdef XLAT_VAL_3
+ | XLAT_VAL_3
+# endif
+# ifdef XLAT_VAL_4
+ | XLAT_VAL_4
+# endif
+# ifdef XLAT_VAL_5
+ | XLAT_VAL_5
+# endif
+# ifdef XLAT_VAL_6
+ | XLAT_VAL_6
+# endif
+# ifdef XLAT_VAL_7
+ | XLAT_VAL_7
+# endif
+# ifdef XLAT_VAL_8
+ | XLAT_VAL_8
+# endif
+# ifdef XLAT_VAL_9
+ | XLAT_VAL_9
+# endif
+# ifdef XLAT_VAL_10
+ | XLAT_VAL_10
+# endif
+# ifdef XLAT_VAL_11
+ | XLAT_VAL_11
+# endif
+# ifdef XLAT_VAL_12
+ | XLAT_VAL_12
+# endif
+# ifdef XLAT_VAL_13
+ | XLAT_VAL_13
+# endif
+# ifdef XLAT_VAL_14
+ | XLAT_VAL_14
+# endif
+ ,
+ .flags_strsz = 0
+# ifdef XLAT_STR_0
+ + sizeof(XLAT_STR_0)
+# endif
+# ifdef XLAT_STR_1
+ + sizeof(XLAT_STR_1)
+# endif
+# ifdef XLAT_STR_2
+ + sizeof(XLAT_STR_2)
+# endif
+# ifdef XLAT_STR_3
+ + sizeof(XLAT_STR_3)
+# endif
+# ifdef XLAT_STR_4
+ + sizeof(XLAT_STR_4)
+# endif
+# ifdef XLAT_STR_5
+ + sizeof(XLAT_STR_5)
+# endif
+# ifdef XLAT_STR_6
+ + sizeof(XLAT_STR_6)
+# endif
+# ifdef XLAT_STR_7
+ + sizeof(XLAT_STR_7)
+# endif
+# ifdef XLAT_STR_8
+ + sizeof(XLAT_STR_8)
+# endif
+# ifdef XLAT_STR_9
+ + sizeof(XLAT_STR_9)
+# endif
+# ifdef XLAT_STR_10
+ + sizeof(XLAT_STR_10)
+# endif
+# ifdef XLAT_STR_11
+ + sizeof(XLAT_STR_11)
+# endif
+# ifdef XLAT_STR_12
+ + sizeof(XLAT_STR_12)
+# endif
+# ifdef XLAT_STR_13
+ + sizeof(XLAT_STR_13)
+# endif
+# ifdef XLAT_STR_14
+ + sizeof(XLAT_STR_14)
+# endif
+ ,
+} };
+DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
+
+# undef XLAT_STR_0
+# undef XLAT_VAL_0
+# undef XLAT_STR_1
+# undef XLAT_VAL_1
+# undef XLAT_STR_2
+# undef XLAT_VAL_2
+# undef XLAT_STR_3
+# undef XLAT_VAL_3
+# undef XLAT_STR_4
+# undef XLAT_VAL_4
+# undef XLAT_STR_5
+# undef XLAT_VAL_5
+# undef XLAT_STR_6
+# undef XLAT_VAL_6
+# undef XLAT_STR_7
+# undef XLAT_VAL_7
+# undef XLAT_STR_8
+# undef XLAT_VAL_8
+# undef XLAT_STR_9
+# undef XLAT_VAL_9
+# undef XLAT_STR_10
+# undef XLAT_VAL_10
+# undef XLAT_STR_11
+# undef XLAT_VAL_11
+# undef XLAT_STR_12
+# undef XLAT_VAL_12
+# undef XLAT_STR_13
+# undef XLAT_VAL_13
+# undef XLAT_STR_14
+# undef XLAT_VAL_14
+# endif /* !IN_MPERS */
+
+#endif /* !XLAT_MACROS_ONLY */
diff --git a/src/xlat/v4l2_input_status_flags.in b/src/xlat/v4l2_input_status_flags.in
new file mode 100644
index 000000000..e80d7d336
--- /dev/null
+++ b/src/xlat/v4l2_input_status_flags.in
@@ -0,0 +1,16 @@
+#unconditional
+V4L2_IN_ST_NO_POWER 0x00000001
+V4L2_IN_ST_NO_SIGNAL 0x00000002
+V4L2_IN_ST_NO_COLOR 0x00000004
+V4L2_IN_ST_HFLIP 0x00000010
+V4L2_IN_ST_VFLIP 0x00000020
+V4L2_IN_ST_NO_H_LOCK 0x00000100
+V4L2_IN_ST_COLOR_KILL 0x00000200
+V4L2_IN_ST_NO_V_LOCK 0x00000400
+V4L2_IN_ST_NO_STD_LOCK 0x00000800
+V4L2_IN_ST_NO_SYNC 0x00010000
+V4L2_IN_ST_NO_EQU 0x00020000
+V4L2_IN_ST_NO_CARRIER 0x00040000
+V4L2_IN_ST_MACROVISION 0x01000000
+V4L2_IN_ST_NO_ACCESS 0x02000000
+V4L2_IN_ST_VTR 0x04000000
diff --git a/src/xlat/v4l2_std_ids.h b/src/xlat/v4l2_std_ids.h
new file mode 100644
index 000000000..2a4d98e8d
--- /dev/null
+++ b/src/xlat/v4l2_std_ids.h
@@ -0,0 +1,399 @@
+/* Generated by ./src/xlat/gen.sh from ./src/xlat/v4l2_std_ids.in; do not edit. */
+
+#include "gcc_compat.h"
+#include "static_assert.h"
+
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_B) == (((v4l2_std_id)0x00000001)), "V4L2_STD_PAL_B != ((v4l2_std_id)0x00000001)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_B1) == (((v4l2_std_id)0x00000002)), "V4L2_STD_PAL_B1 != ((v4l2_std_id)0x00000002)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_G) == (((v4l2_std_id)0x00000004)), "V4L2_STD_PAL_G != ((v4l2_std_id)0x00000004)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_H) == (((v4l2_std_id)0x00000008)), "V4L2_STD_PAL_H != ((v4l2_std_id)0x00000008)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_I) == (((v4l2_std_id)0x00000010)), "V4L2_STD_PAL_I != ((v4l2_std_id)0x00000010)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_D) == (((v4l2_std_id)0x00000020)), "V4L2_STD_PAL_D != ((v4l2_std_id)0x00000020)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_D1) == (((v4l2_std_id)0x00000040)), "V4L2_STD_PAL_D1 != ((v4l2_std_id)0x00000040)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_K) == (((v4l2_std_id)0x00000080)), "V4L2_STD_PAL_K != ((v4l2_std_id)0x00000080)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_M) == (((v4l2_std_id)0x00000100)), "V4L2_STD_PAL_M != ((v4l2_std_id)0x00000100)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_N) == (((v4l2_std_id)0x00000200)), "V4L2_STD_PAL_N != ((v4l2_std_id)0x00000200)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_Nc) == (((v4l2_std_id)0x00000400)), "V4L2_STD_PAL_Nc != ((v4l2_std_id)0x00000400)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_PAL_60) == (((v4l2_std_id)0x00000800)), "V4L2_STD_PAL_60 != ((v4l2_std_id)0x00000800)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_NTSC_M) == (((v4l2_std_id)0x00001000)), "V4L2_STD_NTSC_M != ((v4l2_std_id)0x00001000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_NTSC_M_JP) == (((v4l2_std_id)0x00002000)), "V4L2_STD_NTSC_M_JP != ((v4l2_std_id)0x00002000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_NTSC_443) == (((v4l2_std_id)0x00004000)), "V4L2_STD_NTSC_443 != ((v4l2_std_id)0x00004000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_NTSC_M_KR) == (((v4l2_std_id)0x00008000)), "V4L2_STD_NTSC_M_KR != ((v4l2_std_id)0x00008000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_SECAM_B) == (((v4l2_std_id)0x00010000)), "V4L2_STD_SECAM_B != ((v4l2_std_id)0x00010000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_SECAM_D) == (((v4l2_std_id)0x00020000)), "V4L2_STD_SECAM_D != ((v4l2_std_id)0x00020000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_SECAM_G) == (((v4l2_std_id)0x00040000)), "V4L2_STD_SECAM_G != ((v4l2_std_id)0x00040000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_SECAM_H) == (((v4l2_std_id)0x00080000)), "V4L2_STD_SECAM_H != ((v4l2_std_id)0x00080000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_SECAM_K) == (((v4l2_std_id)0x00100000)), "V4L2_STD_SECAM_K != ((v4l2_std_id)0x00100000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_SECAM_K1) == (((v4l2_std_id)0x00200000)), "V4L2_STD_SECAM_K1 != ((v4l2_std_id)0x00200000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_SECAM_L) == (((v4l2_std_id)0x00400000)), "V4L2_STD_SECAM_L != ((v4l2_std_id)0x00400000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_SECAM_LC) == (((v4l2_std_id)0x00800000)), "V4L2_STD_SECAM_LC != ((v4l2_std_id)0x00800000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_ATSC_8_VSB) == (((v4l2_std_id)0x01000000)), "V4L2_STD_ATSC_8_VSB != ((v4l2_std_id)0x01000000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
+static_assert((V4L2_STD_ATSC_16_VSB) == (((v4l2_std_id)0x02000000)), "V4L2_STD_ATSC_16_VSB != ((v4l2_std_id)0x02000000)");
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
+#undef XLAT_PREV_VAL
+
+#ifndef XLAT_MACROS_ONLY
+
+# ifdef IN_MPERS
+
+extern const struct xlat v4l2_std_ids[];
+
+# else
+
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
+static const struct xlat_data v4l2_std_ids_xdata[] = {
+ XLAT(V4L2_STD_PAL_B),
+ #define XLAT_VAL_0 ((unsigned) (V4L2_STD_PAL_B))
+ #define XLAT_STR_0 STRINGIFY(V4L2_STD_PAL_B)
+ XLAT(V4L2_STD_PAL_B1),
+ #define XLAT_VAL_1 ((unsigned) (V4L2_STD_PAL_B1))
+ #define XLAT_STR_1 STRINGIFY(V4L2_STD_PAL_B1)
+ XLAT(V4L2_STD_PAL_G),
+ #define XLAT_VAL_2 ((unsigned) (V4L2_STD_PAL_G))
+ #define XLAT_STR_2 STRINGIFY(V4L2_STD_PAL_G)
+ XLAT(V4L2_STD_PAL_H),
+ #define XLAT_VAL_3 ((unsigned) (V4L2_STD_PAL_H))
+ #define XLAT_STR_3 STRINGIFY(V4L2_STD_PAL_H)
+ XLAT(V4L2_STD_PAL_I),
+ #define XLAT_VAL_4 ((unsigned) (V4L2_STD_PAL_I))
+ #define XLAT_STR_4 STRINGIFY(V4L2_STD_PAL_I)
+ XLAT(V4L2_STD_PAL_D),
+ #define XLAT_VAL_5 ((unsigned) (V4L2_STD_PAL_D))
+ #define XLAT_STR_5 STRINGIFY(V4L2_STD_PAL_D)
+ XLAT(V4L2_STD_PAL_D1),
+ #define XLAT_VAL_6 ((unsigned) (V4L2_STD_PAL_D1))
+ #define XLAT_STR_6 STRINGIFY(V4L2_STD_PAL_D1)
+ XLAT(V4L2_STD_PAL_K),
+ #define XLAT_VAL_7 ((unsigned) (V4L2_STD_PAL_K))
+ #define XLAT_STR_7 STRINGIFY(V4L2_STD_PAL_K)
+ XLAT(V4L2_STD_PAL_M),
+ #define XLAT_VAL_8 ((unsigned) (V4L2_STD_PAL_M))
+ #define XLAT_STR_8 STRINGIFY(V4L2_STD_PAL_M)
+ XLAT(V4L2_STD_PAL_N),
+ #define XLAT_VAL_9 ((unsigned) (V4L2_STD_PAL_N))
+ #define XLAT_STR_9 STRINGIFY(V4L2_STD_PAL_N)
+ XLAT(V4L2_STD_PAL_Nc),
+ #define XLAT_VAL_10 ((unsigned) (V4L2_STD_PAL_Nc))
+ #define XLAT_STR_10 STRINGIFY(V4L2_STD_PAL_Nc)
+ XLAT(V4L2_STD_PAL_60),
+ #define XLAT_VAL_11 ((unsigned) (V4L2_STD_PAL_60))
+ #define XLAT_STR_11 STRINGIFY(V4L2_STD_PAL_60)
+ XLAT(V4L2_STD_NTSC_M),
+ #define XLAT_VAL_12 ((unsigned) (V4L2_STD_NTSC_M))
+ #define XLAT_STR_12 STRINGIFY(V4L2_STD_NTSC_M)
+ XLAT(V4L2_STD_NTSC_M_JP),
+ #define XLAT_VAL_13 ((unsigned) (V4L2_STD_NTSC_M_JP))
+ #define XLAT_STR_13 STRINGIFY(V4L2_STD_NTSC_M_JP)
+ XLAT(V4L2_STD_NTSC_443),
+ #define XLAT_VAL_14 ((unsigned) (V4L2_STD_NTSC_443))
+ #define XLAT_STR_14 STRINGIFY(V4L2_STD_NTSC_443)
+ XLAT(V4L2_STD_NTSC_M_KR),
+ #define XLAT_VAL_15 ((unsigned) (V4L2_STD_NTSC_M_KR))
+ #define XLAT_STR_15 STRINGIFY(V4L2_STD_NTSC_M_KR)
+ XLAT(V4L2_STD_SECAM_B),
+ #define XLAT_VAL_16 ((unsigned) (V4L2_STD_SECAM_B))
+ #define XLAT_STR_16 STRINGIFY(V4L2_STD_SECAM_B)
+ XLAT(V4L2_STD_SECAM_D),
+ #define XLAT_VAL_17 ((unsigned) (V4L2_STD_SECAM_D))
+ #define XLAT_STR_17 STRINGIFY(V4L2_STD_SECAM_D)
+ XLAT(V4L2_STD_SECAM_G),
+ #define XLAT_VAL_18 ((unsigned) (V4L2_STD_SECAM_G))
+ #define XLAT_STR_18 STRINGIFY(V4L2_STD_SECAM_G)
+ XLAT(V4L2_STD_SECAM_H),
+ #define XLAT_VAL_19 ((unsigned) (V4L2_STD_SECAM_H))
+ #define XLAT_STR_19 STRINGIFY(V4L2_STD_SECAM_H)
+ XLAT(V4L2_STD_SECAM_K),
+ #define XLAT_VAL_20 ((unsigned) (V4L2_STD_SECAM_K))
+ #define XLAT_STR_20 STRINGIFY(V4L2_STD_SECAM_K)
+ XLAT(V4L2_STD_SECAM_K1),
+ #define XLAT_VAL_21 ((unsigned) (V4L2_STD_SECAM_K1))
+ #define XLAT_STR_21 STRINGIFY(V4L2_STD_SECAM_K1)
+ XLAT(V4L2_STD_SECAM_L),
+ #define XLAT_VAL_22 ((unsigned) (V4L2_STD_SECAM_L))
+ #define XLAT_STR_22 STRINGIFY(V4L2_STD_SECAM_L)
+ XLAT(V4L2_STD_SECAM_LC),
+ #define XLAT_VAL_23 ((unsigned) (V4L2_STD_SECAM_LC))
+ #define XLAT_STR_23 STRINGIFY(V4L2_STD_SECAM_LC)
+ XLAT(V4L2_STD_ATSC_8_VSB),
+ #define XLAT_VAL_24 ((unsigned) (V4L2_STD_ATSC_8_VSB))
+ #define XLAT_STR_24 STRINGIFY(V4L2_STD_ATSC_8_VSB)
+ XLAT(V4L2_STD_ATSC_16_VSB),
+ #define XLAT_VAL_25 ((unsigned) (V4L2_STD_ATSC_16_VSB))
+ #define XLAT_STR_25 STRINGIFY(V4L2_STD_ATSC_16_VSB)
+};
+# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
+static
+# endif
+const struct xlat v4l2_std_ids[1] = { {
+ .data = v4l2_std_ids_xdata,
+ .size = ARRAY_SIZE(v4l2_std_ids_xdata),
+ .type = XT_NORMAL,
+ .flags_mask = 0
+# ifdef XLAT_VAL_0
+ | XLAT_VAL_0
+# endif
+# ifdef XLAT_VAL_1
+ | XLAT_VAL_1
+# endif
+# ifdef XLAT_VAL_2
+ | XLAT_VAL_2
+# endif
+# ifdef XLAT_VAL_3
+ | XLAT_VAL_3
+# endif
+# ifdef XLAT_VAL_4
+ | XLAT_VAL_4
+# endif
+# ifdef XLAT_VAL_5
+ | XLAT_VAL_5
+# endif
+# ifdef XLAT_VAL_6
+ | XLAT_VAL_6
+# endif
+# ifdef XLAT_VAL_7
+ | XLAT_VAL_7
+# endif
+# ifdef XLAT_VAL_8
+ | XLAT_VAL_8
+# endif
+# ifdef XLAT_VAL_9
+ | XLAT_VAL_9
+# endif
+# ifdef XLAT_VAL_10
+ | XLAT_VAL_10
+# endif
+# ifdef XLAT_VAL_11
+ | XLAT_VAL_11
+# endif
+# ifdef XLAT_VAL_12
+ | XLAT_VAL_12
+# endif
+# ifdef XLAT_VAL_13
+ | XLAT_VAL_13
+# endif
+# ifdef XLAT_VAL_14
+ | XLAT_VAL_14
+# endif
+# ifdef XLAT_VAL_15
+ | XLAT_VAL_15
+# endif
+# ifdef XLAT_VAL_16
+ | XLAT_VAL_16
+# endif
+# ifdef XLAT_VAL_17
+ | XLAT_VAL_17
+# endif
+# ifdef XLAT_VAL_18
+ | XLAT_VAL_18
+# endif
+# ifdef XLAT_VAL_19
+ | XLAT_VAL_19
+# endif
+# ifdef XLAT_VAL_20
+ | XLAT_VAL_20
+# endif
+# ifdef XLAT_VAL_21
+ | XLAT_VAL_21
+# endif
+# ifdef XLAT_VAL_22
+ | XLAT_VAL_22
+# endif
+# ifdef XLAT_VAL_23
+ | XLAT_VAL_23
+# endif
+# ifdef XLAT_VAL_24
+ | XLAT_VAL_24
+# endif
+# ifdef XLAT_VAL_25
+ | XLAT_VAL_25
+# endif
+ ,
+ .flags_strsz = 0
+# ifdef XLAT_STR_0
+ + sizeof(XLAT_STR_0)
+# endif
+# ifdef XLAT_STR_1
+ + sizeof(XLAT_STR_1)
+# endif
+# ifdef XLAT_STR_2
+ + sizeof(XLAT_STR_2)
+# endif
+# ifdef XLAT_STR_3
+ + sizeof(XLAT_STR_3)
+# endif
+# ifdef XLAT_STR_4
+ + sizeof(XLAT_STR_4)
+# endif
+# ifdef XLAT_STR_5
+ + sizeof(XLAT_STR_5)
+# endif
+# ifdef XLAT_STR_6
+ + sizeof(XLAT_STR_6)
+# endif
+# ifdef XLAT_STR_7
+ + sizeof(XLAT_STR_7)
+# endif
+# ifdef XLAT_STR_8
+ + sizeof(XLAT_STR_8)
+# endif
+# ifdef XLAT_STR_9
+ + sizeof(XLAT_STR_9)
+# endif
+# ifdef XLAT_STR_10
+ + sizeof(XLAT_STR_10)
+# endif
+# ifdef XLAT_STR_11
+ + sizeof(XLAT_STR_11)
+# endif
+# ifdef XLAT_STR_12
+ + sizeof(XLAT_STR_12)
+# endif
+# ifdef XLAT_STR_13
+ + sizeof(XLAT_STR_13)
+# endif
+# ifdef XLAT_STR_14
+ + sizeof(XLAT_STR_14)
+# endif
+# ifdef XLAT_STR_15
+ + sizeof(XLAT_STR_15)
+# endif
+# ifdef XLAT_STR_16
+ + sizeof(XLAT_STR_16)
+# endif
+# ifdef XLAT_STR_17
+ + sizeof(XLAT_STR_17)
+# endif
+# ifdef XLAT_STR_18
+ + sizeof(XLAT_STR_18)
+# endif
+# ifdef XLAT_STR_19
+ + sizeof(XLAT_STR_19)
+# endif
+# ifdef XLAT_STR_20
+ + sizeof(XLAT_STR_20)
+# endif
+# ifdef XLAT_STR_21
+ + sizeof(XLAT_STR_21)
+# endif
+# ifdef XLAT_STR_22
+ + sizeof(XLAT_STR_22)
+# endif
+# ifdef XLAT_STR_23
+ + sizeof(XLAT_STR_23)
+# endif
+# ifdef XLAT_STR_24
+ + sizeof(XLAT_STR_24)
+# endif
+# ifdef XLAT_STR_25
+ + sizeof(XLAT_STR_25)
+# endif
+ ,
+} };
+DIAG_POP_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
+
+# undef XLAT_STR_0
+# undef XLAT_VAL_0
+# undef XLAT_STR_1
+# undef XLAT_VAL_1
+# undef XLAT_STR_2
+# undef XLAT_VAL_2
+# undef XLAT_STR_3
+# undef XLAT_VAL_3
+# undef XLAT_STR_4
+# undef XLAT_VAL_4
+# undef XLAT_STR_5
+# undef XLAT_VAL_5
+# undef XLAT_STR_6
+# undef XLAT_VAL_6
+# undef XLAT_STR_7
+# undef XLAT_VAL_7
+# undef XLAT_STR_8
+# undef XLAT_VAL_8
+# undef XLAT_STR_9
+# undef XLAT_VAL_9
+# undef XLAT_STR_10
+# undef XLAT_VAL_10
+# undef XLAT_STR_11
+# undef XLAT_VAL_11
+# undef XLAT_STR_12
+# undef XLAT_VAL_12
+# undef XLAT_STR_13
+# undef XLAT_VAL_13
+# undef XLAT_STR_14
+# undef XLAT_VAL_14
+# undef XLAT_STR_15
+# undef XLAT_VAL_15
+# undef XLAT_STR_16
+# undef XLAT_VAL_16
+# undef XLAT_STR_17
+# undef XLAT_VAL_17
+# undef XLAT_STR_18
+# undef XLAT_VAL_18
+# undef XLAT_STR_19
+# undef XLAT_VAL_19
+# undef XLAT_STR_20
+# undef XLAT_VAL_20
+# undef XLAT_STR_21
+# undef XLAT_VAL_21
+# undef XLAT_STR_22
+# undef XLAT_VAL_22
+# undef XLAT_STR_23
+# undef XLAT_VAL_23
+# undef XLAT_STR_24
+# undef XLAT_VAL_24
+# undef XLAT_STR_25
+# undef XLAT_VAL_25
+# endif /* !IN_MPERS */
+
+#endif /* !XLAT_MACROS_ONLY */
diff --git a/src/xlat/v4l2_std_ids.in b/src/xlat/v4l2_std_ids.in
new file mode 100644
index 000000000..badf23860
--- /dev/null
+++ b/src/xlat/v4l2_std_ids.in
@@ -0,0 +1,27 @@
+#unconditional
+V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
+V4L2_STD_PAL_B1 ((v4l2_std_id)0x00000002)
+V4L2_STD_PAL_G ((v4l2_std_id)0x00000004)
+V4L2_STD_PAL_H ((v4l2_std_id)0x00000008)
+V4L2_STD_PAL_I ((v4l2_std_id)0x00000010)
+V4L2_STD_PAL_D ((v4l2_std_id)0x00000020)
+V4L2_STD_PAL_D1 ((v4l2_std_id)0x00000040)
+V4L2_STD_PAL_K ((v4l2_std_id)0x00000080)
+V4L2_STD_PAL_M ((v4l2_std_id)0x00000100)
+V4L2_STD_PAL_N ((v4l2_std_id)0x00000200)
+V4L2_STD_PAL_Nc ((v4l2_std_id)0x00000400)
+V4L2_STD_PAL_60 ((v4l2_std_id)0x00000800)
+V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
+V4L2_STD_NTSC_M_JP ((v4l2_std_id)0x00002000)
+V4L2_STD_NTSC_443 ((v4l2_std_id)0x00004000)
+V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000)
+V4L2_STD_SECAM_B ((v4l2_std_id)0x00010000)
+V4L2_STD_SECAM_D ((v4l2_std_id)0x00020000)
+V4L2_STD_SECAM_G ((v4l2_std_id)0x00040000)
+V4L2_STD_SECAM_H ((v4l2_std_id)0x00080000)
+V4L2_STD_SECAM_K ((v4l2_std_id)0x00100000)
+V4L2_STD_SECAM_K1 ((v4l2_std_id)0x00200000)
+V4L2_STD_SECAM_L ((v4l2_std_id)0x00400000)
+V4L2_STD_SECAM_LC ((v4l2_std_id)0x00800000)
+V4L2_STD_ATSC_8_VSB ((v4l2_std_id)0x01000000)
+V4L2_STD_ATSC_16_VSB ((v4l2_std_id)0x02000000)
diff --git a/tests/ioctl_v4l2-success.c b/tests/ioctl_v4l2-success.c
index 4acea3b59..41d85f243 100644
--- a/tests/ioctl_v4l2-success.c
+++ b/tests/ioctl_v4l2-success.c
@@ -865,6 +865,36 @@ main(int argc, char **argv)
{ ARG_XLAT_UNKNOWN(0xdeadc0de, "V4L2_INPUT_TYPE_???") },
};
+ static const struct strval32 input_std[] = {
+ { V4L2_STD_PAL_I,
+ XLAT_KNOWN(0x10, "V4L2_STD_PAL_I") },
+ { V4L2_STD_SECAM_L,
+ XLAT_KNOWN(0x400000, "V4L2_STD_SECAM_L") },
+ { V4L2_STD_PAL_B | V4L2_STD_PAL_G,
+ XLAT_KNOWN(0x5, "V4L2_STD_PAL_B|V4L2_STD_PAL_G") },
+ { ARG_XLAT_UNKNOWN(0x80000000, "V4L2_STD_???") },
+ };
+
+ static const struct strval32 input_status[] = {
+ { V4L2_IN_ST_NO_SIGNAL,
+ XLAT_KNOWN(0x2, "V4L2_IN_ST_NO_SIGNAL") },
+ { V4L2_IN_ST_NO_STD_LOCK,
+ XLAT_KNOWN(0x800, "V4L2_IN_ST_NO_STD_LOCK") },
+ { V4L2_IN_ST_NO_CARRIER | V4L2_IN_ST_NO_ACCESS,
+ XLAT_KNOWN(0x2040000, "V4L2_IN_ST_NO_CARRIER|V4L2_IN_ST_NO_ACCESS") },
+ { ARG_XLAT_UNKNOWN(0x80000000, "V4L2_IN_ST_???") },
+ };
+
+ static const struct strval32 input_caps[] = {
+ { V4L2_IN_CAP_DV_TIMINGS,
+ XLAT_KNOWN(0x2, "V4L2_IN_CAP_DV_TIMINGS") },
+ { V4L2_IN_CAP_NATIVE_SIZE,
+ XLAT_KNOWN(0x8, "V4L2_IN_CAP_NATIVE_SIZE") },
+ { V4L2_IN_CAP_STD | V4L2_IN_CAP_NATIVE_SIZE,
+ XLAT_KNOWN(0xc, "V4L2_IN_CAP_STD|V4L2_IN_CAP_NATIVE_SIZE") },
+ { ARG_XLAT_UNKNOWN(0x80000000, "V4L2_IN_CAP_???") },
+ };
+
struct v4l2_input *input = tail_alloc(sizeof(*input));
ioctl(-1, VIDIOC_ENUMINPUT, 0);
@@ -877,19 +907,34 @@ main(int argc, char **argv)
for (size_t i = 0; i < ARRAY_SIZE(stdids); i++) {
for (size_t j = 0; j < ARRAY_SIZE(input_types); j++) {
- fill_memory32(input, sizeof(*input));
- fill_memory_ex(input->name, sizeof(input->name),
- i * 47 + 13, 255);
- input->type = input_types[j].val;
- input->std = stdids[i].val;
-
- ioctl(-1, VIDIOC_ENUMINPUT, input);
- printf("ioctl(-1, %s, {index=2158018784, name=",
- XLAT_STR(VIDIOC_ENUMINPUT));
- print_quoted_cstring((char *) input->name,
- sizeof(input->name));
- printf(", type=%s}) = %ld (INJECTED)\n",
- input_types[j].str, inject_retval);
+ for (size_t k = 0; k < ARRAY_SIZE(input_std); k++) {
+ for (size_t l = 0; l < ARRAY_SIZE(input_status); l++) {
+ for (size_t m = 0; m < ARRAY_SIZE(input_caps); m++) {
+ fill_memory32(input, sizeof(*input));
+ fill_memory_ex(input->name, sizeof(input->name),
+ i * 47 + 13, 255);
+ input->type = input_types[j].val;
+ input->std = stdids[i].val;
+ input->audioset = 0;
+ input->tuner = 0;
+ input->std = input_std[k].val;
+ input->status = input_status[l].val;
+ input->capabilities = input_caps[m].val;
+
+ ioctl(-1, VIDIOC_ENUMINPUT, input);
+ printf("ioctl(-1, %s, {index=2158018784, name=",
+ XLAT_STR(VIDIOC_ENUMINPUT));
+ print_quoted_cstring((char *) input->name,
+ sizeof(input->name));
+ printf(", type=%s", input_types[j].str);
+ printf(", audioset=0, tuner=0");
+ printf(", std=%s", input_std[k].str);
+ printf(", status=%s", input_status[l].str);
+ printf(", capabilities=%s}) = %ld (INJECTED)\n",
+ input_caps[m].str, inject_retval);
+ }
+ }
+ }
}
}
--
2.34.1
More information about the Strace-devel
mailing list