aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-07-05 05:04:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-07-30 19:23:03 -0400
commit3d687b49ff085b325488e7aeb2ee4df99dd7ca6e (patch)
treed45b98dc936add40783e3dd2966d91c1c98e549e
parentb67a39e4b6850c0346c0b809886632d4cd2fed7d (diff)
[media] videodev2.h: add VIDIOC_ENUM_FREQ_BANDS
Add a new ioctl to enumerate the supported frequency bands of a tuner. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--include/linux/videodev2.h40
1 files changed, 30 insertions, 10 deletions
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 4cf766e6f120..63c950f6fcc2 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -2032,6 +2032,7 @@ struct v4l2_modulator {
2032#define V4L2_TUNER_CAP_RDS 0x0080 2032#define V4L2_TUNER_CAP_RDS 0x0080
2033#define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100 2033#define V4L2_TUNER_CAP_RDS_BLOCK_IO 0x0100
2034#define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200 2034#define V4L2_TUNER_CAP_RDS_CONTROLS 0x0200
2035#define V4L2_TUNER_CAP_FREQ_BANDS 0x0400
2035 2036
2036/* Flags for the 'rxsubchans' field */ 2037/* Flags for the 'rxsubchans' field */
2037#define V4L2_TUNER_SUB_MONO 0x0001 2038#define V4L2_TUNER_SUB_MONO 0x0001
@@ -2050,19 +2051,34 @@ struct v4l2_modulator {
2050#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004 2051#define V4L2_TUNER_MODE_LANG1_LANG2 0x0004
2051 2052
2052struct v4l2_frequency { 2053struct v4l2_frequency {
2053 __u32 tuner; 2054 __u32 tuner;
2054 __u32 type; /* enum v4l2_tuner_type */ 2055 __u32 type; /* enum v4l2_tuner_type */
2055 __u32 frequency; 2056 __u32 frequency;
2056 __u32 reserved[8]; 2057 __u32 reserved[8];
2058};
2059
2060#define V4L2_BAND_MODULATION_VSB (1 << 1)
2061#define V4L2_BAND_MODULATION_FM (1 << 2)
2062#define V4L2_BAND_MODULATION_AM (1 << 3)
2063
2064struct v4l2_frequency_band {
2065 __u32 tuner;
2066 __u32 type; /* enum v4l2_tuner_type */
2067 __u32 index;
2068 __u32 capability;
2069 __u32 rangelow;
2070 __u32 rangehigh;
2071 __u32 modulation;
2072 __u32 reserved[9];
2057}; 2073};
2058 2074
2059struct v4l2_hw_freq_seek { 2075struct v4l2_hw_freq_seek {
2060 __u32 tuner; 2076 __u32 tuner;
2061 __u32 type; /* enum v4l2_tuner_type */ 2077 __u32 type; /* enum v4l2_tuner_type */
2062 __u32 seek_upward; 2078 __u32 seek_upward;
2063 __u32 wrap_around; 2079 __u32 wrap_around;
2064 __u32 spacing; 2080 __u32 spacing;
2065 __u32 reserved[7]; 2081 __u32 reserved[7];
2066}; 2082};
2067 2083
2068/* 2084/*
@@ -2630,6 +2646,10 @@ struct v4l2_create_buffers {
2630#define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings) 2646#define VIDIOC_QUERY_DV_TIMINGS _IOR('V', 99, struct v4l2_dv_timings)
2631#define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap) 2647#define VIDIOC_DV_TIMINGS_CAP _IOWR('V', 100, struct v4l2_dv_timings_cap)
2632 2648
2649/* Experimental, this ioctl may change over the next couple of kernel
2650 versions. */
2651#define VIDIOC_ENUM_FREQ_BANDS _IOWR('V', 101, struct v4l2_frequency_band)
2652
2633/* Reminder: when adding new ioctls please add support for them to 2653/* Reminder: when adding new ioctls please add support for them to
2634 drivers/media/video/v4l2-compat-ioctl32.c as well! */ 2654 drivers/media/video/v4l2-compat-ioctl32.c as well! */
2635 2655