Commit Graph

3201 Commits

Author SHA1 Message Date
Hermann Pitton
0b17d0edbc V4L/DVB (8319): saa7134: Add support for analog only ASUSTeK P7131
saa7134: add a separate entry for the ASUSTeK P7131 analog only
         and do some eeprom detection to escape from the TVFM7135
         with the same PCI subsystem on auto detection.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:45 -03:00
Daniel Drake
cd257a6f4d V4L/DVB (8318): OV7670: don't reject unsupported settings
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-20 07:24:41 -03:00
Dean Anderson
3f8d6f73da V4L/DVB (8317): Sensoray 2255 V4l driver checkpatch fixes
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-20 07:24:32 -03:00
Jean Delvare
91a1d912f6 V4L/DVB (8316): bt819: Fix a debug message
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:26 -03:00
Jean Delvare
203c204b39 V4L/DVB (8315): zr36067: Delete dead code
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-20 07:24:20 -03:00
Laurent Pinchart
a9e2858561 V4L/DVB (8257): uvcvideo: Fix possible AB-BA deadlock with videodev_lock and 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-20 07:19:31 -03:00
Andrew Morton
6f80e1b4cd V4L/DVB (8256): uvc/uvc_v4l2.c: suppress uninitialized var warning
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-20 07:19:26 -03:00
Laurent Pinchart
25e69850d1 V4L/DVB (8254): uvcvideo : Add support for Asus F9GS integrated webcam
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:19:22 -03:00
Mauro Carvalho Chehab
a9e1113483 V4L/DVB (8253): gspca: fix warnings on x86_64
/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-20 07:19:18 -03:00
Christophe Jaillet
a47cacbd86 V4L/DVB (8252): buf-dma-sg.c: avoid clearing memory twice
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-20 07:19:10 -03:00
David Howells
3fce3fb059 V4L/DVB (8249): Fix pointer cast warnings in the ivtv framebuffer driver
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-20 07:18:58 -03:00
Jean Delvare
5a367dfb73 V4L/DVB (8246): tvaudio: Stop I2C driver ID abuse
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-20 07:18:38 -03:00
Jean Delvare
be99af6679 V4L/DVB (8245): ovcamchip: Delete stray I2C bus ID
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-20 07:18:34 -03:00
Massimo Piccioni
e2fc00c211 V4L/DVB (8244): saa7134: add support for AVerMedia M103
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-20 07:18:29 -03:00
Michael Krufky
52b5045078 V4L/DVB (8236): cx23885: add support for new revision of FusionHDTV7 Dual 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-20 07:18:25 -03:00
Laurent Pinchart
bdf2fe4a0b V4L/DVB (8235): uvcvideo : Add support for Medion Akoya Mini E1210 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-20 07:18:13 -03:00
Laurent Pinchart
6833c917b4 V4L/DVB (8234): uvcvideo: Make input device support optional
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-20 07:18:09 -03:00
Jean-Francois Moine
ac0d6df69b V4L/DVB (8232): gspca: Change the USERPTR mechanism.
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-20 07:18:04 -03:00
Jean-Francois Moine
c41492c89a V4L/DVB (8231): gspca: Do not declare the webcams declared by other drivers.
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-20 07:17:59 -03:00
Hans Verkuil
f87086e302 v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10
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-20 07:17:52 -03:00
Laurent Pinchart
e01117c816 V4L/DVB (8209): uvcvideo: Don't free URB buffers on suspend.
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-20 07:17:45 -03:00
Laurent Pinchart
291358785c V4L/DVB (8208): uvcvideo: Use GFP_NOIO when allocating memory during resume
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-20 07:17:40 -03:00
Laurent Pinchart
233548a2fd V4L/DVB (8207): uvcvideo: Fix a buffer overflow in format descriptor parsing
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-20 07:17:34 -03:00
Andoni Zubimendi
553b9fa47d V4L/DVB (8205): gspca: Size of frame header adjusted according to sn9c10x in 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-20 07:17:29 -03:00
Jean-Francois Moine
814429501f V4L/DVB (8204): gspca: Cleanup code.
spca508:  Cleanup code.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:17:24 -03:00
Hans de Goede
80544d3c7a V4L/DVB (8202): gspca: PAC207 frames may be not compressed.
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-20 07:17:20 -03:00
Jean-Francois Moine
c2446b3eba V4L/DVB (8201): gspca: v4l2_pix_format in each subdriver.
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-20 07:17:15 -03:00
Harvey Harrison
efab8211db V4L/DVB (8199): gspca: Compile warnings about NULL ptr.
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-20 07:17:11 -03:00
Hans de Goede
46ccdafa71 V4L/DVB (8198): gspca: Frame decoding errors when PAC207 in full daylight.
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-20 07:17:06 -03:00
Hans de Goede
ab8f12cf8e V4L/DVB (8197): gspca: pac207 frames no more decoded in the subdriver.
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-20 07:17:02 -03:00
Hans de Goede
24c530b4ab V4L/DVB (8196): gspca: Correct sizeimage in vidioc_s/try/g_fmt_cap
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-20 07:16:58 -03:00
Jean-Francois Moine
a5ae206225 V4L/DVB (8195): gspca: Input buffer overwritten in spca561 + cleanup code.
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-20 07:16:53 -03:00
Hans de Goede
54ab92ca05 V4L/DVB (8194): gspca: Fix the format of the low resolution mode of spca561.
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-20 07:16:47 -03:00
Jean-Francois Moine
bf7f0b9842 V4L/DVB (8193): gspca: Input buffer may be changed on reg write.
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-20 07:16:41 -03:00
Hans de Goede
0d2a722dda V4L/DVB (8192): Try to fix a reg_w() bug
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-20 07:16:35 -03:00
Hans de Goede
d646e70181 V4L/DVB (8191): gspca: Make CONFIG_VIDEO_ADV_DEBUG actually work.
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-20 07:16:29 -03:00
Andy Walls
0c61621412 V4L/DVB (8189): cx18: Use correct GPIO pin for resetting Xceive 3028 tuner 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-20 07:16:24 -03:00
Andy Walls
53ad02efe7 V4L/DVB (8188): cx18: Add missing reset recovery delay in cx18-i2c.c
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-20 07:16:19 -03:00
Douglas Schilling Landgraf
69b28b1109 V4L/DVB (8184): spca508: Add Clone Digital Webcam 11043
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-20 07:16:10 -03:00
Jean-Francois Moine
82643d0e90 V4L/DVB (8181): gspca: read() did not work (loop in kernel, timeout...)
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-20 07:16:00 -03:00
Jean-Francois Moine
956e42d28f V4L/DVB (8180): Source cleanup - compile error with VIDEO_ADV_DEBUG.
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-20 07:15:56 -03:00
Mike Isely
00528d9c2e V4L/DVB (8176): pvrusb2: Update video_gop_size
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-20 07:15:52 -03:00
Mike Isely
ab062fe3b5 V4L/DVB (8175): pvrusb2: Fix misleading source code comment
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:15:48 -03:00
Hans Verkuil
7e87218bbf V4L/DVB (8173): saa711x.c: remove obsolete file.
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-20 07:15:43 -03:00
Hans Verkuil
dc5e42fb20 V4L/DVB (8171): ivtv: put back full device name, people relied on it in udev rules.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:15:39 -03:00
Hans Verkuil
e8b934de12 V4L/DVB (8169): cx18: enable TS support
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:15:35 -03:00
Hans Verkuil
1a3932e0ed V4L/DVB (8168): cx18: Upgrade to newer firmware & update cx18 documentation.
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-20 07:15:30 -03:00
Hans Verkuil
81cb727d29 V4L/DVB (8167): cx18: set correct audio inputs for tuner and line-in 2.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:15:19 -03:00
Hans Verkuil
f313da113f V4L/DVB (8165): cx18: fix v4l-cx23418-dig.fw firmware load.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:15:13 -03:00
Hans Verkuil
c3cb4d95ae V4L/DVB (8164): cx18/ivtv: choose a better initial TV standard for cards without eeprom.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:15:08 -03:00
Hans Verkuil
c1738904d6 V4L/DVB (8162): cx18: fix PAL/SECAM support
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>
2008-07-20 07:15:04 -03:00
Mauro Carvalho Chehab
e078770a05 V4L/DVB (8161): gspca: Fix compilation
Some callbacks were renamed. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:59 -03:00
Jean-Francois Moine
50a871fed9 V4L/DVB (8158): gspca: minor changes
main: V4L2_PIX_FMT_SPCA501 is compressed (thanks to Hans de Goede)
main: return 0 when no change on vidioc_s_fmt_cap (thanks to Hans de Goede)
pac207: cleanup

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:55 -03:00
Jean-Francois Moine
6a7eba24e4 V4L/DVB (8157): gspca: all subdrivers
- remaning subdrivers added
- remove the decoding helper and some specific frame decodings

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:49 -03:00
Jean-Francois Moine
d43fa32fec V4L/DVB (8156): Many bug fixes, zc3xx added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:45 -03:00
Jean-Francois Moine
4aa0d037a6 V4L/DVB (8154): Fix protection problems in the main driver.
- Protect format change when streaming active.
- Protect USB exchanges on close.
- Set a timeout in frame wait.
- Have only one capture file and free the resources when closing this file.
- Simplify the URB buffer.
- Don't reset the control values at open time in pac207.
- Fix compilation warnings of stk014.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:40 -03:00
Hans de Goede
e2997a72dd V4L/DVB (8153): Subdriver pac207 added and minor changes.
pac207 added.
Check status on mutex lock.
Call back on frame dequeue.
Free the resources on last close only.
Avoid URB and ISOC errors on close.



Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:32 -03:00
Jean-Francois Moine
63eb9546dc V4L/DVB (8152): Initial release of gspca with only one driver.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:28 -03:00
Hans Verkuil
8b53b39d62 V4L/DVB (8151): saa7134-empress: fix MPEG control support
The MPEG controls could not be enumerated and so could not be read or set
through the v4l2-ctl utility or shown in control panels.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:23 -03:00
Tim Farrington
e5e4cd8df6 V4L/DVB (8149): Avermedia E506 composite
Composite was originally mis-labelled as name_comp1,
so it should be simply redone as name_comp,
with its now corrected attributes.

