diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-28 18:19:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-28 18:19:09 -0300 |
commit | 80f09f603d2001e9a765d66aa5fa5cf5f9f8ed44 (patch) | |
tree | 47ab08df25ce956b894779491385b3962b01fc77 /linux | |
parent | eb7519ddf0079fb5e8a48fe4ec4091ded9de495a (diff) | |
parent | 5a8d592ca3b750889157d08b2e349e036a678663 (diff) | |
download | mediapointer-dvb-s2-80f09f603d2001e9a765d66aa5fa5cf5f9f8ed44.tar.gz mediapointer-dvb-s2-80f09f603d2001e9a765d66aa5fa5cf5f9f8ed44.tar.bz2 |
merge: http://www.linuxtv.org/hg/~stoth/hvr1300-final
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/Documentation/video4linux/CARDLIST.saa7134 | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/gp8psk.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-blackbird.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/ir-kbd-i2c.c | 19 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 9 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-cards.c | 36 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-dvb.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-input.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 1 | ||||
-rw-r--r-- | linux/include/linux/videodev2.h | 80 |
12 files changed, 147 insertions, 11 deletions
diff --git a/linux/Documentation/video4linux/CARDLIST.saa7134 b/linux/Documentation/video4linux/CARDLIST.saa7134 index 94cf695b1..6fb82ac3b 100644 --- a/linux/Documentation/video4linux/CARDLIST.saa7134 +++ b/linux/Documentation/video4linux/CARDLIST.saa7134 @@ -97,3 +97,4 @@ 96 -> Medion Md8800 Quadro [16be:0007,16be:0008] 97 -> LifeView FlyDVB-S /Acorp TV134DS [5168:0300,4e42:0300] 98 -> Proteus Pro 2309 [0919:2003] + 99 -> AVerMedia TV Hybrid A16AR [1461:2c00] diff --git a/linux/drivers/media/dvb/dvb-usb/gp8psk.c b/linux/drivers/media/dvb/dvb-usb/gp8psk.c index 2685a5ab4..e2d906985 100644 --- a/linux/drivers/media/dvb/dvb-usb/gp8psk.c +++ b/linux/drivers/media/dvb/dvb-usb/gp8psk.c @@ -219,7 +219,7 @@ static struct dvb_usb_device_properties gp8psk_properties = { .cold_ids = { &gp8psk_usb_table[0], NULL }, .warm_ids = { &gp8psk_usb_table[1], NULL }, }, - { 0 }, + { NULL }, } }; diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index ecd536e4c..dc27d74eb 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -928,7 +928,7 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file, snprintf(name, sizeof(name), "%s/2", core->name); printk("%s/2: ============ START LOG STATUS ============\n", core->name); - cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, 0); + cx88_call_i2c_clients(core, VIDIOC_LOG_STATUS, NULL); cx2341x_log_status(&dev->params, name); printk("%s/2: ============= END LOG STATUS =============\n", core->name); diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c index 91ff43d93..b826dcca2 100644 --- a/linux/drivers/media/video/ir-kbd-i2c.c +++ b/linux/drivers/media/video/ir-kbd-i2c.c @@ -65,23 +65,32 @@ MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults static int get_key_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) { unsigned char buf[3]; - int start, toggle, dev, code; + int start, range, toggle, dev, code; /* poll IR chip */ if (3 != i2c_master_recv(&ir->c,buf,3)) return -EIO; /* split rc5 data block ... */ - start = (buf[0] >> 6) & 3; + start = (buf[0] >> 7) & 1; + range = (buf[0] >> 6) & 1; toggle = (buf[0] >> 5) & 1; dev = buf[0] & 0x1f; code = (buf[1] >> 2) & 0x3f; - if (3 != start) + /* rc5 has two start bits + * the first bit must be one + * the second bit defines the command range (1 = 0-63, 0 = 64 - 127) + */ + if (!start) /* no key pressed */ return 0; - dprintk(1,"ir hauppauge (rc5): s%d t%d dev=%d code=%d\n", - start, toggle, dev, code); + + if (!range) + code += 64; + + dprintk(1,"ir hauppauge (rc5): s%d r%d t%d dev=%d code=%d\n", + start, range, toggle, dev, code); /* return key */ *ir_key = code; diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index f6e5771f4..065ccb0bb 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -3245,7 +3245,8 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw, struct list_head *item; struct pvr2_i2c_client *cp; struct v4l2_register req; - int stat; + int stat = 0; + int okFl = 0; req.i2c_id = chip_id; req.reg = reg_id; @@ -3258,9 +3259,13 @@ int pvr2_hdw_register_access(struct pvr2_hdw *hdw, cp,(setFl ? VIDIOC_INT_S_REGISTER : VIDIOC_INT_G_REGISTER),&req); if (!setFl) *val_ptr = req.val; - return stat; + okFl = !0; + break; } } while (0); mutex_unlock(&hdw->i2c_list_lock); + if (okFl) { + return stat; + } return -EINVAL; #else return -ENOSYS; diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c index 99daf3c1f..dbd2466ef 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c @@ -20,6 +20,7 @@ */ #include "compat.h" +#include <linux/kernel.h> #include "pvrusb2-i2c-core.h" #include "pvrusb2-hdw-internal.h" #include "pvrusb2-debug.h" @@ -90,7 +91,8 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp) const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx) { - if (idx >= sizeof(ops)/sizeof(ops[0])) return 0; + if (idx >= ARRAY_SIZE(ops)) + return NULL; return ops[idx]; } diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index 0da6c9ec6..6b72efd56 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -687,7 +687,7 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file, ret = pvr2_hdw_register_access( hdw,req->i2c_id,req->reg, cmd == VIDIOC_INT_S_REGISTER,&val); - if (cmd == 0) req->val = val; + if (cmd == VIDIOC_INT_G_REGISTER) req->val = val; break; } #endif diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index c62dd357d..d6850d5bd 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -3005,6 +3005,35 @@ struct saa7134_board saa7134_boards[] = { .amux = LINE1, }, }, + [SAA7134_BOARD_AVERMEDIA_A16AR] = { + /* Petr Baudis <pasky@ucw.cz> */ + .name = "AVerMedia TV Hybrid A16AR", + .audio_clock = 0x187de7, + .tuner_type = TUNER_PHILIPS_TDA8290, /* untested */ + .radio_type = TUNER_TEA5767, /* untested */ + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .tda9887_conf = TDA9887_PRESENT, + .mpeg = SAA7134_MPEG_DVB, + .inputs = {{ + .name = name_tv, + .vmux = 1, + .amux = TV, + .tv = 1, + },{ + .name = name_comp1, + .vmux = 3, + .amux = LINE2, + },{ + .name = name_svideo, + .vmux = 8, + .amux = LINE1, + }}, + .radio = { + .name = name_radio, + .amux = LINE1, + }, + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -3602,6 +3631,12 @@ struct pci_device_id saa7134_pci_tbl[] = { .subdevice = 0x2003, .driver_data = SAA7134_BOARD_PROTEUS_2309, },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7134, + .subvendor = 0x1461, + .subdevice = 0x2c00, + .driver_data = SAA7134_BOARD_AVERMEDIA_A16AR, + },{ /* --- boards without eeprom + subsystem ID --- */ .vendor = PCI_VENDOR_ID_PHILIPS, .device = PCI_DEVICE_ID_PHILIPS_SAA7134, @@ -3780,6 +3815,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) saa_writeb(SAA7134_GPIO_GPMODE3, 0x08); saa_writeb(SAA7134_GPIO_GPSTATUS3, 0x00); break; + case SAA7134_BOARD_AVERMEDIA_A16AR: case SAA7134_BOARD_AVERMEDIA_CARDBUS: /* power-up tuner chip */ saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); diff --git a/linux/drivers/media/video/saa7134/saa7134-dvb.c b/linux/drivers/media/video/saa7134/saa7134-dvb.c index 352f9ebf6..0718f131a 100644 --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -1056,6 +1056,7 @@ static int dvb_init(struct saa7134_dev *dev) } break; case SAA7134_BOARD_AVERMEDIA_777: + case SAA7134_BOARD_AVERMEDIA_A16AR: printk("%s: avertv 777 dvb setup\n",dev->name); dev->dvb.frontend = dvb_attach(mt352_attach, &avermedia_777, &dev->i2c_adap); diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c index d3fbfbfdf..0799ce916 100644 --- a/linux/drivers/media/video/saa7134/saa7134-input.c +++ b/linux/drivers/media/video/saa7134/saa7134-input.c @@ -186,6 +186,7 @@ int saa7134_input_init1(struct saa7134_dev *dev) case SAA7134_BOARD_AVERMEDIA_STUDIO_305: case SAA7134_BOARD_AVERMEDIA_STUDIO_307: case SAA7134_BOARD_AVERMEDIA_GO_007_FM: + case SAA7134_BOARD_AVERMEDIA_A16AR: ir_codes = ir_codes_avermedia; mask_keycode = 0x0007C8; mask_keydown = 0x000010; diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 84a8c70b8..2a4320c38 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -235,6 +235,7 @@ struct saa7134_format { #define SAA7134_BOARD_MEDION_MD8800_QUADRO 96 #define SAA7134_BOARD_FLYDVBS_LR300 97 #define SAA7134_BOARD_PROTEUS_2309 98 +#define SAA7134_BOARD_AVERMEDIA_A16AR 99 #define SAA7134_MAXBOARDS 8 #define SAA7134_INPUT_MAX 8 diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index c269a76ca..f886a85ac 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -276,6 +276,82 @@ struct v4l2_fmtdesc #define V4L2_FMT_FLAG_COMPRESSED 0x0001 +#if 1 /*KEEP*/ + /* Experimental Frame Size and frame rate enumeration */ +/* + * F R A M E S I Z E E N U M E R A T I O N + */ +enum v4l2_frmsizetypes +{ + V4L2_FRMSIZE_TYPE_DISCRETE = 1, + V4L2_FRMSIZE_TYPE_CONTINUOUS = 2, + V4L2_FRMSIZE_TYPE_STEPWISE = 3, +}; + +struct v4l2_frmsize_discrete +{ + __u32 width; /* Frame width [pixel] */ + __u32 height; /* Frame height [pixel] */ +}; + +struct v4l2_frmsize_stepwise +{ + __u32 min_width; /* Minimum frame width [pixel] */ + __u32 max_width; /* Maximum frame width [pixel] */ + __u32 step_width; /* Frame width step size [pixel] */ + __u32 min_height; /* Minimum frame height [pixel] */ + __u32 max_height; /* Maximum frame height [pixel] */ + __u32 step_height; /* Frame height step size [pixel] */ +}; + +struct v4l2_frmsizeenum +{ + __u32 index; /* Frame size number */ + __u32 pixel_format; /* Pixel format */ + __u32 type; /* Frame size type the device supports. */ + + union { /* Frame size */ + struct v4l2_frmsize_discrete discrete; + struct v4l2_frmsize_stepwise stepwise; + }; + + __u32 reserved[2]; /* Reserved space for future use */ +}; + +/* + * F R A M E R A T E E N U M E R A T I O N + */ +enum v4l2_frmivaltypes +{ + V4L2_FRMIVAL_TYPE_DISCRETE = 1, + V4L2_FRMIVAL_TYPE_CONTINUOUS = 2, + V4L2_FRMIVAL_TYPE_STEPWISE = 3, +}; + +struct v4l2_frmival_stepwise +{ + struct v4l2_fract min; /* Minimum frame interval [s] */ + struct v4l2_fract max; /* Maximum frame interval [s] */ + struct v4l2_fract step; /* Frame interval step size [s] */ +}; + +struct v4l2_frmivalenum +{ + __u32 index; /* Frame format index */ + __u32 pixel_format; /* Pixel format */ + __u32 width; /* Frame width */ + __u32 height; /* Frame height */ + __u32 type; /* Frame interval type the device supports. */ + + union { /* Frame interval */ + struct v4l2_fract discrete; + struct v4l2_frmival_stepwise stepwise; + }; + + __u32 reserved[2]; /* Reserved space for future use */ +}; +#endif + /* * T I M E C O D E */ @@ -1315,6 +1391,10 @@ struct v4l2_streamparm #define VIDIOC_G_EXT_CTRLS _IOWR ('V', 71, struct v4l2_ext_controls) #define VIDIOC_S_EXT_CTRLS _IOWR ('V', 72, struct v4l2_ext_controls) #define VIDIOC_TRY_EXT_CTRLS _IOWR ('V', 73, struct v4l2_ext_controls) +#if 1 /*KEEP*/ +#define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum) +#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum) +#endif #ifdef __OLD_VIDIOC_ /* for compatibility, will go away some day */ |