use VSB IF frequency ( 44 / 5.38 MHz ) if qam_if is invalid or unspecified
Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
On the s5h1409 demod, the IF frequency for VSB is limited to 44 / 5.38 MHz.
Hardcode VSB IF frequency within the driver to 44 / 5.38 MHz.
QAM IF frequency remains configurable via attach-time configuration.
Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If we pass TDA18271_GATE_DIGITAL into tda18271_attach(), it will always try to
use the digital demodulator's i2c gate.
If we pass TDA18271_GATE_ANALOG into tda18271_attach(), it will always try to
use the analog demodulator's i2c gate.
If we pass TDA18271_GATE_AUTO into tda18271_attach(), it will try to use the
analog demodulator's i2c gate when tuning in analog mode, and it will try to
use the digital demodulator's i2c gate when tuning in digital mode.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Use an enum rather than an integer #define to store analog / digital state.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The tuning request coming in from userspace is already center adjusted,
so we should not adjust to center (+1.75mhz) within the driver.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Once the image rejection calibration procedure has been successful,
we should not initialize the tuner registers again.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Move tda18271_map tables to a separate source file,
to improve code readability and ease maintenance.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Whilst reanalysing my formulas I realised it was no longer possible to get the
right values for a 36.1667MHz IF due to rounding problems.
Storing frequencies in units of 0.1kHz makes it possible to calculate these
again correctly.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Rework the input frequency calculation so that it produces the right values
when the ADC oversamples the IF input.
This means MT352 devices can now process a near-zero IF (according to the,
specs 4.57MHz is supported with the default crystal).
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Now we know the zl10353's correct ADC clock, we can calculate the input
frequency registers correctly instead of just blindly setting them.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Issue FSM_GO instead of TUNER_GO if there is no tuner attached to the
secondary i2c bus.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If tda827x_config hasn't been defined, exit the function.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Call analog_demod_ops->i2c_gate_ctrl when in analog tuning mode, and
frontend_ops.i2c_gate_ctrl when in digital tuning mode.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add basic support for NXP TDA8295 analog demod and TDA18271 tuner silicon.
TDA8295 + TDA8275a not yet tested.
TDA8290 + TDA18271 not yet supported.
Digital mode of TDA18271 not yet tested & needs more work.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
EXPORT_SYMBOL should have been EXPORT_SYMBOL_GPL
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add analog tuning support to tda827x dvb_frontend tuner module.
Convert tda8290 module back to native tuner interface.
The tda8290 analog demodulator will be handled the same way as tda9887.
The tuner.ko module (tuner-core) will pass commands to tda8290 via the
tuner_operations interface. tda8290 will communicate with tda827x via
the dvb_frontend interface, while passing a pointer to a private data
structure.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
QAM SNR values were incorrect when the cable was disconnected. This
patch extends the lookup tables to ensure correct values are being
returned.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The default adc_clock for the zl10353 is different from what was originally
thought to be the case and the TRL nominal rate formula was incorrect as a
result. Use a better (and hopefully now correct) formula.
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This is a modified version of a patch previously posted by Thomas
Unverzagt.
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fixes the signal strength value (higher value = higher signal strength)
and scales the value to the range of 0..ffff. The characteristic itself
is wrong. To get proper values on a TT-C2300 in the range of 40..60%
real signal strength, the values from the patch should be divide by two.
The attached patch doesn't fix the characteristic.
Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix reported signal strength value (higher value = higher signal strength).
Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Bit error counting fixed for the tda10021.
Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Change the acquisition range for clock recovery from 120 ppm to
240ppm. Apparently, some cable providers in Germany are playing with
their parameters, and the capture range of the ves1820 is too small
to acquire a lock with the current setting... ;-(
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch enables QAM Annex-B support (US digital cable)
for the s5h1409 VSB/QAM demodulator.
Tested successfully with the mt2131 tuner,
present on the following supported boards:
Hauppauge WinTV-HVR-1250
Hauppauge WinTV-HVR-1800
Hauppauge WinTV-HVR-1800lp
This patch is also known to work with an upcoming XC5000 tuner driver.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The name of the pll will be shown if forced via insmod option,
or if debug is enabled.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add a module option to force the dvb-pll module to use an alternate dvb-pll
description without having to recompile the kernel.
Having a module option like this is useful in some cases, where the vendor
may release an alternate revision of the hardware using a different tuner,
but without changing the pci subsystem / usb device ids.
This option is intended for debugging purposes _only_.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Increased DVB_PLL_MAX from 16 to a figure that would never be reached in a
practical sense.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add a module option to dvb-pll, called "input" to specify which rf
input to use on devices with multiple rf inputs. If the module option
is not specified, then the driver will autoselect the rf input, as per
previous behavior.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Store an instance ID in the dvb_pll_priv structure, so that module options
specific to a given pll may be used by the functions within the driver.
When debug is turned on, print a message indicating which pll was attached
and it's instance id.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The pll-specific set() function will need access to the dvb_pll_priv
structure for new functionality. This patch gives access to this
structure to the required functions.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This
patch removes all occurences of moduleparm.h from drivers/media files.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The min frequencies of the DVB-C frontends are wrong.
In Europe, the center frequency of the lowest channel is 50.5MHz and not
51MHz. All known cards with the stv0297/tda0002x/ves1820 frontend are
able to tune to this frequency.
I've changed the range to the lowest channel - 1/2 bandwidth and the
highest channel + 1/2 bandwidth. For the design of the dvb driver, the
frequency ranges must be part of the tuner and not of the frontend
itself. The same frontend may be used for different tuners.
The attached patch does only fix the ranges and not the design.
Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>