On Wed, May 25, 2016 at 01:57:36PM +0200, Marcus Glocker wrote:
> On Tue, May 24, 2016 at 04:46:57PM -0700, patrick keshishian wrote:
> 
> > Hi,
> > 
> > I have a "mostly working" driver port for Fushicai Audio-Video
> > Grabber (vendor 0x1b71 product 0x3002).
> > 
> > I've had the video bit working for a few days on amd64 and macppc.
> > I finally managed to get the audio bit working this morning on
> > amd64, but still an encoding issue (LE vs BE) on macppc.
> > 
> > I'd like to "polish up" the code for a post here, or off-list if
> > that is preferred, for review and ridicule. So I have some
> > questions which I don't think style(9) answers.
> > 
> > 1. Types: Original source used a few instances of "u16" types,
> >    but I think OpenBSD prefers "u_int16_t" and "uint16_t".
> >    Which to pick?
> 
> I vote for uint*_t.
>  
> > 2. Return values inside parenthesis or not?
> 
> The ongoing religious question :-)  Some people say return and sizeof
> shouldn't be used with parenthesis because they are no functions.  I
> still find it more readable with parenthesis.  We have both variations
> in the tree.  Your choice.
> 
> > 3. Original source filenames were hyphenated (e.g., usbtv-video.c).
> >    OK to use underscore instead? I think it is preferred.
> >    (Next question may trump this one)
> 
> How's about something a bit shorter, like uvcap.c (USB Video Capture)
> and then also call the driver uvcap?  Anyway just a proposal.  Otherwise
> yes, replace the '-' by '_' in the filename.
> 
> > 4. Original source has three .c and one .h file. They are dual-
> >    licensed Linux sources: BSD and GPL.
> > 
> >    I've borrowed from uvideo.c to get this driver working,
> >    introducing a fourth .c.
> > 
> >    I'm pretty sure OBSD doesn't want so many files introduced.
> >    Should I combine the original .c files into one .c file, keep
> >    the .h and the new .c file I introduced? Maintaining copyright
> >    notices as-is (the original and one from uvideo.c).
> 
> For such a kind of driver I also would perfer one .c and one .h file.

Yes. Only concern I have is the slight variations in license
text. The original code is a two-clause BSD[0] while the uvideo.c
is the far simpler one.

> > 5. If tech@ is not the place to post an initial port effort,
> >    especially from a first-timer, do let me know.
> 
> Well, I think tech@ is the right place.  Maybe we can take some stuff
> off-list.  Though myself has no such device yet to test further.

It is a low-end item, so I'm not sure if you really want one, but
would be glad to send one your way; just let me know where to ship
it to.

Also thanks for the suggestions!

--patrick

[0] https://github.com/torvalds/linux/tree/master/drivers/media/usb/usbtv

Reply via email to