Commit graph

245453 commits

Author SHA1 Message Date
Laurent Pinchart d1787b1f8d [media] uvcvideo: Add support for JMicron USB2.0 XGA WebCam
The camera requires the PROBE_MINMAX quirk. Add a corresponding entry
in the device IDs list

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:40 -03:00
Laurent Pinchart 5079107991 [media] uvcvideo: Add support for V4L2_PIX_FMT_RGB565
The TomTom navigation system used in the Sony XNV 660BT and 770BT
reports an RGB565 (RGBP) format, support it in the driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:38 -03:00
Martin Rubli fb08a5cd57 [media] uvcvideo: Add driver documentation
This adds detailed documentation about the driver's extension unit control
features. Part of it has been adopted from the dynctrl.txt that used to be
available in the driver's previous Subversion repository.

The documentation has been rewritten to match the current implementation, in
particular to capture the new XU control support including UVCIOC_CTRL_QUERY.

Signed-off-by: Martin Rubli <martin_rubli@logitech.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:36 -03:00
Laurent Pinchart 9eb30d2fa9 [media] uvcvideo: Rename UVC_CONTROL_* flags to UVC_CTRL_FLAG_*
This makes the public driver API more uniform, in preparation of moving
uvcvideo.h to include/linux. Keep the old names for backward
compatibility with existing applications.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:34 -03:00
Laurent Pinchart 1dc8ddfd5a [media] uvcvideo: Deprecate UVCIOC_CTRL_{ADD,MAP_OLD,GET,SET}
Those ioctls are deprecated, list them in the features removal schedule
for 2.6.42.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:31 -03:00
Martin Rubli fe78d187fe [media] uvcvideo: Add UVCIOC_CTRL_QUERY ioctl
This ioctl extends UVCIOC_CTRL_GET/SET by not only allowing to get/set
XU controls but to also send arbitrary UVC commands to XU controls,
namely GET_CUR, SET_CUR, GET_MIN, GET_MAX, GET_RES, GET_LEN, GET_INFO
and GET_DEF. This is required for applications to work with XU controls,
so that they can properly query the size and allocate the necessary
buffers.

Signed-off-by: Martin Rubli <martin_rubli@logitech.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:26 -03:00
Simon Farnsworth 837d50b564 [media] cx18: Bump driver version to 1.5.0
To simplify maintainer support of this driver, bump the version to
1.5.0 - this will be the first version that is expected to support
mmap() for raw video frames.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:24 -03:00
Simon Farnsworth 1bf5842fe3 [media] cx18: Clean up mmap() support for raw YUV
The initial version of this patch (commit
d5976931639176bb6777755d96b9f8d959f79e9e) had some issues:

 * It didn't correctly calculate the size of the YUV buffer for 4:2:2,
   resulting in capture sometimes being offset by 1/3rd of a picture.

 * There were a lot of variables duplicating information the driver
   already knew, which have been removed.

 * There was an in-kernel format conversion - libv4l can do this one,
   and is the right place to do format conversions anyway.

 * Some magic numbers weren't properly explained.

Fix all these issues, leaving just the move from videobuf to videobuf2
to do.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:22 -03:00
Mariusz Kozlowski 81dfea886c [media] cpia2: fix typo in variable initialisation
Currently 'fh' initialises to whatever happens to be on stack. This
looks like a typo and this patch fixes that.

Signed-off-by: Mariusz Kozlowski <mk@lab.zgora.pl>
Acked-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:21 -03:00
Antti Palosaari e47b78f036 [media] cxd2820r: switch automatically between DVB-T and DVB-T2
Remove old DVB-T2 freq module param and detect DVB-T/T2 automatically.

Implementation is trial and error, if DVB-T does not lock try DVB-T2
and vice versa. That's done by replacing normal DVBFE_ALGO_SW with
DVBFE_ALGO_CUSTOM which gives better control for tuning process.

DVB-C still uses normal software ZigZag, DVBFE_ALGO_SW.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:19 -03:00
Antti Palosaari 2e1ea06e9c [media] cxd2820r: whitespace fix
Make checkpatch.pl happy by fixing whitespaces introduced by
commit 79e8b8e3b8cbf67130247a3f6d25732373fe2f34

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:17 -03:00
Steve Kerrison 2892bd0d95 [media] em28xx: Disable audio for EM28174
Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:15 -03:00
Steve Kerrison 9ac51c5e53 [media] cxd2820r: make C, T, T2 and core components as linked objects
Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:13 -03:00
Antti Palosaari d6a5f921fb [media] Add support for PCTV nanoStick T2 290e [2013:024f]
Supports DVB-T/T2/C, USB ID: 2013:024f.
Empia EM28174, Sony CXD2820R and NXP TDA18271HD/C2.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:11 -03:00
Antti Palosaari 27cfc85e3d [media] Sony CXD2820R DVB-T/T2/C demodulator driver
It is very first DVB-T2 Linux driver!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:10 -03:00
Antti Palosaari bc022694d7 [media] em28xx: add support for EM28174 chip
EM28174 is very similar as already supported EM2874.
I am not sure what are differences, but it could be analog support.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:08 -03:00
Antti Palosaari f71095be66 [media] em28xx: Multi Frontend (MFE) support
Register multiple FEs for same adapter. After that it is
possible to register two FEs for same adapter. For example
one for DVB-T and one for DVB-C.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:07 -03:00
Antti Palosaari f9d0bc1c08 [media] tda18271: add DVB-C support
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:05 -03:00
Antti Palosaari e0bae9b33a [media] cx24116: make FW DL split more readable
Change firmware download split, which I introduced few patch earlier,
a little bit to make it more readable as requested [1].

Anyhow, for some reason this seems to increase compiled binary size
52 bytes, on my AMD64 box, which is rather much for so small change.

[1] http://www.spinics.net/lists/linux-media/msg31968.html

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:04 -03:00
Antti Palosaari bedbf3d145 [media] anysee: add support for Anysee E7 S2
It is DVB-S/S2 USB box.

* DNBU10512IST NIM
 * STV0903 demod
 * STV6110 tuner

* Intersil ISL6423 LNB controller

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: info@anysee.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:02 -03:00
Antti Palosaari f0a53105ed [media] anysee: add support for Anysee E30 S2 Plus
It is USB DVB-S/S2 box.

Conexant cx24116/cx24118 demod tuner combo
Intersil ISL6423 LNB controller

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: info@anysee.com
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:01 -03:00
Antti Palosaari 107d7b181d [media] cx24116: add config option to split firmware download
It is very rare I2C adapter hardware which can provide 32kB I2C write
as one write. Add .i2c_wr_max option to set desired max packet size.
Split transaction to smaller pieces according to that option.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:00 -03:00
Anatolij Gustschin f3b1af1964 [media] media: fsl_viu: fix bug in streamon routine
Currently video capturing using streaming I/O method
doesn't work if capturing to overlay buffer took place
before.

When enabling the stream we have to check the overlay
enable driver flag and reset it so that the interrupt
handler won't execute the overlay interrupt path after
enabling DMA in streamon routine. Otherwise the capture
interrupt won't be handled correctly causing non working
VIDIOC_DQBUF ioctl.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:59 -03:00
Anatolij Gustschin 791ae69910 [media] fsl_viu: add VIDIOC_OVERLAY ioctl
Currently the driver enables overlay when running
VIDIOC_S_FMT ioctl with fmt type V4L2_BUF_TYPE_VIDEO_OVERLAY.
Actually, this is wrong. Add proper VIDIOC_OVERLAY support
instead of using VIDIOC_S_FMT for overlay enable.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:57 -03:00
Jesper Juhl dadefe3b71 [media] gspca/stv06xx_pb0100: Don't potentially deref NULL in pb0100_start()
usb_altnum_to_altsetting() may return NULL. If it does we'll dereference a
NULL pointer in
drivers/media/video/gspca/stv06xx/stv06xx_pb0100.c::pb0100_start().
As far as I can tell there's not really anything more sensible than
-ENODEV that we can return in that situation, but I'm not at all intimate
with this code so I'd like a bit of review/comments on this before it's
applied.
Anyway, here's a proposed patch.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Erik Andren <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:56 -03:00
David Härdeman 488ebc4808 [media] rc-core: use ir_raw_event_store_with_filter in winbond-cir
Using ir_raw_event_store_with_filter() saves about 20 lines of code.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:54 -03:00
David Härdeman 08ffff9fa4 [media] rc-core: add trailing silence in rc-loopback tx
If an IR command is sent (using the LIRC userspace) to rc-loopback
which doesn't include a trailing space, the result is that the message
won't be completely decoded. In addition, "leftovers" from a previous
transmission can be left until the next one. Fix this by faking a long
silence after the end of TX data.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:53 -03:00
David Härdeman c829f2672f [media] rc-core: add TX support to the winbond-cir driver
This patch adds preliminary IR TX capabilities to the
winbond-cir driver.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:51 -03:00
David Härdeman 67cdd42e06 [media] rc-core: int to bool conversion for winbond-cir
Using bool instead of an int helps readability a bit.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:50 -03:00
Detlev Casanova 0f2ce168c8 [media] v4l: Add mt9v032 sensor driver
The MT9V032 is a parallel wide VGA sensor from Aptina (formerly Micron)
controlled through I2C.

