[RFCv1 PATCH 4/5] videodev2.h: add frequency band information.

2012-05-27 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com

Signed-off-by: Hans Verkuil hans.verk...@cisco.com
---
 include/linux/videodev2.h |   19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 2339678..013ee46 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -2023,7 +2023,8 @@ struct v4l2_tuner {
__u32   audmode;
__s32   signal;
__s32   afc;
-   __u32   reserved[4];
+   __u32   band;
+   __u32   reserved[3];
 };
 
 struct v4l2_modulator {
@@ -2033,7 +2034,8 @@ struct v4l2_modulator {
__u32   rangelow;
__u32   rangehigh;
__u32   txsubchans;
-   __u32   reserved[4];
+   __u32   band;
+   __u32   reserved[3];
 };
 
 /*  Flags for the 'capability' field */
@@ -2048,6 +2050,11 @@ struct v4l2_modulator {
 #define V4L2_TUNER_CAP_RDS 0x0080
 #define V4L2_TUNER_CAP_RDS_BLOCK_IO0x0100
 #define V4L2_TUNER_CAP_RDS_CONTROLS0x0200
+#define V4L2_TUNER_CAP_BAND_FM_EUROPE_US 0x0001
+#define V4L2_TUNER_CAP_BAND_FM_JAPAN 0x0002
+#define V4L2_TUNER_CAP_BAND_FM_RUSSIAN   0x0004
+#define V4L2_TUNER_CAP_BAND_FM_WEATHER   0x0008
+#define V4L2_TUNER_CAP_BAND_AM_MW0x0010
 
 /*  Flags for the 'rxsubchans' field */
 #define V4L2_TUNER_SUB_MONO0x0001
@@ -2065,6 +2072,14 @@ struct v4l2_modulator {
 #define V4L2_TUNER_MODE_LANG1  0x0003
 #define V4L2_TUNER_MODE_LANG1_LANG20x0004
 
+/*  Values for the 'band' field */
+#define V4L2_TUNER_BAND_DEFAULT   0
+#define V4L2_TUNER_BAND_FM_EUROPE_US  1   /* 87.5 Mhz - 108 MHz */
+#define V4L2_TUNER_BAND_FM_JAPAN  2   /* 76 MHz - 90 MHz */
+#define V4L2_TUNER_BAND_FM_RUSSIAN3   /* 65.8 MHz - 74 MHz */
+#define V4L2_TUNER_BAND_FM_WEATHER4   /* 162.4 MHz - 162.55 MHz */
+#define V4L2_TUNER_BAND_AM_MW 5
+
 struct v4l2_frequency {
__u32 tuner;
__u32 type; /* enum v4l2_tuner_type */
-- 
1.7.10

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFCv1 PATCH 4/5] videodev2.h: add frequency band information.

2012-05-27 Thread Hans de Goede

Looks good:

Acked-by: Hans de Goede hdego...@redhat.com


On 05/27/2012 01:50 PM, Hans Verkuil wrote:

From: Hans Verkuilhans.verk...@cisco.com

Signed-off-by: Hans Verkuilhans.verk...@cisco.com
---
  include/linux/videodev2.h |   19 +--
  1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 2339678..013ee46 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -2023,7 +2023,8 @@ struct v4l2_tuner {
__u32   audmode;
__s32   signal;
__s32   afc;
-   __u32   reserved[4];
+   __u32   band;
+   __u32   reserved[3];
  };

  struct v4l2_modulator {
@@ -2033,7 +2034,8 @@ struct v4l2_modulator {
__u32   rangelow;
__u32   rangehigh;
__u32   txsubchans;
-   __u32   reserved[4];
+   __u32   band;
+   __u32   reserved[3];
  };

  /*  Flags for the 'capability' field */
@@ -2048,6 +2050,11 @@ struct v4l2_modulator {
  #define V4L2_TUNER_CAP_RDS0x0080
  #define V4L2_TUNER_CAP_RDS_BLOCK_IO   0x0100
  #define V4L2_TUNER_CAP_RDS_CONTROLS   0x0200
+#define V4L2_TUNER_CAP_BAND_FM_EUROPE_US 0x0001
+#define V4L2_TUNER_CAP_BAND_FM_JAPAN 0x0002
+#define V4L2_TUNER_CAP_BAND_FM_RUSSIAN   0x0004
+#define V4L2_TUNER_CAP_BAND_FM_WEATHER   0x0008
+#define V4L2_TUNER_CAP_BAND_AM_MW0x0010

  /*  Flags for the 'rxsubchans' field */
  #define V4L2_TUNER_SUB_MONO   0x0001
@@ -2065,6 +2072,14 @@ struct v4l2_modulator {
  #define V4L2_TUNER_MODE_LANG1 0x0003
  #define V4L2_TUNER_MODE_LANG1_LANG2   0x0004

+/*  Values for the 'band' field */
+#define V4L2_TUNER_BAND_DEFAULT   0
+#define V4L2_TUNER_BAND_FM_EUROPE_US  1   /* 87.5 Mhz - 108 MHz */
+#define V4L2_TUNER_BAND_FM_JAPAN  2   /* 76 MHz - 90 MHz */
+#define V4L2_TUNER_BAND_FM_RUSSIAN3   /* 65.8 MHz - 74 MHz */
+#define V4L2_TUNER_BAND_FM_WEATHER4   /* 162.4 MHz - 162.55 MHz */
+#define V4L2_TUNER_BAND_AM_MW 5
+
  struct v4l2_frequency {
__u32 tuner;
__u32 type; /* enum v4l2_tuner_type */

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html