From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>, Antti Palosaari <crope@iki.fi>,
mchehab@infradead.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org, Pekka Sarnila <sarnila@adit.fi>,
linux-input@vger.kernel.org
Subject: Re: [PATCH 1/1] media: dvb-usb/af9015, fix disconnection crashes
Date: Thu, 04 Feb 2010 10:04:57 -0200 [thread overview]
Message-ID: <4B6AB7E9.40607@redhat.com> (raw)
In-Reply-To: <4B6AA211.1060707@gmail.com>
Jiri Slaby wrote:
> On 01/26/2010 02:08 PM, Jiri Kosina wrote:
>>> In my understanding the cause of the remote problem is chipset bug which sets
>>> USB2.0 polling interval to 4096ms. Therefore HID remote does not work at all
>>> or starts repeating. It is possible to implement remote as polling from the
>>> driver which works very well. But HID problem still remains. I have some hacks
>>> in my mind to test to kill HID. One is to configure HID wrongly to see if it
>>> stops outputting characters. Other way is try to read remote codes directly
>>> from the chip memory.
>> Yes, Pekka Sarnila has added this workaround to the HID driver, as the
>> device is apparently broken.
>>
>> I want to better understand why others are not hitting this with the
>> DVB remote driver before removing the quirk from HID code completely.
>
> I think, we should go for a better way. Thanks Pekka for hints, I ended
> up with the patch in the attachment. Could you try it whether it works
> for you?
>
> I have 2 dvb-t receivers and both of them need fullspeed quirk. Further
> disable_rc_polling (a dvb_usb module parameter) must be set to not get
> doubled characters now. And then, it works like a charm.
Module parameters always bothers me. They should be used as last resort alternatives
when there's no other possible way to make it work properly.
If we know for sure that the RC polling should be disabled by an specific device,
just add this logic at the driver.
> Note that, it's just some kind of proof of concept. A migration of
> af9015 devices from dvb-usb-remote needs to be done first.
>
> Ideas, comments?
Please next time, send the patch inlined. As you're using Thunderbird, you'll likely need
Asalted-patches[1] to avoid thunderbird to destroy your patches.
[1]https://hg.mozilla.org/users/clarkbw_gnome.org/asalted-patches/
+config HID_DVB
+ tristate "DVB remotes support" if EMBEDDED
+ depends on USB_HID
+ default !EMBEDDED
+ ---help---
+ Say Y here if you have DVB remote controllers.
+
I think the better would be to use a more generic name, like HID_RC (for Remote Controller).
I suspect we may need in the future other hacks for other similar devices.
+static int dvb_event(struct hid_device *hdev, struct hid_field *field,
+ struct hid_usage *usage, __s32 value)
+{
+ /* we won't get a "key up" event */
+ if (value) {
+ input_event(field->hidinput->input, usage->type, usage->code, 1);
+ input_event(field->hidinput->input, usage->type, usage->code, 0);
+ }
+ return 1;
+}
Several V4L/DVB IR's have keyup/keydown events. So I think the name here is also wrong:
it is better to name the function as dvb_nokeyup_event() and eventually add an specific
quirk to indicate devices that only have key up events.
--
Cheers,
Mauro
next prev parent reply other threads:[~2010-02-04 12:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 17:19 [PATCH 1/1] media: dvb-usb/af9015, fix disconnection crashes Jiri Slaby
2010-01-24 23:44 ` Antti Palosaari
2010-01-25 9:12 ` Jiri Slaby
2010-01-25 18:07 ` Antti Palosaari
2010-01-26 13:08 ` Jiri Kosina
2010-02-04 10:31 ` Jiri Slaby
2010-02-04 12:04 ` Mauro Carvalho Chehab [this message]
2010-02-04 12:53 ` Jiri Slaby
2010-02-04 13:41 ` Mauro Carvalho Chehab
2010-02-04 13:51 ` Jiri Slaby
2010-02-04 14:05 ` Mauro Carvalho Chehab
2010-02-05 14:02 ` Jarod Wilson
2010-02-04 14:26 ` Mauro Carvalho Chehab
2010-02-04 13:23 ` Pekka Sarnila
2010-02-04 13:27 ` Jiri Kosina
2010-02-04 14:07 ` Pekka Sarnila
2010-02-08 4:13 ` Greg KH
2010-02-04 14:04 ` Mauro Carvalho Chehab
2010-02-04 15:05 ` Pekka Sarnila
2010-02-04 17:13 ` Mauro Carvalho Chehab
2010-02-05 14:31 ` Pekka Sarnila
2010-02-04 18:14 ` Dmitry Torokhov
2010-02-04 18:33 ` Jiri Slaby
2010-02-04 18:41 ` Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B6AB7E9.40607@redhat.com \
--to=mchehab@redhat.com \
--cc=crope@iki.fi \
--cc=jirislaby@gmail.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=sarnila@adit.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).