Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13359
b: refs/heads/master
c: 74458e6
h: refs/heads/master
i:
  13357: a2bd195
  13355: 28fade8
  13351: 8d5e3e3
  13343: d5c8dee
v: v3
  • Loading branch information
Sascha Sommer authored and Linus Torvalds committed Nov 9, 2005
1 parent 0acb712 commit d66d3fc
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d5e5265315770bda46c50ecaa64e2b9790f2064c
refs/heads/master: 74458e6c1aea9e422e46030e7bc61e9b0984be5b
3 changes: 0 additions & 3 deletions trunk/drivers/media/video/em28xx/em28xx-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,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,
Expand All @@ -184,7 +183,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,
Expand All @@ -208,7 +206,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,
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,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 */
Expand Down
12 changes: 12 additions & 0 deletions trunk/drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,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)
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ enum em2820_decoder {

struct em2820_board {
char *name;
unsigned char chip_id;
int vchannels;
int norm;
int tuner_type;
Expand Down

0 comments on commit d66d3fc

Please sign in to comment.