All of lore.kernel.org
 help / color / mirror / Atom feed
* Enable IR on hdpvr
@ 2011-01-10  0:36 Jason Gauthier
       [not found] ` <8AFBEFD7-69E3-4E71-B155-EA773C2FED43@wilsonet.com>
  0 siblings, 1 reply; 19+ messages in thread
From: Jason Gauthier @ 2011-01-10  0:36 UTC (permalink / raw)
  To: linux-media

Hey all,

   I've been a long time MythTV user, and earlier this year purchased two Hauppauge HDPVRs.   I was running the Mythbuntu distribution (10.04) which had a 2.6.32.

Using a custom hdpvr module, I had the IR bits turned on, and a custom lirc_zilog (which was not standard in the kernel then).  
When hdpvr.ko would load, it would enable the IR chipset, and lirc_zilog would pick it up.  Occasionally, I would an oops, and I believe this is why the IR pieces were disabled to begin with.

Well, a ton of changes have occurred since .32, to .37.  Namely, I2C changes.  The custom code I have won't compile at all.  
So, I started doing some more digging, and I discovered the linuxtv git repository.  Recently, Andy Walls put some piece in place that interested me.

I pulled the tree down, and worked with it a while.  What I am trying to do is re-enable the IR transmitter in the hdprv module. I've done plenty of development but, unfortunately, this is a bit over my head.   

After reading through these three patches:
http://www.mail-archive.com/linux-media@vger.kernel.org/msg26264.html
http://www.mail-archive.com/linux-media@vger.kernel.org/msg07588.html
http://www.mail-archive.com/linux-media@vger.kernel.org/msg07589.html

It looks very close to what I am interested in.  

I've spent awhile messing with this, but just haven't gotten anywhere.    Does anyone know what it would take, or how, to enable the IR bits on the hdpvr code?

I did simply try changing:

       /* until i2c is working properly */
       retval = 0; /* hdpvr_register_i2c_ir(dev); */
       if (retval < 0)

so that it would register with i2c.
Doing so returns a positive registration with I2C, but the lirc_zilog driver doesn't see the chip when it loads. (The lirc_zilog is now in the kernel, yay)

Really appreciate any help!

Thanks,

Jason


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Enable IR on hdpvr
       [not found] ` <8AFBEFD7-69E3-4E71-B155-EA773C2FED43@wilsonet.com>
@ 2011-01-10 12:07   ` Andy Walls
  2011-01-10 12:12   ` Maybe I'll hack on lirc_zilog.c this coming weekend (Re: Enable IR on hdpvr) Andy Walls
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 19+ messages in thread
From: Andy Walls @ 2011-01-10 12:07 UTC (permalink / raw)
  To: Jarod Wilson; +Cc: Jason Gauthier, Linux Media Mailing List, Janne Grunau

On Mon, 2011-01-10 at 01:05 -0500, Jarod Wilson wrote:
> On Jan 9, 2011, at 7:36 PM, Jason Gauthier wrote:

> Janne, I've heard many success stories w/the hdpvr IR lately, and almost no reports
> of lockups, so I'm thinking a firmware update may have helped out here, and thus,
> maybe its time we just go ahead and push this patch along upstream? We still
> require someone to load lirc_zilog manually, so it seems like a fairly low-risk
> thing to do.

FYI, the code I added to hdpvr-i2c.c will perform 2 accesses to the chip
to check for existence, by virtue of a call to i2c_new_probed_device()
(or whatever it is called).  The I2C subsystem tries to talk the chip to
see if it exists.

If you are really concerned about corner cases that may hang, add a
module option to hdpvr to disable I2C and/or IR in the hdpvr driver.
With that users in the field can work-around the problem without
rebuilding modules.

Regards,
Andy


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Maybe I'll hack on lirc_zilog.c this coming weekend (Re: Enable IR on hdpvr)
       [not found] ` <8AFBEFD7-69E3-4E71-B155-EA773C2FED43@wilsonet.com>
  2011-01-10 12:07   ` Andy Walls
@ 2011-01-10 12:12   ` Andy Walls
  2011-01-10 19:51     ` Jarod Wilson
  2011-01-10 12:24   ` Enable IR on hdpvr Janne Grunau
  2011-01-10 14:25   ` Jason Gauthier
  3 siblings, 1 reply; 19+ messages in thread
From: Andy Walls @ 2011-01-10 12:12 UTC (permalink / raw)
  To: Jarod Wilson; +Cc: Jason Gauthier, Linux Media Mailing List, Janne Grunau

