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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>