aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video
AgeCommit message (Collapse)Author
2008-07-20V4L/DVB (8318): OV7670: don't reject unsupported settingsDaniel Drake
For VIDIOC_G_FMT/VIDIOC_TRY_FMT, the V4L2 API spec states: "Drivers should not return an error code unless the input is ambiguous" "Very simple, inflexible devices may even ignore all input and always return the default parameters." "When the requested buffer type is not supported drivers return an EINVAL error code." i.e. returning errors for unsupported fields is bad, and it's ok to unconditionally overwrite user-requested settings This patch makes ov7670 meet that behaviour, and brings it in line with other drivers e.g. stk-webcam. It also fixes compatibility with (unpatched) gstreamer. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8317): Sensoray 2255 V4l driver checkpatch fixesDean Anderson
This patch fixes some coding style issues. It also fixes a NULL de-reference on driver unload. The permissions for the module parameters were changed to 0644. Signed-off-by: Dean Anderson <dean@sensoray.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8316): bt819: Fix a debug messageJean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8315): zr36067: Delete dead codeJean Delvare
This has been commented out for years, it's about time to get rid of it. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8257): uvcvideo: Fix possible AB-BA deadlock with videodev_lock and ↵Laurent Pinchart
open_mutex The uvcvideo driver's uvc_v4l2_open() method is called from videodev's video_open() function, which means it is called with the videodev_lock mutex held. uvc_v4l2_open() then takes uvc_driver.open_mutex to check dev->state and avoid racing against a device disconnect, which means that open_mutex must nest inside videodev_lock. However uvc_disconnect() takes the open_mutex around setting dev->state and also around putting its device reference. However, if uvc_disconnect() ends up dropping the last reference, it will call uvc_delete(), which calls into the videodev code to unregister its device, and this will end up taking videodev_lock. This opens a (unlikely in practice) window for an AB-BA deadlock and also causes a lockdep warning because of the lock misordering. Fortunately there is no apparent reason to hold open_mutex when doing kref_put() in uvc_disconnect(): if uvc_v4l2_open() runs before the state is set to UVC_DEV_DISCONNECTED, then it will take another reference to the device and kref_put() won't call uvc_delete; if uvc_v4l2_open() runs after the state is set, it will run before uvc_delete(), see the state, and return immediately -- uvc_delete() does uvc_unregister_video() (and hence video_unregister_device(), which is synchronized with videodev_lock) as its first thing, so there is no risk of use-after-free in uvc_v4l2_open(). Bug diagnosed based on a lockdep warning reported by Romano Giannetti <romano@dea.icai.upcomillas.es>. Signed-off-by: Roland Dreier <roland@digitalvampire.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8256): uvc/uvc_v4l2.c: suppress uninitialized var warningAndrew Morton
drivers/media/video/uvc/uvc_v4l2.c: In function `uvc_v4l2_mmap': drivers/media/video/uvc/uvc_v4l2.c:1035: warning: 'buffer' might be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8254): uvcvideo : Add support for Asus F9GS integrated webcamLaurent Pinchart
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8253): gspca: fix warnings on x86_64Mauro Carvalho Chehab
/home/v4l/master/v4l/gspca.c: In function 'gspca_frame_add': /home/v4l/master/v4l/gspca.c:222: warning: format '%d' expects type 'int', but argument 2 has type 'long int' /home/v4l/master/v4l/gspca.c: In function 'dev_read': /home/v4l/master/v4l/gspca.c:1568: warning: format '%d' expects type 'int', but argument 2 has type 'size_t' /home/v4l/master/v4l/gspca.c:1618: warning: format '%d' expects type 'int', but argument 3 has type 'size_t' Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8252): buf-dma-sg.c: avoid clearing memory twiceChristophe Jaillet
1) Remove a useless initialisation of 'i' 2) Avoid clearing the memory allocated twice (once in 'kcalloc', once in 'sg_init_table') 3) Remove a test that can never trigger. The function returns NULL in such a case, so we know that at this point 'pages[0]' != NULL Signed-off-by: Christophe Jaillet <jaillet.christophe@wanadoo.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8249): Fix pointer cast warnings in the ivtv framebuffer driverDavid Howells
Fix casts of pointers to integers of different sizes in the ivtv framebuffer driver. These were introduced in patch 38eb6ba5b8487d15b020fe391d324edd2b659b03. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8246): tvaudio: Stop I2C driver ID abuseJean Delvare
The tvaudio driver is using "official" I2C device IDs for internal purpose. There must be some historical reason behind this but anyway, it shouldn't do that. As the stored values are never used, the easiest way to fix the problem is simply to remove them altogether. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8245): ovcamchip: Delete stray I2C bus IDJean Delvare
I2C_HW_SMBUS_OVFX2 is referenced in ovcamchip_core.c, but no bus uses this driver ID, so we can remove the reference. As far as I can see, the Cypress FX2 webcam is handled by a different driver (dvb-usb). Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8244): saa7134: add support for AVerMedia M103Massimo Piccioni
The following patch updates saa7134 driver to add support for AVerMedia M103 MiniPCI DVB-T Hybrid card. Signed-off-by: Massimo Piccioni <alsa@piccio.org> [mchehab@infradead.org: fixed merge conflicts and a small codingstyle] Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8236): cx23885: add support for new revision of FusionHDTV7 Dual ↵Michael Krufky
Express The new revision of this board uses the same pci subsystem id as the first revision, but uses a S5H1411 demodulator instead of the S5H1409. In the case of the FusionHDTV7 Dual Express, if s5h1409_attach fails, try s5h1411_attach. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8235): uvcvideo : Add support for Medion Akoya Mini E1210 ↵Laurent Pinchart
integrated webcam Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8234): uvcvideo: Make input device support optionalLaurent Pinchart
UVC devices can report button events. The uvcvideo driver depends on CONFIG_INPUT to report events to the input layer. This patch removes the hard dependency by introducing a new CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV option. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8232): gspca: Change the USERPTR mechanism.Jean-Francois Moine
main: Change the packet copy mechanism for userptr. Cannot do reqbufs ioctl when already done and count != 0. Accept count < frame size in read(). Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8231): gspca: Do not declare the webcams declared by other drivers.Jean-Francois Moine
etoms: Do not declare the webcams declared by the driver et61x251. sonixb, sonixj: Do not declare the webcams declared by the driver sn9c102. zc3xx: Do not declare the webcams declared by the driver zc0301. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10Hans Verkuil
Also remove some blank lines that were used to split compat code at -devel tree. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8209): uvcvideo: Don't free URB buffers on suspend.Laurent Pinchart
All submitted URBs must be killed at suspend time, but URB buffers don't have to be freed. Avoiding a free on suspend/reallocate on resume lowers the presure on system memory. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8208): uvcvideo: Use GFP_NOIO when allocating memory during resumeLaurent Pinchart
The swap device might still be asleep, so memory allocated in the resume handler must use GFP_NOIO. Thanks to Oliver Neukum for catching and reporting this bug. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8207): uvcvideo: Fix a buffer overflow in format descriptor parsingLaurent Pinchart
Thanks to Oliver Neukum for catching and reporting this bug. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8205): gspca: Size of frame header adjusted according to sn9c10x in ↵Andoni Zubimendi
sonixb. Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8204): gspca: Cleanup code.Jean-Francois Moine
spca508: Cleanup code. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8202): gspca: PAC207 frames may be not compressed.Hans de Goede
pac207: Set the sizeimage to the max value for 352x288. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8201): gspca: v4l2_pix_format in each subdriver.Jean-Francois Moine
main: Parameter comp_fac removed. main, pac207: get_buff_size op removed. (all) v4l2_pix_format in each subdriver. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8199): gspca: Compile warnings about NULL ptr.Harvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8198): gspca: Frame decoding errors when PAC207 in full daylight.Hans de Goede
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8197): gspca: pac207 frames no more decoded in the subdriver.Hans de Goede
videodev2: New pixfmt pac207: Remove the specific decoding. main: get_buff_size operation added for the subdriver. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8196): gspca: Correct sizeimage in vidioc_s/try/g_fmt_capHans de Goede
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8195): gspca: Input buffer overwritten in spca561 + cleanup code.Jean-Francois Moine
spca561: Input buffer may be changed on reg write. (all sd): Cleanup code, 'const' added. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8194): gspca: Fix the format of the low resolution mode of spca561.Hans de Goede
The low (half) res modes of the spca561 are not spca561 compressed, but are raw bayer, this patches fixes this and adds a PIX_FMT define for the GBRG bayer format used by the spca561 in low res mode. Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8193): gspca: Input buffer may be changed on reg write.Jean-Francois Moine
Done for conex, etoms, pac7311, sonixj, t613 and tv8532. Code cleanup for some other subdrivers. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8192): Try to fix a reg_w() bugHans de Goede
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8191): gspca: Make CONFIG_VIDEO_ADV_DEBUG actually work.Hans de Goede
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8189): cx18: Use correct GPIO pin for resetting Xceive 3028 tuner ↵Andy Walls
on Yuan MPC718 Change the Yuan MPC718 cards entry to use the correct GPIO pin for resetting the Xceive 3028 tuner. Thanks to Brian Hope <brian@hopefamily.info> for taking the time and figuring out which pin to use. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8188): cx18: Add missing reset recovery delay in cx18-i2c.cAndy Walls
cx18: Add a missing reset recovery delay in cx18-i2c.c after the final deassert. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8184): spca508: Add Clone Digital Webcam 11043Douglas Schilling Landgraf
Added ID vendor/product for Clone Digital Webcam 11043. Thanks to Ivan Brasil Fuzzer <ivan@fuzzer.com.br> for testing and data collection. Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8181): gspca: read() did not work (loop in kernel, timeout...)Jean-Francois Moine
main: Remove some vidioc_xx traces. main: read() did not work (user irq instead of mmap irq). main: Lack of v4l1 compat. main: Process loop inside kernel when no frame arriving. main: Double qbuf in read() when too many buffered frames. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8180): Source cleanup - compile error with VIDEO_ADV_DEBUG.Jean-Francois Moine
main, etoms, mars, pac207, pac7311, sonixb, sonixj, spca500, spca505: Cleanup source. sunplus: Compilation error when VIDEO_ADV_DEBUG set. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8176): pvrusb2: Update video_gop_sizeMike Isely
When switching video standard, ensure that video GOP size remains appropriately configured. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8175): pvrusb2: Fix misleading source code commentMike Isely
Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8173): saa711x.c: remove obsolete file.Hans Verkuil
saa711x.c is no longer used. Remove. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8171): ivtv: put back full device name, people relied on it in udev ↵Hans Verkuil
rules. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8169): cx18: enable TS supportHans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8168): cx18: Upgrade to newer firmware & update cx18 documentation.Hans Verkuil
Conexant graciously gave us permission to redistribute the firmware. Update the documentation where the firmware can be downloaded. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8167): cx18: set correct audio inputs for tuner and line-in 2.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8165): cx18: fix v4l-cx23418-dig.fw firmware load.Hans Verkuil
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8164): cx18/ivtv: choose a better initial TV standard for cards ↵Hans Verkuil
without eeprom. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20V4L/DVB (8162): cx18: fix PAL/SECAM supportHans Verkuil
Reverted the 'Fix unintended auto configurations in cx18-av-core' patch, instead disable the auto config completely. Fix a bug in cx18_av_vbi_setup() where the standard tests were done in the wrong order. Tested with NTSC-M, PAL-BG, PAL-I, PAL-DK, PAL-M, PAL-Nc, SECAM-DK, SECAM-L and SECAM-BG. The last one does not work at the moment due to a tda9887.c bug. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>