diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2006-07-24 11:41:55 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2006-07-24 11:41:55 -0400 |
commit | 56d40ce051f0d1ee88a7ab212aefd9b728f7ef4b (patch) | |
tree | 8a368f9686068e69e1a765a5bffed59bc28aa3d1 /linux/drivers/media/video | |
parent | db59f820f93562fa25bf5bee039df35dc162ebd6 (diff) | |
download | mediapointer-dvb-s2-56d40ce051f0d1ee88a7ab212aefd9b728f7ef4b.tar.gz mediapointer-dvb-s2-56d40ce051f0d1ee88a7ab212aefd9b728f7ef4b.tar.bz2 |
cx88: add support for Norwood PCI TV Tuner (non-pro)
From: Peter Naulls <peter@chocky.org>
This patch adds support for Norwood PCI TV Tuner (non-pro)
Signed-off-by: Peter Naulls <peter@chocky.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-cards.c | 20 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-input.c | 17 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 1 |
4 files changed, 38 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index e23fb7b0d..f842007c9 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -1264,6 +1264,26 @@ struct cx88_board cx88_boards[] = { .gpio0 = 0x84bf, }}, }, + [CX88_BOARD_NORWOOD_MICRO] = { + .name = "Norwood Micro TV Tuner", + .tuner_type = TUNER_TNF_5335MF, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .input = {{ + .type = CX88_VMUX_TELEVISION, + .vmux = 0, + .gpio0 = 0x0709, + },{ + .type = CX88_VMUX_COMPOSITE1, + .vmux = 1, + .gpio0 = 0x070b, + },{ + .type = CX88_VMUX_SVIDEO, + .vmux = 2, + .gpio0 = 0x070b, + }}, + }, }; const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index cc42730f8..fbbb6ecf5 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -121,7 +121,7 @@ static u32* cx88_risc_field(u32 *rp, struct scatterlist *sglist, *(rp++)=cpu_to_le32(sg_dma_address(sg)+offset); offset+=bpl; } else { - /* scanline needs to be splitted */ + /* scanline needs to be split */ todo = bpl; *(rp++)=cpu_to_le32(RISC_WRITE|RISC_SOL| (sg_dma_len(sg)-offset)); diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c index 72d76ab56..18165e7cb 100644 --- a/linux/drivers/media/video/cx88/cx88-input.c +++ b/linux/drivers/media/video/cx88/cx88-input.c @@ -108,7 +108,15 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) (gpio & ir->mask_keydown) ? " down" : "", (gpio & ir->mask_keyup) ? " up" : ""); - if (ir->mask_keydown) { + if (ir->core->board == CX88_BOARD_NORWOOD_MICRO) { + u32 gpio_key = cx_read(MO_GP0_IO); + + data = (data << 4) | ((gpio_key & 0xf0) >> 4); + + ir_input_keydown(ir->input, &ir->ir, data, data); + ir_input_nokey(ir->input, &ir->ir); + + } else if (ir->mask_keydown) { /* bit set on keydown */ if (gpio & ir->mask_keydown) { ir_input_keydown(ir->input, &ir->ir, data, data); @@ -249,6 +257,13 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ir_type = IR_TYPE_PD; ir->sampling = 0xff00; /* address */ break; + case CX88_BOARD_NORWOOD_MICRO: + ir_codes = ir_codes_norwood; + ir->gpio_addr = MO_GP1_IO; + ir->mask_keycode = 0x0e; + ir->mask_keyup = 0x80; + ir->polling = 50; /* ms */ + break; case CX88_BOARD_NPGTECH_REALTV_TOP10FM: ir_codes = ir_codes_npgtech; ir->gpio_addr = MO_GP0_IO; diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index d0d212c07..a85e5aeef 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -206,6 +206,7 @@ extern struct sram_channel cx88_sram_channels[]; #define CX88_BOARD_WINFAST_DTV2000H 51 #define CX88_BOARD_GENIATECH_DVBS 52 #define CX88_BOARD_HAUPPAUGE_HVR3000 53 +#define CX88_BOARD_NORWOOD_MICRO 54 enum cx88_itype { CX88_VMUX_COMPOSITE1 = 1, |