aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/video4linux/CARDLIST.cx881
-rw-r--r--drivers/media/common/ir-keymaps.c48
-rw-r--r--drivers/media/video/cx88/cx88-cards.c20
-rw-r--r--drivers/media/video/cx88/cx88-core.c2
-rw-r--r--drivers/media/video/cx88/cx88-input.c17
-rw-r--r--drivers/media/video/cx88/cx88.h1
-rw-r--r--include/media/ir-common.h1
7 files changed, 88 insertions, 2 deletions
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index d692a35ef1cc..348b67ddc36b 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -52,3 +52,4 @@
52 51 -> WinFast DTV2000 H [107d:665e] 52 51 -> WinFast DTV2000 H [107d:665e]
53 52 -> Geniatech DVB-S [14f1:0084] 53 52 -> Geniatech DVB-S [14f1:0084]
54 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404] 54 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T [0070:1404]
55 54 -> Norwood Micro TV Tuner
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c
index ca98d9478947..ce1281445dde 100644
--- a/drivers/media/common/ir-keymaps.c
+++ b/drivers/media/common/ir-keymaps.c
@@ -1473,3 +1473,51 @@ IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE] = {
1473}; 1473};
1474 1474
1475EXPORT_SYMBOL_GPL(ir_codes_npgtech); 1475EXPORT_SYMBOL_GPL(ir_codes_npgtech);
1476
1477/* Norwood Micro (non-Pro) TV Tuner
1478 By Peter Naulls <peter@chocky.org>
1479 Key comments are the functions given in the manual */
1480IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE] = {
1481 /* Keys 0 to 9 */
1482 [ 0x20 ] = KEY_0,
1483 [ 0x21 ] = KEY_1,
1484 [ 0x22 ] = KEY_2,
1485 [ 0x23 ] = KEY_3,
1486 [ 0x24 ] = KEY_4,
1487 [ 0x25 ] = KEY_5,
1488 [ 0x26 ] = KEY_6,
1489 [ 0x27 ] = KEY_7,
1490 [ 0x28 ] = KEY_8,
1491 [ 0x29 ] = KEY_9,
1492
1493 [ 0x78 ] = KEY_TUNER, /* Video Source */
1494 [ 0x2c ] = KEY_EXIT, /* Open/Close software */
1495 [ 0x2a ] = KEY_SELECT, /* 2 Digit Select */
1496 [ 0x69 ] = KEY_AGAIN, /* Recall */
1497
1498 [ 0x32 ] = KEY_BRIGHTNESSUP, /* Brightness increase */
1499 [ 0x33 ] = KEY_BRIGHTNESSDOWN, /* Brightness decrease */
1500 [ 0x6b ] = KEY_KPPLUS, /* (not named >>>>>) */
1501 [ 0x6c ] = KEY_KPMINUS, /* (not named <<<<<) */
1502
1503 [ 0x2d ] = KEY_MUTE, /* Mute */
1504 [ 0x30 ] = KEY_VOLUMEUP, /* Volume up */
1505 [ 0x31 ] = KEY_VOLUMEDOWN, /* Volume down */
1506 [ 0x60 ] = KEY_CHANNELUP, /* Channel up */
1507 [ 0x61 ] = KEY_CHANNELDOWN, /* Channel down */
1508
1509 [ 0x3f ] = KEY_RECORD, /* Record */
1510 [ 0x37 ] = KEY_PLAY, /* Play */
1511 [ 0x36 ] = KEY_PAUSE, /* Pause */
1512 [ 0x2b ] = KEY_STOP, /* Stop */
1513 [ 0x67 ] = KEY_FASTFORWARD, /* Foward */
1514 [ 0x66 ] = KEY_REWIND, /* Rewind */
1515 [ 0x3e ] = KEY_SEARCH, /* Auto Scan */
1516 [ 0x2e ] = KEY_CAMERA, /* Capture Video */
1517 [ 0x6d ] = KEY_MENU, /* Show/Hide Control */
1518 [ 0x2f ] = KEY_ZOOM, /* Full Screen */
1519 [ 0x34 ] = KEY_RADIO, /* FM */
1520 [ 0x65 ] = KEY_POWER, /* Computer power */
1521};
1522
1523EXPORT_SYMBOL_GPL(ir_codes_norwood);
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index afd50b465df7..83bfcecee2d3 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1231,6 +1231,26 @@ struct cx88_board cx88_boards[] = {
1231 .gpio0 = 0x84bf, 1231 .gpio0 = 0x84bf,
1232 }}, 1232 }},
1233 }, 1233 },
1234 [CX88_BOARD_NORWOOD_MICRO] = {
1235 .name = "Norwood Micro TV Tuner",
1236 .tuner_type = TUNER_TNF_5335MF,
1237 .radio_type = UNSET,
1238 .tuner_addr = ADDR_UNSET,
1239 .radio_addr = ADDR_UNSET,
1240 .input = {{
1241 .type = CX88_VMUX_TELEVISION,
1242 .vmux = 0,
1243 .gpio0 = 0x0709,
1244 },{
1245 .type = CX88_VMUX_COMPOSITE1,
1246 .vmux = 1,
1247 .gpio0 = 0x070b,
1248 },{
1249 .type = CX88_VMUX_SVIDEO,
1250 .vmux = 2,
1251 .gpio0 = 0x070b,
1252 }},
1253 },
1234}; 1254};
1235const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); 1255const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
1236 1256
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c
index 973d3f39b2d5..d72e177607a7 100644
--- a/drivers/media/video/cx88/cx88-core.c
+++ b/drivers/media/video/cx88/cx88-core.c
@@ -105,7 +105,7 @@ static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist,
105 *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset); 105 *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset);
106 offset+=bpl; 106 offset+=bpl;
107 } else { 107 } else {
108 /* scanline needs to be splitted */ 108 /* scanline needs to be split */
109 todo = bpl; 109 todo = bpl;
110 *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL| 110 *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL|
111 (sg_dma_len(sg)-offset)); 111 (sg_dma_len(sg)-offset));
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index c25564648993..3049bd5b5a48 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -107,7 +107,15 @@ static void cx88_ir_handle_key(struct cx88_IR *ir)
107 (gpio & ir->mask_keydown) ? " down" : "", 107 (gpio & ir->mask_keydown) ? " down" : "",
108 (gpio & ir->mask_keyup) ? " up" : ""); 108 (gpio & ir->mask_keyup) ? " up" : "");
109 109
110 if (ir->mask_keydown) { 110 if (ir->core->board == CX88_BOARD_NORWOOD_MICRO) {
111 u32 gpio_key = cx_read(MO_GP0_IO);
112
113 data = (data << 4) | ((gpio_key & 0xf0) >> 4);
114
115 ir_input_keydown(ir->input, &ir->ir, data, data);
116 ir_input_nokey(ir->input, &ir->ir);
117
118 } else if (ir->mask_keydown) {
111 /* bit set on keydown */ 119 /* bit set on keydown */
112 if (gpio & ir->mask_keydown) { 120 if (gpio & ir->mask_keydown) {
113 ir_input_keydown(ir->input, &ir->ir, data, data); 121 ir_input_keydown(ir->input, &ir->ir, data, data);
@@ -248,6 +256,13 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
248 ir_type = IR_TYPE_PD; 256 ir_type = IR_TYPE_PD;
249 ir->sampling = 0xff00; /* address */ 257 ir->sampling = 0xff00; /* address */
250 break; 258 break;
259 case CX88_BOARD_NORWOOD_MICRO:
260 ir_codes = ir_codes_norwood;
261 ir->gpio_addr = MO_GP1_IO;
262 ir->mask_keycode = 0x0e;
263 ir->mask_keyup = 0x80;
264 ir->polling = 50; /* ms */
265 break;
251 case CX88_BOARD_NPGTECH_REALTV_TOP10FM: 266 case CX88_BOARD_NPGTECH_REALTV_TOP10FM:
252 ir_codes = ir_codes_npgtech; 267 ir_codes = ir_codes_npgtech;
253 ir->gpio_addr = MO_GP0_IO; 268 ir->gpio_addr = MO_GP0_IO;
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index ce441e27f214..0405d6d0157a 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -198,6 +198,7 @@ extern struct sram_channel cx88_sram_channels[];
198#define CX88_BOARD_WINFAST_DTV2000H 51 198#define CX88_BOARD_WINFAST_DTV2000H 51
199#define CX88_BOARD_GENIATECH_DVBS 52 199#define CX88_BOARD_GENIATECH_DVBS 52
200#define CX88_BOARD_HAUPPAUGE_HVR3000 53 200#define CX88_BOARD_HAUPPAUGE_HVR3000 53
201#define CX88_BOARD_NORWOOD_MICRO 54
201 202
202enum cx88_itype { 203enum cx88_itype {
203 CX88_VMUX_COMPOSITE1 = 1, 204 CX88_VMUX_COMPOSITE1 = 1,
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 7bab09b0ed45..f883bc3aa70e 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -90,6 +90,7 @@ extern IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE];
90extern IR_KEYTAB_TYPE ir_codes_pinnacle_color[IR_KEYTAB_SIZE]; 90extern IR_KEYTAB_TYPE ir_codes_pinnacle_color[IR_KEYTAB_SIZE];
91extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE]; 91extern IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE];
92extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE]; 92extern IR_KEYTAB_TYPE ir_codes_npgtech[IR_KEYTAB_SIZE];
93extern IR_KEYTAB_TYPE ir_codes_norwood[IR_KEYTAB_SIZE];
93 94
94#endif 95#endif
95 96