* [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix
@ 2012-02-27 11:53 James Hogan
2012-03-05 11:57 ` James Hogan
0 siblings, 1 reply; 5+ messages in thread
From: James Hogan @ 2012-02-27 11:53 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Paul Gortmaker, linux-media, linux-kernel
The raw Sony IR decoder decodes 15bit messages slightly incorrectly.
To decode the function number, it shifts the bits right by 7 so that the
function is in bits 7:1, masks with 0xFD (0b11111101), and does an 8 bit
reverse so it ends up in bits 6:0. The mask should be 0xFE to correspond
with bits 7:1 (0b11111110).
The old mask had the effect of dropping the MSB of the function number
from bit 6, and leaving the LSB of the device number in bit 7.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
---
(note, i don't have a 15bit sony remote to test this with, but i'm
pretty confident of it's correctness based on this:
http://picprojects.org.uk/projects/sirc/sonysirc.pdf )
drivers/media/rc/ir-sony-decoder.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/rc/ir-sony-decoder.c b/drivers/media/rc/ir-sony-decoder.c
index d5e2b50..dab98b3 100644
--- a/drivers/media/rc/ir-sony-decoder.c
+++ b/drivers/media/rc/ir-sony-decoder.c
@@ -130,7 +130,7 @@ static int ir_sony_decode(struct rc_dev *dev, struct ir_raw_event ev)
case 15:
device = bitrev8((data->bits >> 0) & 0xFF);
subdevice = 0;
- function = bitrev8((data->bits >> 7) & 0xFD);
+ function = bitrev8((data->bits >> 7) & 0xFE);
break;
case 20:
device = bitrev8((data->bits >> 5) & 0xF8);
--
1.7.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix
2012-02-27 11:53 [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix James Hogan
@ 2012-03-05 11:57 ` James Hogan
2012-03-05 14:32 ` Trilok Soni
0 siblings, 1 reply; 5+ messages in thread
From: James Hogan @ 2012-03-05 11:57 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Paul Gortmaker, linux-media, linux-kernel
Ping
Another week's gone by with no response. It's a trivial patch, so can
somebody please take a look at it? (or if I'm missing somebody relevant
from CC, please add them)
Thanks
James
On 27/02/12 11:53, James Hogan wrote:
> The raw Sony IR decoder decodes 15bit messages slightly incorrectly.
> To decode the function number, it shifts the bits right by 7 so that the
> function is in bits 7:1, masks with 0xFD (0b11111101), and does an 8 bit
> reverse so it ends up in bits 6:0. The mask should be 0xFE to correspond
> with bits 7:1 (0b11111110).
>
> The old mask had the effect of dropping the MSB of the function number
> from bit 6, and leaving the LSB of the device number in bit 7.
>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> ---
>
> (note, i don't have a 15bit sony remote to test this with, but i'm
> pretty confident of it's correctness based on this:
> http://picprojects.org.uk/projects/sirc/sonysirc.pdf )
>
> drivers/media/rc/ir-sony-decoder.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/rc/ir-sony-decoder.c b/drivers/media/rc/ir-sony-decoder.c
> index d5e2b50..dab98b3 100644
> --- a/drivers/media/rc/ir-sony-decoder.c
> +++ b/drivers/media/rc/ir-sony-decoder.c
> @@ -130,7 +130,7 @@ static int ir_sony_decode(struct rc_dev *dev, struct ir_raw_event ev)
> case 15:
> device = bitrev8((data->bits >> 0) & 0xFF);
> subdevice = 0;
> - function = bitrev8((data->bits >> 7) & 0xFD);
> + function = bitrev8((data->bits >> 7) & 0xFE);
> break;
> case 20:
> device = bitrev8((data->bits >> 5) & 0xF8);
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix
2012-03-05 11:57 ` James Hogan
@ 2012-03-05 14:32 ` Trilok Soni
2012-03-05 17:17 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 5+ messages in thread
From: Trilok Soni @ 2012-03-05 14:32 UTC (permalink / raw)
To: James Hogan
Cc: Mauro Carvalho Chehab, Paul Gortmaker, linux-media, linux-kernel
Hi James,
On 3/5/2012 5:27 PM, James Hogan wrote:
> Ping
>
> Another week's gone by with no response. It's a trivial patch, so can
> somebody please take a look at it? (or if I'm missing somebody relevant
> from CC, please add them)
>
You are not alone, GPIO IR patch is also in waiting mode...
---Trilok Soni
--
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix
2012-03-05 14:32 ` Trilok Soni
@ 2012-03-05 17:17 ` Mauro Carvalho Chehab
2012-03-05 19:51 ` James Hogan
0 siblings, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2012-03-05 17:17 UTC (permalink / raw)
To: Trilok Soni
Cc: James Hogan, Mauro Carvalho Chehab, Paul Gortmaker, linux-media,
linux-kernel
Em 05-03-2012 11:32, Trilok Soni escreveu:
> Hi James,
>
> On 3/5/2012 5:27 PM, James Hogan wrote:
>> Ping
>>
>> Another week's gone by with no response. It's a trivial patch, so can
>> somebody please take a look at it? (or if I'm missing somebody relevant
>> from CC, please add them)
>>
>
> You are not alone, GPIO IR patch is also in waiting mode...
Unfortunately, I'm very busy those days, testing a big patch series that it is
re-writing one subsystem on several machines. Due to that, I had to reduce
the timeslot for patch review.
If your patches are at patchwork.linuxtv.org, you shouldn't worry... the patches
are on my queue ;)
I'll review them in time for 3.4.
Regards,
Mauro
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix
2012-03-05 17:17 ` Mauro Carvalho Chehab
@ 2012-03-05 19:51 ` James Hogan
0 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2012-03-05 19:51 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Trilok Soni, Mauro Carvalho Chehab, Paul Gortmaker, linux-media,
linux-kernel
On 5 March 2012 17:17, Mauro Carvalho Chehab <mchehab@redhat.com> wrote:
>
> Em 05-03-2012 11:32, Trilok Soni escreveu:
> > Hi James,
> >
> > On 3/5/2012 5:27 PM, James Hogan wrote:
> >> Ping
> >>
> >> Another week's gone by with no response. It's a trivial patch, so can
> >> somebody please take a look at it? (or if I'm missing somebody relevant
> >> from CC, please add them)
> >>
> >
> > You are not alone, GPIO IR patch is also in waiting mode...
>
> Unfortunately, I'm very busy those days, testing a big patch series that
> it is
> re-writing one subsystem on several machines. Due to that, I had to reduce
> the timeslot for patch review.
>
> If your patches are at patchwork.linuxtv.org, you shouldn't worry... the
> patches
> are on my queue ;)
>
> I'll review them in time for 3.4.
Okay no problem, sorry for nagging :)
Thanks
James
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-05 19:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-27 11:53 [RESEND] [PATCH] media: ir-sony-decoder: 15bit function decode fix James Hogan
2012-03-05 11:57 ` James Hogan
2012-03-05 14:32 ` Trilok Soni
2012-03-05 17:17 ` Mauro Carvalho Chehab
2012-03-05 19:51 ` James Hogan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox