* Upstreaming syntek driver
@ 2011-01-18 22:17 Luca Tettamanti
2011-01-18 22:45 ` Hans Verkuil
0 siblings, 1 reply; 5+ messages in thread
From: Luca Tettamanti @ 2011-01-18 22:17 UTC (permalink / raw)
To: Linux Media Mailing List; +Cc: Nicolas VIVIEN
Hello,
I'm a "lucky" owner of a Syntek USB webcam (embedded on my Asus
laptop); as you might know Nicolas (CC) wrote a driver for these
cams[1][2], but it's still not included in mainline kernel.
Since I'd rather save myself and the other users the pain of compiling
an out-of-tree driver I'm offering my help to make the changes
necessary to see this driver upstreamed; I'm already a maintainer of
another driver (in hwmon), so I'm familiar with the development
process.
>From a quick overview of the code I've spotted a few problems:
- minor style issues, trivially dealt with
- missing cleanups in error paths, idem
- possible memory leak, reported on the bug tracker - requires investigation
- big switch statements for all the models, could be simplified with
function pointers
Another objection could be that the initialization is basically
writing magic numbers into magic registers... I guess that Nicolas
recorded the initialization sequence with a USB sniffer. No solution
for this one; does anybody have a contact inside Syntek?
Are there other issues blocking the inclusion of this driver?
Luca
[1] http://syntekdriver.sourceforge.net/
[2] http://syntekdriver.svn.sourceforge.net/viewvc/syntekdriver/trunk/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Upstreaming syntek driver
2011-01-18 22:17 Upstreaming syntek driver Luca Tettamanti
@ 2011-01-18 22:45 ` Hans Verkuil
2011-01-20 11:35 ` Luca Tettamanti
0 siblings, 1 reply; 5+ messages in thread
From: Hans Verkuil @ 2011-01-18 22:45 UTC (permalink / raw)
To: Luca Tettamanti; +Cc: Linux Media Mailing List, Nicolas VIVIEN
On Tuesday, January 18, 2011 23:17:11 Luca Tettamanti wrote:
> Hello,
> I'm a "lucky" owner of a Syntek USB webcam (embedded on my Asus
> laptop); as you might know Nicolas (CC) wrote a driver for these
> cams[1][2], but it's still not included in mainline kernel.
> Since I'd rather save myself and the other users the pain of compiling
> an out-of-tree driver I'm offering my help to make the changes
> necessary to see this driver upstreamed; I'm already a maintainer of
> another driver (in hwmon), so I'm familiar with the development
> process.
> From a quick overview of the code I've spotted a few problems:
> - minor style issues, trivially dealt with
> - missing cleanups in error paths, idem
> - possible memory leak, reported on the bug tracker - requires investigation
> - big switch statements for all the models, could be simplified with
> function pointers
>
> Another objection could be that the initialization is basically
> writing magic numbers into magic registers... I guess that Nicolas
> recorded the initialization sequence with a USB sniffer. No solution
> for this one; does anybody have a contact inside Syntek?
>
> Are there other issues blocking the inclusion of this driver?
After a quick scan through the sources in svn I found the following (in no
particular order):
- Supports easycap model with ID 05e1:0408: a driver for this model is now
in driver/staging/easycap.
- format conversion must be moved to libv4lconvert (if that can't already be
used out of the box). Ditto for software brightness correction.
- kill off the sysfs bits
- kill off V4L1
- use the new control framework for the control handling
- use video_ioctl2 instead of the current ioctl function
- use unlocked_ioctl instead of ioctl
But probably the first step should be to see if this can't be made part of the
gspca driver. I can't help thinking that that would be the best approach. But
I guess the gspca developers can give a better idea of how hard that is.
Regards,
Hans
--
Hans Verkuil - video4linux developer - sponsored by Cisco
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Upstreaming syntek driver
2011-01-18 22:45 ` Hans Verkuil
@ 2011-01-20 11:35 ` Luca Tettamanti
2011-01-20 13:40 ` Hans de Goede
0 siblings, 1 reply; 5+ messages in thread
From: Luca Tettamanti @ 2011-01-20 11:35 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Linux Media Mailing List, Nicolas VIVIEN
On Tue, Jan 18, 2011 at 11:45 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
[...]
> After a quick scan through the sources in svn I found the following (in no
> particular order):
>
> - Supports easycap model with ID 05e1:0408: a driver for this model is now
> in driver/staging/easycap.
Can you elaborate? Is this the same hardware?
> - format conversion must be moved to libv4lconvert (if that can't already be
> used out of the box). Ditto for software brightness correction.
>
> - kill off the sysfs bits
>
> - kill off V4L1
>
> - use the new control framework for the control handling
>
> - use video_ioctl2 instead of the current ioctl function
>
> - use unlocked_ioctl instead of ioctl
Ok, major surgery then :)
> But probably the first step should be to see if this can't be made part of the
> gspca driver. I can't help thinking that that would be the best approach. But
> I guess the gspca developers can give a better idea of how hard that is.
I've looked at the framework provided by gspca, it would probably
allow to drop most of the USB support code from the driver. I'm
looking into frame handling.
Luca
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Upstreaming syntek driver
2011-01-20 11:35 ` Luca Tettamanti
@ 2011-01-20 13:40 ` Hans de Goede
0 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2011-01-20 13:40 UTC (permalink / raw)
To: Luca Tettamanti; +Cc: Hans Verkuil, Linux Media Mailing List, Nicolas VIVIEN
Hi,
On 01/20/2011 12:35 PM, Luca Tettamanti wrote:
> On Tue, Jan 18, 2011 at 11:45 PM, Hans Verkuil<hverkuil@xs4all.nl> wrote:
> [...]
>> After a quick scan through the sources in svn I found the following (in no
>> particular order):
>>
>> - Supports easycap model with ID 05e1:0408: a driver for this model is now
>> in driver/staging/easycap.
>
> Can you elaborate? Is this the same hardware?
>
>> - format conversion must be moved to libv4lconvert (if that can't already be
>> used out of the box). Ditto for software brightness correction.
>>
>> - kill off the sysfs bits
>>
>> - kill off V4L1
>>
>> - use the new control framework for the control handling
>>
>> - use video_ioctl2 instead of the current ioctl function
>>
>> - use unlocked_ioctl instead of ioctl
>
> Ok, major surgery then :)
>
>> But probably the first step should be to see if this can't be made part of the
>> gspca driver. I can't help thinking that that would be the best approach. But
>> I guess the gspca developers can give a better idea of how hard that is.
>
> I've looked at the framework provided by gspca, it would probably
> allow to drop most of the USB support code from the driver.
Yeah, that is the whole idea :) I give a big +1 to the Hans' suggestion
to convert this to a gspca driver!
> I'm looking into frame handling.
Let me know if you need any help / explanation about how certain things
are done in gspca.
Regards,
Hans G (aka the other Hans).
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <2053988317-1295421724-cardhu_decombobulator_blackberry.rim.net-406926901-@b18.c6.bise7.blackberry>]
end of thread, other threads:[~2011-01-20 13:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-18 22:17 Upstreaming syntek driver Luca Tettamanti
2011-01-18 22:45 ` Hans Verkuil
2011-01-20 11:35 ` Luca Tettamanti
2011-01-20 13:40 ` Hans de Goede
[not found] <2053988317-1295421724-cardhu_decombobulator_blackberry.rim.net-406926901-@b18.c6.bise7.blackberry>
2011-01-20 11:37 ` Luca Tettamanti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox