Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366788
b: refs/heads/master
c: 50deb74
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 24, 2013
1 parent e4b7dff commit 6549605
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 156 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: 59d7b91a1d89168d44f07c8f8fb0ad0dc65a140f
refs/heads/master: 50deb74905d1e123878f50ed31f829916b936ded
35 changes: 22 additions & 13 deletions trunk/drivers/staging/media/go7007/go7007-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -650,19 +650,7 @@ struct go7007 *go7007_alloc(struct go7007_board_info *board, struct device *dev)
init_waitqueue_head(&go->interrupt_waitq);
go->in_use = 0;
go->input = 0;
if (board->sensor_flags & GO7007_SENSOR_TV) {
go->standard = GO7007_STD_NTSC;
go->width = 720;
go->height = 480;
go->sensor_framerate = 30000;
} else {
go->standard = GO7007_STD_OTHER;
go->width = board->sensor_width;
go->height = board->sensor_height;
go->sensor_framerate = board->sensor_framerate;
}
go->encoder_v_offset = board->sensor_v_offset;
go->encoder_h_offset = board->sensor_h_offset;
go7007_update_board(go);
go->encoder_h_halve = 0;
go->encoder_v_halve = 0;
go->encoder_subsample = 0;
Expand Down Expand Up @@ -692,4 +680,25 @@ struct go7007 *go7007_alloc(struct go7007_board_info *board, struct device *dev)
}
EXPORT_SYMBOL(go7007_alloc);

void go7007_update_board(struct go7007 *go)
{
struct go7007_board_info *board = go->board_info;

if (board->sensor_flags & GO7007_SENSOR_TV) {
go->standard = GO7007_STD_NTSC;
go->std = V4L2_STD_NTSC_M;
go->width = 720;
go->height = 480;
go->sensor_framerate = 30000;
} else {
go->standard = GO7007_STD_OTHER;
go->width = board->sensor_width;
go->height = board->sensor_height;
go->sensor_framerate = board->sensor_framerate;
}
go->encoder_v_offset = board->sensor_v_offset;
go->encoder_h_offset = board->sensor_h_offset;
}
EXPORT_SYMBOL(go7007_update_board);

MODULE_LICENSE("GPL v2");
3 changes: 3 additions & 0 deletions trunk/drivers/staging/media/go7007/go7007-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ struct go7007 {
int input;
int aud_input;
enum { GO7007_STD_NTSC, GO7007_STD_PAL, GO7007_STD_OTHER } standard;
v4l2_std_id std;
int sensor_framerate;
int width;
int height;
Expand Down Expand Up @@ -291,6 +292,8 @@ int go7007_start_encoder(struct go7007 *go);
void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length);
struct go7007 *go7007_alloc(struct go7007_board_info *board,
struct device *dev);
void go7007_update_board(struct go7007 *go);

/* go7007-fw.c */
int go7007_construct_fw_image(struct go7007 *go, u8 **fw, int *fwlen);

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/staging/media/go7007/go7007-usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
"Adlink PCI-MPG24, channel #%d",
channel);
}
go7007_update_board(go);
}
}

Expand All @@ -1209,12 +1210,14 @@ static int go7007_usb_probe(struct usb_interface *intf,
case 1:
go->board_id = GO7007_BOARDID_PX_TV402U_EU;
go->tuner_type = TUNER_SONY_BTF_PG472Z;
go->std = V4L2_STD_PAL;
strncpy(go->name, "Plextor PX-TV402U-EU",
sizeof(go->name));
break;
case 2:
go->board_id = GO7007_BOARDID_PX_TV402U_JP;
go->tuner_type = TUNER_SONY_BTF_PK467Z;
go->std = V4L2_STD_NTSC_M_JP;
num_i2c_devs -= 2;
strncpy(go->name, "Plextor PX-TV402U-JP",
sizeof(go->name));
Expand Down
Loading

0 comments on commit 6549605

Please sign in to comment.