On Mon, 2011-01-10 at 01:05 -0500, Jarod Wilson wrote:
> On Jan 9, 2011, at 7:36 PM, Jason Gauthier wrote:

> There's a bit more to it than just the one line change. Here's the patch we're
> carrying in the Fedora kernels to enable it:
> 
> http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable.patch
> 

BTW, I plan to work on lirc_zilog.c this coming weekend, with my PVR-150
and HVR-1600 as test units.  If there are any lirc_zilog.c patches you
have developed that are not in the media_tree.git repo, could you point
me to them before then?

Regards,
Andy


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Enable IR on hdpvr
       [not found] ` <8AFBEFD7-69E3-4E71-B155-EA773C2FED43@wilsonet.com>
  2011-01-10 12:07   ` Andy Walls
  2011-01-10 12:12   ` Maybe I'll hack on lirc_zilog.c this coming weekend (Re: Enable IR on hdpvr) Andy Walls
@ 2011-01-10 12:24   ` Janne Grunau
  2011-01-10 14:25   ` Jason Gauthier
  3 siblings, 0 replies; 19+ messages in thread
From: Janne Grunau @ 2011-01-10 12:24 UTC (permalink / raw)
  To: Jarod Wilson; +Cc: Jason Gauthier, Linux Media Mailing List, Janne Grunau

On Mon, Jan 10, 2011 at 01:05:10AM -0500, Jarod Wilson wrote:
> 
> There's a bit more to it than just the one line change. Here's the patch we're
> carrying in the Fedora kernels to enable it:
> 
> http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable.patch
> 
> Janne, I've heard many success stories w/the hdpvr IR lately, and almost no reports
> of lockups, so I'm thinking a firmware update may have helped out here, and thus,
> maybe its time we just go ahead and push this patch along upstream? We still
> require someone to load lirc_zilog manually, so it seems like a fairly low-risk
> thing to do.

Ack, go ahead. I haven't checked IR for a long time.

Janne

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: Enable IR on hdpvr
       [not found] ` <8AFBEFD7-69E3-4E71-B155-EA773C2FED43@wilsonet.com>
                     ` (2 preceding siblings ...)
  2011-01-10 12:24   ` Enable IR on hdpvr Janne Grunau
@ 2011-01-10 14:25   ` Jason Gauthier
  2011-01-10 19:50     ` Jarod Wilson
  3 siblings, 1 reply; 19+ messages in thread
From: Jason Gauthier @ 2011-01-10 14:25 UTC (permalink / raw)
  To: Jarod Wilson; +Cc: Linux Media Mailing List, Janne Grunau

>> 
>> I did simply try changing:
>> 
>>       /* until i2c is working properly */
>>       retval = 0; /* hdpvr_register_i2c_ir(dev); */
>>       if (retval < 0)
>> 
>> so that it would register with i2c.
>> Doing so returns a positive registration with I2C, but the lirc_zilog 
>> driver doesn't see the chip when it loads. (The lirc_zilog is now in 
>> the kernel, yay)

>There's a bit more to it than just the one line change. Here's the patch we're carrying in the Fedora kernels to enable it:

>http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable.patch

>Janne, I've heard many success stories w/the hdpvr IR lately, and almost no reports of lockups, so I'm thinking a firmware update may have helped out >here, and thus, maybe its time we just go ahead and push this patch along upstream? We still require someone to load lirc_zilog manually, so it seems like a >fairly low-risk thing to do.

Thanks.  What source tree is this against?  I see the patch is dated 09/2009.  Manually comparing to my .37 source tree it does not appear to match up.
I don't mind bringing in a third source tree to compare against to see if I can make this work on .37, I just don't know which one!


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Enable IR on hdpvr
  2011-01-10 14:25   ` Jason Gauthier
@ 2011-01-10 19:50     ` Jarod Wilson
  2011-01-12  4:40       ` Jarod Wilson
  0 siblings, 1 reply; 19+ messages in thread
From: Jarod Wilson @ 2011-01-10 19:50 UTC (permalink / raw)
  To: Jason Gauthier; +Cc: Linux Media Mailing List, Janne Grunau

On Jan 10, 2011, at 9:25 AM, Jason Gauthier wrote:

>>> 
>>> I did simply try changing:
>>> 
>>>      /* until i2c is working properly */
>>>      retval = 0; /* hdpvr_register_i2c_ir(dev); */
>>>      if (retval < 0)
>>> 
>>> so that it would register with i2c.
>>> Doing so returns a positive registration with I2C, but the lirc_zilog 
>>> driver doesn't see the chip when it loads. (The lirc_zilog is now in 
>>> the kernel, yay)
> 
>> There's a bit more to it than just the one line change. Here's the patch we're carrying in the Fedora kernels to enable it:
> 
>> http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable.patch
> 
>> Janne, I've heard many success stories w/the hdpvr IR lately, and almost no reports of lockups, so I'm thinking a firmware update may have helped out >here, and thus, maybe its time we just go ahead and push this patch along upstream? We still require someone to load lirc_zilog manually, so it seems like a >fairly low-risk thing to do.
> 
> Thanks.  What source tree is this against?  I see the patch is dated 09/2009.  Manually comparing to my .37 source tree it does not appear to match up.
> I don't mind bringing in a third source tree to compare against to see if I can make this work on .37, I just don't know which one!

Bah. Yeah, sorry, that wasn't the current patch in Fedora 14. This is:

http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable-2.patch

Its atop the F14 2.6.35.10 kernel, which has a fairly recent v4l/dvb
backport on top of it, so it should be pretty close to matching the
current v4l/dvb code...


-- 
Jarod Wilson
jarod@wilsonet.com




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Maybe I'll hack on lirc_zilog.c this coming weekend (Re: Enable IR on hdpvr)
  2011-01-10 12:12   ` Maybe I'll hack on lirc_zilog.c this coming weekend (Re: Enable IR on hdpvr) Andy Walls
@ 2011-01-10 19:51     ` Jarod Wilson
  0 siblings, 0 replies; 19+ messages in thread
From: Jarod Wilson @ 2011-01-10 19:51 UTC (permalink / raw)
  To: Andy Walls; +Cc: Jason Gauthier, Linux Media Mailing List, Janne Grunau

On Jan 10, 2011, at 7:12 AM, Andy Walls wrote:

> On Mon, 2011-01-10 at 01:05 -0500, Jarod Wilson wrote:
>> On Jan 9, 2011, at 7:36 PM, Jason Gauthier wrote:
> 
>> There's a bit more to it than just the one line change. Here's the patch we're
>> carrying in the Fedora kernels to enable it:
>> 
>> http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable.patch
>> 
> 
> BTW, I plan to work on lirc_zilog.c this coming weekend, with my PVR-150
> and HVR-1600 as test units.  If there are any lirc_zilog.c patches you
> have developed that are not in the media_tree.git repo, could you point
> me to them before then?

Don't have any, so you should be good to go.

/me still needs to do further testing w/the hdpvr and hvr-1950...

-- 
Jarod Wilson
jarod@wilsonet.com




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Enable IR on hdpvr
  2011-01-10 19:50     ` Jarod Wilson
@ 2011-01-12  4:40       ` Jarod Wilson
  2011-01-12 13:49         ` Jason Gauthier
  0 siblings, 1 reply; 19+ messages in thread
From: Jarod Wilson @ 2011-01-12  4:40 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Jason Gauthier, Janne Grunau

On Jan 10, 2011, at 2:50 PM, Jarod Wilson wrote:

> On Jan 10, 2011, at 9:25 AM, Jason Gauthier wrote:
> 
>>>> 
>>>> I did simply try changing:
>>>> 
>>>>     /* until i2c is working properly */
>>>>     retval = 0; /* hdpvr_register_i2c_ir(dev); */
>>>>     if (retval < 0)
>>>> 
>>>> so that it would register with i2c.
>>>> Doing so returns a positive registration with I2C, but the lirc_zilog 
>>>> driver doesn't see the chip when it loads. (The lirc_zilog is now in 
>>>> the kernel, yay)
>> 
>>> There's a bit more to it than just the one line change. Here's the patch we're carrying in the Fedora kernels to enable it:
>> 
>>> http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable.patch
>> 
>>> Janne, I've heard many success stories w/the hdpvr IR lately, and almost no reports of lockups, so I'm thinking a firmware update may have helped out >here, and thus, maybe its time we just go ahead and push this patch along upstream? We still require someone to load lirc_zilog manually, so it seems like a >fairly low-risk thing to do.
>> 
>> Thanks.  What source tree is this against?  I see the patch is dated 09/2009.  Manually comparing to my .37 source tree it does not appear to match up.
>> I don't mind bringing in a third source tree to compare against to see if I can make this work on .37, I just don't know which one!
> 
> Bah. Yeah, sorry, that wasn't the current patch in Fedora 14. This is:
> 
> http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable-2.patch
> 
> Its atop the F14 2.6.35.10 kernel, which has a fairly recent v4l/dvb
> backport on top of it, so it should be pretty close to matching the
> current v4l/dvb code...

With the help of Andy Walls and Jean Delvare, I think we've hashed out
an updated patch that will work sitting atop the current v4l/dvb hdpvr
code, but I'm only just now getting around to compile-testing it, and
its past my bedtime, so it'll be tomorrow before I can do any sort of
functional testing (but hey, due to the snow, I'll be working from
home tomorrow, where my hdpvr happens to be...).

-- 
Jarod Wilson
jarod@wilsonet.com




^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: Enable IR on hdpvr
  2011-01-12  4:40       ` Jarod Wilson
@ 2011-01-12 13:49         ` Jason Gauthier
  2011-01-12 23:45           ` Andy Walls
  0 siblings, 1 reply; 19+ messages in thread
From: Jason Gauthier @ 2011-01-12 13:49 UTC (permalink / raw)
  To: Jarod Wilson, Linux Media Mailing List; +Cc: Janne Grunau

>> 
>> Bah. Yeah, sorry, that wasn't the current patch in Fedora 14. This is:
>> 
>> http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable-2.patch
>> 
>> Its atop the F14 2.6.35.10 kernel, which has a fairly recent v4l/dvb 
>> backport on top of it, so it should be pretty close to matching the 
>> current v4l/dvb code...

>With the help of Andy Walls and Jean Delvare, I think we've hashed out an updated patch that will work sitting atop the current v4l/dvb hdpvr code, but I'm only just now getting around to compile->testing it, and its past my bedtime, so it'll be tomorrow before I can do any sort of functional testing (but hey, due to the snow, I'll be working from home tomorrow, where my hdpvr happens to be...).

I've got two hdpvrs.  Whenever you're ready to extend your testing, I'm happy to extend that functional testing.  I didn't get a chance to look at the FC14 patch yet (busy couple of days), but I will hold off now, anyway!

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: Enable IR on hdpvr
  2011-01-12 13:49         ` Jason Gauthier
@ 2011-01-12 23:45           ` Andy Walls
  2011-01-13  2:16             ` Jason Gauthier
  2011-01-13  5:23             ` Andy Walls
  0 siblings, 2 replies; 19+ messages in thread
From: Andy Walls @ 2011-01-12 23:45 UTC (permalink / raw)
  To: Jason Gauthier; +Cc: Jarod Wilson, Linux Media Mailing List, Janne Grunau

On Wed, 2011-01-12 at 13:49 +0000, Jason Gauthier wrote:
> >> 
> >> Bah. Yeah, sorry, that wasn't the current patch in Fedora 14. This is:
> >> 
> >> http://wilsonet.com/jarod/lirc_misc/hdpvr-ir/hdpvr-ir-enable-2.patch
> >> 
> >> Its atop the F14 2.6.35.10 kernel, which has a fairly recent v4l/dvb 
> >> backport on top of it, so it should be pretty close to matching the 
> >> current v4l/dvb code...
> 
> >With the help of Andy Walls and Jean Delvare, I think we've hashed
> out an updated patch that will work sitting atop the current v4l/dvb
> hdpvr code, but I'm only just now getting around to compile->testing
> it, and its past my bedtime, so it'll be tomorrow before I can do any
> sort of functional testing (but hey, due to the snow, I'll be working
> from home tomorrow, where my hdpvr happens to be...).
> 
> I've got two hdpvrs.  Whenever you're ready to extend your testing,
> I'm happy to extend that functional testing.  I didn't get a chance to
> look at the FC14 patch yet (busy couple of days), but I will hold off
> now, anyway!

If all goes well, with Jarrod's change, you should be able to test the
hdpvr module with the ir-kbd-i2c module and test IR Rx.

Strictly speaking, lirc_zilog needs some rework to use the kernel
internal interfaces properly.  It might still work, but don't be
surprised if it doesn't.

I might get to working on lirc_zilog tonight, but otherwise not until
this weekend.

Regards,
Andy


^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: Enable IR on hdpvr
  2011-01-12 23:45           ` Andy Walls
@ 2011-01-13  2:16             ` Jason Gauthier
  2011-01-13  5:31               ` Andy Walls
  2011-05-21 18:19               ` Jason Gauthier
  2011-01-13  5:23             ` Andy Walls
  1 sibling, 2 replies; 19+ messages in thread
From: Jason Gauthier @ 2011-01-13  2:16 UTC (permalink / raw)
  To: Andy Walls; +Cc: Jarod Wilson, Linux Media Mailing List, Janne Grunau


>> I've got two hdpvrs.  Whenever you're ready to extend your testing,
>> I'm happy to extend that functional testing.  I didn't get a chance to
>> look at the FC14 patch yet (busy couple of days), but I will hold off
>> now, anyway!

>If all goes well, with Jarrod's change, you should be able to test the
>hdpvr module with the ir-kbd-i2c module and test IR Rx.

>Strictly speaking, lirc_zilog needs some rework to use the kernel
>internal interfaces properly.  It might still work, but don't be
>surprised if it doesn't.

>I might get to working on lirc_zilog tonight, but otherwise not until
>this weekend.

Sounds good. Will give any feedback I can!  Is Tx completely a no show at this point?  From my circle of friends that use the hdpvr, they all use the Tx for channel changing to cable boxes.  This small sample might not be indicative of the larger hdpvr user base, though! :)


^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: Enable IR on hdpvr
  2011-01-12 23:45           ` Andy Walls
  2011-01-13  2:16             ` Jason Gauthier
@ 2011-01-13  5:23             ` Andy Walls
  1 sibling, 0 replies; 19+ messages in thread
From: Andy Walls @ 2011-01-13  5:23 UTC (permalink / raw)
  To: Jason Gauthier; +Cc: Jarod Wilson, Linux Media Mailing List, Janne Grunau

On Wed, 2011-01-12 at 18:45 -0500, Andy Walls wrote:


> If all goes well, with Jarrod's change, you should be able to test the
> hdpvr module with the ir-kbd-i2c module and test IR Rx.

FYI, I have (re)confirmed that ir-kbd-i2c and cx18, in a bleeding-edge
development kernel, still work with the Zilog Z8 IR Rx on the
HVR-1600.  

It's nice to have a known working baseline.


> Strictly speaking, lirc_zilog needs some rework to use the kernel
> internal interfaces properly.  It might still work, but don't be
> surprised if it doesn't.
> 
> I might get to working on lirc_zilog tonight, but otherwise not until
> this weekend.

lirc_zilog got a little work tonight:

http://git.linuxtv.org/awalls/media_tree.git?a=shortlog;h=refs/heads/z8

My changes make it slightly *more* broken in some respects. :D

At least what needs to be reworked is now becoming easier to see and
address.

Regards,
Andy


^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: Enable IR on hdpvr
  2011-01-13  2:16             ` Jason Gauthier
@ 2011-01-13  5:31               ` Andy Walls
  2011-05-21 18:19               ` Jason Gauthier
  1 sibling, 0 replies; 19+ messages in thread
From: Andy Walls @ 2011-01-13  5:31 UTC (permalink / raw)
  To: Jason Gauthier; +Cc: Jarod Wilson, Linux Media Mailing List, Janne Grunau

On Thu, 2011-01-13 at 02:16 +0000, Jason Gauthier wrote:
> >> I've got two hdpvrs.  Whenever you're ready to extend your testing,
> >> I'm happy to extend that functional testing.  I didn't get a chance to
> >> look at the FC14 patch yet (busy couple of days), but I will hold off
> >> now, anyway!
> 
> >If all goes well, with Jarrod's change, you should be able to test the
> >hdpvr module with the ir-kbd-i2c module and test IR Rx.
> 
> >Strictly speaking, lirc_zilog needs some rework to use the kernel
> >internal interfaces properly.  It might still work, but don't be
> >surprised if it doesn't.
> 
> >I might get to working on lirc_zilog tonight, but otherwise not until
> >this weekend.
> 
> Sounds good. Will give any feedback I can!  Is Tx completely a no show
> at this point?  

No, it might work.  It's hard to tell, but you best course of action is
to load the hdpvr driver and then load the lirc_zilog module and *do
not* unload it.

The major lirc_zilog problem is *double* registration of the Tx and Rx
interfaces due to an old design in lirc_zilog.c:ir_probe().  Other
subtle problems I noticed were pointer use after kfree() and not
deallocating everything properly on module unload.

How will those affect you?  I don't know...

Regards,
Andy


^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: Enable IR on hdpvr
  2011-01-13  2:16             ` Jason Gauthier
  2011-01-13  5:31               ` Andy Walls
@ 2011-05-21 18:19               ` Jason Gauthier
  2011-05-21 18:46                 ` Jason Gauthier
  1 sibling, 1 reply; 19+ messages in thread
From: Jason Gauthier @ 2011-05-21 18:19 UTC (permalink / raw)
  To: Linux Media Mailing List

All,

>>If all goes well, with Jarrod's change, you should be able to test the
>>hdpvr module with the ir-kbd-i2c module and test IR Rx.

>>Strictly speaking, lirc_zilog needs some rework to use the kernel
>>internal interfaces properly.  It might still work, but don't be
>>surprised if it doesn't.

>>I might get to working on lirc_zilog tonight, but otherwise not until
>>this weekend.

>Sounds good. Will give any feedback I can!  Is Tx completely a no show at this point?  From my circle of friends that >use the hdpvr, they all use >the Tx for channel changing to cable boxes.  This small sample might not be indicative of >the larger hdpvr user base, though! :)

Well, it's been a few very busy months!    I've upgraded my distribution, and coupled that with a move to kernel 2.6.38.  I noticed that many patches for hdpvr and zilog have made it into the kernel source (at least staging)

Well, I am trying this out, and zilog does not probe the Tx on the HDPVR. Is that expected?
Well, it sort of does.

May 21 12:51:06 jgauthier-mythtv kernel: [   42.519404] lirc_zilog: Zilog/Hauppauge IR driver initializing
May 21 12:51:06 jgauthier-mythtv kernel: [   42.521233] lirc_zilog: probing IR Rx on Hauppage HD PVR I2C (i2c-1)
May 21 12:51:06 jgauthier-mythtv kernel: [   42.521239] lirc_zilog: probe of IR Rx on Hauppage HD PVR I2C (i2c-1) done. Waiting on IR Tx.
May 21 12:51:06 jgauthier-mythtv kernel: [   42.521245] lirc_zilog: probing IR Tx on Hauppage HD PVR I2C (i2c-1)
May 21 12:51:06 jgauthier-mythtv kernel: [   42.521372] i2c i2c-1: lirc_dev: driver lirc_zilog registered at minor = 1
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088260] lirc_zilog: Zilog/Hauppauge IR blaster firmware version 2.1.0 loaded
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088265] lirc_zilog: probe of IR Tx on Hauppage HD PVR I2C (i2c-1) done. IR unit ready.
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088279] lirc_zilog: probing IR Rx on Hauppage HD PVR I2C (i2c-2)
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088282] lirc_zilog: ir_probe: probing IR Rx on Hauppage HD PVR I2C (i2c-2) failed with 1
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088288] Zilog/Hauppauge i2c IR: probe of 2-0071 failed with error 1
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088293] lirc_zilog: probing IR Tx on Hauppage HD PVR I2C (i2c-2)
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088295] lirc_zilog: ir_probe: probing IR Tx on Hauppage HD PVR I2C (i2c-2) failed with 1
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088298] Zilog/Hauppauge i2c IR: probe of 2-0070 failed with error 1
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088329] lirc_zilog: initialization complete

Admittedly, I do not understand exactly what I am reading.  It seems to probe the IR Tx (i2c-1) successfully:
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088265] lirc_zilog: probe of IR Tx on Hauppage HD PVR I2C (i2c-1) done. IR unit ready.

But, then below on (i2c-2) is failed:
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088282] lirc_zilog: ir_probe: probing IR Rx on Hauppage HD PVR I2C (i2c-2) failed with 1
May 21 12:51:06 jgauthier-mythtv kernel: [   43.088288] Zilog/Hauppauge i2c IR: probe of 2-0071 failed with error 1

Either way irsend doesn't work:

irsend: command failed: SEND_ONCE blaster 0_74_KEY_2
irsend: hardware does not support sending

Are there other pieces I need to glue together?
I attempted to move to lirc 0.9, and recompiled everything (including zilog) against it, (I read it somewhere) but that did not really make a difference.

Thanks,

Jason

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: Enable IR on hdpvr
  2011-05-21 18:19               ` Jason Gauthier
@ 2011-05-21 18:46                 ` Jason Gauthier
  2011-05-22  2:02                   ` [SOLVED] " Jason Gauthier
  0 siblings, 1 reply; 19+ messages in thread
From: Jason Gauthier @ 2011-05-21 18:46 UTC (permalink / raw)
  To: Jason Gauthier, Linux Media Mailing List

>Admittedly, I do not understand exactly what I am reading.  It seems to probe the IR Tx (i2c-1) successfully:
>May 21 12:51:06 jgauthier-mythtv kernel: [   43.088265] lirc_zilog: probe of IR Tx on Hauppage HD PVR I2C (i2c-1) done. IR unit ready.

>But, then below on (i2c-2) is failed:
>May 21 12:51:06 jgauthier-mythtv kernel: [   43.088282] lirc_zilog: ir_probe: probing IR Rx on Hauppage HD PVR I2C (i2c-2) failed with 1
>May 21 12:51:06 jgauthier-mythtv kernel: [   43.088288] Zilog/Hauppauge i2c IR: probe of 2-0071 failed with error 1

>Either way irsend doesn't work:

>irsend: command failed: SEND_ONCE blaster 0_74_KEY_2
>irsend: hardware does not support sending

>Are there other pieces I need to glue together?
>I attempted to move to lirc 0.9, and recompiled everything (including zilog) against it, (I read it somewhere) but that did not really make a >difference.

Okay, so I emailed a little too quickly.  The messages above got me thinking.  One of them is successful the other is not.
I verified with irsend.  So, this may be an issue with multiple hdpvrs.

Anything else I can test/verify?


^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [SOLVED] Enable IR on hdpvr
  2011-05-21 18:46                 ` Jason Gauthier
@ 2011-05-22  2:02                   ` Jason Gauthier
  2011-05-22  2:13                     ` [SOLVED (not really)] " Jason Gauthier
  2011-05-22  3:02                     ` [SOLVED] " Andy Walls
  0 siblings, 2 replies; 19+ messages in thread
From: Jason Gauthier @ 2011-05-22  2:02 UTC (permalink / raw)
  To: Linux Media Mailing List

All,


>Okay, so I emailed a little too quickly.  The messages above got me thinking.  One of them is successful the other is not.
>I verified with irsend.  So, this may be an issue with multiple hdpvrs.

I believe I've tracked this down.  

In lirc_zilog.c:

 At 1307:
                ret = add_ir_device(ir);
                if (ret)
                        goto out_free_ir;

Looking at add_ir_device:
  It returns:

	 return i == MAX_IRCTL_DEVICES ? -ENOMEM : i;

Meaning, that with a single device, it will generally return 0.  However, if there are multiple devices it will return a positive. This causes the return check to succeeed, and the goto out_free_ir, and basically doesn't continue.

So, simply changing the check to if (ret<0) seems to resolve this.  Then if -ENOMEM is returned it will fail, and otherwise succeed.

Sorry, this is not an official patch.  The maintainer (Jarod?) should be able to see what I am talking about and correct this.

Thanks!

Jasoin

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [SOLVED (not really)] Enable IR on hdpvr
  2011-05-22  2:02                   ` [SOLVED] " Jason Gauthier
@ 2011-05-22  2:13                     ` Jason Gauthier
  2011-05-22  3:02                     ` [SOLVED] " Andy Walls
  1 sibling, 0 replies; 19+ messages in thread
From: Jason Gauthier @ 2011-05-22  2:13 UTC (permalink / raw)
  To: Linux Media Mailing List

>So, simply changing the check to if (ret<0) seems to resolve this.  Then if -ENOMEM is returned it will fail, and otherwise succeed.

>Sorry, this is not an official patch.  The maintainer (Jarod?) should be able to see what I am talking about and correct this.

>Thanks!

Last email on this topic for awhile.

The module loads, but there is definitely an issue beyond me at this point.
The second zilog device detected not sending, even though it looks good:

[ 3247.366917] lirc_zilog: Zilog/Hauppauge IR driver initializing
[ 3247.369339] lirc_zilog: probing IR Rx on Hauppage HD PVR I2C (i2c-1)
[ 3247.369346] lirc_zilog: probe of IR Rx on Hauppage HD PVR I2C (i2c-1) done. Waiting on IR Tx.
[ 3247.369352] lirc_zilog: probing IR Tx on Hauppage HD PVR I2C (i2c-1)
[ 3247.369477] i2c i2c-1: lirc_dev: driver lirc_zilog registered at minor = 1
[ 3247.622652] lirc_zilog: Zilog/Hauppauge IR blaster firmware version 2.1.0 loaded
[ 3247.622657] lirc_zilog: probe of IR Tx on Hauppage HD PVR I2C (i2c-1) done. IR unit ready.
[ 3247.622671] lirc_zilog: probing IR Rx on Hauppage HD PVR I2C (i2c-2)
[ 3247.622675] lirc_zilog: probe of IR Rx on Hauppage HD PVR I2C (i2c-2) done. Waiting on IR Tx.
[ 3247.622680] lirc_zilog: probing IR Tx on Hauppage HD PVR I2C (i2c-2)
[ 3247.622835] i2c i2c-2: lirc_dev: driver lirc_zilog registered at minor = 2
[ 3247.869401] lirc_zilog: Zilog/Hauppauge IR blaster firmware version 2.1.0 loaded
[ 3247.869406] lirc_zilog: probe of IR Tx on Hauppage HD PVR I2C (i2c-2) done. IR unit ready.
[ 3247.869446] lirc_zilog: initialization complete


