diff options
author | Gerd Knorr <devnull@localhost> | 2004-06-23 14:33:51 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-06-23 14:33:51 +0000 |
commit | 25a121bba097b66e8fba1e371c5df6321ba51d19 (patch) | |
tree | 407d3d9fad4043341a9f1eb7bc1ce7bdfdc5907d /linux/drivers/media | |
parent | 0e796b2ee04bd1acbdc5150e7c939cc349aa23d5 (diff) | |
download | mediapointer-dvb-s2-25a121bba097b66e8fba1e371c5df6321ba51d19.tar.gz mediapointer-dvb-s2-25a121bba097b66e8fba1e371c5df6321ba51d19.tar.bz2 |
- misc fixes from various people.
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/bttv-cards.c | 18 | ||||
-rw-r--r-- | linux/drivers/media/video/bttv.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 22 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/ir-kbd-gpio.c | 47 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-ts.c | 2 |
6 files changed, 88 insertions, 3 deletions
diff --git a/linux/drivers/media/video/bttv-cards.c b/linux/drivers/media/video/bttv-cards.c index 1ccc6209b..3e27e4b69 100644 --- a/linux/drivers/media/video/bttv-cards.c +++ b/linux/drivers/media/video/bttv-cards.c @@ -297,7 +297,7 @@ static struct CARD { // DVB cards (using pci function .1 for mpeg data xfer) { 0x01010071, BTTV_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, - { 0x07611461, BTTV_NEBULA_DIGITV, "AverMedia AverTV DVB-T" }, + { 0x07611461, BTTV_AVDVBT_761, "AverMedia AverTV DVB-T" }, { 0x002611bd, BTTV_TWINHAN_DST, "Pinnacle PCTV SAT CI" }, { 0x00011822, BTTV_TWINHAN_DST, "Twinhan VisionPlus DVB-T" }, { 0xfc00270f, BTTV_TWINHAN_DST, "ChainTech digitop DST-1000 DVB-S" }, @@ -2078,6 +2078,22 @@ struct tvcard bttv_tvcards[] = { #if 0 /* untested */ .has_remote = 1, #endif +},{ + /* Matt Jesson <dvb@jesson.eclipse.co.uk> */ + /* Based on the Nebula card data - added remote and new card number - BTTV_AVDVBT_761, see also ir-kbd-gpio.c */ + .name = "AverMedia AverTV DVB-T", + .video_inputs = 1, + .tuner = -1, + .svhs = -1, + .muxsel = { 2, 3, 1, 0}, + .no_msp34xx = 1, + .no_tda9875 = 1, + .no_tda7432 = 1, + .pll = PLL_28, + .tuner_type = -1, + .has_dvb = 1, + .no_gpioirq = 1, + .has_remote = 1, }}; const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); diff --git a/linux/drivers/media/video/bttv.h b/linux/drivers/media/video/bttv.h index 9d820f6be..9ecd89207 100644 --- a/linux/drivers/media/video/bttv.h +++ b/linux/drivers/media/video/bttv.h @@ -126,6 +126,7 @@ #define BTTV_LMLBT4 0x76 #define BTTV_PICOLO_TETRA_CHIP 0x79 #define BTTV_AVDVBT_771 0x7b +#define BTTV_AVDVBT_761 0x7c /* i2c address list */ #define I2C_TSA5522 0xc2 diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 47dcd2052..4024b8ef9 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -146,63 +146,75 @@ static struct cx8800_tvnorm tvnorms[] = { .id = V4L2_STD_NTSC_M, .cxiformat = VideoFormatNTSC, .cxoformat = 0x181f0008, + .step_dr = 4406250, },{ .name = "NTSC-JP", .id = V4L2_STD_NTSC_M_JP, .cxiformat = VideoFormatNTSCJapan, .cxoformat = 0x181f0008, + .step_dr = 4406250, #if 0 },{ .name = "NTSC-4.43", .id = FIXME, .cxiformat = VideoFormatNTSC443, .cxoformat = 0x181f0008, + .step_dr = 4406250, #endif },{ .name = "PAL-BG", .id = V4L2_STD_PAL_BG, .cxiformat = VideoFormatPAL, .cxoformat = 0x181f0008, + .step_dr = 4406250, },{ .name = "PAL-DK", .id = V4L2_STD_PAL_DK, .cxiformat = VideoFormatPAL, .cxoformat = 0x181f0008, + .step_dr = 4406250, },{ .name = "PAL-I", .id = V4L2_STD_PAL_I, .cxiformat = VideoFormatPAL, .cxoformat = 0x181f0008, + .step_dr = 4406250, },{ .name = "PAL-M", .id = V4L2_STD_PAL_M, .cxiformat = VideoFormatPALM, .cxoformat = 0x1c1f0008, + .step_dr = 4406250, },{ .name = "PAL-N", .id = V4L2_STD_PAL_N, .cxiformat = VideoFormatPALN, .cxoformat = 0x1c1f0008, + .step_dr = 4406250, },{ .name = "PAL-Nc", .id = V4L2_STD_PAL_Nc, .cxiformat = VideoFormatPALNC, .cxoformat = 0x1c1f0008, + .step_dr = 4406250, },{ .name = "PAL-60", .id = V4L2_STD_PAL_60, .cxiformat = VideoFormatPAL60, .cxoformat = 0x181f0008, + .step_dr = 4406250, },{ .name = "SECAM-L", .id = V4L2_STD_SECAM_L, .cxiformat = VideoFormatSECAM, .cxoformat = 0x181f0008, + .step_dr = 4250000, },{ .name = "SECAM-DK", .id = V4L2_STD_SECAM_DK, .cxiformat = VideoFormatSECAM, .cxoformat = 0x181f0008, + .step_dr = 4250000, } }; @@ -570,7 +582,7 @@ static int set_tvnorm(struct cx8800_dev *dev, struct cx8800_tvnorm *norm) cx_write(MO_SUB_STEP, (u32)tmp64); // MO_SUB_STEP_DR = 8 * 4406250 / video dec clock * 2^22 - tmp64 = 4406250 * 8 * (u64)(1 << 22); + tmp64 = norm->step_dr * 8 * (u64)(1 << 22); do_div(tmp64, vdec_clock); dprintk(1,"set_tvnorm: MO_SUB_STEP_DR 0x%08x [old=0x%08x]\n", (u32)tmp64, cx_read(MO_SUB_STEP_DR)); @@ -666,6 +678,10 @@ static int set_scale(struct cx8800_dev *dev, unsigned int width, unsigned int he // setup filters value = 0; value |= (1 << 19); // CFILT (default) + if (dev->tvnorm->id & V4L2_STD_SECAM) + value |= (1 << 15); + if (INPUT(dev->input)->type == CX88_VMUX_SVIDEO) + value |= (1 << 13) | (1 << 5); if (V4L2_FIELD_INTERLACED == field) value |= (1 << 3); // VINT (interlaced vertical scaling) if (width < 385) @@ -697,10 +713,14 @@ static int video_mux(struct cx8800_dev *dev, unsigned int input) case CX88_VMUX_SVIDEO: cx_set(MO_AFECFG_IO, 0x00000001); cx_set(MO_INPUT_FORMAT, 0x00010010); + cx_set(MO_FILTER_EVEN, 0x00002020); + cx_set(MO_FILTER_ODD, 0x00002020); break; default: cx_clear(MO_AFECFG_IO, 0x00000001); cx_clear(MO_INPUT_FORMAT, 0x00010010); + cx_clear(MO_FILTER_EVEN, 0x00002020); + cx_clear(MO_FILTER_ODD, 0x00002020); break; } return 0; diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 78e9eee5b..ca1df83fc 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -83,6 +83,7 @@ struct cx8800_tvnorm { v4l2_std_id id; u32 cxiformat; u32 cxoformat; + u32 step_dr; }; struct cx8800_fmt { diff --git a/linux/drivers/media/video/ir-kbd-gpio.c b/linux/drivers/media/video/ir-kbd-gpio.c index c853e4581..02d24e2eb 100644 --- a/linux/drivers/media/video/ir-kbd-gpio.c +++ b/linux/drivers/media/video/ir-kbd-gpio.c @@ -74,6 +74,45 @@ static IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE] = { [ 1 ] = KEY_BLUE, // unmarked }; +/* Matt Jesson <dvb@jesson.eclipse.co.uk */ +static IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = { + [ 0x28 ] = KEY_KP0, //'0' / 'enter' + [ 0x22 ] = KEY_KP1, //'1' + [ 0x12 ] = KEY_KP2, //'2' / 'up arrow' + [ 0x32 ] = KEY_KP3, //'3' + [ 0x24 ] = KEY_KP4, //'4' / 'left arrow' + [ 0x14 ] = KEY_KP5, //'5' + [ 0x34 ] = KEY_KP6, //'6' / 'right arrow' + [ 0x26 ] = KEY_KP7, //'7' + [ 0x16 ] = KEY_KP8, //'8' / 'down arrow' + [ 0x36 ] = KEY_KP9, //'9' + + [ 0x20 ] = KEY_LIST, // 'source' + [ 0x10 ] = KEY_TEXT, // 'teletext' + [ 0x00 ] = KEY_POWER, // 'power' + [ 0x04 ] = KEY_AUDIO, // 'audio' + [ 0x06 ] = KEY_ZOOM, // 'full screen' + [ 0x18 ] = KEY_VIDEO, // 'display' + [ 0x38 ] = KEY_SEARCH, // 'loop' + [ 0x08 ] = KEY_INFO, // 'preview' + [ 0x2a ] = KEY_REWIND, // 'backward <<' + [ 0x1a ] = KEY_FASTFORWARD, // 'forward >>' + [ 0x3a ] = KEY_RECORD, // 'capture' + [ 0x0a ] = KEY_MUTE, // 'mute' + [ 0x2c ] = KEY_RECORD, // 'record' + [ 0x1c ] = KEY_PAUSE, // 'pause' + [ 0x3c ] = KEY_STOP, // 'stop' + [ 0x0c ] = KEY_PLAY, // 'play' + [ 0x2e ] = KEY_RED, // 'red' + [ 0x01 ] = KEY_BLUE, // 'blue' / 'cancel' + [ 0x0e ] = KEY_YELLOW, // 'yellow' / 'ok' + [ 0x21 ] = KEY_GREEN, // 'green' + [ 0x11 ] = KEY_CHANNELDOWN, // 'channel -' + [ 0x31 ] = KEY_CHANNELUP, // 'channel +' + [ 0x1e ] = KEY_VOLUMEDOWN, // 'volume -' + [ 0x3e ] = KEY_VOLUMEUP, // 'volume +' +}; + static IR_KEYTAB_TYPE winfast_codes[IR_KEYTAB_SIZE] = { [ 5 ] = KEY_KP1, [ 6 ] = KEY_KP2, @@ -284,6 +323,14 @@ static int ir_probe(struct device *dev) ir->polling = 50; // ms break; + case BTTV_AVDVBT_761: + /* case BTTV_AVDVBT_771: */ + ir_codes = ir_codes_avermedia_dvbt; + ir->mask_keycode = 0x0f00c0; + ir->mask_keydown = 0x000020; + ir->polling = 50; // ms + break; + case BTTV_PXELVWPLTVPAK: ir_codes = ir_codes_pixelview; ir->mask_keycode = 0x003e00; diff --git a/linux/drivers/media/video/saa7134/saa7134-ts.c b/linux/drivers/media/video/saa7134/saa7134-ts.c index a7b62c2e1..a3a3f60ad 100644 --- a/linux/drivers/media/video/saa7134/saa7134-ts.c +++ b/linux/drivers/media/video/saa7134/saa7134-ts.c @@ -415,7 +415,7 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, case MPEG_SETPARAMS: return ts_init_encoder(dev, arg); - + default: return -ENOIOCTLCMD; } |