summaryrefslogtreecommitdiff
path: root/linux/drivers/usb/media/em2820-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-10-14 17:26:09 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-10-14 17:26:09 +0000
commit8171d7183d71387dfaf4b887113f6740ee8bce88 (patch)
tree754b60ac5ea55807e89fda893965b71ea0d94e02 /linux/drivers/usb/media/em2820-core.c
parentdc49b979bbf88fb36e888c8d04d22b3168885d80 (diff)
downloadmediapointer-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/usb/media/em2820-core.c')
-rw-r--r--linux/drivers/usb/media/em2820-core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/linux/drivers/usb/media/em2820-core.c b/linux/drivers/usb/media/em2820-core.c
index 48489dda8..eb75151a8 100644
--- a/linux/drivers/usb/media/em2820-core.c
+++ b/linux/drivers/usb/media/em2820-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 */