diff options
-rw-r--r-- | Documentation/video4linux/CARDLIST.saa7134 | 1 | ||||
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 118 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 33 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 1 | ||||
-rw-r--r-- | drivers/media/video/tda8290.c | 2 |
5 files changed, 153 insertions, 2 deletions
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index c5ae8a32f756..9b3ef0031ef6 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -75,3 +75,4 @@ | |||
75 | 74 -> LifeView FlyTV Platinum Mini2 [14c0:1212] | 75 | 74 -> LifeView FlyTV Platinum Mini2 [14c0:1212] |
76 | 75 -> AVerMedia AVerTVHD MCE A180 [1461:1044] | 76 | 75 -> AVerMedia AVerTVHD MCE A180 [1461:1044] |
77 | 76 -> SKNet MonsterTV Mobile [1131:4ee9] | 77 | 76 -> SKNet MonsterTV Mobile [1131:4ee9] |
78 | 77 -> Pinnacle PCTV 110i (saa7133) [11bd:002e] | ||
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 12f1053137da..0cd1fc89b2d0 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -122,6 +122,64 @@ static IR_KEYTAB_TYPE ir_codes_purpletv[IR_KEYTAB_SIZE] = { | |||
122 | 122 | ||
123 | }; | 123 | }; |
124 | 124 | ||
125 | static IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE] = { | ||
126 | [ 0x59 ] = KEY_MUTE, | ||
127 | [ 0x4a ] = KEY_POWER, | ||
128 | |||
129 | [ 0x18 ] = KEY_TEXT, | ||
130 | [ 0x26 ] = KEY_TV, | ||
131 | [ 0x3d ] = KEY_PRINT, | ||
132 | |||
133 | [ 0x48 ] = KEY_RED, | ||
134 | [ 0x04 ] = KEY_GREEN, | ||
135 | [ 0x11 ] = KEY_YELLOW, | ||
136 | [ 0x00 ] = KEY_BLUE, | ||
137 | |||
138 | [ 0x2d ] = KEY_VOLUMEUP, | ||
139 | [ 0x1e ] = KEY_VOLUMEDOWN, | ||
140 | |||
141 | [ 0x49 ] = KEY_MENU, | ||
142 | |||
143 | [ 0x16 ] = KEY_CHANNELUP, | ||
144 | [ 0x17 ] = KEY_CHANNELDOWN, | ||
145 | |||
146 | [ 0x20 ] = KEY_UP, | ||
147 | [ 0x21 ] = KEY_DOWN, | ||
148 | [ 0x22 ] = KEY_LEFT, | ||
149 | [ 0x23 ] = KEY_RIGHT, | ||
150 | [ 0x0d ] = KEY_SELECT, | ||
151 | |||
152 | |||
153 | |||
154 | [ 0x08 ] = KEY_BACK, | ||
155 | [ 0x07 ] = KEY_REFRESH, | ||
156 | |||
157 | [ 0x2f ] = KEY_ZOOM, | ||
158 | [ 0x29 ] = KEY_RECORD, | ||
159 | |||
160 | [ 0x4b ] = KEY_PAUSE, | ||
161 | [ 0x4d ] = KEY_REWIND, | ||
162 | [ 0x2e ] = KEY_PLAY, | ||
163 | [ 0x4e ] = KEY_FORWARD, | ||
164 | [ 0x53 ] = KEY_PREVIOUS, | ||
165 | [ 0x4c ] = KEY_STOP, | ||
166 | [ 0x54 ] = KEY_NEXT, | ||
167 | |||
168 | [ 0x69 ] = KEY_KP0, | ||
169 | [ 0x6a ] = KEY_KP1, | ||
170 | [ 0x6b ] = KEY_KP2, | ||
171 | [ 0x6c ] = KEY_KP3, | ||
172 | [ 0x6d ] = KEY_KP4, | ||
173 | [ 0x6e ] = KEY_KP5, | ||
174 | [ 0x6f ] = KEY_KP6, | ||
175 | [ 0x70 ] = KEY_KP7, | ||
176 | [ 0x71 ] = KEY_KP8, | ||
177 | [ 0x72 ] = KEY_KP9, | ||
178 | |||
179 | [ 0x74 ] = KEY_CHANNEL, | ||
180 | [ 0x0a ] = KEY_BACKSPACE, | ||
181 | }; | ||
182 | |||
125 | /* ----------------------------------------------------------------------- */ | 183 | /* ----------------------------------------------------------------------- */ |
126 | /* insmod parameters */ | 184 | /* insmod parameters */ |
127 | 185 | ||
@@ -245,6 +303,58 @@ static int get_key_purpletv(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | |||
245 | *ir_raw = b; | 303 | *ir_raw = b; |
246 | return 1; | 304 | return 1; |
247 | } | 305 | } |
306 | |||
307 | /* The new pinnacle PCTV remote (with the colored buttons) | ||
308 | * | ||
309 | * Ricardo Cerqueira <v4l@cerqueira.org> | ||
310 | */ | ||
311 | |||
312 | static int get_key_pinnacle(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) | ||
313 | { | ||
314 | unsigned char b[4]; | ||
315 | unsigned int start = 0,parity = 0,code = 0; | ||
316 | |||
317 | /* poll IR chip */ | ||
318 | if (4 != i2c_master_recv(&ir->c,b,4)) { | ||
319 | dprintk(1,"read error\n"); | ||
320 | return -EIO; | ||
321 | } | ||
322 | |||
323 | for (start = 0; start<4; start++) { | ||
324 | if (b[start] == 0x80) { | ||
325 | code=b[(start+3)%4]; | ||
326 | parity=b[(start+2)%4]; | ||
327 | } | ||
328 | } | ||
329 | |||
330 | /* Empty Request */ | ||
331 | if (parity==0) | ||
332 | return 0; | ||
333 | |||
334 | /* Repeating... */ | ||
335 | if (ir->old == parity) | ||
336 | return 0; | ||
337 | |||
338 | |||
339 | ir->old = parity; | ||
340 | |||
341 | /* Reduce code value to fit inside IR_KEYTAB_SIZE | ||
342 | * | ||
343 | * this is the only value that results in 42 unique | ||
344 | * codes < 128 | ||
345 | */ | ||
346 | |||
347 | code %= 0x88; | ||
348 | |||
349 | *ir_raw = code; | ||
350 | *ir_key = code; | ||
351 | |||
352 | dprintk(1,"Pinnacle PCTV key %02x\n", code); | ||
353 | |||
354 | return 1; | ||
355 | } | ||
356 | |||
357 | |||
248 | /* ----------------------------------------------------------------------- */ | 358 | /* ----------------------------------------------------------------------- */ |
249 | 359 | ||
250 | static void ir_key_poll(struct IR_i2c *ir) | 360 | static void ir_key_poll(struct IR_i2c *ir) |
@@ -350,6 +460,12 @@ static int ir_attach(struct i2c_adapter *adap, int addr, | |||
350 | ir_type = IR_TYPE_OTHER; | 460 | ir_type = IR_TYPE_OTHER; |
351 | ir_codes = ir_codes_empty; | 461 | ir_codes = ir_codes_empty; |
352 | break; | 462 | break; |
463 | case 0x47: | ||
464 | name = "Pinnacle PCTV"; | ||
465 | ir->get_key = get_key_pinnacle; | ||
466 | ir_type = IR_TYPE_OTHER; | ||
467 | ir_codes = ir_codes_pinnacle; | ||
468 | break; | ||
353 | case 0x7a: | 469 | case 0x7a: |
354 | name = "Purple TV"; | 470 | name = "Purple TV"; |
355 | ir->get_key = get_key_purpletv; | 471 | ir->get_key = get_key_purpletv; |
@@ -426,7 +542,7 @@ static int ir_probe(struct i2c_adapter *adap) | |||
426 | */ | 542 | */ |
427 | 543 | ||
428 | static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1}; | 544 | static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1}; |
429 | static const int probe_saa7134[] = { 0x7a, -1 }; | 545 | static const int probe_saa7134[] = { 0x7a, 0x47, -1 }; |
430 | static const int probe_em2820[] = { 0x30, 0x47, -1 }; | 546 | static const int probe_em2820[] = { 0x30, 0x47, -1 }; |
431 | const int *probe = NULL; | 547 | const int *probe = NULL; |
432 | struct i2c_client c; | 548 | struct i2c_client c; |
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index a60d49af341d..0147d8342f8d 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -2391,6 +2391,33 @@ struct saa7134_board saa7134_boards[] = { | |||
2391 | .amux = LINE1, | 2391 | .amux = LINE1, |
2392 | }}, | 2392 | }}, |
2393 | }, | 2393 | }, |
2394 | [SAA7134_BOARD_PINNACLE_PCTV_110i] = { | ||
2395 | .name = "Pinnacle PCTV 110i (saa7133)", | ||
2396 | .audio_clock = 0x00187de7, | ||
2397 | .tuner_type = TUNER_PHILIPS_TDA8290, | ||
2398 | .radio_type = UNSET, | ||
2399 | .tuner_addr = ADDR_UNSET, | ||
2400 | .radio_addr = ADDR_UNSET, | ||
2401 | .gpiomask = 0x080200000, | ||
2402 | .inputs = {{ | ||
2403 | .name = name_tv, | ||
2404 | .vmux = 4, | ||
2405 | .amux = TV, | ||
2406 | .tv = 1, | ||
2407 | },{ | ||
2408 | .name = name_comp1, | ||
2409 | .vmux = 1, | ||
2410 | .amux = LINE2, | ||
2411 | },{ | ||
2412 | .name = name_svideo, | ||
2413 | .vmux = 8, | ||
2414 | .amux = LINE2, | ||
2415 | }}, | ||
2416 | .radio = { | ||
2417 | .name = name_radio, | ||
2418 | .amux = LINE1, | ||
2419 | }, | ||
2420 | }, | ||
2394 | }; | 2421 | }; |
2395 | 2422 | ||
2396 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); | 2423 | const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); |
@@ -2809,6 +2836,12 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
2809 | .subdevice = 0x4ee9, | 2836 | .subdevice = 0x4ee9, |
2810 | .driver_data = SAA7134_BOARD_MONSTERTV_MOBILE, | 2837 | .driver_data = SAA7134_BOARD_MONSTERTV_MOBILE, |
2811 | },{ | 2838 | },{ |
2839 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
2840 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
2841 | .subvendor = 0x11bd, | ||
2842 | .subdevice = 0x002e, | ||
2843 | .driver_data = SAA7134_BOARD_PINNACLE_PCTV_110i, | ||
2844 | },{ | ||
2812 | /* --- boards without eeprom + subsystem ID --- */ | 2845 | /* --- boards without eeprom + subsystem ID --- */ |
2813 | .vendor = PCI_VENDOR_ID_PHILIPS, | 2846 | .vendor = PCI_VENDOR_ID_PHILIPS, |
2814 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | 2847 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index cd28a6a7b972..d497fea5425f 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -203,6 +203,7 @@ struct saa7134_format { | |||
203 | #define SAA7134_BOARD_FLYTVPLATINUM_MINI2 74 | 203 | #define SAA7134_BOARD_FLYTVPLATINUM_MINI2 74 |
204 | #define SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180 75 | 204 | #define SAA7134_BOARD_AVERMEDIA_AVERTVHD_A180 75 |
205 | #define SAA7134_BOARD_MONSTERTV_MOBILE 76 | 205 | #define SAA7134_BOARD_MONSTERTV_MOBILE 76 |
206 | #define SAA7134_BOARD_PINNACLE_PCTV_110i 77 | ||
206 | 207 | ||
207 | #define SAA7134_MAXBOARDS 8 | 208 | #define SAA7134_MAXBOARDS 8 |
208 | #define SAA7134_INPUT_MAX 8 | 209 | #define SAA7134_INPUT_MAX 8 |
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c index 8f9d7d1fd3f4..fa9b4b898f68 100644 --- a/drivers/media/video/tda8290.c +++ b/drivers/media/video/tda8290.c | |||
@@ -487,7 +487,7 @@ static void tda8290_init_tuner(struct i2c_client *c) | |||
487 | unsigned char tda8275a_init[] = { 0x00, 0x00, 0x00, 0x00, 0xdC, 0x05, 0x8b, | 487 | unsigned char tda8275a_init[] = { 0x00, 0x00, 0x00, 0x00, 0xdC, 0x05, 0x8b, |
488 | 0x0c, 0x04, 0x20, 0xFF, 0x00, 0x00, 0x4b }; | 488 | 0x0c, 0x04, 0x20, 0xFF, 0x00, 0x00, 0x4b }; |
489 | struct i2c_msg msg = {.addr = t->tda827x_addr, .flags=0, | 489 | struct i2c_msg msg = {.addr = t->tda827x_addr, .flags=0, |
490 | .buf=tda8275_init, .len = 14}; | 490 | .buf=tda8275_init, .len = 14}; |
491 | if (t->tda827x_ver != 0) | 491 | if (t->tda827x_ver != 0) |
492 | msg.buf = tda8275a_init; | 492 | msg.buf = tda8275a_init; |
493 | 493 | ||