diff options
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 31 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-tvaudio.c | 38 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-cards.c | 57 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/tda8290.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/tuner-core.c | 5 |
8 files changed, 118 insertions, 38 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 3b109d16f..ee18141ca 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-cards.c,v 1.61 2005/02/10 10:38:05 kraxel Exp $ + * $Id: cx88-cards.c,v 1.62 2005/02/14 16:30:26 kraxel Exp $ * * device driver for Conexant 2388x based TV cards * card-specific stuff. @@ -219,10 +219,33 @@ struct cx88_board cx88_boards[] = { .input = {{ .type = CX88_VMUX_TELEVISION, .vmux = 0, - }}, + .gpio0 = 0x0035e700, + .gpio1 = 0x00003004, + .gpio2 = 0x0035e700, + .gpio3 = 0x02000000, + },{ + + .type = CX88_VMUX_COMPOSITE1, + .vmux = 1, + .gpio0 = 0x0035c700, + .gpio1 = 0x00003004, + .gpio2 = 0x0035c700, + .gpio3 = 0x02000000, + },{ + .type = CX88_VMUX_SVIDEO, + .vmux = 2, + .gpio0 = 0x0035c700, + .gpio1 = 0x0035c700, + .gpio2 = 0x02000000, + .gpio3 = 0x02000000, + }}, .radio = { - .type = CX88_RADIO, - }, + .type = CX88_RADIO, + .gpio0 = 0x0035d700, + .gpio1 = 0x00007004, + .gpio2 = 0x0035d700, + .gpio3 = 0x02000000, + }, }, [CX88_BOARD_LEADTEK_PVR2000] = { // gpio values for PAL version from regspy by DScaler diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index 4931667f3..a53db7a39 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -1,5 +1,5 @@ /* - $Id: cx88-tvaudio.c,v 1.30 2005/02/10 12:40:39 kraxel Exp $ + $Id: cx88-tvaudio.c,v 1.31 2005/02/14 16:30:26 kraxel Exp $ cx88x-audio.c - Conexant CX23880/23881 audio downstream driver driver @@ -57,7 +57,7 @@ #include "cx88.h" -static unsigned int audio_debug = 1; +static unsigned int audio_debug = 0; module_param(audio_debug,int,0644); MODULE_PARM_DESC(audio_debug,"enable debug messages [audio]"); @@ -785,6 +785,19 @@ void cx88_set_tvaudio(struct cx88_core *core) return; } +void cx88_newstation(struct cx88_core *core) +{ + core->audiomode_manual = UNSET; + + switch (core->tvaudio) { + case WW_SYSTEM_L_AM: + /* try nicam ... */ + core->audiomode_current = V4L2_TUNER_MODE_STEREO; + set_audio_standard_NICAM_L(core, 1); + break; + } +} + void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t) { static char *m[] = {"stereo", "dual mono", "mono", "sap"}; @@ -832,12 +845,16 @@ void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t) } break; case WW_NICAM_BGDKL: - if (0 == mode) + if (0 == mode) { t->audmode = V4L2_TUNER_MODE_STEREO; + t->rxsubchans |= V4L2_TUNER_SUB_STEREO; + } break; case WW_SYSTEM_L_AM: - if (0x0 == mode) + if (0x0 == mode && (cx_read(AUD_INIT) & 0x04)) { t->audmode = V4L2_TUNER_MODE_STEREO; + t->rxsubchans |= V4L2_TUNER_SUB_STEREO; + } break ; default: /* nothing */ @@ -852,11 +869,12 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual) u32 mask = UNSET; if (manual) { - core->audiomode = mode; + core->audiomode_manual = mode; } else { - if (UNSET != core->audiomode) + if (UNSET != core->audiomode_manual) return; } + core->audiomode_current = mode; switch (core->tvaudio) { case WW_BTSC: @@ -959,7 +977,7 @@ int cx88_audio_thread(void *data) { struct cx88_core *core = data; struct v4l2_tuner t; - u32 mode = 0, lastmode = 0; + u32 mode = 0; dprintk("cx88: tvaudio thread started\n"); for (;;) { @@ -971,7 +989,7 @@ int cx88_audio_thread(void *data) memset(&t,0,sizeof(t)); cx88_get_stereo(core,&t); - if (UNSET == core->audiomode) + if (UNSET != core->audiomode_manual) /* manually set, don't do anything. */ continue; @@ -980,11 +998,10 @@ int cx88_audio_thread(void *data) mode = V4L2_TUNER_MODE_STEREO; else mode = V4L2_TUNER_MODE_MONO; - if (mode == lastmode) + if (mode == core->audiomode_current) continue; /* automatically switch to best available mode */ - lastmode = mode; cx88_set_stereo(core, mode, 0); } @@ -995,6 +1012,7 @@ int cx88_audio_thread(void *data) /* ----------------------------------------------------------- */ EXPORT_SYMBOL(cx88_set_tvaudio); +EXPORT_SYMBOL(cx88_newstation); EXPORT_SYMBOL(cx88_set_stereo); EXPORT_SYMBOL(cx88_get_stereo); EXPORT_SYMBOL(cx88_audio_thread); diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 9a0653b5b..690ca8990 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-video.c,v 1.54 2005/01/31 11:35:05 kraxel Exp $ + * $Id: cx88-video.c,v 1.55 2005/02/14 16:30:26 kraxel Exp $ * * device driver for Conexant 2388x based TV cards * video4linux video interface @@ -1439,7 +1439,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, if (*i >= 4) return -EINVAL; down(&dev->lock); - dev->core->audiomode = UNSET; + cx88_newstation(core); video_mux(dev,*i); up(&dev->lock); return 0; @@ -1601,7 +1601,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, return -EINVAL; down(&dev->lock); dev->freq = f->frequency; - dev->core->audiomode = UNSET; + cx88_newstation(core); #ifdef V4L2_I2C_CLIENTS cx88_call_i2c_clients(dev->core,VIDIOC_S_FREQUENCY,f); #else diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 4d94faf00..0e0cdc380 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -1,5 +1,5 @@ /* - * $Id: cx88.h,v 1.51 2005/02/09 12:59:19 kraxel Exp $ + * $Id: cx88.h,v 1.52 2005/02/14 16:30:26 kraxel Exp $ * * v4l2 device driver for cx2388x based TV cards * @@ -265,7 +265,8 @@ struct cx88_core { struct task_struct *kthread; struct cx88_tvnorm *tvnorm; u32 tvaudio; - u32 audiomode; + u32 audiomode_manual; + u32 audiomode_current; u32 input; u32 astat; @@ -520,6 +521,7 @@ extern void cx88_card_setup(struct cx88_core *core); #define WW_FM 12 void cx88_set_tvaudio(struct cx88_core *core); +void cx88_newstation(struct cx88_core *core); void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t); void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual); int cx88_audio_thread(void *data); diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 2b357d18c..6f4ba26b8 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -1,6 +1,6 @@ /* - * $Id: saa7134-cards.c,v 1.51 2005/02/10 12:40:39 kraxel Exp $ + * $Id: saa7134-cards.c,v 1.52 2005/02/14 16:30:26 kraxel Exp $ * * device driver for philips saa7134 based TV cards * card-specific stuff. @@ -157,11 +157,11 @@ struct saa7134_board saa7134_boards[] = { .gpio = 0x8000, }, }, - [SAA7134_BOARD_FLYTVPLATINUM] = { + [SAA7134_BOARD_FLYTVPLATINUM_MINI] = { /* "Arnaud Quette" <aquette@free.fr> */ - .name = "LifeView FlyTV Platinum", + .name = "LifeView FlyTV Platinum Mini", .audio_clock = 0x00200000, - .tuner_type = TUNER_PHILIPS_SECAM, + .tuner_type = TUNER_PHILIPS_TDA8290, .inputs = {{ .name = name_tv, .vmux = 1, @@ -177,6 +177,47 @@ struct saa7134_board saa7134_boards[] = { .amux = LINE2, }}, }, + [SAA7134_BOARD_FLYTVPLATINUM_FM] = { + /* LifeView FlyTV Platinum FM (LR214WF) */ + /* "Peter Missel <peter.missel@onlinehome.de> */ + .name = "LifeView FlyTV Platinum FM", + .audio_clock = 0x00200000, + .tuner_type = TUNER_PHILIPS_TDA8290, +// .gpiomask = 0xe000, + .inputs = {{ + .name = name_tv, + .vmux = 1, + .amux = TV, +// .gpio = 0x0000, + .tv = 1, + },{ +/* .name = name_tv_mono, + .vmux = 1, + .amux = LINE2, + .gpio = 0x0000, + .tv = 1, + },{ +*/ .name = name_comp1, /* Composite signal on S-Video input */ + .vmux = 0, + .amux = LINE2, +// .gpio = 0x4000, + },{ + .name = name_comp2, /* Composite input */ + .vmux = 3, + .amux = LINE2, +// .gpio = 0x4000, + },{ + .name = name_svideo, /* S-Video signal on S-Video input */ + .vmux = 8, + .amux = LINE2, +// .gpio = 0x4000, + }}, +/* .radio = { + .name = name_radio, + .amux = LINE2, + .gpio = 0x2000, + }, +*/ }, [SAA7134_BOARD_EMPRESS] = { /* "Gert Vervoort" <gert.vervoort@philips.com> */ .name = "EMPRESS", @@ -1552,13 +1593,13 @@ struct pci_device_id saa7134_pci_tbl[] = { .device = PCI_DEVICE_ID_PHILIPS_SAA7135, .subvendor = 0x5168, .subdevice = 0x0212, /* minipci, LR212 */ - .driver_data = SAA7134_BOARD_FLYTVPLATINUM, + .driver_data = SAA7134_BOARD_FLYTVPLATINUM_MINI, },{ .vendor = PCI_VENDOR_ID_PHILIPS, .device = PCI_DEVICE_ID_PHILIPS_SAA7133, .subvendor = 0x5168, - .subdevice = 0x0214, /* "normal" PCI card, LR214 */ - .driver_data = SAA7134_BOARD_FLYTVPLATINUM /* fixme */, + .subdevice = 0x0214, /* Standard PCI, LR214WF */ + .driver_data = SAA7134_BOARD_FLYTVPLATINUM_FM, },{ .vendor = PCI_VENDOR_ID_PHILIPS, .device = PCI_DEVICE_ID_PHILIPS_SAA7134, @@ -1867,8 +1908,6 @@ int saa7134_board_init1(struct saa7134_dev *dev) case SAA7134_BOARD_FLYVIDEO2000: case SAA7134_BOARD_FLYVIDEO3000: dev->has_remote = 1; - /* fall throuth */ - case SAA7134_BOARD_FLYTVPLATINUM: board_flyvideo(dev); break; case SAA7134_BOARD_CINERGY400: diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 1380acc84..c1900fe1b 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -1,5 +1,5 @@ /* - * $Id: saa7134.h,v 1.36 2005/02/09 15:42:46 kraxel Exp $ + * $Id: saa7134.h,v 1.37 2005/02/14 16:30:26 kraxel Exp $ * * v4l2 device driver for philips saa7134 based TV cards * @@ -180,7 +180,7 @@ struct saa7134_format { #define SAA7133_BOARD_UPMOST_PURPLE_TV 36 #define SAA7134_BOARD_ITEMS_MTV005 37 #define SAA7134_BOARD_CINERGY200 38 -#define SAA7134_BOARD_FLYTVPLATINUM 39 +#define SAA7134_BOARD_FLYTVPLATINUM_MINI 39 #define SAA7134_BOARD_VIDEOMATE_TV_PVR 40 #define SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUS 41 #define SAA7134_BOARD_SABRENT_SBTTVFM 42 @@ -195,6 +195,7 @@ struct saa7134_format { #define SAA7134_BOARD_PROVIDEO_PV952 51 #define SAA7134_BOARD_AVERMEDIA_305 52 #define SAA7135_BOARD_ASUSTeK_TVFM7135 53 +#define SAA7134_BOARD_FLYTVPLATINUM_FM 54 #define SAA7134_MAXBOARDS 8 #define SAA7134_INPUT_MAX 8 diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c index 739e96fee..c6b63873d 100644 --- a/linux/drivers/media/video/tda8290.c +++ b/linux/drivers/media/video/tda8290.c @@ -1,5 +1,5 @@ /* - * $Id: tda8290.c,v 1.3 2005/02/10 09:24:12 kraxel Exp $ + * $Id: tda8290.c,v 1.4 2005/02/14 16:30:26 kraxel Exp $ * * i2c tv tuner chip device driver * controls the philips tda8290+75 tuner chip combo. @@ -144,11 +144,11 @@ static void set_frequency(struct tuner *t, u16 ifc) t->i2c_set_freq[0] = 0; t->i2c_set_freq[1] = (unsigned char)(N>>8); t->i2c_set_freq[2] = (unsigned char) N; - t->i2c_set_freq[0] = 0x40; - t->i2c_set_freq[0] = 0x52; + t->i2c_set_freq[3] = 0x40; + t->i2c_set_freq[4] = 0x52; t->i2c_set_freq[5] = get_freq_entry(band_table, t->freq); t->i2c_set_freq[6] = get_freq_entry(agc_table, t->freq); - t->i2c_set_freq[0] = 0x8f; + t->i2c_set_freq[7] = 0x8f; } #define V4L2_STD_MN (V4L2_STD_PAL_M|V4L2_STD_PAL_N|V4L2_STD_PAL_Nc|V4L2_STD_NTSC) diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 45ac397f2..cc7a78af8 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -1,5 +1,5 @@ /* - * $Id: tuner-core.c,v 1.3 2005/02/10 09:24:12 kraxel Exp $ + * $Id: tuner-core.c,v 1.4 2005/02/14 16:30:26 kraxel Exp $ * * i2c tv tuner chip device driver * core core, i.e. kernel interfaces, registering and so on @@ -223,9 +223,6 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind) t->type = UNSET; t->radio_if2 = 10700*1000; // 10.7MHz - FM radio - if (I2C_ADDR_TDA8290 == client->addr) - t->type = TUNER_PHILIPS_TDA8290; - i2c_attach_client(client); return 0; } |