From: Patrick Dickey <pdickeybeta@gmail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Dorozel Csaba <mrjuuzer@upcmail.hu>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: ir-kbd-i2c / rc-hauppauge / linux-3.x broken
Date: Sat, 31 Dec 2011 05:17:57 -0600 [thread overview]
Message-ID: <4EFEEF65.6040703@gmail.com> (raw)
In-Reply-To: <4EFEECF4.3010709@redhat.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 12/31/2011 05:07 AM, Mauro Carvalho Chehab wrote:
> On 31-12-2011 08:15, Dorozel Csaba wrote:
>>> Basically, the bridge driver is not sending the complete RC-5
>>> keycode to the IR core, but just the 8 least siginificant
>>> bits. So, it is loosing the 0x1e00 code for the Hauppauge grey
>>> remote.
>>>
>>> The fix should be at saa7134-input. It should be something
>>> like the enclosed patch (I'm just guessing there that code3
>>> contains the MSB bits - you may need to adjust it to match the
>>> IR decoder there):
>>
>> I'm absolutly not a programer but an unhappy linux user who want
>> his working remote back. Know nothing about c code, MSB bits ...
>> After apply your fix looks what happening but remote is still
>> broken.
>>
>> user juuzer # ir-keytable -t Testing events. Please, press CTRL-C
>> to abort. 1325324726.066129: event MSC: scancode = de3d
>> 1325324726.066131: event sync 1325324726.169132: event MSC:
>> scancode = de3d 1325324726.169134: event sync 1325324727.508129:
>> event MSC: scancode = fe3d 1325324727.508131: event sync
>> 1325324727.611132: event MSC: scancode = fe3d 1325324727.611134:
>> event sync 1325324730.084132: event MSC: scancode = de3d
>> 1325324730.084134: event sync 1325324730.187132: event MSC:
>> scancode = de3d
>>
>> It seems the code3 sometimes return with de (11011110) sometimes
>> fe (11111110). Is it possible to bitwise left 3 then bitwise
>> right 3 so the result in both case is 1e (00011110) ? Or its
>> totaly wrong ?
>
> An RC-5 code is just 14 bits. I found some Hauppauge decoders
> returning just 12 bits on some places. It seems that all it needs
> is to do a code3 | 0x3f, in order to discard the two most
> significant bits (MSB).
>
> So, the enclosed patch should fix the issues. Please test.
>
> Regards, Mauro -
>
> saa7134-input: Fix get_key_hvr1110() handling
>
> Instead of returning just 8 bits, return the full RC-5 code
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
>
> diff --git a/drivers/media/video/saa7134/saa7134-input.c
> b/drivers/media/video/saa7134/saa7134-input.c index
> d4ee24b..29c8efd 100644 ---
> a/drivers/media/video/saa7134/saa7134-input.c +++
> b/drivers/media/video/saa7134/saa7134-input.c @@ -249,8 +249,8 @@
> static int get_key_hvr1110(struct IR_i2c *ir, u32 *ir_key, u32
> *ir_raw) return 0;
>
> /* return key */ - *ir_key = code4; - *ir_raw = code4; + *ir_key =
> 0x3fff & (code4 | code3 << 8); + *ir_raw = *ir_key; return 1; }
>
>
> Regards, Mauro
>>
>
> -- To unsubscribe from this list: send the line "unsubscribe
> linux-media" in the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Will this work regardless of what remote is being used? Currently I'm
using a Windows Media Center Remote (Hauppauge HVR-1600 provided it)
with a combination of saa7134 (MSI TV@nywhere Plus) and Hauppauge
HVR-1600 tuners. Right now, the Hauppauge works fine (all of this is
in Mythtv 0.24), but the MSI crashes when I change channels.
Have a great day:)
Patrick.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk7+72UACgkQMp6rvjb3CAR2tQCgqSAc55bQyDEe3Z4vu0sUYAne
RrQAoIU89vMVzI8UBH8v+dJxl3RsHj44
=3joI
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2011-12-31 11:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20111230120658.DXPH19694.viefep13-int.chello.at@edge04.upcmail.net>
2011-12-30 17:17 ` ir-kbd-i2c / rc-hauppauge / linux-3.x broken Mauro Carvalho Chehab
2011-12-31 10:15 ` Dorozel Csaba
2011-12-31 11:07 ` Mauro Carvalho Chehab
2011-12-31 11:17 ` Patrick Dickey [this message]
2011-12-31 12:04 ` Mauro Carvalho Chehab
2011-12-31 11:47 ` Dorozel Csaba
2011-12-31 12:15 ` Mauro Carvalho Chehab
2011-12-31 13:22 ` Dorozel Csaba
2011-12-31 20:44 ` Mauro Carvalho Chehab
2011-12-31 20:58 ` [PATCH] [media] saa7134: fix IR handling for HVR-1110 Mauro Carvalho Chehab
2012-01-01 9:57 ` Dorozel Csaba
2012-01-01 14:14 ` Dorozel Csaba
2012-01-01 18:47 ` Mauro Carvalho Chehab
2012-01-01 19:17 ` Dorozel Csaba
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=4EFEEF65.6040703@gmail.com \
--to=pdickeybeta@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=mrjuuzer@upcmail.hu \
/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).