[linux-dvb] Bug found in dvb-usb driver for avermedia

Doug Scoular dscoular at cisco.com
Sun Jun 26 13:45:30 CEST 2005


Hi Patrick,
	Doh! and of course I forgot to attach the diff!!!

	What a classic newbie mistake!

	Blush...

	Doug

On Sun, 26 Jun 2005, Doug Scoular wrote:

> Hi Patrick,
> 
> On Sun, 26 Jun 2005, Patrick Boettcher wrote:
> > Hi,
> > 
> > On Sun, 26 Jun 2005, Andrew Hodgson wrote:
> > > Thanks for you quick reply. Attached are the diffs for a800.c and
> > > dvb-usb-remote.c. The changes to a800.c are trivial just a few errors
> > > in the remote control codes.
> > 
> > > The other change was to make auto repeat work. Hope this helps and
> > > thanks for the great work. The dvb-usb box works wonderfully better
> > > than the PCI card which always had overheating problems
> > 
> > Yeah. After you saying you found bugs in dvb-usb-remote.c I had a look 
> > for myself and found them, too.
> > 
> 
> 	I have a shuttle sb61g2 with a Nova-T DVB-T PCI card
> 	(the one with the grey remote) and an AVerMedia AverTV
> 	DVB-T USB 2.0 (A800).
> 
> 	It looks like budget-ci.c module has problems similar
> 	to the a800 with auto repeat. A colleague of mine made
> 	some changes to the code to allow better handling
> 	of the repeats and I've been manually applying his
> 	changes each time I grab code from CVS.
> 
> 	I'm no driver coder so I don't fully understand what
> 	his changes entail or whether they make sense for
> 	all supported remotes, however it does make my
> 	grey hauppauge remote work wonderfully well. His
> 	method of selecting the keycodes was via a simple
> 	hash define (might be better using a module parameter
> 	IMHO). Anyway I just thought I'd send you the diffs
> 	to let you see them. This is for my Hauppauage Nova-T
> 	DVB-T card.
> 
> 	As I said, I also have a AVerMedia AverTV DVB-T
> 	USB 2.0 (A800) so I'm looking forward to any fixes
> 	for it's remote making their way into CVS. 
> 
> 	The other thing I've noticed with my a800 is that
> 	tzap works flawlessly with great quality, but
> 	when I use it with MythTV 0.18.1 it often fails to
> 	get FE_LOCK or the picture is very garbled. The
> 	Nova-T using the same antenna and tzap has no
> 	problems with either card.
> 
> 	Is there any reason tzap would work while MythTV
> 	has issues ? 
> 
> 	Any thoughts much appreciated.
>  -- 
>         Doug Scoular            "The big print giveth and the
>         UNIX Systems Architect   small print taketh away"
>         D: +61 2 8446 6035
>         M: +61 402 896747
>         E: dscoular at cisco.com
> 
> _______________________________________________
> linux-dvb mailing list
> linux-dvb at linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
> 

-- 
        Doug Scoular            "The big print giveth and the
        UNIX Systems Architect   small print taketh away"
        D: +61 2 8446 6035
        M: +61 402 896747
        E: dscoular at cisco.com
-------------- next part --------------
74a75,122
> #define HAUPPAGE_GREY_REMOTE_GENERIC
> 
> #ifdef HAUPPAGE_GREY_REMOTE_GENERIC
> static  u16 key_map[64] = {
> 	/* 0x0X */
> 	BTN_0, BTN_1, BTN_2, BTN_3, BTN_4, BTN_5, BTN_6, BTN_7, BTN_8,
> 	BTN_9,
> 	0,
> 	KEY_RED,
> 	KEY_OPTION, /* Reserved: No label */
> 	KEY_MENU, /* Menu */
> 	0,
> 	KEY_MUTE,
> 	/* 0x1X */
> 	KEY_VOLUMEUP, KEY_VOLUMEDOWN,
> 	0, 0, 0,
> 	0, 0, 0,
> 	0, 0, 0,
> 	0, 0, 0,
> 	KEY_FORWARD, // Skip forward
> 	KEY_EXIT, /* Back/Exit */
> 	/* 0x2X */
> 	KEY_CHANNELUP, KEY_CHANNELDOWN, //
> 	0, 0,
> 	KEY_BACK, // Skip back
> 	KEY_OK,
> 	0, 0, 0,
> 	KEY_BLUE,
> 	0, 0, 0, 0,
> 	KEY_GREEN,
> 	0,
> 	/* 0x3X */
> 	KEY_PAUSE,
> 	0,
> 	KEY_REWIND,
> 	0,
> 	KEY_FASTFORWARD,
> 	KEY_PLAY,
> 	KEY_STOP,
> 	KEY_RECORD,
> 	KEY_YELLOW,
> 	0, 0,
> 	KEY_GOTO, /* Go */
> 	KEY_INFO, /* Full Screen */
> 	KEY_POWER, /* On/Off */
> 	0, 0,
> };
> #else /* HAUPPAGE_GREY_REMOTE_GENERIC */
127a176
> #endif /* HAUPPAGE_GREY_REMOTE_GENERIC */
154,160c203,208
< 		if (timer_pending(&dev->timer)) {
< 			if (code == dev->repeat_key) {
< 				++dev->rep[0];
< 				return;
< 			}
< 			del_timer(&dev->timer);
< 			input_event(dev, EV_KEY, key_map[dev->repeat_key], !!0);
---
>         	if (timer_pending(&dev->timer) && code == dev->repeat_key) {
> 			/* Repeat of the previous key inside the timer */
>                        	++dev->rep[0];
> 		} else {
> 			dev->repeat_key = code;
> 			dev->rep[0] = 0;
169,173c217,218
< 		dev->repeat_key = code;
< 		/* Zenith remote _always_ sends 2 sequences */
< 		dev->rep[0] = ~0;
< 		/* 350 milliseconds */
< 		dev->timer.expires = jiffies + HZ * 350 / 1000;
---
> 		/* Set timer for 150ms (longer than the remote key repeat time) */
> 		dev->timer.expires = jiffies + HZ * 150 / 1000;
175c220,226
< 		input_event(dev, EV_KEY, key_map[code], !0);
---
> 		if (dev->rep[0]==0 || dev->rep[0]>10) {
>         		input_event(dev, EV_KEY, key_map[code], !0);
>         		input_event(dev, EV_KEY, key_map[code], !!0);
> 		}
> 		/* Delete and retrigger the timer */
>         	if (timer_pending(&dev->timer))
>                 	del_timer(&dev->timer);
198c249
< 	budget_ci->input_dev.timer.function = msp430_ir_debounce;
---
> 	//	budget_ci->input_dev.timer.function = msp430_ir_debounce;


More information about the linux-dvb mailing list