Mauro Carvalho Chehab [Sat, 21 Jan 2012 15:41:21 +0000 (12:41 -0300)]
[media] az6007: Use the right keycode for Terratec H7
Instead of using a fake keycode, just for testing, use the
right one, for Terratec H7.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 21 Jan 2012 15:20:30 +0000 (12:20 -0300)]
[media] az6007: Convert IR to use the rc_core logic
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 21 Jan 2012 15:14:13 +0000 (12:14 -0300)]
[media] az6007: Fix IR handling
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 21 Jan 2012 14:53:18 +0000 (11:53 -0300)]
[media] az6007: Be sure to use kmalloc'ed buffer for transfers
USB data transfers may not work if the buffer is allocated at
the stack. Be sure to use kmalloc on all places where a buffer
is needed.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 21 Jan 2012 14:19:16 +0000 (11:19 -0300)]
[media] az6007: Protect read/write calls with a mutex
This will avoid interference with CI and IR I/O operations.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 21 Jan 2012 13:35:12 +0000 (10:35 -0300)]
[media] az6007: Driver cleanup
Remove commented test code, remove unused poweroff stuff, and
fix the copyright data.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 20 Jan 2012 21:37:01 +0000 (18:37 -0300)]
[media] az6007: code cleanups and fixes
Several changes were needed to make az6007 to work, producing
the same commands as the original driver. This patch does
that.
While here, be less verbose when debug is not enabled.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 21 Jan 2012 10:57:06 +0000 (07:57 -0300)]
[media] drxk: Allow enabling MERR/MVAL cfg
Those two settings are different when used with az6007. Add
a config option to enable it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 20 Jan 2012 22:13:07 +0000 (19:13 -0300)]
[media] drxk: add support for Mpeg output clock drive strength config
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 20 Jan 2012 21:36:26 +0000 (18:36 -0300)]
[media] az6007: Use DRX-K dynamic clock mode
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 20 Jan 2012 21:30:58 +0000 (18:30 -0300)]
[media] drxk: Allow setting it on dynamic_clock mode
This is used on az6007.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 16 Jan 2012 23:37:13 +0000 (20:37 -0300)]
[media] az6007: Use a per device private struct
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 16 Jan 2012 21:57:51 +0000 (18:57 -0300)]
[media] az6007: Change it to use the MFE solution adopted at dvb-usb
This driver were written to use a previous solution for MFE at dvb-usb.
Due to the internal API changes, change the binding to work with the
new way.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 31 Jul 2011 13:11:32 +0000 (10:11 -0300)]
[media] az6007: Use the new MFE support at dvb-usb
Use the newly dvb-usb MFE support added by
changeset
9bd9e3bd2c57530dfe3057dd0aa9bdb37824925d.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 29 Jul 2011 14:40:40 +0000 (11:40 -0300)]
[media] az6007: improve the error messages for az6007 read/write calls
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 29 Jul 2011 14:31:13 +0000 (11:31 -0300)]
[media] az6007: Fix IR receive code
The code still needs to be commented, as there's a mutex
missing at the az6007_read() call. A mutex there is needed,
in order to prevent RC (or CI) calls while other operations
are in progress.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 25 Jul 2011 15:49:46 +0000 (12:49 -0300)]
[media] az6007: Simplify the code by removing an uneeded function
Everything to reset the demod is already at
az6007_frontend_poweron().
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 25 Jul 2011 15:45:16 +0000 (12:45 -0300)]
[media] az6007: Simplify the read/write logic
This patch introduces no functional changes. It basically defines
a macro for each different req found at the driver, and cleans the
code to use them, making easier to understand the code.
With regards to the IR handling code, although the original code
doesn't define what's the request, it is clear, from the USB logs,
that 0xc5 is for IR polling.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 25 Jul 2011 14:17:41 +0000 (11:17 -0300)]
[media] az6007: Change the az6007 read/write routine parameter
Use usb_device for those routines, as it allows using them on
all places. While there, rename to better express the meaning.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 25 Jul 2011 14:07:20 +0000 (11:07 -0300)]
[media] az6007: Fix some init sequences and use the right firmwares
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Mon, 25 Jul 2011 13:38:20 +0000 (10:38 -0300)]
[media] az6007: need to define drivers name before including dvb-usb.h
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sun, 24 Jul 2011 12:25:39 +0000 (09:25 -0300)]
[media] drxk: Don't assume a default firmware name
Move the ngene/ddbridge firmware into their drivers.
There are two reasons for that:
1) The firmware used there didn't work for a few devices
I tested here (Terratec H5, H6 and H7);
2) At least Terratec H7 doesn't seem to require a firmware
for it to work.
After this change, if firmware is not specified, the driver will
use a rom-based firmware (this seems to be the case for Terratec
H7, although I need to better check the USB dumps to be sure about
that).
In any case, the firmware seems to be optional, as the DRX-K driver
don't return the firmware load error.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 23 Jul 2011 14:54:40 +0000 (11:54 -0300)]
[media] az6007: make driver less verbose
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 23 Jul 2011 14:10:10 +0000 (11:10 -0300)]
[media] az6007: move device PID's to the proper place
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 23 Jul 2011 13:59:25 +0000 (10:59 -0300)]
[media] az6007: Replace the comments at the beginning of the driver
The comments there is wrong.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 23 Jul 2011 13:55:10 +0000 (10:55 -0300)]
[media] az6007: Get rid of az6007.h
The header file serves for no purpose and exports some things
that should be static.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 23 Jul 2011 13:40:08 +0000 (10:40 -0300)]
[media] az6007: CodingStyle cleanup
make checkpatch.pl happy
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 23 Jul 2011 13:12:12 +0000 (10:12 -0300)]
[media] az6007: Remove some dead code that doesn't seem to be needed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 23 Jul 2011 12:58:38 +0000 (09:58 -0300)]
[media] az6007: Comment the gate_ctl mutex
The mutex is there to protect the I2C gate. However, for some reason,
it is being called twice:
[ 2103.542796] usbcore: registered new interface driver dvb_usb_az6007
[ 2103.772392] az6007: drxk_gate_ctrl: enable
[ 2103.793900] az6007: drxk_gate_ctrl: enable
For now, let's just comment, to allow the driver to run.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Sat, 23 Jul 2011 12:51:12 +0000 (09:51 -0300)]
[media] az6007: Fix the I2C code in order to handle mt2063
mt2063 uses a one-byte transfer. This requires a special handling
inside the i2c code. Fix it to properly accept i2c reads. This
is needed to make the mt2063 to be detected.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 22 Jul 2011 13:31:25 +0000 (10:31 -0300)]
[media] az6007: Fix it to allow loading it without crash
Add some fixes to allow frontend attachment. The patch is not
complete yet, as just the frontend 0 is initialized. So, more
changes will be needed, including some changes at dvb-usb core.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 21 Jul 2011 21:31:14 +0000 (18:31 -0300)]
[media] az6007: Fix compilation troubles at az6007
Some changes are needed, in order to make az6007 compile with the
upstream tree. Most of the changes are due to the upstream drxk
module.
Even allowing its compilation, the driver is not working yet.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Thu, 21 Jul 2011 20:46:41 +0000 (17:46 -0300)]
[media] dvb: Add a new driver for az6007
Import the az6007 driver from Terratec H7 source, as-is.
It won't compile or run, so latter patches are needed in order
to fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Laurent Pinchart [Sun, 8 Jan 2012 23:18:19 +0000 (20:18 -0300)]
[media] as3645a: Fix compilation by including slab.h
The as3645a driver calls kzalloc(). Include slab.h.
Reported-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sachin Kamat [Tue, 17 Jan 2012 07:55:25 +0000 (04:55 -0300)]
[media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.c
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sachin Kamat [Tue, 17 Jan 2012 07:52:41 +0000 (04:52 -0300)]
[media] s5p-mfc: Remove linux/version.h include from s5p_mfc.c
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 17 Jan 2012 06:28:51 +0000 (03:28 -0300)]
[media] ds3000: using logical && instead of bitwise &
The intent here was to test if the FE_HAS_LOCK was set. The current
test is equivalent to "if (status) { ..."
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Mon, 16 Jan 2012 15:27:15 +0000 (12:27 -0300)]
[media] v4l2-ctrls: make control names consistent
Several control names used inconsistent capitalization or were inconsistent
in other ways. I also corrected a spelling mistake and fixed four strings
that were too long (>31 characters). Harmless, but the string is cut off when
it is returned with QUERYCTRL.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Tue, 10 Jan 2012 17:11:25 +0000 (14:11 -0300)]
[media] DVB: dib0700, add support for Nova-TD LEDs
Add an override of read_status to intercept lock status. This allows
us to switch LEDs appropriately on and off with signal un/locked.
The second phase is to override sleep to properly turn off both.
This is a hackish way to achieve that.
Thanks to Mike Krufky for his help.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Tue, 10 Jan 2012 17:11:24 +0000 (14:11 -0300)]
[media] DVB: dib0700, add corrected Nova-TD frontend_attach
This means cut & paste from the former f. attach. But while at it write
to the right GPIO to turn on the right LED. Also turn the other two
off jsut for sure.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Tue, 10 Jan 2012 17:11:23 +0000 (14:11 -0300)]
[media] DVB: dib0700, separate stk7070pd initialization
The start is common for both stk7070pd and novatd specific routine.
This is just a preparation for the next patch.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jiri Slaby [Tue, 10 Jan 2012 17:11:22 +0000 (14:11 -0300)]
[media] DVB: dib0700, move Nova-TD Stick to a separate set
To properly support the three LEDs which are on the stick, we need
a special handling in the ->frontend_attach function. Thus let's have
a separate ->frontend_attach instead of ifs in the common one.
The hadnling itself will be added in further patches.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Patrick Boettcher [Tue, 17 Jan 2012 11:41:20 +0000 (08:41 -0300)]
[media] : add MODULE_FIRMWARE to dib0700
The dib0700 needs a binary firmware file. This patch added the MODULE_FIRMWARE-macro.
Signed-off-by: Christoph Anton Mitterer <calestyo@scientia.net>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Patrick Boettcher [Tue, 17 Jan 2012 08:49:14 +0000 (05:49 -0300)]
[media] DVB-CORE: remove superfluous DTV_CMDs
This small patch removes superfluous DTV_CMDs from dvb_frontend.c which were added in the initially when ISBD-T support was added.
They were there unnoticed even though compilers should have warning about those duplicates. Finally they did and now we can remove them.
Thanks to Dan Carpenter <dan.carpenter@oracle.com> for pointing that out.
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Marek Szyprowski [Fri, 13 Jan 2012 08:12:38 +0000 (05:12 -0300)]
[media] s5p-jpeg: adapt to recent videobuf2 changes
queue_setup callback has been extended with struct v4l2_format *fmt
parameter in
2d86401c2c commit. This patch adds this parameter to
s5p-jpeg driver.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Kamil Debski [Mon, 2 Jan 2012 12:19:25 +0000 (09:19 -0300)]
[media] s5p-g2d: fixed a bug in controls setting function
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Kamil Debski [Tue, 27 Dec 2011 13:07:24 +0000 (10:07 -0300)]
[media] s5p-mfc: Fix volatile controls setup
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Thu, 12 Jan 2012 20:49:30 +0000 (17:49 -0300)]
[media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test
Rewrite a duplicated test to test the correct value
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E;
@@
(
* E
|| ... || E
|
* E
&& ... && E
)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Julia Lawall [Thu, 12 Jan 2012 20:49:28 +0000 (17:49 -0300)]
[media] drivers/media/video/s5p-fimc/fimc-capture.c: adjust double test
Rewrite a duplicated test to test the correct value
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E;
@@
(
* E
|| ... || E
|
* E
&& ... && E
)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Sachin Kamat [Tue, 10 Jan 2012 08:46:57 +0000 (05:46 -0300)]
[media] s5p-fimc: Fix incorrect control ID assignment
This patch fixes the mismatch between control IDs (CID) and controls
for hflip, vflip and rotate.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 17 Jan 2012 18:20:37 +0000 (16:20 -0200)]
[media] dvb_frontend: Don't call get_frontend() if idle
If the frontend is in idle state, don't call get_frontend.
Calling get_frontend() when the device is not tuned may
result in wrong parameters to be returned to the
userspace.
I was tempted to not call get_frontend() at all, except
inside the dvb frontend thread, but this won't work for
all cases. The ISDB-T specs (ABNT NBR 15601 and ARIB
STD-B31) allow the broadcaster to dynamically change the
channel specs at runtime. That means that an ISDB-T optimized
application may want/need to monitor the TMCC tables, decoded
at the frontends via get_frontend call.
So, let's do the simpler change here.
Eventually, the logic could be changed to work only if
the device is tuned and has lock, but, even so, the
lock is also standard-dependent. For ISDB-T, the right
lock to wait is that the demod has TMCC lock. So, drivers
may need to implement some logic to detect if the get_frontend
info was retrieved or not.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 17 Jan 2012 12:00:41 +0000 (10:00 -0200)]
[media] DocBook/dvbproperty.xml: Remove DTV_MODULATION from ISDB-T
On ISDB-T, each layer can have its own independent modulation,
applied to the carriers that belong to the segments associated
with them. So, there's no sense to define a global modulation
parameter.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 17 Jan 2012 11:49:28 +0000 (09:49 -0200)]
[media] DocBook/dvbproperty.xml: Fix ISDB-T delivery system parameters
The ISDB-T differs on its way to implement the hierarchical
transmissions: instead of using a low-priority/high-priority
FEC codes, it does that by using different layers, each layer
with their groups of segments. So, those parameters don't make sense
for ISDB-T.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 17 Jan 2012 11:45:48 +0000 (09:45 -0200)]
[media] DocBook/dvbproperty.xml: Fix the units for DTV_FREQUENCY
The units for DTV_FREQUENCY are kHz for satellital delivery systems
(DVB-S/DVB-S2/DVB-TURBO/ISDB-S). Fix it at the API spec.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 15 Jan 2012 21:30:36 +0000 (18:30 -0300)]
[media] cxd2820r: do not allow get_frontend() when demod is not initialized
This fixes bug introduced by multi-frontend to single-frontend change.
Finally HAS_LOCK is got back!
We are not allowed to access hardware in sleep mode...
Chip did not like when .get_frontend() reads some registers while
chip was sleeping and due to that HAS_LOCK bit was never gained.
TODO: We should add logic for dvb-core to drop out illegal calls like that.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 15 Jan 2012 19:50:11 +0000 (16:50 -0300)]
[media] cxd2820r: wait demod lock for DVB-C too
Fix yet another bug introduced be recent cxd2820r multi-frontend to
single-frontend change.
Finally, we have at least almost working picture for DVB-C too.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Jesper Juhl [Sun, 15 Jan 2012 19:39:13 +0000 (16:39 -0300)]
[media] tda18271c2dd: Remove pointless linux/version.h include
As pointed out by 'make versioncheck', there's no need for
drivers/media/dvb/frontends/tda18271c2dd.c to
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 15 Jan 2012 18:08:30 +0000 (15:08 -0300)]
[media] cxd2820r: do not switch to DVB-T when DVB-C fails
Fix another bug introduced by recent multi-frontend to single-frontend
change.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Sun, 15 Jan 2012 17:20:50 +0000 (14:20 -0300)]
[media] anysee: do not attach same frontend twice
cxd2820r implements only one frontend currently which
handles all the standards.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Sun, 15 Jan 2012 10:32:19 +0000 (07:32 -0300)]
[media] tlg2300: fix up check_firmware() return
The caller doesn't check the return value of check_firmware() but static
checkers complain. It currently returns negative error codes, or zero
or greater on success but since the return type is boolean the values
are truncated to one or zero. I've changed it to return an int,
negative on error and zero on success.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Sun, 15 Jan 2012 10:25:57 +0000 (07:25 -0300)]
[media] saa7164: remove duplicate initialization
These were initialized twice by mistake. They were defined the same way
both times so this doesn't change how the code works.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Miroslav Slugen [Sun, 11 Dec 2011 23:19:34 +0000 (20:19 -0300)]
[media] Add registers names to XC2028 tuner from datahseet and use them
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Miroslav Slugen [Wed, 21 Dec 2011 00:18:38 +0000 (21:18 -0300)]
[media] xc4000: add support for signal strength measures
In xc4000 chipsets real signal and noise level is stored in register
0x0A and 0x0B,so we can use those registers to monitor signal strength.
I tested this patch on 2 different cards Leadtek DVR3200 and DTV2000H
Plus, both with same results, I used special antenna hubs (toner 4x, 6x,
8x and 12x) with mesured signal lost, both registers are in dB value,
first represent signal with limit value -113.5dB (should be -114dB) and
exactly match with test results. Second represents noise level also in
dB and there is no maximum value, but from tests we can drop everything
above 32dB which tuner realy can't use, signal was usable till 20dB
noise level.
In digital mode we can take signal strength but sadly noise level is not
relevant and real value is stored in demodulator for now just zl10353,
also digital mode is just for testing, because it needs changing other
parts of code which reads data only from demodulator.
In analog mode I was able to test only FM radio, signal level is not
important, it says something about cable and hub losts, but nothing
about real quality of reception, so even if we have signal level at
minimum 113dB we can still here radio, because of that it is displaied
only in debug mode, but for real signal level is used noise register
which is again very accurate, radio noise level was betwen 6-20dB for
good signal, 20-25dB for medium signal, and above 25dB signal is
unusable.
For now real benefit of this patch is only for FM radio mode.
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Miroslav Slugen [Sun, 11 Dec 2011 21:47:32 +0000 (18:47 -0300)]
[media] tuner: Fix numberspace conflict between xc4000 and pti 5nf05 tuners
Update xc4000 tuner definition, number 81 is already in use by
TUNER_PARTSNIC_PTI_5NF05.
Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Miroslav Slugen [Sun, 11 Dec 2011 22:00:06 +0000 (19:00 -0300)]
[media] cx88: fix: don't duplicate xc4000 entry for radio
All radio tuners in cx88 driver using same address for radio and tuner,
so there is no need to probe it twice for same tuner and we can use
radio_type UNSET, this also fix broken radio since kernel 2.6.39-rc1
for those tuners.
Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Miroslav Slugen [Sun, 11 Dec 2011 23:19:34 +0000 (20:19 -0300)]
[media] cx23885: Don't duplicate xc4000 entry for radio
All radio tuners in cx23885 driver using same address for radio and
tuner, so there is no need to probe it twice for same tuner and we can
use radio_type UNSET.
Be aware radio support in cx23885 is not yet committed, so this is only
minor fix for future support.
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Miroslav Slugen [Sun, 11 Dec 2011 21:57:58 +0000 (18:57 -0300)]
[media] cx23885-dvb: check if dvb_attach() succeded
Fix possible null dereference for Leadtek DTV 3200H
XC4000 tuner when no firmware file available.
Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Fri, 13 Jan 2012 05:34:00 +0000 (02:34 -0300)]
[media] cx231xx: dereferencing NULL after allocation failure
"dev" is NULL here so we should use "nr" instead of "dev->devno".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Fri, 13 Jan 2012 05:28:34 +0000 (02:28 -0300)]
[media] mb86a20s: fix off by one checks
Clearly ">=" was intended here instead of ">".
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 10 Jan 2012 20:51:12 +0000 (17:51 -0300)]
[media] pwc: Simplify leds parameter parsing
This reduces our module init to a simple usb_register() call, so
that we can make use of the new upcoming macro's for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 10 Jan 2012 20:47:25 +0000 (17:47 -0300)]
[media] pwc: Remove dev_hint module parameter
The code for this is rather crufty, and being able to tie a device
to a specific minor is not really something we want to support in
a modern udev based world.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 10 Jan 2012 20:02:04 +0000 (17:02 -0300)]
[media] pwc: Use one shared usb command buffer
The pwc driver used to:
1. kmalloc a buffer
2. memcpy data to send over usb there
3. do the usb_control_msg call (which does not work with data on the stack)
4. free the buffer
For every usb command send. This patch changes the code to instead malloc
a buffer for this purpose once and use it everywhere.
[mchehab@redhat.com: Fix a compilation breakage with allyesconfig:
drivers/media/video/pwc/pwc-ctrl.c: In function ‘pwc_get_cmos_sensor’:
drivers/media/video/pwc/pwc-ctrl.c:546:3: warning: passing argument 4 of ‘recv_control_msg’ makes integer from pointer without a cast [en$
drivers/media/video/pwc/pwc-ctrl.c:107:12: note: expected ‘int’ but argument is of type ‘unsigned char *’
drivers/media/video/pwc/pwc-ctrl.c:546:3: error: too many arguments to function ‘recv_control_msg’
drivers/media/video/pwc/pwc-ctrl.c:107:12: note: declared here]
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 10 Jan 2012 16:23:34 +0000 (13:23 -0300)]
[media] pwc: Avoid unnecessarily rebuilding the decoder tables
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 10 Jan 2012 16:14:46 +0000 (13:14 -0300)]
[media] pwc: Avoid sending mode info to the camera when it is not needed
Since we always do a set_video_mode on stream start, there is no need
to actually send the mode info to the device on a s_fmt / s_parm ioctl.
Not doing this saves us doing (slow) usb io.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Tue, 10 Jan 2012 16:01:41 +0000 (13:01 -0300)]
[media] pwc: Fix pixfmt handling
Before this patch various code in the mode setting patch checked
pdev->pixfmt, but that was not set until the mode setting succeeded, so
it was looking at the old pixfmt! This patch fixes this by making the
pixfmt a parameter to set_video_mode, and setting it from set_video_mode
on success.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sun, 8 Jan 2012 14:29:19 +0000 (11:29 -0300)]
[media] pwc: Make decoder data part of the main pwc struct
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans de Goede [Sun, 8 Jan 2012 10:19:29 +0000 (07:19 -0300)]
[media] pwc: Make fps runtime configurable through s_parm, drop fps module param
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 12 Oct 2011 08:36:04 +0000 (05:36 -0300)]
[media] ivtv: remove open_id/id from the filehandle code
Instead of messing around with id's it's much easier to just compare
against a filehandle pointer.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 11 Oct 2011 09:06:58 +0000 (06:06 -0300)]
[media] ivtv: switch to the v4l core lock
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 11 Oct 2011 08:23:36 +0000 (05:23 -0300)]
[media] cx18: remove exclusive open of radio device
For some reason the cx18 driver could open the radio device only once.
Remove this limitation.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 11 Oct 2011 08:18:08 +0000 (05:18 -0300)]
[media] ivtv: remove exclusive radio open
For some reason the /dev/radio device was implemented as an exclusive open:
you could open it only once and not a second time.
Remove this limitation.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 11 Oct 2011 08:12:52 +0000 (05:12 -0300)]
[media] v4l2-ioctl: make tuner 'type' check more strict for S_FREQUENCY
As per the feature removal document, make the tuner type check more strict
so that it is no longer possible to set the radio frequency through a video
node or the TV frequency through a radio node.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 11 Jan 2012 10:37:54 +0000 (07:37 -0300)]
[media] V4L2 Spec: improve the G/S_INPUT/OUTPUT documentation
As Rupert pointed out, the phrase "It is good practice" should be replaced
with "You must".
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Rupert Eibauer <Rupert.Eibauer@ces.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Wed, 11 Jan 2012 10:30:55 +0000 (07:30 -0300)]
[media] V4L2 Spec: fix extended control documentation
Update the spec to the behavior implemented by the control framework.
This should have been documented long ago but for some reason it was
never done.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 22 Nov 2011 11:23:19 +0000 (08:23 -0300)]
[media] omap_vout: add missing OVERLAY_OUTPUT cap and set V4L2_FBUF_FLAG_OVERLAY
The omap_vout driver has an output overlay, but never advertised that
capability.
The driver should also set the V4L2_FBUF_FLAG_OVERLAY flag.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
CC: Archit Taneja <archit@ti.com>
CC: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 22 Nov 2011 11:48:47 +0000 (08:48 -0300)]
[media] zoran: do not set V4L2_FBUF_FLAG_OVERLAY
The zoran driver does not support this flag, so don't set it.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Hans Verkuil [Tue, 22 Nov 2011 11:59:34 +0000 (08:59 -0300)]
[media] v4l2 spec: clarify usage of V4L2_FBUF_FLAG_OVERLAY
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Dan Carpenter [Tue, 10 Jan 2012 08:04:39 +0000 (05:04 -0300)]
[media] cx23885: handle errors from videobuf_dvb_get_frontend()
The error handling in the original code wasn't complete so static
checkers complained about a potential NULL deference.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 13 Jan 2012 13:46:36 +0000 (11:46 -0200)]
[media] dvb-core: preserve the delivery system at cache clear
The changeset
240ab508aa is incomplete, as the first thing that
happens at cache clear is to do a memset with 0 to the cache.
So, the delivery system needs to be explicitly preserved there.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Fri, 13 Jan 2012 13:09:23 +0000 (11:09 -0200)]
[media] dvb-core: fix a regression with MythTV
As reported by Lawrence[1], MythTV 0.24.1 does the wrong thing
with a DVBv5 call: it fills the delivery system with
SYS_UNDEFINED, expecting that the DVB core would work with that.
This used to work by accident, as the DVB core were missing the
check for the supported delivery systems. Yet, fixing it
is easy, so let's add a logic to handle this case, to
provide backward compatibility.
[1] http://patchwork.linuxtv.org/patch/8314/
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Antti Palosaari [Fri, 13 Jan 2012 18:20:38 +0000 (15:20 -0300)]
[media] revert patch: HDIC HD29L2 DMB-TH USB2.0 reference design driver
I added it by mistake. It is useless as no real hardware.
It even uses even Cypress FX2, general USB bridge chip, default IDs
that makes driver load all FX2 devices having default ID...
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 11 Jan 2012 13:00:28 +0000 (11:00 -0200)]
mb86a20s: Add a few more register settings at the init seq
Some time ago, Manoel sent us a patch adding more stuff
to the init sequence. However, his patch were also doing
non-related stuff, by changing the init logic without
any good reason. So, it was asked for him to submit a
patch with just the data that has changed, in order to
allow us to better analyze it.
As he didn't what it was requested, I finally found some
time to dig into his init sequence and add it here.
Basically, new stuff is added there. There are a few changes:
1) The removal of the extra (duplicated) logic that puts
the chip into the serial mode;
2) Some Viterbi VBER measurement init data was changed from
0x00 to 0xff for layer A, to match what was done for
layers B and C.
None of those caused any regressions and both make sense
on my eyes.
The other parameters additions actually increased the
tuning quality for some channels. Yet, some channels that
were previously discovered with scan disappered, while
others appeared instead. This were tested in Brasilia,
with an external antena.
At the overall, it is now a little better. So, better to
add these, and then try to figure out a configuration that
would get even better scanning results.
Reported-by: Manoel Pinheiro <pinusdtv@hotmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Wed, 11 Jan 2012 12:56:30 +0000 (10:56 -0200)]
mb86a20s: Group registers into the same line
On mb86a20s, some registers have sub-addresses, while others not.
In order to make easier to compare different settings, group them.
No functional changes in this patch.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab [Tue, 10 Jan 2012 21:00:50 +0000 (18:00 -0300)]
[media] [PATCH] don't reset the delivery system on DTV_CLEAR
As a DVBv3 application may be relying on the delivery system,
don't reset it at DTV_CLEAR. For DVBv5 applications, the
delivery system should be set anyway.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Malcolm Priestley [Tue, 10 Jan 2012 22:45:31 +0000 (19:45 -0300)]
[media] [BUG] it913x-fe fix typo error making SNR levels unstable
Fix error where SNR unstable and jumps levels.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Steven Toth [Fri, 6 Jan 2012 14:55:32 +0000 (11:55 -0300)]
[media] cx23885: Query the CX25840 during enum_input for status
We can pass a NO_SIGNAL video decoder state back to applications
if it's available.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Steven Toth [Fri, 6 Jan 2012 14:54:05 +0000 (11:54 -0300)]
[media] cx25840: Add support for g_input_status
Allow bridge drivers to query status.
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Samuel Rakitnican [Fri, 6 Jan 2012 20:34:53 +0000 (17:34 -0300)]
[media] rc-videomate-m1f.c Rename to match remote controler name
This remote was added with support for card Compro VideoMate M1F.
This remote is shipped with various Compro cards, not this one only.
Furthermore this remote can be bought separately under name Compro
VideoMate K100.
http://compro.com.tw/en/product/k100/k100.html
So give it a proper name.
[mchehab@redhat.com: Fix the Makefile]
Signed-off-by: Samuel Rakitničan <samuel.rakitnican@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Fabio Estevam [Tue, 10 Jan 2012 12:15:29 +0000 (09:15 -0300)]
[media] drivers: media: au0828: Fix dependency for VIDEO_AU0828
Fix the following build warning:
warning: (VIDEO_AU0828) selects DVB_AU8522 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CAPTURE_DRIVERS && DVB_CORE && I2C && VIDEO_V4L2)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Axel Lin [Tue, 10 Jan 2012 06:21:49 +0000 (03:21 -0300)]
[media] convert drivers/media/* to use module_platform_driver()
This patch converts the drivers in drivers/media/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com>
Cc: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Muralidharan Karicheri <m-karicheri2@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Daniel Drake <dsd@laptop.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>