summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/videodev.c
AgeCommit message (Collapse)Author
2006-12-01Improve debug msgs to show fourcc and buffer length on video_ioctl2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-20Remove the need of a STD array for drivers using video_ioctl2Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> CC: Jonathan Corbet <corbet@lwn.net> video_ioctl2 will auto-generate standard entries at ENUM_FMT. Also, now, a driver may return a subset of the video array at the return, to be stored as the current_norm. For example, a driver may ask for V4L2_STD_PAL. At return, driver may change it to V4L2_STD_PAL_B. This way, a futher call to G_STD will return the exact detected video std. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-20Optimization of v4l1 handlingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-20Fix initializations on some video_ioctl2 handlersMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-13Fix oops in VIDIOC_G_PARMMauro Carvalho Chehab
From: Jonathan Corbet <corbet-v4l@lwn.net> The call to v4l2_std_construct() in the VIDIOC_G_PARM handler treats vfd->current_norm as if it were an index - but it's not. The result is an oops if the driver has no vidioc_g_parm() method defined. Here's the fix. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-09Fixed an if-block to avoid floating with debug-messagesMauro Carvalho Chehab
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> The dbgarg() macro in videodev.c contains some printk() statements where only the first one is influenced by an if-statement. This causes floating with debug-messages which is fixed by this patch by adding a '{ ... }' pair. Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-14Add a default method for VIDIOC_G_PARMMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> For most drivers, VIDIOC_G_PARM will just return the current standard fps. So, instead of failing, drivers based on video_ioctl2 will implement the default method. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-13Fix VIDIOC_ENUMSTD ioctl in videodev.cMauro Carvalho Chehab
From: Sascha Hauer <s.hauer@pengutronix.de> Do not return -EINVAL for index=0 in VIDIOC_ENUMSTD, because it is a valid index Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-11Copy-paste bug in videodev.cMauro Carvalho Chehab
This patch fixes a copy-paste bug in videodev.c where the vidioc_qbuf() function gets called for the dqbuf ioctl. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-30Fix a typo that caused some compat stuff to not workMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Config option typo: -#ifdef CONFIG_V4L1_COMPAT +#ifdef CONFIG_VIDEO_V4L1_COMPAT Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-25videodev: Check return value of class_device_register() correctlyTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Errors are return values < 0, not != 0. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-07-25videodev: Handle class_device related errorsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add proper error checking and roll-back for failure of class_device_create_file() in videodev.c. Print error messages and unroll partially created sysfs entries. Also, failure of class_device_register() in video_register_device() is handled correctly. It was failing to de-allocate the minor number. This must be done in video_register_device(), since the caller has no way of knowing if failure occurred before or after the class device was registered. Also added an error message if video_register_device() is called with an unknown type, which should never happen. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-07-23Fix for compilation without V4L1 or V4L1_COMPATMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Removed usage of HAVE_V4L1 Including videodev.h will just include videodev2.h if V4L1 is not supported V4L1 code at core drivers will honor CONFIG_V4L1_COMPAT stuff Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-19[PATCH] devfs: Remove the videodevice devfs_name field as it's no longer neededMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: backport from kernel to v4l/dvb tree Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-19[PATCH] devfs: Remove the devfs_fs_kernel.h file from the treeMauro Carvalho Chehab
From: Greg Kroah-Hartman <gregkh@suse.de> Also fixes up all files that #include it. kernel-sync: backport from kernel to v4l/dvb tree Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-19[PATCH] devfs: Remove devfs_remove() function from the kernel treeMauro Carvalho Chehab
From: Greg Kroah-Hartman <gregkh@suse.de> Removes the devfs_remove() function and all callers of it. kernel-sync: backport from kernel to v4l/dvb tree Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-19[PATCH] devfs: Remove devfs_mk_cdev() function from the kernel treeMauro Carvalho Chehab
From: Greg Kroah-Hartman <gregkh@suse.de> Removes the devfs_mk_cdev() function and all callers of it. kernel-sync: backport from kernel to v4l/dvb tree Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-18videodev: remove bad kfree()Michael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> This fixes a previous commit -- We shouldnt kfree(&vfd->class_dev) inside video_register_device, since the resource is not allocated inside this function. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-07-18videodev: check the return value of class_device_registerMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> If an error occurs during class_device_register, print an error message, kfree(&vfd->class_dev), and return the error code to the caller of video_register_device. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-07-18videodev: replace class_device_create_file with video_device_create_fileMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> This patch replaces the call to class_device_create_file with video_device_create_file, as defined in v4l2-dev.h, so that the return value of class_device_create_file will be checked. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-06-23merge: http://linuxtv.org/hg/~hverkuil/mpeg-apiMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-23fix userbits debug printsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Previously, it were showing the pointer value, instead of the setted bits. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-18Put old MPEGCOMP API under #if __KERNEL__ and issue warnings when used.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-06-18Add videodev support for VIDIOC_S/G/TRY_EXT_CTRLS.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> videodev.c copies the control list specified in struct v4l2_ext_controls to kernel space. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-06-17Fix: videodev.c were cleaning the pointer, not the valuesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-07Fix: Wrong callback check for streamoff.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-07Fixes some errors on *FMT functionsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> memset() were being called on wrong places; At the right places where memset() is required, the type value were being lost. Inserted also debug functions to VIDEO_CAPTURE buffers on *_FMT ioctls. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-06Fixes lots of small errors at videodev.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Fixes several small errors at debug; Fixes max line size to 80 columns; Fixes parameter passage to callback functions; Removed unused fh pointer at video_device struct. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-04Several improvements at videodev.cMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Videodev now is capable of better handling V4L2 api, by processing V4L2 ioctls and using callbacks to the driver. The drivers should be migrated to the newer way and the older one will be obsoleted soon. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-03fix warning: assignment discards qualifiers from pointer target typeMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> The following warning in all kernels < 2.6.17 is caused by changeset a875912f0aada25949e3201bcd97e177040fa782 : http://linuxtv.org/hg/v4l-dvb?cmd=changeset;node=a875912f0aad videodev.c: In function 'video_open': videodev.c:131: warning: assignment discards qualifiers from pointer target type videodev.c:136: warning: assignment discards qualifiers from pointer target type dvbdev.c: In function 'dvb_device_open': dvbdev.c:105: warning: assignment discards qualifiers from pointer target type This changeset restores backwards-compatability. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-04-02[PATCH] mark f_ops const in the inodeMauro Carvalho Chehab
From: Arjan van de Ven <arjan@infradead.org> Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. kernel-sync Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-06sem2mutex: drivers/media/, #2Mauro Carvalho Chehab
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Kernel-sync from patch 3318b Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-21added some VBI macros and moved minor definitions to header fileMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - Moved some hardcoded minor numbers to videodev2.h - Included more comments for sliced VBI standards - Included some VBI macros to group similar standards Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-15Semaphore to mutex conversion on drivers/mediaMauro Carvalho Chehab
From: Ingo Molnar <mingo@elte.hu> Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-11From: Panagiotis Issaris <takis@issaris.org>Mauro Carvalho Chehab
Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to k(z|c)alloc. kernel-sync Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2005-12-22minor whitespace cleanups; fixed videodev.c broken backwards compat for ↵Michael Krufky
kernels < 2.6.12 - fixed videodev.c broken backwards compat for kernels < 2.6.12 - minor whitespace cleanups Signed-off-by: Michael Krufky <mkrufky@m1k.net>
2005-12-09Make videodev.c compile under V4L/DVB treeMauro Carvalho Chehab
kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-12-07kernel-sync patches.Mauro Carvalho Chehab
- kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-14Fixes maximum number of VBI devicesMauro Carvalho Chehab
From: Sigmund Augdal Helberg <sigmund@snap.tv> - Increases the minor number limitation for vbi devices from 223 to 255. This is in agreement with the minor number allocation specified in Documentation/devices.txt. - Without this patch it is not possible to use more than 5 Hauppauge WinTV-PVR 350 cards since each of these allocate 3 vbi devices. Signed-of-by: Sigmund Augdal Helberg <sigmund@snap.tv> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-11-14- added videodev.c from 2.6.14-git13Mauro Carvalho Chehab
kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>