diff options
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/audiochip.h | 3 | ||||
-rw-r--r-- | include/media/saa6752hs.h | 49 | ||||
-rw-r--r-- | include/media/tuner.h | 51 |
3 files changed, 22 insertions, 81 deletions
diff --git a/include/media/audiochip.h b/include/media/audiochip.h index f345a61c3bd..cd831168fdc 100644 --- a/include/media/audiochip.h +++ b/include/media/audiochip.h @@ -1,5 +1,5 @@ /* - * $Id: audiochip.h,v 1.3 2005/06/12 04:19:19 mchehab Exp $ + * $Id: audiochip.h,v 1.5 2005/06/16 22:59:16 hhackmann Exp $ */ #ifndef AUDIOCHIP_H @@ -35,5 +35,4 @@ /* misc stuff to pass around config info to i2c chips */ #define AUDC_CONFIG_PINNACLE _IOW('m',32,int) - #endif /* AUDIOCHIP_H */ diff --git a/include/media/saa6752hs.h b/include/media/saa6752hs.h index 791bad2b86e..3b8686ead80 100644 --- a/include/media/saa6752hs.h +++ b/include/media/saa6752hs.h @@ -18,55 +18,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#if 0 /* ndef _SAA6752HS_H */ -#define _SAA6752HS_H - -enum mpeg_video_bitrate_mode { - MPEG_VIDEO_BITRATE_MODE_VBR = 0, /* Variable bitrate */ - MPEG_VIDEO_BITRATE_MODE_CBR = 1, /* Constant bitrate */ - - MPEG_VIDEO_BITRATE_MODE_MAX -}; - -enum mpeg_audio_bitrate { - MPEG_AUDIO_BITRATE_256 = 0, /* 256 kBit/sec */ - MPEG_AUDIO_BITRATE_384 = 1, /* 384 kBit/sec */ - - MPEG_AUDIO_BITRATE_MAX -}; - -enum mpeg_video_format { - MPEG_VIDEO_FORMAT_D1 = 0, - MPEG_VIDEO_FORMAT_2_3_D1 = 1, - MPEG_VIDEO_FORMAT_1_2_D1 = 2, - MPEG_VIDEO_FORMAT_SIF = 3, - - MPEG_VIDEO_FORMAT_MAX -}; - -#define MPEG_VIDEO_TARGET_BITRATE_MAX 27000 -#define MPEG_VIDEO_MAX_BITRATE_MAX 27000 -#define MPEG_TOTAL_BITRATE_MAX 27000 -#define MPEG_PID_MAX ((1 << 14) - 1) - -struct mpeg_params { - enum mpeg_video_bitrate_mode video_bitrate_mode; - unsigned int video_target_bitrate; - unsigned int video_max_bitrate; // only used for VBR - enum mpeg_audio_bitrate audio_bitrate; - unsigned int total_bitrate; - - unsigned int pmt_pid; - unsigned int video_pid; - unsigned int audio_pid; - unsigned int pcr_pid; - - enum mpeg_video_format video_format; -}; - -#define MPEG_SETPARAMS _IOW('6',100,struct mpeg_params) - -#endif // _SAA6752HS_H /* * Local variables: diff --git a/include/media/tuner.h b/include/media/tuner.h index 4794c563236..d8c0a556328 100644 --- a/include/media/tuner.h +++ b/include/media/tuner.h @@ -1,5 +1,5 @@ -/* $Id: tuner.h,v 1.33 2005/06/21 14:58:08 mkrufky Exp $ +/* $Id: tuner.h,v 1.42 2005/07/06 09:42:19 mchehab Exp $ * tuner.h - definition for different tuners @@ -26,8 +26,6 @@ #include <linux/videodev2.h> -#include "id.h" - #define ADDR_UNSET (255) #define TUNER_TEMIC_PAL 0 /* 4002 FH5 (3X 7756, 9483) */ @@ -111,8 +109,6 @@ #define TUNER_TEA5767 62 /* Only FM Radio Tuner */ #define TUNER_PHILIPS_FMD1216ME_MK3 63 -#define TEA5767_TUNER_NAME "Philips TEA5767HN FM Radio" - #define NOTUNER 0 #define PAL 1 /* PAL_BG */ #define PAL_I 2 @@ -135,19 +131,8 @@ #define TCL 11 #define THOMSON 12 -enum v4l_radio_tuner { - TEA5767_LOW_LO_32768 = 0, - TEA5767_HIGH_LO_32768 = 1, - TEA5767_LOW_LO_13MHz = 2, - TEA5767_HIGH_LO_13MHz = 3, -}; - - -#define TUNER_SET_TYPE _IOW('t',1,int) /* set tuner type */ -#define TUNER_SET_TVFREQ _IOW('t',2,int) /* set tv freq */ -#define TUNER_SET_TYPE_ADDR _IOW('T',3,int) /* set tuner type and I2C addr */ - -#define TDA9887_SET_CONFIG _IOW('t',5,int) +#define TUNER_SET_TYPE_ADDR _IOW('T',3,int) +#define TDA9887_SET_CONFIG _IOW('t',5,int) /* tv card specific */ # define TDA9887_PRESENT (1<<0) @@ -169,25 +154,34 @@ enum v4l_radio_tuner { #define I2C_ADDR_TDA8290 0x4b #define I2C_ADDR_TDA8275 0x61 -struct tuner_addr { - enum v4l2_tuner_type v4l2_tuner; - unsigned int type; +enum tuner_mode { + T_UNINITIALIZED = 0, + T_RADIO = 1 << V4L2_TUNER_RADIO, + T_ANALOG_TV = 1 << V4L2_TUNER_ANALOG_TV, + T_DIGITAL_TV = 1 << V4L2_TUNER_DIGITAL_TV, + T_STANDBY = 1 << 31 +}; + +struct tuner_setup { unsigned short addr; + unsigned int type; + unsigned int mode_mask; }; struct tuner { /* device */ struct i2c_client i2c; - /* state + config */ - unsigned int initialized; unsigned int type; /* chip type */ + + unsigned int mode; + unsigned int mode_mask; /* Combination of allowable modes */ + unsigned int freq; /* keep track of the current settings */ + unsigned int audmode; v4l2_std_id std; - int using_v4l2; - enum v4l2_tuner_type mode; - unsigned int input; + int using_v4l2; /* used by MT2032 */ unsigned int xogc; @@ -197,15 +191,11 @@ struct tuner { unsigned char i2c_easy_mode[2]; unsigned char i2c_set_freq[8]; - /* used to keep track of audmode */ - unsigned int audmode; - /* function ptrs */ void (*tv_freq)(struct i2c_client *c, unsigned int freq); void (*radio_freq)(struct i2c_client *c, unsigned int freq); int (*has_signal)(struct i2c_client *c); int (*is_stereo)(struct i2c_client *c); - int (*set_tuner)(struct i2c_client *c, struct v4l2_tuner *v); }; extern unsigned int tuner_debug; @@ -215,6 +205,7 @@ extern int microtune_init(struct i2c_client *c); extern int tda8290_init(struct i2c_client *c); extern int tea5767_tuner_init(struct i2c_client *c); extern int default_tuner_init(struct i2c_client *c); +extern int tea5767_autodetection(struct i2c_client *c); #define tuner_warn(fmt, arg...) \ dev_printk(KERN_WARNING , &t->i2c.dev , fmt , ## arg) |