Signed-off-by: Tim Farrington <timf@iinet.net.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:19 -03:00
Mauro Carvalho Chehab
ecfceef742 V4L/DVB (8143): Fix compilation for mt9v022
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:00 -03:00
Al Viro
9c169df8d6 V4L/DVB (8134): zoran annotations and fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:13:39 -03:00
Al Viro
86ecc02755 V4L/DVB (8133): cx23885 endianness fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:13:35 -03:00
Al Viro
3aa7110e1c V4L/DVB (8132): bt8xx endianness annotations and fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:13:31 -03:00
Dean Anderson
38f993ad8b V4L/DVB (8125): This driver adds support for the Sensoray 2255 devices.
It was primarily developed by Dean Anderson with only a little bit of
guidance and cleanup by Greg.

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
[mchehab@infradead.org: fixed renamed callbacks]
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:59 -03:00
Daniel Gimpelevich
bfda3a0b32 V4L/DVB (8124): Add LifeVideo To-Go Cardbus PCI ID
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:53 -03:00
Devin Heitmueller
a9fc52bcbe V4L/DVB (8123): Add support for em2860 based PointNix Intra-Oral Camera
em28xx-cards.c
em28xx-input.c
em28xx-video.c
em28xx.h
 - Add support for the PointNix Intra-Oral Camera, which required addition of
   a construct for reading the "snapshot" button (provided on the em2860 and
   em2880 chips, but this is the first case where I have seen it actually used
   in a product). The button is wired to pin 56 on the em2880.

   http://www.pointnix.com/ENG/dental/product_02.asp

   Thanks to Roberto Mantovani <rmantovani@libero.it> for testing the changes

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:48 -03:00
Douglas Schilling Landgraf
305519c924 V4L/DVB (8120): cx23885-417: Replace cx23885_do_ioctl to use video_ioctl2
Convert cx23885-417 to use video_ioctl2

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:43 -03:00
Dan Taylor
9c7ecaf5ac V4L/DVB (8117): saa7134: Avermedia A16D composite input
Signed-off-by: Star Trac by Unisen, Inc. Dan Taylor <dtaylor@startrac.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:38 -03:00
Hans Verkuil
6264c80661 V4L/DVB (8116): videodev: allow PRIVATE_BASE controls when called through VIDIOC_G/S_CTRL.
V4L2_CID_PRIVATE_BASE controls are not allowed when called from
VIDIOC_S/G_EXT_CTRL as extended controls use a better mechanism
for private controls. But still allow it when called from the
VIDIOC_G/S_CTRL to extended control conversion in video_ioctl2()
for backwards compatibility.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:33 -03:00
Andy Walls
c5588b5c47 V4L/DVB (8114): cx18: Improve Raptor card audio input routing defintions
cx18: Improved Raptor card audio input routing defintions, so that muxer values
matched cx18_gpio() values for tuner, line in 1, and radio and added LED
indication of selected audio input.  Audio line in 2 doesn't work as it uses
the not yet supported 2nd I2S port.  Tuner/FM Radio AF is mono until SIF
support is fixed.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:27 -03:00
Hans Verkuil
adb65bc71c V4L/DVB (8113): ivtv/cx18: remove s/g_ctrl, now all controls are handled through s/g_ext_ctrl
videodev converts old-style controls to an extended control so the ivtv and
cx18 drivers no longer have to handle both.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:23 -03:00
Hans Verkuil
d8799b4699 V4L/DVB (8112): videodev: improve extended control support in video_ioctl2()
- add sanity checks for the extended controls argument.
- if the driver only supports extended controls, then convert
  old-style controls to an extended control callback.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:18 -03:00
Hans Verkuil
36ecd4955a V4L/DVB (8111): ivtv/cx18: fix compile error when CONFIG_VIDEO_ADV_DEBUG is not defined.
Thanks to Randy Dunlap for reporting this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:14 -03:00
Mauro Carvalho Chehab
1d0a436256 V4L/DVB (8110): bttv: allow debug ioctl's
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:09 -03:00
Hans Verkuil
f24648e42f V4L/DVB (8107): cx18: improve support for the Raptor board.
- add radio definition
- reset the audio firmware (required for this board, harmless for the
others)

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:05 -03:00
Hans Verkuil
156f194b9d V4L/DVB (8106): ivtv/cx18: improve tuner std check in card definitions.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:12:01 -03:00
Hans Verkuil
e0e31cdb91 V4L/DVB (8105): cx2341x: add TS capability
The cx18 can support transport streams with newer firmwares. Add a TS
capability to the generic cx2341x module.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:55 -03:00
Hans Verkuil
37f89f9542 V4L/DVB (8104): cx18/ivtv: ioctl debugging improvements
Completely rely on the video_ioctl2 debugging facilities rather than
doing it ourselves.

Fill in some missing fields in ivtv with VIDIOC_G_FBUF.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:51 -03:00
Hans Verkuil
21575c1312 V4L/DVB (8103): videodev: fix/improve ioctl debugging
Various ioctl debugging fixes and improvements:

