2006-11-13 16:34:09

by Michael Ira Krufky

[permalink] [raw]
Subject: Re: [linux-dvb] Avermedia 777 misbehaves after remote hack merged into v4l-dvb tree

Jos? Su?rez wrote:
> Hi to everybody.
>
> I am using an Avermedia 777 DVB-T pci card. It is a very nice card, and it's
> been working perfectly for the last weeks. However I decided to make an
> upgrade to the current revision of the v4l-dvb tree which includes support
> for the remote control. After the upgrade whenever I start the TV (with
> whatever program: kaffeine, mythtv,...) it happens just as if the TV card
> kept sending keyboard events all the time and as a result, the volume mutes,
> unmutes, amarok is launched,... (that's because I have a multimedia keyboard
> and some keys are mapped to do that). For example, when I launch mythbackend
> in a konsole window, the application starts, opens the TV card and suddenly
> what happens is like if keys got pressed, so for example there appears 771935
> in the console window.
> This happens all the time the TV card is open. I suggest that somebody takes a
> look at the remote control code because there must be the problem, as I have
> just installed the v4l-dvb revision which existed just before to the remote
> control commitment.
>
> All the best, Jos?

The author of that patch had explained that he was unable to test it. The patch
was merged into the v4l-dvb master development repository over the weekend, and
Mauro sent a pull request for this patch to go to 2.6.19 a few hours ago. I
don't know why this was sent to the 2.6.19 tree without first being tested. :-(

Mauro -- that patch needs fixing / more testing before it goes to mainstream...

Could you please remove that changeset from your git tree before Linus pulls it?

The problem changeset:

git commit 450efcfd2e1d941e302a8c89322fbfcef237be98

V4L/DVB (4814): Remote support for Avermedia 777

http://www.kernel.org/git/?p=linux/kernel/git/mchehab/v4l-dvb.git;a=commit;h=450efcfd2e1d941e302a8c89322fbfcef237be98


--
Michael Krufky


2006-11-13 16:44:51

by Linus Torvalds

[permalink] [raw]
Subject: Re: [linux-dvb] Avermedia 777 misbehaves after remote hack merged into v4l-dvb tree



On Mon, 13 Nov 2006, Michael Krufky wrote:
>
> Mauro -- that patch needs fixing / more testing before it goes to mainstream...
>
> Could you please remove that changeset from your git tree before Linus pulls it?

Too late. Already pulled and pushed out.

Looking at the patch, one obvious bug stands out: the new case statement
for SAA7134_BOARD_AVERMEDIA_777 doesn't have a "break" at the end.

Jos?, can you test this trivial patch and see if it fixes things?

Linus

