[pvrusb2] driver status / update

Hans Verkuil hverkuil at xs4all.nl
Thu Jan 15 02:45:29 CST 2009


> On Thu, 15 Jan 2009, Hans Verkuil wrote:
>
>> On Thursday 15 January 2009 06:51:03 Mike Isely wrote:
>>
>> Hmm, that's my fault again. I didn't realize the consequences of this
>> change. Allow me to fix this in the cx25840 driver itself so that no
>> changes are needed in the bridge drivers that use this module.
>>
>> I'll have something for you tonight.
>>
>> > I imagine as more stuff moves over to the v4l2_subdev model that this
>> > might become more common.  I will see about fixing the pvrusb2 driver
>> > to always issue this command to any v4l2 modules which are bound to
>> > it. For modules that don't know about this command the result should
>> > be a harmless nop.
>>
>> No need to change pvrusb2 for this, it's cx25840 that needs to be
>> changed.
>
> I kind of figured you'd jump into the thread again :-)
>
> I've actually already got a working implementation for this in the
> pvrusb2 driver.  But I can revert it.  However before I do so, do you
> see any value in the bridge driver issuing that INIT anyway just out of
> paranoia?  I'm thinking probably not.  But it turns out to have been
> very simple to implement this in the pvrusb2 driver - it already has the
> ability to sync up a module when it binds so I just added a snippet to
> do the init command as the first step of that synchronization.

I've made a tree that fixes this regression:

http://www.linuxtv.org/hg/~hverkuil/v4l-dvb-cx25840

It's a simple change. Please test as I don't have a pvrusb2 available at
the moment!

That said, I think it is a good idea to add the INIT. When pvrusb2 is
converted to v4l2_subdev you need it to call it anyway.

The reason behind the explicit init is that this gives the bridge driver
control over when the cx25840 firmware will be loaded. In general this
isn't possible (or very hard) to do when the driver is compiled into the
kernel (as opposed to being a module). So ivtv and cx18 will postpone the
firmware load until the first open of the device. Having a standard
cx25840 command to force the firmware load makes it explicit when the load
should happen.

Previously the cx25840 driver would just load the fw on the first use, but
I never liked that type of implicit behavior, so for the v4l2_subdev API
I've dropped it. Unfortunately, I dropped it for old-style drivers as
well. :-(

Regards,

        Hans

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG



More information about the pvrusb2 mailing list