forked from Minki/linux
V4L/DVB (5956): Add remote control support for the Hauppauge Nova-T 500
This patch adds remote control support for the Hauppauge Nova-T 500 using the same keys as for STK7700PD. Signed-off-by: Janne Grunau <janne-dvb@grunau.be> Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
01373a5c97
commit
82f3d55942
@ -264,7 +264,7 @@ static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap)
|
|||||||
|
|
||||||
static u8 rc_request[] = { REQUEST_POLL_RC, 0 };
|
static u8 rc_request[] = { REQUEST_POLL_RC, 0 };
|
||||||
|
|
||||||
static int stk7700d_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
|
static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
|
||||||
{
|
{
|
||||||
u8 key[4];
|
u8 key[4];
|
||||||
int i;
|
int i;
|
||||||
@ -274,7 +274,7 @@ static int stk7700d_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
|
|||||||
*state = REMOTE_NO_KEY_PRESSED;
|
*state = REMOTE_NO_KEY_PRESSED;
|
||||||
i=dib0700_ctrl_rd(d,rc_request,2,key,4);
|
i=dib0700_ctrl_rd(d,rc_request,2,key,4);
|
||||||
if (i<=0) {
|
if (i<=0) {
|
||||||
err("stk7700d:RC Query Failed\n");
|
err("RC Query Failed\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (key[0]==0 && key[1]==0 && key[2]==0 && key[3]==0) return 0;
|
if (key[0]==0 && key[1]==0 && key[2]==0 && key[3]==0) return 0;
|
||||||
@ -287,14 +287,12 @@ static int stk7700d_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err("stk7700d:Unknown remote controller key : %2X %2X\n",(int)key[2],(int)key[3]);
|
err("Unknown remote controller key : %2X %2X\n",(int)key[2],(int)key[3]);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define KEY_MAP_SIZE (25+48)
|
static struct dvb_usb_rc_key dib0700_rc_keys[] = {
|
||||||
|
|
||||||
static struct dvb_usb_rc_key stk7700d_rc_keys[] = {
|
|
||||||
/* Key codes for the tiny Pinnacle remote*/
|
/* Key codes for the tiny Pinnacle remote*/
|
||||||
{ 0x07, 0x00, KEY_MUTE },
|
{ 0x07, 0x00, KEY_MUTE },
|
||||||
{ 0x07, 0x01, KEY_MENU }, // Pinnacle logo
|
{ 0x07, 0x01, KEY_MENU }, // Pinnacle logo
|
||||||
@ -370,7 +368,7 @@ static struct dvb_usb_rc_key stk7700d_rc_keys[] = {
|
|||||||
{ 0xeb, 0x54, KEY_PREVIOUS },
|
{ 0xeb, 0x54, KEY_PREVIOUS },
|
||||||
{ 0xeb, 0x58, KEY_RECORD },
|
{ 0xeb, 0x58, KEY_RECORD },
|
||||||
{ 0xeb, 0x5c, KEY_NEXT }
|
{ 0xeb, 0x5c, KEY_NEXT }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */
|
/* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */
|
||||||
static struct dibx000_agc_config stk7700p_7000m_mt2060_agc_config = {
|
static struct dibx000_agc_config stk7700p_7000m_mt2060_agc_config = {
|
||||||
@ -864,7 +862,12 @@ struct dvb_usb_device_properties dib0700_devices[] = {
|
|||||||
{ &dib0700_usb_id_table[2], &dib0700_usb_id_table[3], NULL },
|
{ &dib0700_usb_id_table[2], &dib0700_usb_id_table[3], NULL },
|
||||||
{ NULL },
|
{ NULL },
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
|
|
||||||
|
.rc_interval = DEFAULT_RC_INTERVAL,
|
||||||
|
.rc_key_map = dib0700_rc_keys,
|
||||||
|
.rc_key_map_size = sizeof(dib0700_rc_keys),
|
||||||
|
.rc_query = dib0700_rc_query
|
||||||
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
|
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
|
||||||
|
|
||||||
.num_adapters = 2,
|
.num_adapters = 2,
|
||||||
@ -901,10 +904,11 @@ struct dvb_usb_device_properties dib0700_devices[] = {
|
|||||||
{ NULL },
|
{ NULL },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
.rc_interval = DEFAULT_RC_INTERVAL,
|
.rc_interval = DEFAULT_RC_INTERVAL,
|
||||||
.rc_key_map = stk7700d_rc_keys,
|
.rc_key_map = dib0700_rc_keys,
|
||||||
.rc_key_map_size = KEY_MAP_SIZE,
|
.rc_key_map_size = sizeof(dib0700_rc_keys),
|
||||||
.rc_query = stk7700d_rc_query
|
.rc_query = dib0700_rc_query
|
||||||
|
|
||||||
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
|
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user