summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c4
-rw-r--r--linux/drivers/media/video/cx88/cx88-cards.c31
-rw-r--r--linux/drivers/media/video/cx88/cx88-input.c106
-rw-r--r--linux/drivers/media/video/cx88/cx88.h3
4 files changed, 37 insertions, 107 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index e66467e7d..b981cd54a 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-blackbird.c,v 1.24 2005/01/31 11:35:05 kraxel Exp $
+ * $Id: cx88-blackbird.c,v 1.25 2005/02/16 13:11:55 kraxel Exp $
*
* Support for a cx23416 mpeg encoder via cx2388x host port.
* "blackbird" reference design.
@@ -857,6 +857,8 @@ static void __devexit blackbird_remove(struct pci_dev *pci_dev)
/* common */
cx8802_fini_common(dev);
+ cx88_core_put(dev->core,dev->pci);
+ kfree(dev);
}
static struct pci_device_id cx8802_pci_tbl[] = {
diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c
index a74ef661d..d9c19d51a 100644
--- a/linux/drivers/media/video/cx88/cx88-cards.c
+++ b/linux/drivers/media/video/cx88/cx88-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-cards.c,v 1.63 2005/02/15 15:59:34 kraxel Exp $
+ * $Id: cx88-cards.c,v 1.64 2005/02/16 13:11:55 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* card-specific stuff.
@@ -558,6 +558,31 @@ struct cx88_board cx88_boards[] = {
},
.blackbird = 1,
},
+ [CX88_BOARD_DIGITALLOGIC_MEC] = {
+ /* params copied over from Leadtek PVR 2000 */
+ .name = "Digital-Logic MICROSPACE Entertainment Center (MEC)",
+ /* not sure yet about the tuner type */
+ .tuner_type = 38,
+ .tda9887_conf = TDA9887_PRESENT,
+ .input = {{
+ .type = CX88_VMUX_TELEVISION,
+ .vmux = 0,
+ .gpio0 = 0x0000bde6,
+ },{
+ .type = CX88_VMUX_COMPOSITE1,
+ .vmux = 1,
+ .gpio0 = 0x0000bde6,
+ },{
+ .type = CX88_VMUX_SVIDEO,
+ .vmux = 2,
+ .gpio0 = 0x0000bde6,
+ }},
+ .radio = {
+ .type = CX88_RADIO,
+ .gpio0 = 0x0000bd62,
+ },
+ .blackbird = 1,
+ },
};
const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
@@ -665,6 +690,10 @@ struct cx88_subid cx88_subids[] = {
.subvendor = 0x0070,
.subdevice = 0x2801,
.card = CX88_BOARD_HAUPPAUGE_ROSLYN,
+ },{
+ .subvendor = 0x14F1,
+ .subdevice = 0x0342,
+ .card = CX88_BOARD_DIGITALLOGIC_MEC,
}
};
const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c
index d6266e51a..9029c818e 100644
--- a/linux/drivers/media/video/cx88/cx88-input.c
+++ b/linux/drivers/media/video/cx88/cx88-input.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-input.c,v 1.6 2005/02/09 19:27:21 kraxel Exp $
+ * $Id: cx88-input.c,v 1.7 2005/02/16 13:11:55 kraxel Exp $
*
* Device driver for GPIO attached remote control interfaces
* on Conexant 2388x based TV/DVB cards.
@@ -73,46 +73,6 @@ static IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE] = {
[ 0x1f ] = KEY_VOLUMEDOWN, // 'volume -'
};
-/* Happauge: the newer, gray remote */
-static IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE] = {
- [ 0x00 ] = KEY_KP0, // 0
- [ 0x01 ] = KEY_KP1, // 1
- [ 0x02 ] = KEY_KP2, // 2
- [ 0x03 ] = KEY_KP3, // 3
- [ 0x04 ] = KEY_KP4, // 4
- [ 0x05 ] = KEY_KP5, // 5
- [ 0x06 ] = KEY_KP6, // 6
- [ 0x07 ] = KEY_KP7, // 7
- [ 0x08 ] = KEY_KP8, // 8
- [ 0x09 ] = KEY_KP9, // 9
- [ 0x0b ] = KEY_RED, // red button
- [ 0x0c ] = KEY_OPTION, // black key without text
- [ 0x0d ] = KEY_MENU, // menu
- [ 0x0f ] = KEY_MUTE, // mute
- [ 0x10 ] = KEY_VOLUMEUP, // volume +
- [ 0x11 ] = KEY_VOLUMEDOWN, // volume -
- [ 0x1e ] = KEY_NEXT, // skip >|
- [ 0x1f ] = KEY_EXIT, // back/exit
- [ 0x20 ] = KEY_CHANNELUP, // channel / program +
- [ 0x21 ] = KEY_CHANNELDOWN, // channel / program -
- [ 0x22 ] = KEY_CHANNEL, // source (old black remote)
- [ 0x24 ] = KEY_PREVIOUS, // replay |<
- [ 0x25 ] = KEY_ENTER, // OK
- [ 0x26 ] = KEY_SLEEP, // minimize (old black remote)
- [ 0x29 ] = KEY_BLUE, // blue key
- [ 0x2e ] = KEY_GREEN, // green button
- [ 0x30 ] = KEY_PAUSE, // pause
- [ 0x32 ] = KEY_REWIND, // backward <<
- [ 0x34 ] = KEY_FASTFORWARD, // forward >>
- [ 0x35 ] = KEY_PLAY, // play
- [ 0x36 ] = KEY_STOP, // stop
- [ 0x37 ] = KEY_RECORD, // recording
- [ 0x38 ] = KEY_YELLOW, // yellow key
- [ 0x3b ] = KEY_SELECT, // top right button
- [ 0x3c ] = KEY_ZOOM, // full
- [ 0x3d ] = KEY_POWER, // system power (green button)
-};
-
/* ---------------------------------------------------------------------- */
struct cx88_IR {
@@ -309,68 +269,6 @@ int cx88_ir_fini(struct cx88_core *core)
/* ---------------------------------------------------------------------- */
-static int inline getbit(u32 *samples, int bit)
-{
- return (samples[bit/32] & (1 << (31-(bit%32)))) ? 1 : 0;
-}
-
-static int dump_samples(u32 *samples, int count)
-{
- int i, bit, start;
-
- printk(KERN_DEBUG "ir samples @ 4kHz: ");
- start = 0;
- for (i = 0; i < count * 32; i++) {
- bit = getbit(samples,i);
- if (bit)
- start = 1;
- if (0 == start)
- continue;
- printk("%s", bit ? "#" : "_");
- }
- printk("\n");
-}
-
-static int ir_decode_biphase(u32 *samples, int count, int low, int high)
-{
- int i,last,bit,len,flips;
- u32 value;
-
- /* find start bit (1) */
- for (i = 0; i < 32; i++) {
- bit = getbit(samples,i);
- if (bit)
- break;
- }
-
- /* go decoding */
- len = 0;
- flips = 0;
- value = 1;
- for (; i < count * 32; i++) {
- if (len > high)
- break;
- if (flips > 1)
- break;
- last = bit;
- bit = getbit(samples,i);
- if (last == bit) {
- len++;
- continue;
- }
- if (len < low) {
- len++;
- flips++;
- continue;
- }
- value <<= 1;
- value |= bit;
- flips = 0;
- len = 1;
- }
- return value;
-}
-
void cx88_ir_irq(struct cx88_core *core)
{
struct cx88_IR *ir = core->ir;
@@ -402,7 +300,7 @@ void cx88_ir_irq(struct cx88_core *core)
for (i = 0; i < ir->scount; i++)
ir->samples[i] = ~ir->samples[i];
if (ir_debug)
- dump_samples(ir->samples,ir->scount);
+ ir_dump_samples(ir->samples,ir->scount);
/* decode it */
switch (core->board) {
diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h
index 0e0cdc380..de7547b17 100644
--- a/linux/drivers/media/video/cx88/cx88.h
+++ b/linux/drivers/media/video/cx88/cx88.h
@@ -1,5 +1,5 @@
/*
- * $Id: cx88.h,v 1.52 2005/02/14 16:30:26 kraxel Exp $
+ * $Id: cx88.h,v 1.53 2005/02/16 13:11:55 kraxel Exp $
*
* v4l2 device driver for cx2388x based TV cards
*
@@ -161,6 +161,7 @@ extern struct sram_channel cx88_sram_channels[];
#define CX88_BOARD_PCHDTV_HD3000 22
#define CX88_BOARD_DNTV_LIVE_DVB_T 23
#define CX88_BOARD_HAUPPAUGE_ROSLYN 24
+#define CX88_BOARD_DIGITALLOGIC_MEC 25
enum cx88_itype {
CX88_VMUX_COMPOSITE1 = 1,