aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-01-16 05:39:30 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-01-16 05:39:30 -0500
commitf87d09be8c2c270b83c2ad80d06206a7306e2fa9 (patch)
treed6e3f7e8ac8a6c567d800fb30e237eb788ac3edf /include
parent4a8e4a270b89030bdeb09d2f8cef7cfe9a50e54d (diff)
parent21e2379b9ef705fcb3ba3be738decd3397fc30b7 (diff)
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Diffstat (limited to 'include')
-rw-r--r--include/linux/i2c-id.h4
-rw-r--r--include/media/tuner-types.h55
-rw-r--r--include/media/tuner.h10
-rw-r--r--include/media/v4l2-common.h7
4 files changed, 73 insertions, 3 deletions
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 6ff2d365895f..474c8f4f5d4f 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -104,6 +104,10 @@
104#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */ 104#define I2C_DRIVERID_AKITAIOEXP 74 /* IO Expander on Sharp SL-C1000 */
105#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */ 105#define I2C_DRIVERID_INFRARED 75 /* I2C InfraRed on Video boards */
106#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */ 106#define I2C_DRIVERID_TVP5150 76 /* TVP5150 video decoder */
107#define I2C_DRIVERID_WM8739 77 /* wm8739 audio processor */
108#define I2C_DRIVERID_UPD64083 78 /* upd64083 video processor */
109#define I2C_DRIVERID_UPD64031A 79 /* upd64031a video processor */
110#define I2C_DRIVERID_SAA717X 80 /* saa717x video encoder */
107 111
108#define I2C_DRIVERID_I2CDEV 900 112#define I2C_DRIVERID_I2CDEV 900
109#define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */ 113#define I2C_DRIVERID_ARP 902 /* SMBus ARP Client */
diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h
new file mode 100644
index 000000000000..15821ab14a9e
--- /dev/null
+++ b/include/media/tuner-types.h
@@ -0,0 +1,55 @@
1/*
2 * descriptions for simple tuners.
3 */
4
5#ifndef __TUNER_TYPES_H__
6#define __TUNER_TYPES_H__
7
8enum param_type {
9 TUNER_PARAM_TYPE_RADIO, \
10 TUNER_PARAM_TYPE_PAL, \
11 TUNER_PARAM_TYPE_SECAM, \
12 TUNER_PARAM_TYPE_NTSC
13};
14
15struct tuner_range {
16 unsigned short limit;
17 unsigned char cb;
18};
19
20struct tuner_params {
21 enum param_type type;
22 /* Many Philips based tuners have a comment like this in their
23 * datasheet:
24 *
25 * For channel selection involving band switching, and to ensure
26 * smooth tuning to the desired channel without causing
27 * unnecessary charge pump action, it is recommended to consider
28 * the difference between wanted channel frequency and the
29 * current channel frequency. Unnecessary charge pump action
30 * will result in very low tuning voltage which may drive the
31 * oscillator to extreme conditions.
32 *
33 * Set cb_first_if_lower_freq to 1, if this check is
34 * required for this tuner.
35 *
36 * I tested this for PAL by first setting the TV frequency to
37 * 203 MHz and then switching to 96.6 MHz FM radio. The result was
38 * static unless the control byte was sent first.
39 */
40 unsigned int cb_first_if_lower_freq:1;
41 unsigned char config; /* to be moved into struct tuner_range for dvb-pll merge */
42
43 unsigned int count;
44 struct tuner_range *ranges;
45};
46
47struct tunertype {
48 char *name;
49 struct tuner_params *params;
50};
51
52extern struct tunertype tuners[];
53extern unsigned const int tuner_count;
54
55#endif
diff --git a/include/media/tuner.h b/include/media/tuner.h
index 27cbf08c931d..a5beeac495c7 100644
--- a/include/media/tuner.h
+++ b/include/media/tuner.h
@@ -23,6 +23,7 @@
23#define _TUNER_H 23#define _TUNER_H
24 24
25#include <linux/videodev2.h> 25#include <linux/videodev2.h>
26#include <media/tuner-types.h>
26 27
27#define ADDR_UNSET (255) 28#define ADDR_UNSET (255)
28 29
@@ -114,6 +115,7 @@
114 115
115#define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */ 116#define TUNER_PHILIPS_TUV1236D 68 /* ATI HDTV Wonder */
116#define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */ 117#define TUNER_TNF_5335MF 69 /* Sabrent Bt848 */
118#define TUNER_SAMSUNG_TCPN_2121P30A 70 /* Hauppauge PVR-500MCE NTSC */
117 119
118/* tv card specific */ 120/* tv card specific */
119#define TDA9887_PRESENT (1<<0) 121#define TDA9887_PRESENT (1<<0)
@@ -177,7 +179,9 @@ struct tuner {
177 unsigned int mode; 179 unsigned int mode;
178 unsigned int mode_mask; /* Combination of allowable modes */ 180 unsigned int mode_mask; /* Combination of allowable modes */
179 181
180 unsigned int freq; /* keep track of the current settings */ 182 unsigned int tv_freq; /* keep track of the current settings */
183 unsigned int radio_freq;
184 u16 last_div;
181 unsigned int audmode; 185 unsigned int audmode;
182 v4l2_std_id std; 186 v4l2_std_id std;
183 187
@@ -195,8 +199,8 @@ struct tuner {
195 unsigned int sgIF; 199 unsigned int sgIF;
196 200
197 /* function ptrs */ 201 /* function ptrs */
198 void (*tv_freq)(struct i2c_client *c, unsigned int freq); 202 void (*set_tv_freq)(struct i2c_client *c, unsigned int freq);
199 void (*radio_freq)(struct i2c_client *c, unsigned int freq); 203 void (*set_radio_freq)(struct i2c_client *c, unsigned int freq);
200 int (*has_signal)(struct i2c_client *c); 204 int (*has_signal)(struct i2c_client *c);
201 int (*is_stereo)(struct i2c_client *c); 205 int (*is_stereo)(struct i2c_client *c);
202 void (*standby)(struct i2c_client *c); 206 void (*standby)(struct i2c_client *c);
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index c74052abb189..d4030a7e16e0 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -120,6 +120,13 @@ enum v4l2_chip_ident {
120/* select from TV,radio,extern,MUTE */ 120/* select from TV,radio,extern,MUTE */
121#define AUDC_SET_INPUT _IOW('d',89,int) 121#define AUDC_SET_INPUT _IOW('d',89,int)
122 122
123/* msp3400 ioctl: will be removed in the near future */
124struct msp_matrix {
125 int input;
126 int output;
127};
128#define MSP_SET_MATRIX _IOW('m',17,struct msp_matrix)
129
123/* tuner ioctls */ 130/* tuner ioctls */
124/* Sets tuner type and its I2C addr */ 131/* Sets tuner type and its I2C addr */
125#define TUNER_SET_TYPE_ADDR _IOW('d',90,int) 132#define TUNER_SET_TYPE_ADDR _IOW('d',90,int)