xc2028_attach was returning an integer when disabled from the build, where it
should instead be returning NULL. Declare xc2028_attach as type dvb_frontend *
instead of void *.
The prototype declaration must be marked as extern in the header.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
It seems that the DTV78 firmware is intended for use in locations where
VHF channels have 7MHz bandwidth and UHF channels have 8MHz bandwidth.
If we switch to DTV78 firmware when we detect this condition, we can
avoid firmware reloads when switching between VHF and UHF transponders.
Place the state for this in the control structure so that card drivers
can hint to us to use DTV78 firmware from the first tuning attempt.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
s-code tables are related to IF frequency used for video demodulation.
The s-codes for analog are automatically loaded, according with video standard.
However, for digital, they will depend on the IF of the demoduler chip. IF of
the demoduler.
Before this patch, only a few IF's where possible to use. This patch allows
selecting any IF defined at firmware file.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
xc3028 can be used on some DTV only designs (for example, DVB-S boards). Before
this patch, a DTV only board would need to call set_tuner_config callback.
This patch allows to optionally pass a xc3028_ctrl parameter, via xc3028_config
struct, fully initializing the driver for DTV.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Xc2028.3028 has two type of firmwares: audio-standard specific ones and
baseband MTS firmwares. MTS firmwares provide stereo decoding for 6 MHz
BTSC/EIAJ and for monoaural audio decoding on 8 MHz firmwares.
It seems that the option to use MTS or a standard-specific audio decoding
depends on the way xc2028/3028 is connected.
Instead of wasting 32 (or 64 bits) to signalize if the driver needs to use MTS
firmware, this patch converts it to a bitfield that can be shared with other
proprieties of xc2028/3028.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Define a list of valid "firmware types" for each combination of BASE,
DTV and SCODEs. By masking the appropriate firmware bits off we can
just use one "type" for the firmware searching and also flag when we
are looking for a BASE, DTV or SCODE type firmware. This makes it
much easier to track if we need to change device modes or flash an
individual firmware part.
Add a structure to remember what firmware properties we have. This
contains the currently loaded/wanted base firmware (type), video std
(id), video std requested (std_req), scode file and number in use.
Incorporate said structure into the tuner private data.
When checking whether the current firmware needs to be reloaded, first
figure out exactly what "type" of firmware we want (base, std and
scode), and then proceed to load the appropriate matching base,
std-specific and scode records iff there are any changes required.
This removes guesswork from the process because we no longer need to
individually code a check for every tuning parameter's interactions.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add a bit to select D2633 DTV firmware to struct xc2028_ctrl, so that it can
be enabled via .set_config.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Removes uneeded parameters and adds an structure for passing the parameters
This patch is co-authored by Mauro Carvalho Chehab.
Signed-off-by: Michel Ludwig <michel.ludwig@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This changeset converts tuner-xc2028 to the newer hybrid approach. It also
prevents creating twice the xc3028 private struct by both DVB and V4L parts.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>