---
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 7f62403..dee8355 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -202,6 +202,7 @@ int saa7134_input_init1(struct saa7134_d
/* Without this we won't receive key up events */
saa_setb(SAA7134_GPIO_GPMODE1, 0x1);
saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
+ break;
case SAA7134_BOARD_KWORLD_TERMINATOR:
ir_codes = ir_codes_pixelview;
mask_keycode = 0x00001f;

2006-11-13 21:14:37

by Michael Ira Krufky

[permalink] [raw]
Subject: Re: [linux-dvb] Avermedia 777 misbehaves after remote hack merged into v4l-dvb tree

Linus Torvalds wrote:
>
> On Mon, 13 Nov 2006, Michael Krufky wrote:
>> Mauro -- that patch needs fixing / more testing before it goes to mainstream...
>>
>> Could you please remove that changeset from your git tree before Linus pulls it?
>
> Too late. Already pulled and pushed out.
>
> Looking at the patch, one obvious bug stands out: the new case statement
> for SAA7134_BOARD_AVERMEDIA_777 doesn't have a "break" at the end.
>
> Jos?, can you test this trivial patch and see if it fixes things?
>
> Linus
>
> ---
> diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
> index 7f62403..dee8355 100644
> --- a/drivers/media/video/saa7134/saa7134-input.c
> +++ b/drivers/media/video/saa7134/saa7134-input.c
> @@ -202,6 +202,7 @@ int saa7134_input_init1(struct saa7134_d
> /* Without this we won't receive key up events */
> saa_setb(SAA7134_GPIO_GPMODE1, 0x1);
> saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
> + break;
> case SAA7134_BOARD_KWORLD_TERMINATOR:
> ir_codes = ir_codes_pixelview;
> mask_keycode = 0x00001f;


Thanks for the fix, Linus... I see that you've already pushed this into git, so
I've added it to my v4l-dvb hg development tree.

Jose, you can use this tree for testing, if you don't want to apply the patch by hand.

Mauro, please pull from:

http://linuxtv.org/hg/~mkrufky/v4l-dvb

for the following:

- saa7134: Fix missing 'break' for avermedia card case

saa7134-input.c | 1 +
1 file changed, 1 insertion(+)

Cheers,

Michael Krufky

2006-11-13 21:17:11

by Petr Baudis

[permalink] [raw]
Subject: Re: [linux-dvb] Avermedia 777 misbehaves after remote hack merged into v4l-dvb tree

On Mon, Nov 13, 2006 at 05:44:16PM CET, Linus Torvalds wrote:
> Looking at the patch, one obvious bug stands out: the new case statement
> for SAA7134_BOARD_AVERMEDIA_777 doesn't have a "break" at the end.

Oh, sorry about that. :-( I was splitting the patch to multiple ones and
merging it with Jose Alberto's, and apparently this got lost somewhere
in the process...

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

2006-11-13 21:23:59

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: Re: [linux-dvb] Avermedia 777 misbehaves after remote hack merged into v4l-dvb tree

Em Seg, 2006-11-13 ?s 16:09 -0500, Michael Krufky escreveu:
> Linus Torvalds wrote:
> >
> > On Mon, 13 Nov 2006, Michael Krufky wrote:
> >> Mauro -- that patch needs fixing / more testing before it goes to mainstream...
> >>
> >> Could you please remove that changeset from your git tree before Linus pulls it?
> >
> > Too late. Already pulled and pushed out.
> >
> > Looking at the patch, one obvious bug stands out: the new case statement
> > for SAA7134_BOARD_AVERMEDIA_777 doesn't have a "break" at the end.
> >
> > Jos?, can you test this trivial patch and see if it fixes things?
Yes, this should fix the issue. It passed by my eyes :(

> Mauro, please pull from:
>
> http://linuxtv.org/hg/~mkrufky/v4l-dvb
>
> for the following:
>
> - saa7134: Fix missing 'break' for avermedia card case

Ok, I've updated also master development tree at
http://linuxtv.org/hg/v4l-dvb

Pasky,

Please test it also.

Cheers,
Mauro.

2006-11-14 03:45:38

by José Suárez

[permalink] [raw]
Subject: Re: [linux-dvb] Avermedia 777 misbehaves after remote hack merged into v4l-dvb tree

El Lunes 13 Noviembre 2006 22:23, Mauro Carvalho Chehab escribi?:
> Em Seg, 2006-11-13 ?s 16:09 -0500, Michael Krufky escreveu:
> > Linus Torvalds wrote:
> > > On Mon, 13 Nov 2006, Michael Krufky wrote:
> > >> Mauro -- that patch needs fixing / more testing before it goes to
> > >> mainstream...
> > >>
> > >> Could you please remove that changeset from your git tree before Linus
> > >> pulls it?
> > >
> > > Too late. Already pulled and pushed out.
> > >
> > > Looking at the patch, one obvious bug stands out: the new case
> > > statement for SAA7134_BOARD_AVERMEDIA_777 doesn't have a "break" at the
> > > end.
> > >
> > > Jos?, can you test this trivial patch and see if it fixes things?
>
> Yes, this should fix the issue. It passed by my eyes :(
>
> > Mauro, please pull from:
> >
> > http://linuxtv.org/hg/~mkrufky/v4l-dvb
> >
> > for the following:
> >
> > - saa7134: Fix missing 'break' for avermedia card case
>
> Ok, I've updated also master development tree at
> http://linuxtv.org/hg/v4l-dvb
>
> Pasky,
>
> Please test it also.
>
> Cheers,
> Mauro.

The Avermedia 777 is working perfectly again with the current v4l-dvb tree. No
more misbehaviours. Looks like you guys addressed and resolved the issue
quite fast :)
At the moment I can't give the remote control a try because lirc doesn't
compile against version 2.6.18 of the kernel. If that lirc issue gets solved,
I will try to use it as soon as I can.

All the best.

2006-11-14 04:28:56

by Petr Baudis

[permalink] [raw]
Subject: Re: [linux-dvb] Avermedia 777 misbehaves after remote hack merged into v4l-dvb tree

On Tue, Nov 14, 2006 at 04:45:29AM CET, Jos? Su?rez wrote:
> At the moment I can't give the remote control a try because lirc doesn't
> compile against version 2.6.18 of the kernel. If that lirc issue gets solved,
> I will try to use it as soon as I can.

Note that in lircd, you should use the input device driver
("devinput"). The saa7134 driver will create a random input event device
for the events; I use this udev rule to create a /dev/remote symlink
pointing at the right device:

KERNEL="event*", SYSFS{name}="saa7134 IR*", NAME="input/%k", SYMLINK="remote"

Furthermore, especially if you have problems with lircd, having the
full-blown daemon for the event interface may not be worth it. There is
a standalone inputlircd package containing a much simpler daemon which
is compatible with lirc client applications but takes the events just
from the input devices. You can run it e.g. like:

/usr/sbin/inputlircd /dev/remote -g -m 0

You can find an example mplayer lirc configuration at:

http://pasky.or.cz/~pasky/dev/v4l/lircrc

--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)