Re: [PATCH-TESTERS-REQUIRED] Leadtek Winfast PxDVR 3200 H - DVB Only support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



stev391@xxxxxxxxx wrote:
>> ----- Original Message -----
>> From: "Steven Toth" <stoth@xxxxxxxxxxx>
>> To: stev391@xxxxxxxxx
>> Subject: Re:  [PATCH-TESTERS-REQUIRED] Leadtek Winfast PxDVR 3200 H - DVB Only support
>> Date: Tue, 05 Aug 2008 10:30:57 -0400
>>
>>
>> stev391@xxxxxxxxx wrote:
>>> Steve,
>>>
>>> I have reworked the tuner callback now against your branch at:
>>> http://linuxtv.org/hg/~stoth/v4l-dvb
>>>
>>> The new Patch (to add support for this card) is attached inline below for testing (this is a 
>>> hint Mark & Jon), I have not provided a signed-off note on purpose as I want to solve the 
>>> issue mentioned in the next paragraph first.
>>>
>>> Regarding the cx25840 module; the card doesn't seem to initialise properly (no DVB output and 
>>> DMA errors in log) unless I have this requested.  Once the card is up and running I can unload 
>>> all drivers, recompile without the cx25840 and load and it will work again until I power off 
>>> the computer and back on again (This has been tedious trying to work out which setting I had 
>>> missed).  Is there some initialisation work being performed in the cx25840 module that I can 
>>> incorporate into my patch to remove this dependency? Or should I leave it as is?
>>>
>>> Anyway nearly bedtime here.
>> The patch looks good, with the exception of requesting the cx25840.
>>
>> I've always been able to run DVB without that driver being present, so something is odd with the 
>> Leadtek card. I'm not aware of any relationship between the cx25840 driver and the DVB core.
>>
>> You're going to need to find the magic register write that the cx25840 is performing so we can 
>> discuss here. I'd rather we figured that out cleanly, than just merged the patch and have the 
>> problem linger on.
>>
>> Other than that, good patch.
>>
>> - Steve
> 
> Steve,
> 
> I have found the lines (starting at line 1441) within cx25840-core.c that effects the DVB working or not working. These lines are:
> 	if (state->is_cx23885) {
> 		/* Drive GPIO2 direction and values */
> 		cx25840_write(client, 0x160, 0x1d);
> 		cx25840_write(client, 0x164, 0x00);
> 	}
> 
> If I comment these lines out in the code, the DVB side doesn't work.  I have tried incorporating these register writes into various places in the cx23885 code (cx23885_gpio_setup(), cx23885_card_setup() and dvb_register()) as the following lines:
> cx_write(0x160, 0x1d);
> cx_write(0x164, 0x00);
> 
> But this does not allow the card to work.
> 
> I have also commented out/ removed all of the code in cx25840-core.c except for the read, write, probe(now only contains the above cx25840_writes) and remove functions and the various struct configs, to ensure that it is not something else contributing to the dependency.
> 
> Have a used cx_write correctly?
> 
> I have also noticed that the following card also uses the cx25840 without any analog support in the driver:
> CX23885_BOARD_HAUPPAUGE_HVR1700
> 
> Perhaps the person who included support for this card has already gone down this track...
> 
> There are two possible directions that I would like to take from here:
> 1) Submit the patch as is with the cx25840 dependency
> 2) Work on why the registers writes aren't working. (However this is out of my depth of knowledge and will need some guidance or pass it onto someone else).

OK, so they tied the demod reset to the GPIO on the avcore, rather than 
a regular GPIO on the pcie bridge itself. I've only ever seen one other 
card do that (which you found - the HVR1700) because Hauppauge ran out 
of GPIO's on the bridge itself.

In this new case, for the Leadtek, I accept that we'll have to 
request_module for the card.

You should also add a comment to the _gpio_setup() code (where generally 
I try to ensure all card GPIO's are document), to say that the GPIO is 
on the AVCore (like the HVR1700). See the HVR1700 example comments.

One comment the bitmask in the tuner reset looks unusually long for 
resetting the xc3028. 70404, and it dosn't match the value used in your 
_gpio_setup() implementation (0x04).

So three very minor things to get this patch accepted:
1. Change 70404 to 4, this is clean.
2. Add the cx25840 request_module() code back.
3. Update the comments in _gpio_setup() to indicate the GPIO for the 
zilink part os on the AVcore.

Good work Steve, thanks for helping. Please publish the patch to this 
mailing list (with your sign-off) and I'll put up an official tree for 
retest and final merge.

- Steve

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

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux