diff options
author | Janne Grunau <janne-dvb@grunau.be> | 2007-07-30 12:50:28 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:03:45 -0400 |
commit | 82f3d5594240adcd8d6764cf31dffc473a6cc1d0 (patch) | |
tree | 19dd90ef274bfbd2338445ee54c8a44f47e9d71f /drivers/media/dvb | |
parent | 01373a5c97ced83d4cb520f7e56c80454a198bfb (diff) |
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>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_devices.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 558ab3bd6889..994e5b8d44a2 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -264,7 +264,7 @@ static int stk7700d_tuner_attach(struct dvb_usb_adapter *adap) | |||
264 | 264 | ||
265 | static u8 rc_request[] = { REQUEST_POLL_RC, 0 }; | 265 | static u8 rc_request[] = { REQUEST_POLL_RC, 0 }; |
266 | 266 | ||
267 | static int stk7700d_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | 267 | static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state) |
268 | { | 268 | { |
269 | u8 key[4]; | 269 | u8 key[4]; |
270 | int i; | 270 | int i; |
@@ -274,7 +274,7 @@ static int stk7700d_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
274 | *state = REMOTE_NO_KEY_PRESSED; | 274 | *state = REMOTE_NO_KEY_PRESSED; |
275 | i=dib0700_ctrl_rd(d,rc_request,2,key,4); | 275 | i=dib0700_ctrl_rd(d,rc_request,2,key,4); |
276 | if (i<=0) { | 276 | if (i<=0) { |
277 | err("stk7700d:RC Query Failed\n"); | 277 | err("RC Query Failed\n"); |
278 | return 0; | 278 | return 0; |
279 | } | 279 | } |
280 | if (key[0]==0 && key[1]==0 && key[2]==0 && key[3]==0) return 0; | 280 | 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) | |||
287 | return 0; | 287 | return 0; |
288 | } | 288 | } |
289 | } | 289 | } |
290 | err("stk7700d:Unknown remote controller key : %2X %2X\n",(int)key[2],(int)key[3]); | 290 | err("Unknown remote controller key : %2X %2X\n",(int)key[2],(int)key[3]); |
291 | } | 291 | } |
292 | return 0; | 292 | return 0; |
293 | } | 293 | } |
294 | 294 | ||
295 | #define KEY_MAP_SIZE (25+48) | 295 | static struct dvb_usb_rc_key dib0700_rc_keys[] = { |
296 | |||
297 | static struct dvb_usb_rc_key stk7700d_rc_keys[] = { | ||
298 | /* Key codes for the tiny Pinnacle remote*/ | 296 | /* Key codes for the tiny Pinnacle remote*/ |
299 | { 0x07, 0x00, KEY_MUTE }, | 297 | { 0x07, 0x00, KEY_MUTE }, |
300 | { 0x07, 0x01, KEY_MENU }, // Pinnacle logo | 298 | { 0x07, 0x01, KEY_MENU }, // Pinnacle logo |
@@ -370,7 +368,7 @@ static struct dvb_usb_rc_key stk7700d_rc_keys[] = { | |||
370 | { 0xeb, 0x54, KEY_PREVIOUS }, | 368 | { 0xeb, 0x54, KEY_PREVIOUS }, |
371 | { 0xeb, 0x58, KEY_RECORD }, | 369 | { 0xeb, 0x58, KEY_RECORD }, |
372 | { 0xeb, 0x5c, KEY_NEXT } | 370 | { 0xeb, 0x5c, KEY_NEXT } |
373 | }; | 371 | }; |
374 | 372 | ||
375 | /* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */ | 373 | /* STK7700P: Hauppauge Nova-T Stick, AVerMedia Volar */ |
376 | static struct dibx000_agc_config stk7700p_7000m_mt2060_agc_config = { | 374 | static struct dibx000_agc_config stk7700p_7000m_mt2060_agc_config = { |
@@ -864,7 +862,12 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
864 | { &dib0700_usb_id_table[2], &dib0700_usb_id_table[3], NULL }, | 862 | { &dib0700_usb_id_table[2], &dib0700_usb_id_table[3], NULL }, |
865 | { NULL }, | 863 | { NULL }, |
866 | }, | 864 | }, |
867 | } | 865 | }, |
866 | |||
867 | .rc_interval = DEFAULT_RC_INTERVAL, | ||
868 | .rc_key_map = dib0700_rc_keys, | ||
869 | .rc_key_map_size = sizeof(dib0700_rc_keys), | ||
870 | .rc_query = dib0700_rc_query | ||
868 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 871 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
869 | 872 | ||
870 | .num_adapters = 2, | 873 | .num_adapters = 2, |
@@ -901,10 +904,11 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
901 | { NULL }, | 904 | { NULL }, |
902 | }, | 905 | }, |
903 | }, | 906 | }, |
907 | |||
904 | .rc_interval = DEFAULT_RC_INTERVAL, | 908 | .rc_interval = DEFAULT_RC_INTERVAL, |
905 | .rc_key_map = stk7700d_rc_keys, | 909 | .rc_key_map = dib0700_rc_keys, |
906 | .rc_key_map_size = KEY_MAP_SIZE, | 910 | .rc_key_map_size = sizeof(dib0700_rc_keys), |
907 | .rc_query = stk7700d_rc_query | 911 | .rc_query = dib0700_rc_query |
908 | 912 | ||
909 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 913 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
910 | 914 | ||