V4L/DVB (12278): zr364xx: implement V4L2_CAP_STREAMING
authorLamarque Vieira Souza <lamarque@gmail.com>
Wed, 15 Jul 2009 23:54:55 +0000 (20:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 12 Sep 2009 15:17:44 +0000 (12:17 -0300)
commitccbf035ae5de4c535160fc99f73feb44cc55b534
tree616ac85f09e31bfaad688dd6719a185e92eb6b81
parenta4afd65870188b872ec9b5cc0330f7c818c4c3a4
V4L/DVB (12278): zr364xx: implement V4L2_CAP_STREAMING

This patch implements V4L2_CAP_STREAMING for the zr364xx driver, by
converting the driver to use videobuf. This version is synced with v4l-dvb as
of 15/Jul/2009.

Tested with Creative PC-CAM 880.

It basically:
. implements V4L2_CAP_STREAMING using videobuf;

. re-implements V4L2_CAP_READWRITE using videobuf;

. copies cam->udev->product to the card field of the v4l2_capability struct.
That gives more information to the users about the webcam;

. moves the brightness setting code from before requesting a frame (in
read_frame) to the vidioc_s_ctrl ioctl. This way the brightness code is
executed only when the application requests a change in brightness and
not before every frame read;

. comments part of zr364xx_vidioc_try_fmt_vid_cap that says that Skype +
libv4l do not work.

This patch fixes zr364xx for applications such as mplayer,
Kopete+libv4l and Skype+libv4l can make use of the webcam that comes
with zr364xx chip.

Signed-off-by: Lamarque V. Souza <lamarque@gmail.com>
Signed-off-by: Antoine Jacquet <royale@zerezo.com>
[mchehab@redhat.com: fix the lack of linux/version.h]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/zr364xx.c