The driver creates a V4L2 subdevice. It currently supports binning and
cropping, and the gain, auto gain, exposure, auto exposure and test
pattern controls.

Signed-off-by: Detlev Casanova <detlev.casanova@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:49 -03:00
Malcolm Priestley 9d8e1b5490 [media] STV0299 Register 02 on Opera1/Bsru6/z0194a/mantis_vp1033
Bits 4 and 5 on register 02 should always be set to 1.

Opera1/Bsru6/z0194a/mantis_vp1033

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:48 -03:00
Malcolm Priestley 24fb06049a [media] STV0299 incorrect standby setting issues register 02 (MCR)
Issues with Register 02 causing spurious channel locking from standby.
Should have always bits 4 & 5 written to 1.
Lower nibble not used in any current driver. Usage if necessary can be
applied through initab to mcr_reg. stv0299 not out of standby before
writing inittab.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:46 -03:00
Anatolij Gustschin 2f9700062c [media] fsl-viu: replace .ioctl by .unlocked_ioctl
Use the core-assisted locking in fsl-viu driver and switch
to .unlocked_ioctl.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:44 -03:00
Jonathan Nieder 8d11593162 [media] cx88: don't use atomic_t for core->users
users is always read or written with core->lock held.  A plain int is
simpler and faster.

Tested-by: Andi Huber <hobrom@gmx.at>
Tested-by: Marlon de Boer <marlon@hyves.nl>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:43 -03:00
Jonathan Nieder f4bd4be8d1 [media] cx88: don't use atomic_t for core->mpeg_users
mpeg_users is always read or written with core->lock held except
in mpeg_release (where it looks like a bug).  A plain int is simpler
and faster.

Tested-by: Andi Huber <hobrom@gmx.at>
Tested-by: Marlon de Boer <marlon@hyves.nl>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:42 -03:00
Jonathan Nieder 579b2b4512 [media] cx88: gracefully reject attempts to use unregistered cx88-blackbird driver
It should not be possible to enter mpeg_open and acquire core->lock
without the blackbird driver being registered, so just error out if it
is not.  This makes the code more readable and should prevent the bug
fixed by the patch "hold device lock during sub-driver initialization"
from resurfacing again.

Similarly, if we enter mpeg_release and acquire core->lock then either
the blackbird driver is registered (since open files keep it loaded)
or the sysadmin forced the driver's removal.  In the latter case the
state will be inconsistent and this is worth a loud warning.

Tested-by: Andi Huber <hobrom@gmx.at>
Tested-by: Marlon de Boer <marlon@hyves.nl>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:40 -03:00
Jonathan Nieder 344d6c6ba6 [media] cx88: protect cx8802_devlist with a mutex
Add and use a mutex to protect the cx88-mpeg device list.  Previously
the BKL prevented races.

Based on work by Ben Hutchings <ben@decadent.org.uk>.

Tested-by: Andi Huber <hobrom@gmx.at>
Tested-by: Marlon de Boer <marlon@hyves.nl>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:38 -03:00
Jonathan Nieder 1d6213ab99 [media] cx88: hold device lock during sub-driver initialization
cx8802_blackbird_probe makes a device node for the mpeg sub-device
before it has been added to dev->drvlist.  If the device is opened
during that time, the open succeeds but request_acquire cannot be
called, so the reference count remains zero.  Later, when the device
is closed, the reference count becomes negative --- uh oh.

Close the race by holding core->lock during probe and not releasing
until the device is in drvlist and initialization finished.
Previously the BKL prevented this race.

Reported-by: Andreas Huber <hobrom@gmx.at>
Tested-by: Andi Huber <hobrom@gmx.at>
Tested-by: Marlon de Boer <marlon@hyves.nl>
Cc: stable@kernel.org
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:37 -03:00
Jonathan Nieder 1fe70e9630 [media] cx88: fix locking of sub-driver operations
The BKL conversion of this driver seems to have gone wrong.
Loading the cx88-blackbird driver deadlocks.

The cause: mpeg_ops::open in the cx2388x blackbird driver acquires the
device lock and calls the sub-driver's request_acquire, which tries to
acquire the lock again.  Fix it by clarifying the semantics of
request_acquire, request_release, advise_acquire, and advise_release:
now all will rely on the caller to acquire the device lock.

Based on work by Ben Hutchings <ben@decadent.org.uk>.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=31962

Reported-by: Andi Huber <hobrom@gmx.at>
Tested-by: Andi Huber <hobrom@gmx.at>
Tested-by: Marlon de Boer <marlon@hyves.nl>
Cc: stable@kernel.org
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:36 -03:00
Jonathan Nieder 8a317a8760 [media] cx88: protect per-device driver list with device lock
The BKL conversion of this driver seems to have gone wrong.  Various
uses of the sub-device and driver lists appear to be subject to race
conditions.

In particular, some functions access drvlist without a relevant lock
held, which will race against removal of drivers.  Let's start with
that --- clean up by consistently protecting dev->drvlist with
dev->core->lock, noting driver functions that require the device lock
to be held or not to be held.

After this patch, there are still some races --- e.g.,
cx8802_blackbird_remove can run between the time the blackbird driver
is acquired and the time it is used in mpeg_release, and there's a
similar race in cx88_dvb_bus_ctrl.  Later patches will address the
remaining known races and the deadlock noticed by Andi.  This patch
just makes the semantics clearer in preparation for those later
changes.

Based on work by Ben Hutchings <ben@decadent.org.uk>.

Tested-by: Andi Huber <hobrom@gmx.at>
Tested-by: Marlon de Boer <marlon@hyves.nl>
Cc: stable@kernel.org
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:34 -03:00
HIRANO Takahito cae72c7c63 [media] Fix panic on loading earth-pt1
Signed-off-by: HIRANO Takahito <hiranotaka@zng.info>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:33 -03:00
Ondrej Zary 59983439c0 [media] usbvision: remove broken testpattern
Enabling force_testpattern module parameter in usbvision causes kernel panic.
Things like that does not belong to the kernel anyway so the fix is easy.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:31 -03:00
Ondrej Zary 240d57bb82 [media] usbvision: add Nogatech USB MicroCam
Add Nogatech USB MicroCam PAL (NV3001P) and NTSC (NV3000N) support to
usbvision driver.
PAL version is tested, NTSC untested.
Data captured using usbsnoop, init_values are listed in the INF file along
with image dimensions, offsets and frame rates.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:29 -03:00
Malcolm Priestley 449a0bada3 [media] lmedm04: PID filtering changes
Improve PID filtering and program register 20 correctly.
 Make sure stream_on message is sent if streaming is off, otherwise
 PIDs are not registered.
 Move mutex outside lme2510_enable_pid.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:27 -03:00
Malcolm Priestley a760d63878 [media] lmedm04: don't write to buffer without a mutex
usb_buffer not inside mutex lock, waiting caller can alter buffer.
 Static added to lme2510_exit and lme2510_exit_int.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:26 -03:00
Malcolm Priestley 853e3b2930 [media] IX2505V Keep I2C gate control alive
Gate could close after first I2C message. On stv0288 it does.
 Keep 2nd and 3rd message I2C gate control alive.
 Remove unnecessary gate closing in this module.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:29:25 -03:00
Jesper Juhl 08921ac9e9 [media] Media, DVB, Siano, smsusb: Avoid static analysis report about 'use after free'
In drivers/media/dvb/siano/smsusb.c we have this code:
 ...
               kfree(dev);

               sms_info("device %p destroyed", dev);
 ...

at least one static analysis tool (Coverity Prevent) complains about this
as a use-after-free bug.
While it's true that we do use the pointer variable after freeing it, the
only use is to print the value of the pointer, so there's not actually any
problem here. But still, silencing the complaint is trivial by just moving
the kfree() call below the sms_info(), so why not just do it?. It doesn't
change the workings of the code in any way, but it makes the tool shut up.
The patch below also removes a rather pointless blank line.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:57 -03:00
Mauro Carvalho Chehab 792bc09a98 [media] tm6000: add detection based on eeprom name
On some situations, it is desired to use eeprom data to detect
the board type. This patch adds a logic for it and fixes 2 detection
issues:
	1) 10Moons UT-821 uses a generic Trident ID. Other boards
also share the same ID. So, better to use an alternative way for
it;
	2) Sometimes, HVR-900H is loaded with the default Trident
ID. This seems to be some hardware bug or race condition.

The new logic will only be enabled if the device is detected as
having a generic ID.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:55 -03:00
Malcolm Priestley dca6b74bb3 [media] dvb-usb: don't return error if stream stop
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:54 -03:00
Malcolm Priestley c8b7ced346 [media] dvb-usb return device errors to demuxer
Return device errors to demuxer from on/off streamming and
 pid filtering.

Please test this patch with all dvb-usb devices.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:28:53 -03:00