BUG RC latest v4l-dvb for Nova T-500 (dib0700)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

- Linux Ubuntu 07-04, kept up to date
- CPU0: AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
- 2 Hauppage cards
    Hauppauge Nova-T 500 Dual DVB-T
cx88[0]: subsystem: 0070:9402, board: Hauppauge WinTV-HVR1100 DVB-T/Hybrid [card=40,autodetected]
    cx88[0]: hauppauge eeprom: model=94009
    input: cx88 IR (Hauppauge WinTV-HVR110 as /class/input/input3

The remote from the 1100 works fine. The remote from the T-500 (original card), was not supported when I first compiled v4l-dvb in June. The code I picked up yesterday attempts to do so but fails and sends 2 lines to the log file every 150msec., very annoying. I had to patch the code to limit the output generated (patch included; I haven't coded in C in 15 years, so I didn't do anything fancy, a real patch should use a counter on a per card basis).
 Output:

Sep  1 17:43:28 mytv kernel: [   19.140000] dib0700: RC Query Failed
Sep 1 17:43:28 mytv kernel: [ 19.140000] dvb-usb: error while querying for an remote control event.
...

  My patch changes this to
Sep 1 22:15:39 mytv kernel: [ 14.888000] dib0700: Infrared Remote Failed (T-500 dib0700) Sep 1 22:15:39 mytv kernel: [ 14.888000] dvb-usb: error while querying for an remote control event.
... 10 times
Sep 1 22:15:39 mytv kernel: [ 16.292000] dvb-usb: error while querying for an remote control event. Sep 1 22:15:39 mytv kernel: [ 18.008000] dvb-usb: error while querying for an remote control event, stopping polling.

 We should avoid filling up /var...


Alain
*** dib0700_devices.c~	2007-09-01 17:15:53.000000000 +0200
--- dib0700_devices.c	2007-09-01 21:07:00.000000000 +0200
***************
*** 263,268 ****
--- 263,269 ----
  #define DEFAULT_RC_INTERVAL 150
  
  static u8 rc_request[] = { REQUEST_POLL_RC, 0 };
+ static int rc_not_connected = 0;
  
  static int dib0700_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
  {
***************
*** 274,280 ****
  	*state = REMOTE_NO_KEY_PRESSED;
  	i=dib0700_ctrl_rd(d,rc_request,2,key,4);
  	if (i<=0) {
! 		err("RC Query Failed");
  		return -1;
  	}
  	if (key[0]==0 && key[1]==0 && key[2]==0 && key[3]==0) return 0;
--- 275,284 ----
  	*state = REMOTE_NO_KEY_PRESSED;
  	i=dib0700_ctrl_rd(d,rc_request,2,key,4);
  	if (i<=0) {
! 	    if ( ! rc_not_connected ) {
! 		err("Infrared Remote Failed (T-500 dib0700)");
! 		rc_not_connected = 1;  /* Avoid repeating the message for ever */
! 	    }
  		return -1;
  	}
  	if (key[0]==0 && key[1]==0 && key[2]==0 && key[3]==0) return 0;
*** /usr/src/v4l-dvb.old/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c	2007-06-30 21:40:22.000000000 +0200
--- dvb-usb-remote.c	2007-09-01 22:10:27.000000000 +0200
***************
*** 19,24 ****
--- 19,25 ----
   *
   * TODO: Fix the repeat rate of the input device.
   */
+ static int remote_failed = 0;
  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
  static void dvb_usb_read_remote_control(void *data)
  #else
***************
*** 42,49 ****
--- 43,60 ----
  		return;
  
  	if (d->props.rc_query(d,&event,&state)) {
+ 	    if ( remote_failed < 10 ) {
  		err("error while querying for an remote control event.");
+ 		remote_failed++;
  		goto schedule;
+ 	    } else if ( remote_failed < 20 ) {
+ 		remote_failed++;
+ 		goto schedule;
+ 	    } else if ( remote_failed == 20 ) {
+ 		remote_failed++;
+ 		err("error while querying for an remote control event, stopping polling.");
+ 	    }
+ 	    return;
  	}
  
  
_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux