Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-25 Thread Boleslaw Ciesielski
On 8/7/07, Geoffrey Hausheer inli3epy93n at phracturedblue.com wrote:
 I have been unable to tune my HD5000 using recent kernels for quite
 some time, and I finally broke down and tried to figure out what is
 going on.
 It turns out that ever since the lgh06xf driver was removed, my card
 has been unable to tune.  However this is only true after a hard-boot.
  If I boot into an earlier driver, tune it once and get a lock, then
 soft-boot unto a recent driver, it works fine.

 I didn't really dig into that, but comparing dvb_pll_attach to
 lgh06xf_attach I noticed the only significant difference was some
 extra i2c stuff.

 Specifically this:
   ret = i2c_transfer (i2c, msg, 1);
   if (ret != 1)
   return NULL;

 Well, I checked, and, indeed, we fall through here and abort the
 attach before all the callbacks are registered.  Since the lgh06xf
 didn't even do this, I just ignored the return code, and voila, my
 HD5000 tunes fine again.

FWIW, I just wanted to confirm that I have the same problem and that
Geoffrey's patch/hack fixes it for me.

Bolek


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-25 Thread Michael Krufky
Boleslaw Ciesielski wrote:
 On 8/7/07, Geoffrey Hausheer inli3epy93n at phracturedblue.com wrote:
 I have been unable to tune my HD5000 using recent kernels for quite
 some time, and I finally broke down and tried to figure out what is
 going on.
 It turns out that ever since the lgh06xf driver was removed, my card
 has been unable to tune.  However this is only true after a hard-boot.
  If I boot into an earlier driver, tune it once and get a lock, then
 soft-boot unto a recent driver, it works fine.

 I didn't really dig into that, but comparing dvb_pll_attach to
 lgh06xf_attach I noticed the only significant difference was some
 extra i2c stuff.

 Specifically this:
   ret = i2c_transfer (i2c, msg, 1);
   if (ret != 1)
   return NULL;

 Well, I checked, and, indeed, we fall through here and abort the
 attach before all the callbacks are registered.  Since the lgh06xf
 didn't even do this, I just ignored the return code, and voila, my
 HD5000 tunes fine again.
 
 FWIW, I just wanted to confirm that I have the same problem and that
 Geoffrey's patch/hack fixes it for me.

Bolek,

Thank you for confirming.  Although Geoffrey's patch fixes the HD5000, it will 
break some other devices, instead.

Geoffrey's patch did, however, help us to find the actual problem in 
flexcop-i2c.c

The full description of the problem is located in the commit message of the fix:

http://linuxtv.org/hg/v4l-dvb/rev/0277da58bf56

This patch has already been merged into Linus' 2.6.23-rc tree, and is queued 
for the 2.6.22.7 -stable kernel release.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=6175e487e314385e37f06448847e4c46c20edb44

Thanks to Trent Piepho, for providing the flexcop-i2c workaround, Jarod Wilson, 
who had originally reported this regression and was instrumental in testing the 
fixes, and Geoffrey Hausheer, whose original workaround patch led us to find 
the actual cause of the problem.

Cheers,

Mike Krufky

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-25 Thread Boleslaw Ciesielski
Michael Krufky wrote:
 The full description of the problem is located in the commit message
 of the fix:
 
 http://linuxtv.org/hg/v4l-dvb/rev/0277da58bf56
 
 This patch has already been merged into Linus' 2.6.23-rc tree, and is
 queued for the 2.6.22.7 -stable kernel release.

Ah, thanks, I did not realize this was already fixed and old news. Sorry 
for the noise.

Bolek


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-08 Thread Michael Krufky
On 8/7/07, Geoffrey Hausheer [EMAIL PROTECTED] wrote:
 I have been unable to tune my HD5000 using recent kernels for quite
 some time, and I finally broke down and tried to figure out what is
 going on.
 It turns out that ever since the lgh06xf driver was removed, my card
 has been unable to tune.  However this is only true after a hard-boot.
  If I boot into an earlier driver, tune it once and get a lock, then
 soft-boot unto a recent driver, it works fine.

 I didn't really dig into that, but comparing dvb_pll_attach to
 lgh06xf_attach I noticed the only significant difference was some
 extra i2c stuff.

 Specifically this:
   ret = i2c_transfer (i2c, msg, 1);
   if (ret != 1)
   return NULL;

 Well, I checked, and, indeed, we fall through here and abort the
 attach before all the callbacks are registered.  Since the lgh06xf
 didn't even do this, I just ignored the return code, and voila, my
 HD5000 tunes fine again.

 I'm not sure the patch will work for all frontends, but someone more
 knowledgable could probably figure out what needs to be done here.

 ---
 This patch allows my Air2PC HD5000 to tune properly
 Sign-off: Geoffrey Hausheer inli3epy93n at phracturedblue.com

Geoffrey,

Could you give us some more information about your problem?

ie:  What was the last working kernel version? / When did these
problems first appear?  / Do you have the same problem after
installing the newer modules from linuxtv.org v4l-dvb hg repository?
/  Could you test using the hg modules against an older kernel
revision?  /  When testing using hg modules against an older kernel
revision, is your patch still required to allow tuning?

My reasons for asking these questions are decribed below:

I have been informed that the HD5000 has a problem under 2.6.22.y,
where it will correctly tune the first set of params sent to the
device, but all attempts thereafter do not work.  If you are always
trying to tune the same frequency / pid, you would not notice the
problem.  I don't think that this is the problem that you're
experiencing.

I did some testing last weekend, and I confirm the same problem under
vanilla 2.6.22.y , and we'll have to do a git bisection test to
discover the cause.  However, I am sure that the cause of this problem
does NOT lie within the code of the dvb subsystem -- If you install
the most recent hg against an older kernel, there is no problem -- all
works correctly.

Then, I tested using vanilla 2.6.21.y , and had an entirely different
problem, in which tuning did not seem to work at all.  I suspect that
this is what you may be experiencing.  I did not have enough time this
past weekend to figure out the cause of these problems, but I am sure
that a git bisection will reveal the cause.

My HD5000 is sitting in my my mythbackend server, running 2.6.20.
(fedora's 2.6.20-1.2320.fc5smp, to be exact) ... Under 2.6.20, the
card is working properly with no issue.

Although your patch may appear to fix your problem, I suspect that it
is really curing a symptom of the problem, and not the cause.

When replying to this email, please be sure to retain cc: to linux-dvb
-- I am away from my email right now, and I can read the mailing lists
via a separate email account, used specifically for this purpose.  --
it's too much to explain why :-)

Regards,

Mike

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-08 Thread Geoffrey Hausheer
On 8/8/07, Michael Krufky mkrufky-at-linuxtv.org wrote:
 On 8/7/07, Geoffrey Hausheer wrote:
  I have been unable to tune my HD5000 using recent kernels for quite
  some time, and I finally broke down and tried to figure out what is
  going on.

 Geoffrey,

 Could you give us some more information about your problem?

 ie:  What was the last working kernel version? / When did these
 problems first appear?  / Do you have the same problem after
 installing the newer modules from linuxtv.org v4l-dvb hg repository?
 /  Could you test using the hg modules against an older kernel
 revision?  /  When testing using hg modules against an older kernel
 revision, is your patch still required to allow tuning?

Sorry, I guess I didn't make that clear.  2.6.22 doesn't work with my
HD5000 and neither does latest hg.  I don't know the last kernel that
does, but I do know that this is the changeset that broke it for me:

changeset:   5365:77f63fdfba48
user:Trent Piepho [EMAIL PROTECTED]
date:Tue Feb 27 15:11:11 2007 -0800
summary: dvb: Remove lgh06xf driver

If I go back one more from this, it works fine, anything after this, I
need to apply my patch.  I have tested this on both 2.6.19 and 2.6.22
(that this same changeset causes the issue).  So at least in my case,
it is localized to this single change and my card works fine using
latest hg and my patch on both 2.6.19 and 2.6.22.  It also works fine
on 2.6.22.0 with my patch applied (not using hg drivers)


 My reasons for asking these questions are decribed below:

 I have been informed that the HD5000 has a problem under 2.6.22.y,
 where it will correctly tune the first set of params sent to the
 device, but all attempts thereafter do not work.  If you are always
 trying to tune the same frequency / pid, you would not notice the
 problem.  I don't think that this is the problem that you're
 experiencing.
No my problem doesn't seem to be the same.  It is odd though, because
my card does not work at all with any drivers since February, and
apparently not everyone sees this behavior.


 I did some testing last weekend, and I confirm the same problem under
 vanilla 2.6.22.y , and we'll have to do a git bisection test to
 discover the cause.  However, I am sure that the cause of this problem
 does NOT lie within the code of the dvb subsystem -- If you install
 the most recent hg against an older kernel, there is no problem -- all
 works correctly.
Again, for me running 2.6.22.0 (debian kernel) I can use my card just
fine with both latest hg and the kernel supplied as long as I apply my
patch.

 Although your patch may appear to fix your problem, I suspect that it
 is really curing a symptom of the problem, and not the cause.
This is possible.  I don't know anything at all about i2c.  I just
tried to reverted the negative consequences of the patch which broke
my system.

I would be interested in confirmation whether this simple patch works
for others who are broken on 2.6.22 (though from what you've said it
doesn't sound too likely)

By the way, I am only using the card for ATSC broadcasts.  i don't
have digital cable, and can't test its QCAM support.

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-08 Thread Trent Piepho
On Wed, 8 Aug 2007, Geoffrey Hausheer wrote:
 On 8/8/07, Michael Krufky mkrufky-at-linuxtv.org wrote:
  On 8/7/07, Geoffrey Hausheer wrote:
  Although your patch may appear to fix your problem, I suspect that it
  is really curing a symptom of the problem, and not the cause.
 This is possible.  I don't know anything at all about i2c.  I just
 tried to reverted the negative consequences of the patch which broke
 my system.

The real problem is with the flexcop i2c support.  It only allows a very
limited set of a i2c commands, and a one byte read command like the pll
probe uses isn't supported.

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-08 Thread Michael Krufky
Trent Piepho wrote:

On Wed, 8 Aug 2007, Geoffrey Hausheer wrote:
  

On 8/8/07, Michael Krufky mkrufky-at-linuxtv.org wrote:


On 8/7/07, Geoffrey Hausheer wrote:
Although your patch may appear to fix your problem, I suspect that it
is really curing a symptom of the problem, and not the cause.
  

This is possible.  I don't know anything at all about i2c.  I just
tried to reverted the negative consequences of the patch which broke
my system.



The real problem is with the flexcop i2c support.  It only allows a very
limited set of a i2c commands, and a one byte read command like the pll
probe uses isn't supported.

Trent,

If that is the case, then why do you think Geoffrey is having this 
problem while others are not?

When I get back to Brooklyn I will have to test the HD5000 more 
thoroughly... :-/

-Mike


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-08 Thread Trent Piepho
On Wed, 8 Aug 2007, Michael Krufky wrote:
 On Wed, 8 Aug 2007, Geoffrey Hausheer wrote:
 
 
 On 8/8/07, Michael Krufky mkrufky-at-linuxtv.org wrote:
 
 
 On 8/7/07, Geoffrey Hausheer wrote:
 Although your patch may appear to fix your problem, I suspect that it
 is really curing a symptom of the problem, and not the cause.
 
 
 This is possible.  I don't know anything at all about i2c.  I just
 tried to reverted the negative consequences of the patch which broke
 my system.
 
 
 
 The real problem is with the flexcop i2c support.  It only allows a very
 limited set of a i2c commands, and a one byte read command like the pll
 probe uses isn't supported.
 
 Trent,

 If that is the case, then why do you think Geoffrey is having this
 problem while others are not?

The HD-5000 is the only flexcop card that uses dvb-pll with a pll directly
attached to the I2C bus.

The flexcop driver doesn't check the return value of dvb_pll_attach, so
there is no error message.  It will just not work correctly.

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-08 Thread Michael Krufky
Trent Piepho wrote:

On Wed, 8 Aug 2007, Michael Krufky wrote:
  

On Wed, 8 Aug 2007, Geoffrey Hausheer wrote:


  

On 8/8/07, Michael Krufky mkrufky-at-linuxtv.org wrote:




On 8/7/07, Geoffrey Hausheer wrote:
Although your patch may appear to fix your problem, I suspect that it
is really curing a symptom of the problem, and not the cause.


  

This is possible.  I don't know anything at all about i2c.  I just
tried to reverted the negative consequences of the patch which broke
my system.




The real problem is with the flexcop i2c support.  It only allows a very
limited set of a i2c commands, and a one byte read command like the pll
probe uses isn't supported.

  

Trent,

If that is the case, then why do you think Geoffrey is having this
problem while others are not?



The HD-5000 is the only flexcop card that uses dvb-pll with a pll directly
attached to the I2C bus.

The flexcop driver doesn't check the return value of dvb_pll_attach, so
there is no error message.  It will just not work correctly.


Perhaps I worded my question incorrectly...  When I said, others are 
not, I meant other users of the HD5000.  If you look back to earlier in 
this thread, I gave an explanation of the testing that I have done last 
weekend.  Using 2.6.22, the initial tuning params work properly and all 
attempts afterwards do not.

Regardless, things are now beginning to make sense, although I do not 
understand why the latest HG works fine with that card for me against 
eariler kernel revisions.  Perhaps I made a mistake in one of my tests.  
Now I know exactly what needs testing.  How to fix this cleanly, that I 
am still not sure of, without affecting other drivers.  Maybe we'll have 
to hack the flexcop i2c handling to fake a good i2c reply.  I'll look 
into it when I get back home.

-Mike


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-08 Thread Trent Piepho
On Wed, 8 Aug 2007, Michael Krufky wrote:
 
 The HD-5000 is the only flexcop card that uses dvb-pll with a pll directly
 attached to the I2C bus.
 
 The flexcop driver doesn't check the return value of dvb_pll_attach, so
 there is no error message.  It will just not work correctly.
 

 Perhaps I worded my question incorrectly...  When I said, others are
 not, I meant other users of the HD5000.  If you look back to earlier in
 this thread, I gave an explanation of the testing that I have done last
 weekend.  Using 2.6.22, the initial tuning params work properly and all
 attempts afterwards do not.

 Regardless, things are now beginning to make sense, although I do not
 understand why the latest HG works fine with that card for me against
 eariler kernel revisions.  Perhaps I made a mistake in one of my tests.
 Now I know exactly what needs testing.  How to fix this cleanly, that I
 am still not sure of, without affecting other drivers.  Maybe we'll have
 to hack the flexcop i2c handling to fake a good i2c reply.  I'll look
 into it when I get back home.

What should happen is that there aren't any errors, even when loading the
driver or when tuner.  But the frequency won't change.  If the frequency
was set using older drivers, there is probably nothing to reset it when
changing drivers or rebooting.  So if you tune to a channel before testing
after the change, and then try the same channels, it will appear to be
working fine.  If you try to tune to a new channel, it will _appear_ to
work, except you'll keep getting the old channel.

___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


Re: [linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-08 Thread Michael Krufky
Trent Piepho wrote:

On Wed, 8 Aug 2007, Michael Krufky wrote:
  

The HD-5000 is the only flexcop card that uses dvb-pll with a pll directly
attached to the I2C bus.

The flexcop driver doesn't check the return value of dvb_pll_attach, so
there is no error message.  It will just not work correctly.

  

Perhaps I worded my question incorrectly...  When I said, others are
not, I meant other users of the HD5000.  If you look back to earlier in
this thread, I gave an explanation of the testing that I have done last
weekend.  Using 2.6.22, the initial tuning params work properly and all
attempts afterwards do not.

Regardless, things are now beginning to make sense, although I do not
understand why the latest HG works fine with that card for me against
eariler kernel revisions.  Perhaps I made a mistake in one of my tests.
Now I know exactly what needs testing.  How to fix this cleanly, that I
am still not sure of, without affecting other drivers.  Maybe we'll have
to hack the flexcop i2c handling to fake a good i2c reply.  I'll look
into it when I get back home.



What should happen is that there aren't any errors, even when loading the
driver or when tuner.  But the frequency won't change.  If the frequency
was set using older drivers, there is probably nothing to reset it when
changing drivers or rebooting.  So if you tune to a channel before testing
after the change, and then try the same channels, it will appear to be
working fine.  If you try to tune to a new channel, it will _appear_ to
work, except you'll keep getting the old channel.


That is consistent with my 2.6.22.1 tests thus far.  j-rod has reported 
exactly the same behavior as well.

So, the i2c handling of b2c2-flexcop needs to either be fixed or hacked 
to prevent this problem...

I think we have the same problem in 2.6.21.y -- I couldn't get it to 
work at all, there.  2.6.20 works fine.  (we absorbed lgh06xf.ko into 
dvb-pll as of 2.6.21 -- that explains it)

Cheers,

Mike


___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


[linux-dvb] [PATCH] Fix for Air2PC HD5000

2007-08-07 Thread Geoffrey Hausheer
I have been unable to tune my HD5000 using recent kernels for quite
some time, and I finally broke down and tried to figure out what is
going on.
It turns out that ever since the lgh06xf driver was removed, my card
has been unable to tune.  However this is only true after a hard-boot.
 If I boot into an earlier driver, tune it once and get a lock, then
soft-boot unto a recent driver, it works fine.

I didn't really dig into that, but comparing dvb_pll_attach to
lgh06xf_attach I noticed the only significant difference was some
extra i2c stuff.

Specifically this:
  ret = i2c_transfer (i2c, msg, 1);
  if (ret != 1)
  return NULL;

Well, I checked, and, indeed, we fall through here and abort the
attach before all the callbacks are registered.  Since the lgh06xf
didn't even do this, I just ignored the return code, and voila, my
HD5000 tunes fine again.

I'm not sure the patch will work for all frontends, but someone more
knowledgable could probably figure out what needs to be done here.

---
This patch allows my Air2PC HD5000 to tune properly
Sign-off: Geoffrey Hausheer inli3epy93n at phracturedblue.com


hd5000.patch
Description: Binary data
___
linux-dvb mailing list
linux-dvb@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb