As one would expect I want this branch to contain all changes we pushed away
because "they will only be done when we go into the kernel". I started with
removeing all compatibility for older kernels and the doxygen stuff.
Unfortunatly Fedora needs another month to give me a stable way of using
2.6.29 which means I find myself quite unable to test anything from now on.
So please test and get everything ready:
- Makefile
- Kconfig
- .config
are what comes to mind.
Lets get this thing over with.
GWater
Also quick patch to remove the module param and sysfs code for dealing
with fps since this was never really implemented and is unused.
Hey that's great. What kind of magic did you apply to fix all these warnings?
GWater
Great. So who mails a patch/git-pull-request to the respnsible maintainer
(GKH, isn't it?) ?
GWater
> Great. So who mails a patch/git-pull-request to the respnsible maintainer
> (GKH, isn't it?) ?
>
> GWater
One more thing remains:
tags file should be removed, it is not necessary for build :)
Regards
Vasily
Oops, my fault, I didn't notice that it is not under version control.
Btw, here's some patches to review
Regards
Vasily
This is really good news.. A huge "congratulations" and big thank you
to all who contributed to these bits!
Are you guys targeting the .31 merge window? Or next one?
Martin
IMHO ASAP.
GWater
GWater a écrit :
> You're probably right.
>
> Two thingsd are keeping me personally right now:
> 1. Brian is still experimenting with SXGA. This is a great feature but
> maybe we should submit it later.
Yeah I was one of them who said it was available but not implemented and should
be but I thought you said yourselves it was no true SXGA but kinda fake, isn't it ?
> 2. I don't know LKML procedure.
Neither do I but it's time to learn. I'll read some doc about that tomorrow.
> 3. I hoped jojo as the one who started it all would give it his
> blessing.
Yes?
> 4. Also I don't wanna compile a whole kernel to see if it is working.
I may compile kernels, I've already done that some times without problems.
>
> Anyway the current state of affairs is here:
> http://repo.or.cz/w/microdia.git?a=shortlog;h=refs/heads/prepare-for-kernel
>
Okay, I'll try that.
> GWater
Johndescs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoezyQACgkQ+NW4B/ApmtkctQCgkBECHK/esm+a2kM3edTzgUHA
eOwAn1hgrN9YdveDYEN9F3r5koe16TFX
=fkar
-----END PGP SIGNATURE-----
OK,
there are obviously some misunderstandings here:
1. I was wrong when I said SXGA is fake. Brian made it happen using bayer.
3. All these names are driving me crazy. (Remeber the fun with Boris and
Brian?) Is "Johndescs"=="jojo" or do you just think that argument was
pointless?
Anyway, great we're progressing again :).
GWater
Josua Grawitter a écrit :
>>> 3. I hoped jojo as the one who started it all would give it his
>>> blessing.
>> Yes?
>>
>
> OK,
> there are obviously some misunderstandings here:
> 1. I was wrong when I said SXGA is fake. Brian made it happen using bayer.
OK, I must have missed something.
> 3. All these names are driving me crazy. (Remeber the fun with Boris and
> Brian?) Is "Johndescs"=="jojo" or do you just think that argument was
> pointless?
I'm not THE "jojo jojo", but my true name is Jonathan, AKA johndescs because CS
is standing for Chalmion Studios and "des" is the French of "from", so read
"Jonathan from the Chalmion Studios"! I hope this would help mnemonically ;-)
As for the "Yes?" this should have been "Yes..." but the three dots in UTF-8
have been transformed to ISO-8859-1 with a '?', so my apologies. I just wanted
to approve!
>
> Anyway, great we're progressing again :).
>
Uh, I've not done anything yet...
> GWater
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkofmPcACgkQ+NW4B/Apmtm0BwCfYhRu+xGViV8GoOdWjCNMJpLu
toUAoKiiu3BU+36/SsVsEZ7tLQBT/2SD
=FLgx
-----END PGP SIGNATURE-----
I've a little investigated. This is what I've noticed.
http://www.kernel.org/doc/Documentation/SubmittingDrivers
is a good basis, I don't know in which state is your source code, but it seems
to have to be checked against these requirements.
The MAINTAINERS file in the kernel tree:
2. Try to release a few ALPHA test versions to the net. Announce
them onto the kernel channel and await results. This is especially
important for device drivers, because often that's the only way
you will find things like the fact version 3 firmware needs
a magic fix you didn't know about, or some clown changed the
chips on a board and not its name. (Don't laugh! Look at the
SMC etherpower for that.)
I think we should make a tarball ready-to-test, no?
Next, there is no maintainer for the whole media/video stuff but a mailing list:
linux...@vger.kernel.org
This list may IMHO be used to announce the ALPHA presented before.
After mailing to the list, we may be driven by people knowing exactly what to do
in the specific case of this driver.
Does all this seem reasonable to you?
What pending patches / ideas is there? If SXGA is not ready, I think this
doesn't matter since it may be part of a latter update so there is not too much
to release in one block.
Johndescs
P.S. If you think I'm too quick and going in a hurry, let me know... I just hope
to help this being available for the whole community.
I think most we comply with most of the things mentioned:
- Copyright and License integrity were insured from the beginning.
- coding style has been fixed
- struct usb_sn9c20x mirrors the hardware(clarity)
- we have suspend/resume
- V4L2 support
- at least x86 and x86_64 have been tested
Do we want a MAINTAINER flag for our driver?
Looking back on recent activity I don't think so.
Short: I agree.
What tarball do you want to submit - our master or our prepare-for-kernel
branch?
What happened to the famous git-pull requests?
GWater
Cool that most rules are already OK.
I think we would have a place in the MAINTAINERS file from kernel tree (there is
only one on the root directory for the whole kernel).
Isn't the prepare-for-kernel one aiming on kernel integration? Logically this
should be submitted, no?
Your "famous git-pull requests" are perhaps not-so-famous: I don't know about
what you are speaking... do you mean the code should be directly grabbed from
git to be integrated?
Anyways, are some code modifications to be submitted before the so called
"freeze"? Have enough tests been done to take the responsibility of kernel
integration tentative? We should at least wait a little for the other
contributors, IMHO.
Johndecs
I think we shouldn't list ourselves as maintainers because apart from SXGA
there won't be much more to contribute and people submitting patches to this
list may have to wait years until one of us answers.
I don't know of anymore changes being necessary our planned. "prepare-fr-
kernel" has been around quite some time now so I figure everyone is fine with
this driver being submitted.
Submitting prepare-for-kernel as a tarball seems wrong to me because it can't
be build on its own. You need a full kernel-tree to compile it.
git-pull-requests:
http://github.com/guides/pull-requests
example: http://lkml.org/lkml/2009/3/11/326
GWater
AFAIK, Mauro Carvalho Chehab <mch...@infradead.org> is the
drivers/media maintainer.
No tarballs. You make a patch and send it inline on a mail to the
respective list and maintainer.
--
Daniel Ribeiro
You will need to if you want to submit it upstream.
--
Daniel Ribeiro
> For submitting the patch. Documentation/SubmittingPatches section 8
> seems to say that for patches exceeding 40kB(ours is around 250kB) you
> should instead of attaching the patch inline post a link to
> it instead. I would also be inclined myself probably to add an entry
> to the MAINTAINERS file as well. I is not necessary to direct patches
> to this mailing list most of the webcams that have indivdual mainters
> just use the linux-media list as far as i can tell.
>
> I'm currently working on fixing up a patch against the linux kernel
> that should add our driver into it.
Don't forget to add our custom format (V4L2_PIX_FMT_SN9C20X_I420) to
videodev2.h and remove it from sn9c20x.h ;)
Regards
Vasily
I did something similar, but with different 'effects',
when compiled as a module (via make menuconfig, etc.),
everything is ok. If I compile it into the Kernel
(first overlooking that dependecy on v4l being built in aswell)
it compiles, upon restart dmesg has all the right answers BUT
theres no /dev/video[0]....
Maybe I have the wrong module version, what exactly did you tell
git to get the 'prepare-for' version ?
-rasp
--
Please do not look directly into laser with remaining eye.
-fortune
I think we should get some positive responces and then you can try to submit
driver upstream. Unfortunately I have no ability to test patch until Monday.
Regards
Vasily
Not really, in this case you are submitting driver(s).
What you should do is to split the code on various patches, and submit
it as a series. eg, one patch for the bus, and another for each sensor,
or something like that. :)
Big patches are boring to review, doesn't matter if its on a web server
or inlined on the mail.
--
Daniel Ribeiro
Ok, sorry must have been a mix-up on my side of things,
rc8+patch works for me :-)
(I'm just not using *30-rc8 because I get spurious system hangs
if memory is full and it's time to swap)
Also being bored it wrote/put together a little webcam utility to
test the cam itself.
If anyone is interested, you can clone it at
git://gate.spitzner.org/flux/storage/repo/swec
(I borrowed a sbggr8_to_rgb24 from xawtv to get rid of the
libv4lconvert stuff. Which breaks at least my system)
Maybe it would be a good idea to put that into the driver (?).
regards
Thats a start. :)
I have some comments that could help reduce review ping-pong, just small
stuff that I already know are not well seen on the kernel community...
static const int RX[]
static const int RY[]
static const int GX[]
static const int GY[]
static const int BX[]
static const int BY[]
Namespace pollution. Names like these are not good, because they may
clash with other stuff on the kernel, use a more meaningful name, and
keep it lower-case (upper case is generally for macro).
Also, it may be a good idea to move these into a header file.
__u8, __u16, __u32
Just use u8, u16, u32...
545 ret = usb_sn9c20x_control_write(dev, 0x1006, led, 2);
546
547 return ret;
Just "return usb_sn9c20x...." No need for the ret variable. Also applies
to a lot of other functions.
UDIA_INFO("Using yuv420 output format\n");
This is a show stopper. People dont like these. Use dev_err|warn|dbg()
or pr_debug().
int sn9c20x_create_sysfs_files(struct video_device *vdev)
This function lacks error handling..
Other than these minor nitpicks the driver looks good. I lack the v4l
subsystem knowledge to comment on more technical stuff.
Don't forget to run scripts/checkpatch.pl on the patches, and follow the
CodingStyle.
Mauro is always at #v4l on irc.freenode.net, nick "mchehab", it may be a
good idea to come in and present the project/driver on IRC.
It's already too late for .30, but I think you have chances to get it in
for .31 if you send it for review ASAP.
Good Luck!
--
Daniel Ribeiro
Here are patches for the first to issues.
They don't really need review but my local git thinks they're already pushed
even though they don't show up in the repo.or.cz-git webinterface
GWater
There is no performance loss on dereferencing a pointer. A printk costs
more than 1000 (just guessing) pointer dereferences.
All sysfs functions take a struct device * as the first argument. Only
thing wrong in there is that you are naming it "class". But what is the
point here? There is no UDIA_* on -sysfs.c
On -usb.c just use udev->dev.
On -queue.c i see that you have a single sn9c20x_video_queue for each
each struct usb_sn9c20x. You should consider not using a struct
sn9c20x_video_queue at all, and just merge your child fields on the
parent struct. If its not an option for you, then you can get your
struct usb_sn9c20x using the container_of macro. eg:
struct usb_sn9c20x *dev = container_of(queue, struct usb_sn9c20x, queue)
> On 8 Jun., 08:15, Brian Johnson <brij...@gmail.com> wrote:
> The other issue is of course that our current macros
> besides just printing the message will check the log level allowing
> the driver to dynamically adjust which messages get displayed.
You shouldn't invent your own log level facility, the kernel already has
one and filtering is done by standard sys(k)logd.
Use dev_[info|warn|err|dbg]. dev_dbg needs #define DEBUG to actually be
on the code.
Some other minor nitpicks....
Dont: },
{
use }, { instead.
Regarding comments format, dont:
300 /*some hardcoded values are present
301 *like those for maximal/minimal exposure
302 *and exposure steps*/
/* single line (dont forget the spaces after start and before end) */
/*
* Multi-line comment
* line 2
* line 3
*/
577 if (ret < 0)
578 return ret;
579 else
580 return 0;
No need for "else" after "return".
613 udelay(delay);
Urgh! Do you really want to block all the kernel while you wait for
USB/I2C I/O? This is a MEGA performance killer. Use usleep() instead.
--
Daniel Ribeiro
Also the kernel doesn't have a usleep function as far as i can tell.
2009/6/9 Daniel Ribeiro <drw...@gmail.com>:
I would just remove them completely. But if you want to keep, replace
for printk() if they are informational message, or for pr_debug() if
they are debugging messages.
> Also the kernel doesn't have a usleep function as far as i can tell.
Sorry, you are right. Consider using msleep() instead. It may have an
impact on your driver performance tough. But at least it will not steal
the kernel and block it from scheduling everything else, so overall
impact on system should be smaller.
--
Daniel Ribeiro
It seems there really is nothing left to do ;).
Anyway upon testing I noticed several things:
1. Compiling without evdev fails because of one dev->input_gpio in the probe
function. It seems this needs an extra
#ifdef EVDEV_bla
since sn9c20x_initialize() uses dev->input_gpio directly after that. Maybe
that part of sn9c20x_initialize should be moved to input_init()?
2. dmesg says that my cam is accessable vie /dev/video1 while it is actually
using /dev/video0. Has something in the nameing conventions changed? (I use
Fedora11. They have moved some parts of HAL over to DeviceKit. However I don't
know whether this is caused by HAL at all).
Apart from that - great. Let' go fast lane for 2.6.31 ;)
GWater
Works for me with my 624f cam, but it's missing gain control.
Anyway, thanks for your work ;)
Regards
Vasily
However if you want to compile it on its own the attached makefiile
should work for compiling.
You will need to copy the jpeg.h and gspca.h headers files from
v4l-dvb for it to work however.
Also make sure to add the following line to the sn9c20x.h header file
#define V4L2_PIX_FMT_SN9C20X_I420 v4l2_fourcc('S', '9', '2', '0')
Actually thats what I did. (downloading the whole v4l-dvb tree). It seems that
one macro from jpeg.h is missing (QUANT_whatever). Therefore not even the tree
builds. Anyway I'll try to get an older revision as I expect this is because
of my a bit older 2.6.29 kernel headers.
GWater
So,
I got todays HEAD + Patch built and insmodded. Unfortunatly I get no only
blackness.
This means:
1. there is a stream (otherwise mplayer would show green)
2. It's to dark in my cave.
3. The manual gain is broken or insufficient for SOI968 (0c45:624e).
4. We need autogain reimplemented. Why are all these features missing anyway?
The advantage of "branching" this code in our repo is that all microdia
contributers can contribute to the gspca_sn9c20x rewrite. Otherwise you need
to reimplement all these faetures on your own.
GWater
Works for me.
Regards
Vasily
> The advantage of "branching" this code in our repo is that all microdia
> contributers can contribute to the gspca_sn9c20x rewrite. Otherwise you
> need to reimplement all these faetures on your own.
Actually, it makes sense to make another git repo with gspca_sn9c20x. I'm sure
that Brian has local repo, so it's time to publish it somewhere ;)
Regards
Vasily
A complete v4l-dvb tree sounds good. (I hadn't thought about this before,
actually)
I'll take a look at the gain code in a few hours. Anyway - there was enough
light to make it work with the standalone driver.
Thank you,
GWater