diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-11 17:58:04 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-11 17:58:04 -0300 |
commit | da2ce09c5417a5fe750ac5310d6e518bdc5bba49 (patch) | |
tree | ff46e3f2e6cba83ccf725b0ee485b6428e68f55c /linux/drivers/media/video | |
parent | c0e1a168c8871c030502120b0f02fda348e14db7 (diff) | |
parent | 49e6c586ba2502f5cdce194081b3b9cfb590efec (diff) | |
download | mediapointer-dvb-s2-da2ce09c5417a5fe750ac5310d6e518bdc5bba49.tar.gz mediapointer-dvb-s2-da2ce09c5417a5fe750ac5310d6e518bdc5bba49.tar.bz2 |
merge: http://linuxtv.org/hg/~mcisely/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/cpia.c | 14 | ||||
-rw-r--r-- | linux/drivers/media/video/cpia_pp.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/cpia_usb.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-vbi.c | 61 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 9 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-input.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 2 |
7 files changed, 47 insertions, 57 deletions
diff --git a/linux/drivers/media/video/cpia.c b/linux/drivers/media/video/cpia.c index 99ee90628..c605f4849 100644 --- a/linux/drivers/media/video/cpia.c +++ b/linux/drivers/media/video/cpia.c @@ -50,13 +50,6 @@ #include "cpia.h" -#ifdef CONFIG_VIDEO_CPIA_PP -extern int cpia_pp_init(void); -#endif -#ifdef CONFIG_VIDEO_CPIA_USB -extern int cpia_usb_init(void); -#endif - static int video_nr = -1; #ifdef MODULE @@ -4050,13 +4043,6 @@ static int __init cpia_init(void) proc_cpia_create(); #endif -#ifdef CONFIG_VIDEO_CPIA_PP - cpia_pp_init(); -#endif -#ifdef CONFIG_VIDEO_CPIA_USB - cpia_usb_init(); -#endif - return 0; } diff --git a/linux/drivers/media/video/cpia_pp.c b/linux/drivers/media/video/cpia_pp.c index 0b00e6027..4c89bd395 100644 --- a/linux/drivers/media/video/cpia_pp.c +++ b/linux/drivers/media/video/cpia_pp.c @@ -803,7 +803,7 @@ static struct parport_driver cpia_pp_driver = { .detach = cpia_pp_detach, }; -int cpia_pp_init(void) +static int cpia_pp_init(void) { printk(KERN_INFO "%s v%d.%d.%d\n",ABOUT, CPIA_PP_MAJ_VER,CPIA_PP_MIN_VER,CPIA_PP_PATCH_VER); @@ -860,6 +860,8 @@ void cleanup_module(void) static int __init cpia_pp_setup(char *str) { + int err; + if (!strncmp(str, "parport", 7)) { int n = simple_strtoul(str + 7, NULL, 10); if (parport_ptr < PARPORT_MAX) { @@ -873,6 +875,10 @@ static int __init cpia_pp_setup(char *str) parport_nr[parport_ptr++] = PPCPIA_PARPORT_NONE; } + err=cpia_pp_init(); + if (err) + return err; + return 1; } diff --git a/linux/drivers/media/video/cpia_usb.c b/linux/drivers/media/video/cpia_usb.c index 9c49a4b00..2ee34a3b9 100644 --- a/linux/drivers/media/video/cpia_usb.c +++ b/linux/drivers/media/video/cpia_usb.c @@ -474,12 +474,6 @@ static int cpia_usb_close(void *privdata) return 0; } -int cpia_usb_init(void) -{ - /* return -ENODEV; */ - return 0; -} - /* Probing and initializing */ static int cpia_probe(struct usb_interface *intf, diff --git a/linux/drivers/media/video/cx25840/cx25840-vbi.c b/linux/drivers/media/video/cx25840/cx25840-vbi.c index 3383b5549..b452ec9c8 100644 --- a/linux/drivers/media/video/cx25840/cx25840-vbi.c +++ b/linux/drivers/media/video/cx25840/cx25840-vbi.c @@ -89,25 +89,7 @@ void cx25840_vbi_setup(struct i2c_client *client) v4l2_std_id std = cx25840_get_v4lstd(client); int hblank,hactive,burst,vblank,vactive,sc,vblank656,src_decimation; int luma_lpf,uv_lpf, comb; - u32 pll,pll_int,pll_frac,pll_post,fin,fsc; - - /* DEBUG: Displays configured PLL frequency */ - pll_int=cx25840_read(client, 0x108); - pll_frac=cx25840_read4(client, 0x10c)&0x1ffffff; - pll_post=cx25840_read(client, 0x109); - v4l_dbg(1, cx25840_debug, client, - "PLL regs = int: %u, frac: %u, post: %u\n", - pll_int,pll_frac,pll_post); - - - if (pll_post) { - pll= (28636363L*((((u64)pll_int)<<25L)+pll_frac)) >>25L; - pll/=pll_post; - v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n", - pll/1000000, pll%1000000); - v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n", - pll/8000000, (pll/8)%1000000); - } + u32 pll_int,pll_frac,pll_post; /* datasheet startup, step 8d */ if (std & ~V4L2_STD_NTSC) { @@ -159,20 +141,41 @@ void cx25840_vbi_setup(struct i2c_client *client) } } - fin=((u64)src_decimation*pll)>>12; - v4l_dbg(1, cx25840_debug, client, "ADC Sampling freq = %d.%06d MHz\n", + /* DEBUG: Displays configured PLL frequency */ + pll_int=cx25840_read(client, 0x108); + pll_frac=cx25840_read4(client, 0x10c)&0x1ffffff; + pll_post=cx25840_read(client, 0x109); + v4l_dbg(1, cx25840_debug, client, + "PLL regs = int: %u, frac: %u, post: %u\n", + pll_int,pll_frac,pll_post); + + if (pll_post) { + int fin, fsc; + int pll= (28636363L*((((u64)pll_int)<<25L)+pll_frac)) >>25L; + + pll/=pll_post; + v4l_dbg(1, cx25840_debug, client, "PLL = %d.%06d MHz\n", + pll/1000000, pll%1000000); + v4l_dbg(1, cx25840_debug, client, "PLL/8 = %d.%06d MHz\n", + pll/8000000, (pll/8)%1000000); + + fin=((u64)src_decimation*pll)>>12; + v4l_dbg(1, cx25840_debug, client, "ADC Sampling freq = " + "%d.%06d MHz\n", fin/1000000,fin%1000000); - fsc= (((u64)sc)*pll) >> 24L; - fsc= ((u32)((((u64)sc)*pll) >> 21L))/src_decimation; - v4l_dbg(1, cx25840_debug, client, "Chroma sub-carrier freq = %d.%06d MHz\n", + fsc= (((u64)sc)*pll) >> 24L; + v4l_dbg(1, cx25840_debug, client, "Chroma sub-carrier freq = " + "%d.%06d MHz\n", fsc/1000000,fsc%1000000); - v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, vblank %i" - ", vactive %i, vblank656 %i, src_dec %i," - "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, sc 0x%06x\n", - hblank, hactive, vblank, vactive, vblank656, src_decimation, - burst, luma_lpf, uv_lpf, comb, sc); + v4l_dbg(1, cx25840_debug, client, "hblank %i, hactive %i, " + "vblank %i , vactive %i, vblank656 %i, src_dec %i," + "burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x," + " sc 0x%06x\n", + hblank, hactive, vblank, vactive, vblank656, + src_decimation, burst, luma_lpf, uv_lpf, comb, sc); + } /* Sets horizontal blanking delay and active lines */ cx25840_write(client, 0x470, hblank); diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 3e829eb0f..5431d591e 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -1185,9 +1185,9 @@ struct cx88_board cx88_boards[] = { #endif .blackbird = 1, }, - [CX88_BOARD_NPGTECH_REALTV] = { - .name = "NPG Tech Real TV", - .tuner_type = TUNER_LG_PAL_NEW_TAPC, + [CX88_BOARD_NPGTECH_REALTV_TOP10FM] = { + .name = "NPG Tech Real TV FM Top 10", + .tuner_type = TUNER_TNF_5335MF, /* Actually a TNF9535 */ .radio_type = UNSET, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, @@ -1202,6 +1202,7 @@ struct cx88_board cx88_boards[] = { },{ .type = CX88_VMUX_SVIDEO, .vmux = 2, + .gpio0 = 0x078b, }}, .radio = { .type = CX88_RADIO, @@ -1462,7 +1463,7 @@ struct cx88_subid cx88_subids[] = { },{ .subvendor = 0x14f1, .subdevice = 0x0842, - .card = CX88_BOARD_NPGTECH_REALTV, + .card = CX88_BOARD_NPGTECH_REALTV_TOP10FM, },{ .subvendor = 0x107d, .subdevice = 0x665e, diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c index 8b8bbb1b5..9283be42d 100644 --- a/linux/drivers/media/video/cx88/cx88-input.c +++ b/linux/drivers/media/video/cx88/cx88-input.c @@ -75,7 +75,7 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) /* read gpio value */ gpio = cx_read(ir->gpio_addr); - if (core->board == CX88_BOARD_NPGTECH_REALTV) { + if (core->board == CX88_BOARD_NPGTECH_REALTV_TOP10FM) { /* This board apparently uses a combination of 2 GPIO to represent the keys. Additionally, the second GPIO can be used for parity. @@ -249,7 +249,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ir_type = IR_TYPE_PD; ir->sampling = 0xff00; /* address */ break; - case CX88_BOARD_NPGTECH_REALTV: + case CX88_BOARD_NPGTECH_REALTV_TOP10FM: ir_codes = ir_codes_npgtech; ir->gpio_addr = MO_GP0_IO; ir->mask_keycode = 0xfa; diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index b8a28e7cb..efeef4b47 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -201,7 +201,7 @@ extern struct sram_channel cx88_sram_channels[]; #define CX88_BOARD_PCHDTV_HD5500 47 #define CX88_BOARD_KWORLD_MCE200_DELUXE 48 #define CX88_BOARD_PIXELVIEW_PLAYTV_P7000 49 -#define CX88_BOARD_NPGTECH_REALTV 50 +#define CX88_BOARD_NPGTECH_REALTV_TOP10FM 50 #define CX88_BOARD_WINFAST_DTV2000H 51 enum cx88_itype { |