diff options
-rw-r--r-- | linux/drivers/media/common/saa7146_video.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-av.c | 16 | ||||
-rw-r--r-- | linux/drivers/media/video/hexium.h | 26 | ||||
-rw-r--r-- | linux/include/media/saa7146_vv.h | 41 |
4 files changed, 38 insertions, 48 deletions
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c index 5bbbc4d97..a4049526c 100644 --- a/linux/drivers/media/common/saa7146_video.c +++ b/linux/drivers/media/common/saa7146_video.c @@ -944,7 +944,8 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int return -EINVAL; if( e->index < dev->ext->ext_vv_data->num_stds ) { DEB_EE(("VIDIOC_ENUMSTD: index:%d\n",e->index)); - return v4l2_video_std_construct(e, dev->ext->ext_vv_data->stds[e->index].id, dev->ext->ext_vv_data->stds[e->index].name); + v4l2_video_std_construct(e, dev->ext->ext_vv_data->stds[e->index].id, dev->ext->ext_vv_data->stds[e->index].name); + return 0; } return -EINVAL; } diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c index 072a6872d..36f1fa796 100644 --- a/linux/drivers/media/dvb/ttpci/budget-av.c +++ b/linux/drivers/media/dvb/ttpci/budget-av.c @@ -300,10 +300,18 @@ static int av_ioctl(struct saa7146_fh *fh, unsigned int cmd, void *arg) } static struct saa7146_standard standard[] = { - { "PAL", V4L2_STD_PAL, SAA7146_PAL_VALUES }, - { "NTSC", V4L2_STD_NTSC, SAA7146_NTSC_VALUES }, -}; - + { + .name = "PAL", .id = V4L2_STD_PAL, + .v_offset = 0x17, .v_field = 288, .v_calc = 576, + .h_offset = 0x14, .h_pixels = 680, .h_calc = 680+1, + .v_max_out = 576, .h_max_out = 768, + }, { + .name = "NTSC", .id = V4L2_STD_NTSC, + .v_offset = 0x16, .v_field = 240, .v_calc = 480, + .h_offset = 0x06, .h_pixels = 708, .h_calc = 708+1, + .v_max_out = 480, .h_max_out = 640, + } +}; static struct saa7146_ext_vv vv_data = { .inputs = 2, diff --git a/linux/drivers/media/video/hexium.h b/linux/drivers/media/video/hexium.h index 51cd9c6a6..80ddb2418 100644 --- a/linux/drivers/media/video/hexium.h +++ b/linux/drivers/media/video/hexium.h @@ -7,15 +7,25 @@ #define HEXIUM_GEMUINI 4 #define HEXIUM_GEMUINI_DUAL 5 -#define HEXIUM_PAL_VALUES V_OFFSET_PAL, V_FIELD_PAL, V_ACTIVE_LINES_PAL, H_OFFSET_PAL, H_PIXELS_PAL, H_PIXELS_PAL+1, V_ACTIVE_LINES_PAL, 768 -#define HEXIUM_NTSC_VALUES V_OFFSET_NTSC+1, V_FIELD_NTSC, V_ACTIVE_LINES_NTSC, H_OFFSET_NTSC, 640, 641, V_ACTIVE_LINES_NTSC, 640 -#define HEXIUM_SECAM_VALUES V_OFFSET_SECAM, V_FIELD_SECAM, V_ACTIVE_LINES_SECAM, H_OFFSET_SECAM, H_PIXELS_SECAM, H_PIXELS_SECAM+1, V_ACTIVE_LINES_SECAM, 768 - static struct saa7146_standard hexium_standards[] = { - { "PAL", V4L2_STD_PAL, HEXIUM_PAL_VALUES }, - { "NTSC", V4L2_STD_NTSC, HEXIUM_NTSC_VALUES }, - { "SECAM", V4L2_STD_SECAM, HEXIUM_SECAM_VALUES }, -}; + { + .name = "PAL", .id = V4L2_STD_PAL, + .v_offset = 0x17, .v_field = 288, .v_calc = 576, + .h_offset = 0x14, .h_pixels = 680, .h_calc = 680+1, + .v_max_out = 576, .h_max_out = 768, + }, { + .name = "NTSC", .id = V4L2_STD_NTSC, + .v_offset = 0x17, .v_field = 240, .v_calc = 480, + .h_offset = 0x06, .h_pixels = 640, .h_calc = 641+1, + .v_max_out = 480, .h_max_out = 640, + }, { + .name = "SECAM", .id = V4L2_STD_SECAM, + .v_offset = 0x14, .v_field = 288, .v_calc = 576, + .h_offset = 0x14, .h_pixels = 720, .h_calc = 720+1, + .v_max_out = 576, .h_max_out = 768, + } +}; + #define HEXIUM_INPUTS 9 static struct v4l2_input hexium_inputs[HEXIUM_INPUTS] = { diff --git a/linux/include/media/saa7146_vv.h b/linux/include/media/saa7146_vv.h index 9637dd259..2868ad089 100644 --- a/linux/include/media/saa7146_vv.h +++ b/linux/include/media/saa7146_vv.h @@ -39,13 +39,13 @@ struct saa7146_standard char *name; v4l2_std_id id; - int v_offset; - int v_field; - int v_calc; + int v_offset; /* number of lines of vertical offset before processing */ + int v_field; /* number of lines in a field for HPS to process */ + int v_calc; /* number of vertical active lines */ - int h_offset; - int h_pixels; - int h_calc; + int h_offset; /* horizontal offset of processing window */ + int h_pixels; /* number of horizontal pixels to process */ + int h_calc; /* number of horizontal active pixels */ int v_max_out; int h_max_out; @@ -215,35 +215,6 @@ extern struct saa7146_use_ops saa7146_vbi_uops; #define SAA7146_HPS_SYNC_PORT_A 0x00 #define SAA7146_HPS_SYNC_PORT_B 0x01 -/* number of vertical active lines */ -#define V_ACTIVE_LINES_PAL 576 -#define V_ACTIVE_LINES_NTSC 480 -#define V_ACTIVE_LINES_SECAM 576 - -/* number of lines in a field for HPS to process */ -#define V_FIELD_PAL 288 -#define V_FIELD_NTSC 240 -#define V_FIELD_SECAM 288 - -/* number of lines of vertical offset before processing */ -#define V_OFFSET_PAL 0x17 -#define V_OFFSET_NTSC 0x16 -#define V_OFFSET_SECAM 0x14 - -/* number of horizontal pixels to process */ -#define H_PIXELS_PAL 680 -#define H_PIXELS_NTSC 708 -#define H_PIXELS_SECAM 720 - -/* horizontal offset of processing window */ -#define H_OFFSET_PAL 0x14 -#define H_OFFSET_NTSC 0x06 -#define H_OFFSET_SECAM 0x14 - -#define SAA7146_PAL_VALUES V_OFFSET_PAL, V_FIELD_PAL, V_ACTIVE_LINES_PAL, H_OFFSET_PAL, H_PIXELS_PAL, H_PIXELS_PAL+1, V_ACTIVE_LINES_PAL, 768 -#define SAA7146_NTSC_VALUES V_OFFSET_NTSC, V_FIELD_NTSC, V_ACTIVE_LINES_NTSC, H_OFFSET_NTSC, H_PIXELS_NTSC, H_PIXELS_NTSC+1, V_ACTIVE_LINES_NTSC, 640 -#define SAA7146_SECAM_VALUES V_OFFSET_SECAM, V_FIELD_SECAM, V_ACTIVE_LINES_SECAM, H_OFFSET_SECAM, H_PIXELS_SECAM, H_PIXELS_SECAM+1, V_ACTIVE_LINES_SECAM, 768 - /* some memory sizes */ #define SAA7146_CLIPPING_MEM (14*PAGE_SIZE) |