Devin Heitmueller [Thu, 7 Jan 2010 03:52:39 +0000 (00:52 -0300)]
V4L/DVB: cx18: address possible passing of NULL to snd_card_free
Eliminate the possibility of passing NULL to snd_card_free().
Thanks to Takashi Iwai for reviewing and pointing this out.
This work was sponsored by ONELAN Limited.
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Mon, 21 Dec 2009 02:53:46 +0000 (23:53 -0300)]
V4L/DVB: cx18-alsa: codingstyle cleanup
Move the cx18_alsa_announce_pcm_data() function further up in the file, since
apparently "make checkpatch" has never heard of a forward declaration. Note
that despite the hg diff showing everything else as having been deleted/added,
in reality it was only that one function that got moved (and the forward
declaration was removed from the top of the file).
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Mon, 21 Dec 2009 02:50:02 +0000 (23:50 -0300)]
V4L/DVB: cx18-alsa: codingstyle cleanup
Remove some dead code and make a PCM specific module debug parameter to avoid
an extern reference.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Mon, 21 Dec 2009 02:29:02 +0000 (23:29 -0300)]
V4L/DVB: cx18: codingstyle fixes
Codingstyle fixes, some introduced as a result of the ALSA work, some
pre-existing. This patch is a whitespace change only.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Mon, 21 Dec 2009 02:15:58 +0000 (23:15 -0300)]
V4L/DVB: cx18-alsa: codingstyle fixes
Fix codingstyle issues, and make the minimum version for cx18-alsa required
to be 2.6.17, so that we don't need all the #ifdefs related to the changes
to ALSA structures.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Mon, 21 Dec 2009 02:01:46 +0000 (23:01 -0300)]
V4L/DVB: cx18-alsa: fix codingstyle issue
Address coding style issue with cx18-alsa-main.c
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Sat, 12 Dec 2009 20:38:53 +0000 (17:38 -0300)]
V4L/DVB: cx18-alsa: fix memory leak in error condition
If the stream is already in use, make sure we free up the memory allocated
earlier.
Thanks to Andy Wall for reviewing and pointing this out.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Mon, 23 Nov 2009 02:42:33 +0000 (23:42 -0300)]
V4L/DVB: cx18-alsa: remove a couple of warnings
Remove a couple of warnings from dead code during driver development.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 05:15:20 +0000 (02:15 -0300)]
V4L/DVB: cx18-alsa: name alsa device after the actual card
Use the cx18 board name in the ALSA description, to make it easier for users
who run "arecord -l" to see which device they should be looking for.
Also, use strlcpy() instead of strcpy().
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 04:24:57 +0000 (01:24 -0300)]
V4L/DVB: cx18: cleanup cx18-alsa debug logging
Fix the debug macro so that it is dependent on the modprobe parameter.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 04:15:54 +0000 (01:15 -0300)]
V4L/DVB: cx18: rework cx18-alsa module loading to support automatic loading
Restructure the way the module gets loaded so that it gets loaded automatically
when cx18 is loaded, and make it work properly if there are multiple cards
present (since the old code would only take one opportunity to connect to cx18
instances when the module first loaded).
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 02:35:36 +0000 (23:35 -0300)]
V4L/DVB: cx18-alsa: remove unneeded debug line
Remove an unneeded debug line, which was preventing the cx18-alsa module from
loading.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 02:23:57 +0000 (23:23 -0300)]
V4L/DVB: cx18: export more symbols required by cx18-alsa
Export a couple of more symbols required by the cx18-alsa module.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 02:17:40 +0000 (23:17 -0300)]
V4L/DVB: cx18: add cx18-alsa module to Makefile
Add cx18-alsa to the Makefile and Kconfig
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Tue, 19 Jan 2010 00:29:51 +0000 (21:29 -0300)]
V4L/DVB: cx18: overhaul ALSA PCM device handling so it works
Add code so that the PCM ALSA device actually works, and update the
cx18-streams mechanism so that it passes the data off to the cx18-alsa module.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 01:52:30 +0000 (22:52 -0300)]
V4L/DVB: cx18: export a couple of symbols so they can be shared with cx18-alsa
Expose a couple of symbols in the cx18 module so that locking of the PCM
stream can be shared with the cx18-alsa module.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 01:46:10 +0000 (22:46 -0300)]
V4L/DVB: cx18: make it so cx18-alsa-main.c compiles
Fix some basic compilation issues with Andy's original code. In particular,
temporarily #ifdef out the mixer code, add some additional exception handling,
fix a couple of typos, and add a copyright line.
This work was sponsored by ONELAN Limited.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Fri, 20 Nov 2009 01:40:41 +0000 (22:40 -0300)]
V4L/DVB: cx18: rename cx18-alsa.c
Rename cx18-alsa.c to cx18-alsa-main.c so that we can call the final .ko file
cx18-alsa.ko
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Wed, 24 Jun 2009 10:26:45 +0000 (07:26 -0300)]
V4L/DVB: cx18-alsa: Add non-working cx18-alsa-pcm.[ch] files to avoid data loss
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Tue, 26 May 2009 00:40:25 +0000 (21:40 -0300)]
V4L/DVB: cx18-alsa: Initial non-working cx18-alsa files
Initial cx18-alsa module files check-in to avoid losing work.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Igor M. Liplianin [Sun, 17 Jan 2010 15:23:04 +0000 (12:23 -0300)]
V4L/DVB: dm1105: use macro for read/write registers
This is for better readability and smaller size of code lines.
Also it is for future improvements like GPIO handling.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Igor M. Liplianin [Sun, 17 Jan 2010 15:11:00 +0000 (12:11 -0300)]
V4L/DVB: dm1105: use dm1105_dev & dev instead of dm1105dvb
This is for better readability and smaller size of code.
Also it is similar to other drivers.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Igor M. Liplianin [Sun, 17 Jan 2010 14:15:06 +0000 (11:15 -0300)]
V4L/DVB: dm1105: connect splitted else-if statements
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
JD Louw [Sun, 17 Jan 2010 12:57:46 +0000 (09:57 -0300)]
V4L/DVB: Compro S350 GPIO change
This patch enables LNB power on newer revision d1 Compro S350 and S300 DVB-S cards.
Signed-off-by: JD Louw <jd.louw@mweb.co.za>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Igor M. Liplianin [Sun, 17 Jan 2010 13:32:26 +0000 (10:32 -0300)]
V4L/DVB: Add Support for DVBWorld DVB-S2 PCI 2004D card
The PCI card contains dm1105 PCI bridge and ds3000 demod.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Mon, 18 Jan 2010 00:12:24 +0000 (21:12 -0300)]
V4L/DVB: ivtv: Adjust msleep() delays used to prevent tinny audio and PCI bus hang
Martin Dauskardt <martin.dauskardt@gmx.de> has done extensive testing on what
values can be used and and concluded that only 300 ms total is required to
avoid bad video effects such as occasional black screen and short sync
disturbances. Furthermore he determined how this 300 ms was split between
the two msleep()s did matter very much, so he suggested 150ms/150ms as one
acceptable alternative that is implemented here.
Many thanks go to Martin.
Tested-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andy Walls [Thu, 24 Dec 2009 16:06:08 +0000 (13:06 -0300)]
V4L/DVB: cx25840, v4l2-subdev, ivtv, pvrusb2: Fix ivtv/cx25840 tinny audio
This change attempts to fix the ivtv tinny audio problem by keeping digitizer
to encoder audio clocks running, while disabling the video clocks as needed to
avoid unpredictable PCI bus hangs.
To accomplish this, for the cx25840 module enabling of audio streaming had
to be separated from enabling video streaming, requiring an additional
v4l2_subdev_audio_op and calls to this new op in the pvrusb2 and ivtv drivers.
The cx231xx and cx23885 driver use the cx25840 module for affecting only
video on s_stream calls, so those drivers needed no change.
The CX23418 hardware does not exhibit either the tinny audio problem nor the PCI
bus hang, so the cx18 driver did not need corresponding changes.
CX2341[56] based cards that are not using the CX2584x family of chips
do not seem to be affected by the tinny audio problem, and this change should
not affect how they are configured. It will delay their first capture by
starting by another 300 msec though.
Many thanks go to Argus <pthorn-ivtvd@styx2002.no-ip.org> and
Martin Dauskardt <martin.dauskardt@gmx.de> whose persistent testing and
investigation of this problem will hopefully fix this problem once and for all
for many ivtv users.
Reported-by: Martin Dauskardt <martin.dauskardt@gmx.de>
Reported-by: Argus <pthorn-ivtvd@styx2002.no-ip.org>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Ian Armstrong [Tue, 22 Dec 2009 01:59:26 +0000 (22:59 -0300)]
V4L/DVB: ivtv: Fix race condition for queued udma transfers
There are several DMA related interrupts which wake up the dma_waitq. The udma
routines use this queue while they wait for their transfer to complete. When
woken, the udma routine will check the IVTV_F_I_UDMA_PENDING & IVTV_F_I_UDMA
flags to see if the transfer is still queued or has finished. However, a small
window exists between the IVTV_F_I_UDMA_PENDING flag being cleared and the
IVTV_F_I_UDMA flag being set. Given that the completion of an unrelated DMA
transfer may wake up the udma routine, it's possible for this check to fail
and the udma routine will start unmapping pages when the transfer has only
just started. The result of this is unpredictable.
This fix simply delays the clearing of the IVTV_F_I_UDMA_PENDING flag until
after IVTV_F_I_UDMA has been set.
Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk>
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Abylay Ospan [Fri, 22 Jan 2010 19:01:44 +0000 (16:01 -0300)]
V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod
22-kHz tone can be driven in two ways:
1. LNBH24 can produce 22kHz continuous tone when TEN=1 ( 22 KHz tone output is
always activated ).
2. LNBH24 can reproduce 22kHz tone timings from DSQIN or EXTM pin's when TEN=0.
From LNBH24 datasheet:
"In order to improve design flexibility an external tone input pin is
available (EXTM). The EXTM is a Logic input pin which activates the 22 kHz
tone output, on the VoTX pin, by using the LNBH24 integrated tone generator
(similar to the DSQIN pin function). In fact, the output tone waveform
characteristics will always be internally controlled by the LNBH24 tone
generator and the EXTM signal will be used as a timing control for DiSEqC tone
data encoding on the VoTX output."
In NetUP Dual DVB-S2-CI card 22kHz tone timings on EXTM pin produced by
STV0900 demod:
.set_tone = stv0900_set_tone
redefine to "set_tone = lnbp21_set_tone" is not correct for "NetUP Dual
DVB-S2-CI card".
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 14 Jan 2010 13:00:31 +0000 (10:00 -0300)]
V4L/DVB (14005): media/video Kconfig: Mark gspca superceeded drivers as deprecated
We have some duplicate functionality between the zc0301 and gspca-zc3xx,
the sn9c102 and gspca-sonixb + gspca-sonix, and et61x251 and gscpa-etoms
drivers.
The non gspca versions of these drivers not only show a lot of code
duplicty (amongsth each other), as they all copy the same generic usb
webcam code instead of using some sort of framework. They also have not
seen any updates for more then 2 years, where as the gspca drivers are
actively maintained.
So it is time for the non gspca versions of these drivers to go away,
marking them as deprecated is the first step in this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 14 Jan 2010 12:40:37 +0000 (09:40 -0300)]
V4L/DVB (14004): drivers/media/video/Kconfig: Turn deprecated drivers off by default
drivers/media/video/Kconfig: Turn deprecated drivers off by default
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 14 Jan 2010 12:37:18 +0000 (09:37 -0300)]
V4L/DVB (14003): gspca_cpai1: New gspca subdriver for CPIA CPiA version 1 cams
This new driver supports USB PIA CPiA version 1 cams, replacing the
old v4l1 driver.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Theodore Kilgore [Thu, 14 Jan 2010 15:07:18 +0000 (12:07 -0300)]
V4L/DVB (14006): gscpa_sq905c: Better detection of CIF resolution cameras
gscpa_sq905c: Better detection of CIF resolution cameras
Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sun, 10 Jan 2010 22:34:57 +0000 (19:34 -0300)]
V4L/DVB (14002): gspca_sonixb / sn9c102: Make gspca handle 0c45:6007
When both the gspca_sonixb and the sn9c102 driver are enabled, make the
gspca_sonixb driver handle cams with usb-id of 0c45:6007. The sn9c102 driver
is being phased out and gspca driver has been successfully tested
with an 0c45:6007 camara.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sun, 10 Jan 2010 22:31:34 +0000 (19:31 -0300)]
V4L/DVB (14001): gscpa_sonixb: Differentiate between tas5110c and tas5110d and fix d hstart
Our hstart value was wrong for tas5110d sensor using sonixb cams, this
patch fixes this. Many thanks to Paulus (laudaka) for donating me a camera
with such a sensor IC.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sat, 9 Jan 2010 22:45:44 +0000 (19:45 -0300)]
V4L/DVB (14000): gspca_ov519: ov764x remove setting of AEC limits
ov764x remove setting of AEC limits, as the custom values cause AEC
oscilation in 320x240.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sat, 9 Jan 2010 22:22:34 +0000 (19:22 -0300)]
V4L/DVB (13999): gspca_ov519: remove non functioning contrast control for ov764x sensor
gspca_ov519: remove non functioning contrast control for ov764x sensor
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sat, 9 Jan 2010 11:14:43 +0000 (08:14 -0300)]
V4L/DVB (13998): gscpa_ov519: Fix 320x240 on ov519 + ov7648
Differentiate between ov7640 and ov7648 and handle the ov7648 320x240
on the ov519 bridge specially to fix r and b being swapped.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 7 Jan 2010 18:42:35 +0000 (15:42 -0300)]
V4L/DVB (13997): gspca_ov519: differentiate ov7620 and ov7620ae and fix 640x480 on the 7620
Michael Deegan <michael@ucc.gu.uwa.edu.au>, has reported issues with
using 640x480 mode on his ov518+ webcam. The fix for this breaks things
on my ov518+ cam (Trust 320 Sp@cecam), this patch thus adds differentiation
in the driver between the OV7620 sensor his cam has and the OV7620AE sensor
my cam has, and then only changes the init sequence for the ov518+ +
OV7620 combo which was not working for Michael.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 7 Jan 2010 18:31:48 +0000 (15:31 -0300)]
V4L/DVB (13996): gspca_stv0680: Fix streaming on vga cameras
Streaming of VGA stv0680 based cams (instead of CIF ones) failed, because
we were using the wrong control pipe for certain commands, this patch fixes
this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 7 Jan 2010 15:06:00 +0000 (12:06 -0300)]
V4L/DVB (13995): gspca_ov519: mark led on eyetoy II as inverted
Mark led on eyetoy II as inverted, I have the feeling the led needs to
be inverted for all 519 based cams (iow we got the set led code wrong), but
lets just deal with this one cam at a time to avoid breaking currently
working cams.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Thu, 7 Jan 2010 15:04:04 +0000 (12:04 -0300)]
V4L/DVB (13994): gscpa_stv0680: Fix camera initialization on hotplug
stv0680 cameras currently only work when already plugged in when the system
boots (or when manually re-loading the driver after boot). This patch fixes
this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Theodore Kilgore [Fri, 25 Dec 2009 08:19:24 +0000 (05:19 -0300)]
V4L/DVB (13993): gspca.txt: add cams supported by mr97310a, sq905(c) and sn9c2028 drivers
gspca.txt: add cams supported by mr97310a, sq905(c) and sn9c2028 drivers
Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Theodore Kilgore [Fri, 25 Dec 2009 08:16:32 +0000 (05:16 -0300)]
V4L/DVB (13992): gspca_sn9c2028: New gspca subdriver
New gspca subdriver adding support for SN9C2028 dual-mode cameras.
Signed-off-by: Theodore Kilgore <kilgota@banach.math.auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Theodore Kilgore [Fri, 25 Dec 2009 08:15:10 +0000 (05:15 -0300)]
V4L/DVB (13991): gspca_mr973010a: Fix cif type 1 cameras not streaming on UHCI controllers
If you read the mail to Oliver Neukum on the linux-usb list, then you know
that I found a cure for the mysterious problem that the MR97310a CIF "type
1" cameras have been freezing up and refusing to stream if hooked up to a
machine with a UHCI controller.
Namely, the cure is that if the camera is an mr97310a CIF type 1 camera, you
have to send it 0xa0, 0x00. Somehow, this is a timing reset command, or
such. It un-blocks whatever was previously stopping the CIF type 1 cameras
from working on the UHCI-based machines.
Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Arvo Järve [Sun, 10 Jan 2010 20:15:57 +0000 (17:15 -0300)]
V4L/DVB (13989): [TDA8261] Fix TDA8261 I2C read bug
The TDA8261 driver would crash when reading more than a byte as described.
ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff
[ 8.430350] KNC1-2: MAC addr = 00:09:d6:65:2d:91
[ 8.610008] saa7146 (1) saa7146_i2c_writeout [irq]: timed out waiting for end of xfer
[ 8.734457] stb0899_attach: Attaching STB0899
[ 8.768481] tda8261_attach: Attaching TDA8261 8PSK/QPSK tuner
[ 8.768485] DVB: registering adapter 2 frontend 0 (STB0899 Multistandard)...
Once I launch scan-s2:
scan-s2 -vvvv -a 2 -s 1 -l UNIVERSAL /usr/share/dvb/dvb-s/Hotbird-13.0E
I see the following via dmesg:
[ 435.040017] saa7146 (1) saa7146_i2c_writeout [irq]: timed out waiting for end of xfer
[ 435.778648] tda8261_get_bandwidth: Bandwidth=
40000000
[ 435.781781] tda8261_get_bandwidth: Bandwidth=
40000000
[ 435.783311] tda8261_set_state: Step size=1, Divider=1000, PG=0x793 (1939)
[ 435.783512] tda8261_set_state: Waiting to Phase LOCK
[ 435.810134] tda8261_get_status: Tuner Phase Locked
[ 435.810137] tda8261_set_state: Tuner Phase locked: status=1
[ 435.810139] tda8261_set_frequency: Frequency=
1939000
[ 435.810141] tda8261_get_frequency: Frequency=7574
[ 435.830008] tda8261_get_bandwidth: Bandwidth=
40000000
[ 436.402814] tda8261_get_bandwidth: Bandwidth=
40000000
[ 436.405946] tda8261_get_bandwidth: Bandwidth=
40000000
[ 436.407458] general protection fault: 0000 [#1] SMP
[ 436.407527] last sysfs file: /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
[ 436.407560] CPU 0
[ 436.407601] Modules linked in: tda8261 stb0899 dvb_pll mt352 lnbp21 budget_av saa7146_vv snd_hda_codec_realtek videodev stv0299 v4l1_compat coretemp snd_hda_intel v4l2_compat_ioctl32 i915 videobuf_dma_sg b2c2_flexcop_pci snd_hda_codec budget_ci videobuf_core b2c2_flexcop ir_common w83627ehf drm snd_hwdep cx24123 budget_core hwmon_vid snd_pcm cx24113 dvb_core iptable_filter snd_timer i2c_algo_bit ip_tables saa7146 s5h1420 snd ttpci_eeprom soundcore intel_agp video serio_raw pcspkr lp snd_page_alloc x_tables output parport pata_it8213 e1000e
[ 436.408757] Pid: 1410, comm: kdvb-ad-2-fe-0 Not tainted 2.6.31-14-server #48-Ubuntu C2SBC-Q
[ 436.408818] RIP: 0010:[<
ffffffffa00241a1>] [<
ffffffffa00241a1>] tda8261_set_state+0x51/0x250 [tda8261]
[ 436.408903] RSP: 0018:
ffff88013649bc70 EFLAGS:
00010283
[ 436.408945] RAX:
00000000000f1748 RBX:
ffff880138870680 RCX:
0000000000000018
[ 436.408990] RDX:
ffff88013649bcd0 RSI:
0000000000000001 RDI:
ffff880135273010
[ 436.409035] RBP:
ffff88013649bcc0 R08:
0000000000000001 R09:
0000000000000002
[ 436.409081] R10:
ffff88013649bc40 R11:
0000000055555556 R12:
00000000001d9638
[ 436.409126] R13:
38ffffffa0261568 R14:
0000000000000000 R15:
ffff880135273010
[ 436.409172] FS:
0000000000000000(0000) GS:
ffff880028022000(0000) knlGS:
0000000000000000
[ 436.409232] CS: 0010 DS: 0018 ES: 0018 CR0:
000000008005003b
[ 436.409274] CR2:
00007fff925e4cd8 CR3:
000000013642a000 CR4:
00000000000406f0
[ 436.409320] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[ 436.409365] DR3:
0000000000000000 DR6:
00000000ffff0ff0 DR7:
0000000000000400
[ 436.409411] Process kdvb-ad-2-fe-0 (pid: 1410, threadinfo
ffff88013649a000, task
ffff88013658ad60)
[ 436.409473] Stack:
[ 436.409508]
ffff880136ee2af1 00000000bcd5d166 ffff000200000068 0000000035273000
[ 436.409608] <0>
0000000000000001 ffff880135273000 ffffffffa0265260 00003473bc000000
[ 436.409758] <0>
0000000000000000 ffff88013a4e05e0 ffff88013649bd00 ffffffffa025f133
[ 436.409938] Call Trace:
[ 436.409978] [<
ffffffffa025f133>] tda8261_set_frequency+0x23/0x70 [budget_av]
[ 436.410027] [<
ffffffffa026ed09>] ? stb0899_i2c_gate_ctrl+0x49/0xf0 [stb0899]
[ 436.410074] [<
ffffffffa026e259>] ? stb0899_write_reg+0x19/0x20 [stb0899]
[ 436.410121] [<
ffffffffa02716e2>] stb0899_dvbs_algo+0x3a2/0x13c8 [stb0899]
[ 436.410170] [<
ffffffff813cdd0d>] ? i2c_transfer+0xbd/0x100
[ 436.410215] [<
ffffffffa026e13c>] ? stb0899_write_regs+0xac/0x1b0 [stb0899]
[ 436.410262] [<
ffffffffa026f239>] stb0899_search+0x489/0x750 [stb0899]
[ 436.410308] [<
ffffffff8107d153>] ? down_interruptible+0x33/0x60
[ 436.410360] [<
ffffffffa00c34ec>] dvb_frontend_thread+0x57c/0x720 [dvb_core]
[ 436.410407] [<
ffffffff81078620>] ? autoremove_wake_function+0x0/0x40
[ 436.410457] [<
ffffffffa00c2f70>] ? dvb_frontend_thread+0x0/0x720 [dvb_core]
[ 436.410504] [<
ffffffff81078236>] kthread+0xa6/0xb0
[ 436.410547] [<
ffffffff810130aa>] child_rip+0xa/0x20
[ 436.410589] [<
ffffffff81078190>] ? kthread+0x0/0xb0
[ 436.410631] [<
ffffffff810130a0>] ? child_rip+0x0/0x20
[ 436.410672] Code: 00 03 00 00 4c 8b 6b 10 c7 45 cc 00 00 00 00 0f 84 e8 01 00 00 44 8b 22 41 8d 84 24 10 81 f1 ff 3d 80 4f 12 00 0f 87 af 01 00 00 <41> 8b 75 04 31 d2 48 c7 c7 d8 46 02 a0 89 f0 8b 0c 85 f0 45 02
[ 436.411950] RIP [<
ffffffffa00241a1>] tda8261_set_state+0x51/0x250 [tda8261]
[ 436.412015] RSP <
ffff88013649bc70>
[ 436.412064] ---[ end trace
c1d7ae4d9e05c51b ]---
Signed-off-by: Arvo Järve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Oliver Endriss [Sun, 10 Jan 2010 18:40:28 +0000 (15:40 -0300)]
V4L/DVB (13988): [STV090x] Configuration parameters adc1_range, adc2_range, tuner_bbgain
Add parameters adc1_range, adc2_range and tuner_bbgain to the config struct.
Defaults: adc1_range = adc2_range = 2Vpp, tuner_bbgain = 10db
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Oliver Endriss [Sun, 10 Jan 2010 18:39:45 +0000 (15:39 -0300)]
V4L/DVB (13987): [STV090x] Quit processing if the tuner did not lock
Exit stv090x_algo() if the tuner did not lock. This might happen due to
missing signal or invalid/incomplete tuning parameters.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Oliver Endriss [Sun, 10 Jan 2010 18:38:38 +0000 (15:38 -0300)]
V4L/DVB (13986): [STV090x] Disable I2C gate on error
The I2C gate must also be disabled, if a tuner command failed.
Otherwise the tuner mutex would be locked forever.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:24:56 +0000 (19:24 -0300)]
V4L/DVB (13985): [STV090x] reset mclk and dev_ver of internal structure after allocating
When mclk is not 0 then it will never be set to the correct value and
the Demodulator will not work.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:24:32 +0000 (19:24 -0300)]
V4L/DVB (13984): [BUDGET] Use a tuner clock output divider of 2 for TT S2-1600.
This gives the STV090x and improved clock signal (rectangle instead of sine).
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:24:10 +0000 (19:24 -0300)]
V4L/DVB (13983): [STV6110x] add clk_div member to stv6110x_config structure
Using clk_div member of stv6110x_config structure the tuner's clock
output divider can be configured. It is set in stv6110x_attach.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:23:41 +0000 (19:23 -0300)]
V4L/DVB (13982): [STV090x] setup master clock in stv090x_init instead of stv090x_setup.
This is needed when clock input is driven from tuner and an output
divider different from 1 is used.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:23:13 +0000 (19:23 -0300)]
V4L/DVB (13981): [STV6110x] Add a local register map for each instance of the driver.
Before there was used a static register map that could lead to issues
when there are are multiple adapters with the STV6110(A).
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:22:45 +0000 (19:22 -0300)]
V4L/DVB (13980): [STV6110x] Added function stv6110x_write_regs
The function stv6110x_write_regs is used to write several registers at once.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:22:07 +0000 (19:22 -0300)]
V4L/DVB (13979): [STV090x] Added possibility to set a fixed TS output clock.
This could be useful for p.e. Common Interface applications where data rate is limited.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:21:30 +0000 (19:21 -0300)]
V4L/DVB (13978): [STV090x] set FE_HAS_SIGNAL flag in stv090x_read_status when locked.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:21:02 +0000 (19:21 -0300)]
V4L/DVB (13977): [STV090x] Test for valid frequency before starting to tune
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:20:21 +0000 (19:20 -0300)]
V4L/DVB (13976): [STV090x] Added mutex protection around tuner I2C access.
With this change it is possible to have the same I2C address for both tuners.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:19:43 +0000 (19:19 -0300)]
V4L/DVB (13975): [STV090x] Added internal structure with shared settings and data.
As the STV0900 features two demodulation paths in one chip there is
some information used by both instances of the driver when used in
dual mode. This information is now shared in an internal structure
referenced by I2C adapter and address.
Do initialisation of the demodulator only once when used in dual mode.
Moved global mutex demod_lock to internal structure.
Moved dev_ver and mclk to internal structure.
Removed unused tuner_refclk from stv090x_state.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Andreas Regel [Tue, 5 Jan 2010 22:18:52 +0000 (19:18 -0300)]
V4L/DVB (13974): [STV090x] Fix locking reliabilty issues in automatic mode.
In automatic S/S2 detection mode, locking of a DVB-S transponder could
fail when coming from a DVB-S2 transponder. This change fixes the issue
by first disabling DVB-S and DVB-S2 mode before enabling it again.
Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Abylay Ospan [Wed, 13 Jan 2010 08:01:56 +0000 (05:01 -0300)]
V4L/DVB (13936): 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card
22-kHz tone can be driven in two ways:
1. LNBH24 can produce 22kHz continuous tone when TEN=1 ( 22 KHz tone output is
always activated ).
2. LNBH24 can reproduce 22kHz tone timings from DSQIN or EXTM pin's when TEN=0.
From LNBH24 datasheet:
"In order to improve design flexibility an external tone input pin is
available (EXTM). The EXTM is a Logic input pin which activates the 22 kHz
tone output, on the VoTX pin, by using the LNBH24 integrated tone generator
(similar to the DSQIN pin function). In fact, the output tone waveform
characteristics will always be internally controlled by the LNBH24 tone
generator and the EXTM signal will be used as a timing control for DiSEqC tone
data encoding on the VoTX output."
In NetUP Dual DVB-S2-CI card 22kHz tone timings on EXTM pin produced by
STV0900 demod:
.set_tone = stv0900_set_tone
redefine to "set_tone = lnbp21_set_tone" is not correct for "NetUP Dual
DVB-S2-CI card".
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Thu, 7 Jan 2010 08:18:16 +0000 (05:18 -0300)]
V4L/DVB (13916): gspca - ov534/ov534_9: Split the ov534 subdriver.
The two sensors ov772x and ov965x have too much differences.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Sat, 19 Dec 2009 10:03:43 +0000 (07:03 -0300)]
V4L/DVB (13869): gspca - sn9c20x: Cleanup code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Peter Huewe [Tue, 22 Dec 2009 08:38:14 +0000 (05:38 -0300)]
V4L/DVB (13947): add __init/__exit macros to drivers/media/dvb/bt8xx/bt878.c
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of
drivers/media/dvb/bt8xx/bt878.c
Please have a look at the small patch and either pull it through
your tree, or please ack' it so Jiri can pull it through the trivial
tree.
Patch against linux-next-tree, 22. Dez 08:38:18 CET 2009
but also present in linus tree.
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Joe Perches [Wed, 13 Jan 2010 06:59:15 +0000 (03:59 -0300)]
V4L/DVB (13969): frontends/si21xx.c: Remove #define TRUE/FALSE, use bool
And a little code refactoring/neatening around the removals
Reduces object size a little bit:
new:
$ size drivers/media/dvb/frontends/si21xx.o
text data bss dec hex filename
8984 56 1816 10856 2a68 drivers/media/dvb/frontends/si21xx.o
old:
$ size drivers/media/dvb/frontends/si21xx.o
text data bss dec hex filename
9084 56 1792 10932 2ab4 drivers/media/dvb/frontends/si21xx.o
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Sun, 10 Jan 2010 08:56:46 +0000 (05:56 -0300)]
V4L/DVB (13968): cx18, fix potential null dereference
Stanse found a potential null dereference in cx18_dvb_start_feed
and cx18_dvb_stop_feed. There is a check for stream being NULL,
but it is dereferenced earlier. Move the dereference after the
check.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Andy Walls <awalls@radix.net>
Acked-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Alexander Beregalov [Sat, 9 Jan 2010 16:51:14 +0000 (13:51 -0300)]
V4L/DVB: ir: fix memory leak
Free ir_dev before exit.
Found by cppcheck.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Wed, 6 Jan 2010 22:04:07 +0000 (19:04 -0300)]
V4L/DVB (13965): zl10039, jump to error on error
Stanse found an unreachable statement in zl10039_attach. There is
a `break' followed by `goto error'. Remove that break, so that it
can handle the error.
Cc: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Wed, 6 Jan 2010 16:45:28 +0000 (13:45 -0300)]
V4L/DVB (13964): tuner-core, fix memory leak
Stanse found a memory leak in tuner_probe. It is not freed/assigned
on all paths. Fix that.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Wed, 6 Jan 2010 16:45:27 +0000 (13:45 -0300)]
V4L/DVB (13963): siano, fix memory leak
Stanse found a memory leak in smscore_gpio_configure. buffer is not
freed/assigned on all paths. Fix that.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Roel Kluin [Sun, 3 Jan 2010 17:04:42 +0000 (14:04 -0300)]
V4L/DVB (12930): Wrong variable tested
The return of saa7164_i2caddr_to_reglen() was not tested.
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Francesco Lavra [Thu, 31 Dec 2009 11:47:11 +0000 (08:47 -0300)]
V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.
Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
hartleys [Wed, 30 Dec 2009 19:08:57 +0000 (16:08 -0300)]
V4L/DVB (13959): cx23885/cx23885-dvb.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
hartleys [Wed, 30 Dec 2009 19:13:10 +0000 (16:13 -0300)]
V4L/DVB (13958): tveeprom.c: use %pM to show MAC address
Use the %pM kernel extension to display the MAC address.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Francesco Lavra [Tue, 29 Dec 2009 18:48:04 +0000 (15:48 -0300)]
V4L/DVB (13957): IR: Fix sysfs attributes declaration
This patch fixes the declaration of the sysfs attributes for IR's, which
must be a NULL-terminated array of struct attribute *.
Without this patch, my machine crashes when inserting a DVB card.
Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Mon, 28 Dec 2009 17:48:49 +0000 (14:48 -0300)]
V4L/DVB (13956): fix weird array index in zl10036.c
I was initially concerned about the weird array index (the 2 bumps
into the next row of the array). Matthias Schwarzott look at the
datasheet and it turns out it should be zl10036_init_tab[1][0] |= 0x01;
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Mon, 28 Dec 2009 14:09:55 +0000 (11:09 -0300)]
V4L/DVB (13954): Correct NULL test
Test the just-allocated value for NULL rather than some other value.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@r@
identifier f;
@@
f(...) { <+... return NULL; ...+> }
@@
expression *x;
expression y;
identifier r.f;
statement S;
@@
x = f(...);
(
if ((x) == NULL) S
|
if (
- y
+ x
== NULL)
S
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Stefan Richter [Sat, 26 Dec 2009 00:47:12 +0000 (21:47 -0300)]
V4L/DVB (13953): firedtv: add missing NULL pointer check
If there is ever going to be a FireDTV or FloppyDTV firmware which does
not provide a minimal ASCII textual descriptor for Model_Id --- or if
the descriptor is provided indirectly in a descriptor directory ---
the ieee1394 variant of the device probe of firedtv would dereference a
NULL pointer. The firewire variant of firedtv's device probe is not
affected.
The fix makes sure that such an unexpected firmware is safely recognized
by fdtv_alloc as an unknown firmware.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tobias Klauser [Wed, 23 Dec 2009 12:53:14 +0000 (09:53 -0300)]
V4L/DVB (13952): gspca: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.
Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tobias Klauser [Wed, 23 Dec 2009 12:53:12 +0000 (09:53 -0300)]
V4L/DVB (13951): rj54n1cb0: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Tobias Klauser [Wed, 23 Dec 2009 12:53:13 +0000 (09:53 -0300)]
V4L/DVB (13950): usb-friio: Storage class should be before const qualifier
The C99 specification states in section 6.11.5:
The placement of a storage-class specifier other than at the beginning
of the declaration specifiers in a declaration is an obsolescent
feature.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Tue, 22 Dec 2009 21:00:07 +0000 (18:00 -0300)]
V4L/DVB (13949): Move a dereference below a NULL test
If the NULL test is necessary, then the dereference should be moved below
the NULL test.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@
- T i = E->fld;
+ T i;
... when != E
when != i
if (E == NULL) S
+ i = E->fld;
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Tue, 22 Dec 2009 20:31:23 +0000 (17:31 -0300)]
V4L/DVB (13948): radio: Correct use after free
It is not clear how to share the unlock in the case where the structure
containing the lock has to be freed. So the unlock is now duplicated, with
one copy moved before the free. The unlock label furthermore is no longer
useful and is thus deleted.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression x,e;
identifier f;
iterator I;
statement S;
@@
*kfree(x);
... when != &x
when != x = e
when != I(x,...) S
*x->f
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Alexey Dobriyan [Tue, 22 Dec 2009 00:21:47 +0000 (21:21 -0300)]
V4L/DVB (13946): proc_fops: convert av7110
Drop S_IRUGO, proc entry doesn't contain read hooks.
Drop S_IFREG, simply unnecessary.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dmitri Belimov [Mon, 21 Dec 2009 05:00:38 +0000 (02:00 -0300)]
V4L/DVB (13945): Add lost config and PCI ID for card of Beholder
Add lost configuration for our TV card.
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Roel Kluin [Wed, 16 Dec 2009 16:06:33 +0000 (13:06 -0300)]
V4L/DVB (13944): vivi: Fix test of unsigned in vivi_create_instance()
video_nr is unsigned so the test did not work.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Roel Kluin [Wed, 16 Dec 2009 14:35:45 +0000 (11:35 -0300)]
V4L/DVB: use correct size in put_v4l2_window32()
Although these sizes may be the same it is better to calculate the size of
the source, than the destiny.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Wed, 25 Nov 2009 02:17:25 +0000 (23:17 -0300)]
V4L/DVB (13932): em28xx: add PAL support for VBI
Make the VBI support work for PAL standards in addition to NTSC.
This work was sponsored by EyeMagnet Limited.
Thanks go out to Andy Walls for providing a CD containing test PAL/VBI captures
and to Steven Toth for providing a PVR-350 to do signal generation with.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Devin Heitmueller [Mon, 4 Jan 2010 05:43:19 +0000 (02:43 -0300)]
V4L/DVB (13930): dib0700: rework IR logic for firmware 1.20
When firmware 1.20 was introduced, the dib0700 switched from a polling model
using a USB control message, to the messages being delivered on a USB bulk
pipe. The code I originally added would do a blocking read on the pipe with a
50ms timeout. Because the dvb-usb-remote code makes use of the global
workqueue, this resulted in the global workqueue being blocked 50% of the
time. Also, the synchronous urb_bulk_msg() call would burn excess CPU time
(reflected as an abnormal increase in the system's load average when devices
were connected).
Rework the logic so that we now setup an asynchronous callback on the bulk
pipe, so that we now only handle RC data when it arrives on the pipe. Note
that we provide a stub function for the RC polling callback so that we can
continue to leverage the shared code in dvb-usb-rc for the setting up of the
input device.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Tue, 12 Jan 2010 10:12:43 +0000 (07:12 -0300)]
V4L/DVB (13927): gspca - sonixj: Fix bad video mode for all webcams.
The bug was introduced when adding the sensor adcm1700.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Mon, 11 Jan 2010 18:06:12 +0000 (15:06 -0300)]
V4L/DVB (13926): gspca - pac7302: Fix a random USB error.
When loading the register 0x49 of the page 3, the usb_control_msg() sometimes
fails with error -71 or -62.
This change skips loading the register 0x48.
Tested-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Sun, 10 Jan 2010 19:36:53 +0000 (16:36 -0300)]
V4L/DVB (13925): gspca - main: Change the check of the USB video interface.
Some webcams have many interfaces with the same interface class, so the
previous interface check did not work.
The new code checks if the interface number is zero or the only one.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Sun, 10 Jan 2010 17:39:24 +0000 (14:39 -0300)]
V4L/DVB (13924): gspca - sunplus: Optimize and remove unused sequences.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Fri, 8 Jan 2010 11:08:12 +0000 (08:08 -0300)]
V4L/DVB (13923): gspca - zc3xx: Simplify code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Fri, 8 Jan 2010 11:04:21 +0000 (08:04 -0300)]
V4L/DVB (13922): gspca - zc3xx: Switch off the LED on resume.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Fri, 8 Jan 2010 11:03:23 +0000 (08:03 -0300)]
V4L/DVB (13921): gspca - zc3xx: Remove unuseful register write.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Fri, 8 Jan 2010 11:02:42 +0000 (08:02 -0300)]
V4L/DVB (13920): gspca - zc3xx: Let default sharpness for sensor pas202b.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Fri, 8 Jan 2010 11:01:43 +0000 (08:01 -0300)]
V4L/DVB (13919): gspca - zc3xx: Fix hdcs2020 probe.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jean-Francois Moine [Fri, 8 Jan 2010 10:06:06 +0000 (07:06 -0300)]
V4L/DVB (13918): gspca - zc3xx: Rename the USB sequences.
The new names tell the image resolution: 'Scale' is the smaller image.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>