diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-14 17:26:09 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2005-10-14 17:26:09 +0000 |
commit | 8171d7183d71387dfaf4b887113f6740ee8bce88 (patch) | |
tree | 754b60ac5ea55807e89fda893965b71ea0d94e02 /linux/drivers/media | |
parent | dc49b979bbf88fb36e888c8d04d22b3168885d80 (diff) | |
download | mediapointer-dvb-s2-8171d7183d71387dfaf4b887113f6740ee8bce88.tar.gz mediapointer-dvb-s2-8171d7183d71387dfaf4b887113f6740ee8bce88.tar.bz2 |
- Chip_id removed since it isn't required anymore.
- Scaler code for the em2820 does not seem to work for the em2800
chipset. Attached patch will disable all resolutions for the
em2800 that do not produce correct output.
Not sure if NTSC is working.
Signed-off-by: Sascha Sommer <saschasommer@freenet.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-cards.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-core.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 1 |
4 files changed, 24 insertions, 4 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c index a375c79cc..1d733a980 100644 --- a/linux/drivers/media/video/em28xx/em28xx-cards.c +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c @@ -161,7 +161,6 @@ struct em2820_board em2820_boards[] = { }, [EM2800_BOARD_TERRATEC_CINERGY_200] = { .name = "Terratec Cinergy 200 USB", - .chip_id = 0x4, .is_em2800 = 1, .vchannels = 3, .norm = VIDEO_MODE_PAL, @@ -185,7 +184,6 @@ struct em2820_board em2820_boards[] = { }, [EM2800_BOARD_LEADTEK_WINFAST_USBII] = { .name = "Leadtek Winfast USB II", - .chip_id = 0x2, .is_em2800 = 1, .vchannels = 3, .norm = VIDEO_MODE_PAL, @@ -209,7 +207,6 @@ struct em2820_board em2820_boards[] = { }, [EM2800_BOARD_KWORLD_USB2800] = { .name = "Kworld USB2800", - .chip_id = 0x7, .is_em2800 = 1, .vchannels = 3, .norm = VIDEO_MODE_PAL, diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c index 48489dda8..eb75151a8 100644 --- a/linux/drivers/media/video/em28xx/em28xx-core.c +++ b/linux/drivers/media/video/em28xx/em28xx-core.c @@ -445,6 +445,18 @@ int em2820_scaler_set(struct em2820 *dev, u16 h, u16 v) buf[0] = v; buf[1] = v >> 8; em2820_write_regs(dev, VSCALELOW_REG, (char *)buf, 2); + if(dev->is_em2800){ + /* FIXME */ + /* random ratio scaling and 720x567 doesn't seem to work */ + /* the maximum we can get is 640x480 with disabled scaler */ + /* and norm_maxw set to 640 */ + if(dev->width == 640 && dev->height == 480) + return em2820_write_regs(dev, COMPR_REG,"\x00",1); + if(dev->height > 288) + return em2820_write_regs(dev, COMPR_REG,"\x10",1); + if(dev->width > 360) + return em2820_write_regs(dev, COMPR_REG,"\x20",1); + } /* when H and V mixershould be used? */ /* return em2820_write_reg_bits(dev, COMPR_REG, (h ? 0x20 : 0x00) | (v ? 0x10 : 0x00), 0x30); */ /* it seems that both H and V scalers must be active to work correctly */ diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index e8d47df04..6e745d99b 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -1401,6 +1401,18 @@ static int em2820_video_do_ioctl(struct inode *inode, struct file *filp, if (width > maxw) width = maxw; + /* FIXME*/ + if(dev->is_em2800){ + /* we only know how to scale to 50% */ + if(height % (maxh / 2)) + height=maxh; + if(width % (maxw / 2)) + width=maxw; + /* larger resoltion don't seem to work either */ + if(width == maxw && height == maxh) + width /= 2; + } + if ((hscale = (((unsigned long)maxw) << 12) / width - 4096L) >= 0x4000) diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 02512c3e0..9e2ac13fe 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -160,7 +160,6 @@ enum em2820_decoder { struct em2820_board { char *name; - unsigned char chip_id; int vchannels; int norm; int tuner_type; |