Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13379
b: refs/heads/master
c: c2f6f9d
h: refs/heads/master
i:
  13377: 6f1e19c
  13375: 2dd02c0
v: v3
  • Loading branch information
Ricardo Cerqueira authored and Linus Torvalds committed Nov 9, 2005
1 parent 343626d commit f0a4e50
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a741ec9b87ac13f13a1dfcb05979d7c785d0755
refs/heads/master: c2f6f9d866d3ea25eebe32c6c51e47e5141669cf
1 change: 1 addition & 0 deletions trunk/Documentation/video4linux/CARDLIST.saa7134
Original file line number Diff line number Diff line change
Expand Up @@ -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]
118 changes: 117 additions & 1 deletion trunk/drivers/media/video/ir-kbd-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,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 */

Expand Down Expand Up @@ -245,6 +303,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)
Expand Down Expand Up @@ -350,6 +460,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;
Expand Down Expand Up @@ -426,7 +542,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;
Expand Down
33 changes: 33 additions & 0 deletions trunk/drivers/media/video/saa7134/saa7134-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -2391,6 +2391,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);
Expand Down Expand Up @@ -2808,6 +2835,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x1131,
.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,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/saa7134/saa7134.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,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
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/tda8290.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,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;

Expand Down

0 comments on commit f0a4e50

Please sign in to comment.