- use %x rather than %d for control IDs and bitmask fields
- make two arrays const
- show the whole control array for the ext_ctrl ioctls
- print pix_fmt for V4L2_BUF_TYPE_VIDEO_OUTPUT
- show full type name rather than an integer
- fix CROPCAP debugging
- fix G/S_TUNER debugging
- show error code in case of an error
- other small cleanups

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:44 -03:00
Huang Weiyi
fa1035997c V4L/DVB (8095): zoran_driver.c: Removed duplicated include
Removed duplicated include file <asm/byteorder.h> in
drivers/media/video/zoran_driver.c.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:34 -03:00
Hans Verkuil
fdea5d69c1 V4L/DVB (8093): cx18: fix prefix typo
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:28 -03:00
Hans Verkuil
3d66c40570 V4L/DVB (8091): cx18: show GPIO pins when VIDIOC_LOG_STATUS is called.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:23 -03:00
Ian Armstrong
42b03fe16f V4L/DVB (8090): ivtv: yuv decoder lock fix (2)
The IVTV_IOC_DMA_FRAME ioctl fails to correctly 'start' the decoder. Although
yuv output will be correct, some functions which should be disabled while the
decoder is in use remain enabled. This can result in hardware registers being
corrupted, causing problems with the mpeg decoder. This patch ensures the
decoder 'start' sequence is called, disabling these functions until the
device is closed.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:18 -03:00
Sri Deevi
03c2808503 V4L/DVB (8089): cx18: add support for Conexant Raptor PAL/SECAM card
Patch provided courtesy of Conexant http://www.conexant.com.

Signed-off-by: Srinivasa Deevi <srinivasa.deevi@conexant.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:13 -03:00
Ian Armstrong
464e9f3a0c V4L/DVB (8088): ivtv: yuv decoder lock fix
write() operations to the yuv device may not always 'start' the decoder.
Although yuv output will be correct, some functions which should be disabled
while the decoder is in use remain enabled. This can result in hardware
registers being corrupted, causing problems with the mpeg decoder. This patch
simply moves the existing decoder 'start' sequence to earlier in the write()
handler.

Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:09 -03:00
Hans Verkuil
0b5a30e90d V4L/DVB (8087): cx18: make sure all v4l2_format fields are filled in
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:05 -03:00
Hans Verkuil
e27bf207db V4L/DVB (8086): ivtv/cx18: fix video_temporal_filter handling
If the capture is scaled, then the video_temporal_filter is set to 0
by the cx2341x.c module since otherwise you would get ghosting.

However, this was also done in the VIDIOC_S_FMT ioctl which meant that
the video_temporal_filter control was reset to 0 or 8 each time S_FMT
was called. This was old code that should have been removed a long time
ago.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:11:00 -03:00
Hans Verkuil
5cf2cc4803 V4L/DVB (8085): ivtv: fill in all v4l2_framebuffer fields in VIDIOC_G/S_FBUF
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:56 -03:00
Hans Verkuil
79afcb10df V4L/DVB (8084): ivtv/cx18: remove unnecessary memsets & KERNEL_VERSION tests
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:52 -03:00
Hans Verkuil
8bfb9b1ce6 V4L/DVB (8083): videodev: zero fields for ENCODER_CMD and VIDIOC_G_SLICED_VBI_CAP
This avoids the need of memsets in the ivtv/cx18 drivers.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:48 -03:00
Andy Walls
3b6fe58f0f V4L/DVB (8082): cx18: convert to video_ioctl2()
cx18: convert driver to use video_ioctl2().  Pushed down ioctl debug
messages and priority checks as well.  Still left serialization lock in
place for now.  #if 0'ed out sliced vbi ioctl code for now.

Patch heavily based on similar changes made to ivtv by Hans Verkuil.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:43 -03:00
Hans Verkuil
1a05221bc4 V4L/DVB (8081): ivtv: remove obsolete arrays.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:39 -03:00
Hans Verkuil
e88360c0f3 V4L/DVB (8080): ivtv: make sure all v4l2_format fields are filled in
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:35 -03:00
Hans Verkuil
3f038d8003 V4L/DVB (8079): ivtv: Convert to video_ioctl2.
Based on an initial conversion patch from Douglas Landgraf.

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:31 -03:00
brandon@ifup.org
539a7555b3 V4L/DVB (8078): Introduce "index" attribute for persistent video4linux device nodes
A number of V4L drivers have a mod param to specify their preferred minors.
This is because it is often desirable for applications to have a static /dev
name for a particular device.  However, using minors has several disadvantages:

  1) the requested minor may already be taken
  2) using a mod param is driver specific
  3) it requires every driver to add a param
  4) requires configuration by hand

This patch introduces an "index" attribute that when combined with udev rules
can create static device paths like this:

/dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video0
/dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video1
/dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video2

$ ls -la /dev/v4l/by-path/pci-0000\:00\:1d.2-usb-0\:1\:1.0-video0
lrwxrwxrwx 1 root root 12 2008-04-28 00:02 /dev/v4l/by-path/pci-0000:00:1d.2-usb-0:1:1.0-video0 -> ../../video1

These paths are steady across reboots and should be resistant to rearranging
across Kernel versions.

video_register_device_index is available to drivers to request a
specific index number.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Kees Cook <kees@outflux.net>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:10:27 -03:00
Mauro Carvalho Chehab
c121ba1f40 V4L/DVB (8050): Add register get/set debug ioctls to saa7134
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:09:50 -03:00
Jean Delvare
df9b5d4cf6 V4L/DVB (8047): bt8xx: i2c structure templates clean-up
Clean up the use of structure templates in bttv-i2c. For one thing, a
real template is supposed to be read-only. And in some cases it's more
efficient to initialize the few fields we need individually.

This clean-up shrinks bttv-i2c.o by 29% (x86_64).

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:09:41 -03:00
Jean Delvare
6275163e3d V4L/DVB (8046): zoran: i2c structure templates clean-up
Clean up the use of structure templates in zoran_card. For one thing,
a real template is supposed to be read-only. And in some cases it's
more efficient to initialize the few fields we need individually.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:09:37 -03:00
Mauro Carvalho Chehab
584ce48de9 V4L/DVB (8024): vivi: rename MODULE_NAME macro to VIVI_MODULE_NAME to avoid namespace conflicts
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:09:18 -03:00