diff options
author | Nickolay V. Shmyrev <devnull@localhost> | 2005-10-17 22:01:51 +0000 |
---|---|---|
committer | Nickolay V. Shmyrev <devnull@localhost> | 2005-10-17 22:01:51 +0000 |
commit | 539b108b874c6c6d1ae4d4a577a9e0233f342894 (patch) | |
tree | 58f8ba9d2a620bb5db783c0e7201116195457270 /linux | |
parent | 03406143bff4739b6d81e6cf6dc15955d0c01073 (diff) | |
download | mediapointer-dvb-s2-539b108b874c6c6d1ae4d4a577a9e0233f342894.tar.gz mediapointer-dvb-s2-539b108b874c6c6d1ae4d4a577a9e0233f342894.tar.bz2 |
* ../linux/Documentation/video4linux/CARDLIST.saa7134:
* ../linux/drivers/media/video/ir-kbd-i2c.c: (get_key_pinnacle),
(ir_attach), (ir_probe):
* ../linux/drivers/media/video/saa7134/saa7134-cards.c:
* ../linux/drivers/media/video/saa7134/saa7134.h:
- Supports the Pinnacle PCTV 110i board, video inputs, and remote.
- Tuning only works with the new tda8290 module (it's a tda8275a)
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/Documentation/video4linux/CARDLIST.saa7134 | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/ir-kbd-i2c.c | 120 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-cards.c | 35 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/tda8290.c | 4 |
5 files changed, 157 insertions, 6 deletions
diff --git a/linux/Documentation/video4linux/CARDLIST.saa7134 b/linux/Documentation/video4linux/CARDLIST.saa7134 index c5ae8a32f..9b3ef0031 100644 --- a/linux/Documentation/video4linux/CARDLIST.saa7134 +++ b/linux/Documentation/video4linux/CARDLIST.saa7134 @@ -75,3 +75,4 @@ 74 -> LifeView FlyTV Platinum Mini2 [14c0:1212] 75 -> AVerMedia AVerTVHD MCE A180 [1461:1044] 76 -> SKNet MonsterTV Mobile [1131:4ee9] + 77 -> Pinnacle PCTV 110i (saa7133) [11bd:002e] diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c index d8d5c0688..5cb0ce087 100644 --- a/linux/drivers/media/video/ir-kbd-i2c.c +++ b/linux/drivers/media/video/ir-kbd-i2c.c @@ -1,5 +1,5 @@ /* - * $Id: ir-kbd-i2c.c,v 1.22 2005/10/16 12:13:58 mchehab Exp $ + * $Id: ir-kbd-i2c.c,v 1.23 2005/10/17 22:01:51 nsh Exp $ * * keyboard input driver for i2c IR remote controls * @@ -134,6 +134,64 @@ static IR_KEYTAB_TYPE ir_codes_purpletv[IR_KEYTAB_SIZE] = { }; +static IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE] = { + [ 0x59 ] = KEY_MUTE, + [ 0x4a ] = KEY_POWER, + + [ 0x18 ] = KEY_TEXT, + [ 0x26 ] = KEY_TV, + [ 0x3d ] = KEY_PRINT, + + [ 0x48 ] = KEY_RED, + [ 0x04 ] = KEY_GREEN, + [ 0x11 ] = KEY_YELLOW, + [ 0x00 ] = KEY_BLUE, + + [ 0x2d ] = KEY_VOLUMEUP, + [ 0x1e ] = KEY_VOLUMEDOWN, + + [ 0x49 ] = KEY_MENU, + + [ 0x16 ] = KEY_CHANNELUP, + [ 0x17 ] = KEY_CHANNELDOWN, + + [ 0x20 ] = KEY_UP, + [ 0x21 ] = KEY_DOWN, + [ 0x22 ] = KEY_LEFT, + [ 0x23 ] = KEY_RIGHT, + [ 0x0d ] = KEY_SELECT, + + + + [ 0x08 ] = KEY_BACK, + [ 0x07 ] = KEY_REFRESH, + + [ 0x2f ] = KEY_ZOOM, + [ 0x29 ] = KEY_RECORD, + + [ 0x4b ] = KEY_PAUSE, + [ 0x4d ] = KEY_REWIND, + [ 0x2e ] = KEY_PLAY, + [ 0x4e ] = KEY_FORWARD, + [ 0x53 ] = KEY_PREVIOUS, + [ 0x4c ] = KEY_STOP, + [ 0x54 ] = KEY_NEXT, + + [ 0x69 ] = KEY_KP0, + [ 0x6a ] = KEY_KP1, + [ 0x6b ] = KEY_KP2, + [ 0x6c ] = KEY_KP3, + [ 0x6d ] = KEY_KP4, + [ 0x6e ] = KEY_KP5, + [ 0x6f ] = KEY_KP6, + [ 0x70 ] = KEY_KP7, + [ 0x71 ] = KEY_KP8, + [ 0x72 ] = KEY_KP9, + + [ 0x74 ] = KEY_CHANNEL, + [ 0x0a ] = KEY_BACKSPACE, +}; + /* ----------------------------------------------------------------------- */ /* insmod parameters */ @@ -257,6 +315,58 @@ static int get_key_purpletv(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) *ir_raw = b; return 1; } + +/* The new pinnacle PCTV remote (with the colored buttons) + * + * Ricardo Cerqueira <v4l@cerqueira.org> + */ + +static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) +{ + unsigned char b[4]; + unsigned int start = 0,parity = 0,code = 0; + + /* poll IR chip */ + if (4 != i2c_master_recv(&ir->c,b,4)) { + dprintk(1,"read error\n"); + return -EIO; + } + + for (start = 0; start<4; start++) { + if (b[start] == 0x80) { + code=b[(start+3)%4]; + parity=b[(start+2)%4]; + } + } + + /* Empty Request */ + if (parity==0) + return 0; + + /* Repeating... */ + if (ir->old == parity) + return 0; + + + ir->old = parity; + + /* Reduce code value to fit inside IR_KEYTAB_SIZE + * + * this is the only value that results in 42 unique + * codes < 128 + */ + + code %= 0x88; + + *ir_raw = code; + *ir_key = code; + + dprintk(1,"Pinnacle PCTV key %02x\n", code); + + return 1; +} + + /* ----------------------------------------------------------------------- */ static void ir_key_poll(struct IR_i2c *ir) @@ -357,6 +467,12 @@ static int ir_attach(struct i2c_adapter *adap, int addr, ir_type = IR_TYPE_OTHER; ir_codes = ir_codes_empty; break; + case 0x47: + name = "Pinnacle PCTV"; + ir->get_key = get_key_pinnacle; + ir_type = IR_TYPE_OTHER; + ir_codes = ir_codes_pinnacle; + break; case 0x7a: name = "Purple TV"; ir->get_key = get_key_purpletv; @@ -435,7 +551,7 @@ static int ir_probe(struct i2c_adapter *adap) */ static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1}; - static const int probe_saa7134[] = { 0x7a, -1 }; + static const int probe_saa7134[] = { 0x7a, 0x47, -1 }; static const int probe_em2820[] = { 0x30, 0x47, -1 }; const int *probe = NULL; struct i2c_client c; diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c index 0631da415..80a580a3c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-cards.c +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-cards.c,v 1.103 2005/10/16 12:13:58 mchehab Exp $ + * $Id: saa7134-cards.c,v 1.104 2005/10/17 22:01:51 nsh Exp $ * * device driver for philips saa7134 based TV cards * card-specific stuff. @@ -2393,6 +2393,33 @@ struct saa7134_board saa7134_boards[] = { .amux = LINE1, }}, }, + [SAA7134_BOARD_PINNACLE_PCTV_110i] = { + .name = "Pinnacle PCTV 110i (saa7133)", + .audio_clock = 0x00187de7, + .tuner_type = TUNER_PHILIPS_TDA8290, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .gpiomask = 0x080200000, + .inputs = {{ + .name = name_tv, + .vmux = 4, + .amux = TV, + .tv = 1, + },{ + .name = name_comp1, + .vmux = 1, + .amux = LINE2, + },{ + .name = name_svideo, + .vmux = 8, + .amux = LINE2, + }}, + .radio = { + .name = name_radio, + .amux = LINE1, + }, + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -2811,6 +2838,12 @@ struct pci_device_id saa7134_pci_tbl[] = { .subdevice = 0x4ee9, .driver_data = SAA7134_BOARD_MONSTERTV_MOBILE, },{ + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, + .subvendor = 0x11bd, + .subdevice = 0x002e, + .driver_data = SAA7134_BOARD_PINNACLE_PCTV_110i, + },{ /* --- boards without eeprom + subsystem ID --- */ .vendor = PCI_VENDOR_ID_PHILIPS, .device = PCI_DEVICE_ID_PHILIPS_SAA7134, diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 805bffc37..218263439 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -1,5 +1,5 @@ /* - * $Id: saa7134.h,v 1.68 2005/10/17 21:18:42 mchehab Exp $ + * $Id: saa7134.h,v 1.69 2005/10/17 22:01:51 nsh Exp $ * * v4l2 device driver for philips saa7134 based TV cards * @@ -210,6 +210,7 @@ struct saa7134_format { #define SAA7134_BOARD_FLYTVPLATINUM_MINI2 74 #define SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180 75 #define SAA7134_BOARD_MONSTERTV_MOBILE 76 +#define SAA7134_BOARD_PINNACLE_PCTV_110i 77 #define SAA7134_MAXBOARDS 8 #define SAA7134_INPUT_MAX 8 diff --git a/linux/drivers/media/video/tda8290.c b/linux/drivers/media/video/tda8290.c index 88a065f42..f38681368 100644 --- a/linux/drivers/media/video/tda8290.c +++ b/linux/drivers/media/video/tda8290.c @@ -1,5 +1,5 @@ /* - $Id: tda8290.c,v 1.22 2005/10/17 21:54:00 nsh Exp $ + $Id: tda8290.c,v 1.23 2005/10/17 22:01:51 nsh Exp $ i2c tv tuner chip device driver controls the philips tda8290+75 tuner chip combo. @@ -489,7 +489,7 @@ static void tda8290_init_tuner(struct i2c_client *c) unsigned char tda8275a_init[] = { 0x00, 0x00, 0x00, 0x00, 0xdC, 0x05, 0x8b, 0x0c, 0x04, 0x20, 0xFF, 0x00, 0x00, 0x4b }; struct i2c_msg msg = {.addr = t->tda827x_addr, .flags=0, - .buf=tda8275_init, .len = 14}; + .buf=tda8275_init, .len = 14}; if (t->tda827x_ver != 0) msg.buf = tda8275a_init; |