However:
root@jgauthier-mythtv:# irsend -d/var/run/lirc/hdpvr0 SEND_ONCE blaster 0_74_KEY_2
root@jgauthier-mythtv:# irsend -d/var/run/lirc/hdpvr1 SEND_ONCE blaster 0_74_KEY_2
irsend: command failed: SEND_ONCE blaster 0_74_KEY_2
irsend: hardware does not support sending


First one worked. Second does not.  

Thanks,

Jason

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [SOLVED] Enable IR on hdpvr
  2011-05-22  2:02                   ` [SOLVED] " Jason Gauthier
  2011-05-22  2:13                     ` [SOLVED (not really)] " Jason Gauthier
@ 2011-05-22  3:02                     ` Andy Walls
  2011-05-22  3:17                       ` Jason Gauthier
  1 sibling, 1 reply; 19+ messages in thread
From: Andy Walls @ 2011-05-22  3:02 UTC (permalink / raw)
  To: Jason Gauthier, Linux Media Mailing List

Jason Gauthier <jgauthier@lastar.com> wrote:

>All,
>
>
>>Okay, so I emailed a little too quickly.  The messages above got me
>thinking.  One of them is successful the other is not.
>>I verified with irsend.  So, this may be an issue with multiple
>hdpvrs.
>
>I believe I've tracked this down.  
>
>In lirc_zilog.c:
>
> At 1307:
>                ret = add_ir_device(ir);
>                if (ret)
>                        goto out_free_ir;
>
>Looking at add_ir_device:
>  It returns:
>
>	 return i == MAX_IRCTL_DEVICES ? -ENOMEM : i;
>
>Meaning, that with a single device, it will generally return 0. 
>However, if there are multiple devices it will return a positive. This
>causes the return check to succeeed, and the goto out_free_ir, and
>basically doesn't continue.
>
>So, simply changing the check to if (ret<0) seems to resolve this. 
>Then if -ENOMEM is returned it will fail, and otherwise succeed.
>
>Sorry, this is not an official patch.  The maintainer (Jarod?) should
>be able to see what I am talking about and correct this.
>
>Thanks!
>
>Jasoin
>--
>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

I think you're using a borken version.  Are you using this one with all the ref counting fixes?

http://git.linuxtv.org/media_tree.git?a=blob;f=drivers/staging/lirc/lirc_zilog.c;h=dd6a57c3c3a3149bac53eb36fd4ddeabed804050;hb=HEAD

Regards,
Andy

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: [SOLVED] Enable IR on hdpvr
  2011-05-22  3:02                     ` [SOLVED] " Andy Walls
@ 2011-05-22  3:17                       ` Jason Gauthier
  0 siblings, 0 replies; 19+ messages in thread
From: Jason Gauthier @ 2011-05-22  3:17 UTC (permalink / raw)
  To: Andy Walls, Linux Media Mailing List

>I think you're using a borken version.  Are you using this one with all the ref counting fixes?

>http://git.linuxtv.org/media_tree.git?a=blob;f=drivers/staging/lirc/lirc_zilog.c;h=dd6a57c3c3a3149bac53eb36fd4ddeabed804050;hb=HEAD

Well, you were right. I was using the one right out of 2.6.38.  This one compiled cleanly into the tree, and worked perfectly.

Thanks for pointing it out.

Jason

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2011-05-22  3:17 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-10  0:36 Enable IR on hdpvr Jason Gauthier
     [not found] ` <8AFBEFD7-69E3-4E71-B155-EA773C2FED43@wilsonet.com>
2011-01-10 12:07   ` Andy Walls
2011-01-10 12:12   ` Maybe I'll hack on lirc_zilog.c this coming weekend (Re: Enable IR on hdpvr) Andy Walls
2011-01-10 19:51     ` Jarod Wilson
2011-01-10 12:24   ` Enable IR on hdpvr Janne Grunau
2011-01-10 14:25   ` Jason Gauthier
2011-01-10 19:50     ` Jarod Wilson
2011-01-12  4:40       ` Jarod Wilson
2011-01-12 13:49         ` Jason Gauthier
2011-01-12 23:45           ` Andy Walls
2011-01-13  2:16             ` Jason Gauthier
2011-01-13  5:31               ` Andy Walls
2011-05-21 18:19               ` Jason Gauthier
2011-05-21 18:46                 ` Jason Gauthier
2011-05-22  2:02                   ` [SOLVED] " Jason Gauthier
2011-05-22  2:13                     ` [SOLVED (not really)] " Jason Gauthier
2011-05-22  3:02                     ` [SOLVED] " Andy Walls
2011-05-22  3:17                       ` Jason Gauthier
2011-01-13  5:23             ` Andy Walls

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.