Commit Graph

781 Commits

Author SHA1 Message Date
Manu Abraham 8be969b313 V4L/DVB (9450): Code Review: #4 Consolidate configurations
* Better readability
* Avoids duplication

Comments from Oliver Endriss <o.endriss@gmx.de>

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:22 -02:00
Reinhard Nissl 27713c8ba4 V4L/DVB (9449): Code Simplification: use do_div() instead
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Reinhard Nissl 561374113e V4L/DVB (9448): Bug: fix array size
Bug: a string which contains 4 digits needs an array
of size 5. The fifth character will hold the terminating '\0'

Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Reinhard Nissl 6f6c268b0f V4L/DVB (9447): stb6100: improve rounding
Optimization: Round the requested value to achieve a
+/-1MHz error instead of +0/-2MHz

Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Reinhard Nissl 02ec9d8ff4 V4L/DVB (9446): Bug Fix an overflow in bandwidth calculation
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Reinhard Nissl 89693b7d7b V4L/DVB (9445): Bug: Bandwidth calculation at upper and lower boundaries
Signed-off-by: Reinhard Nissl <rnissl@gmx.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Manu Abraham 043a68b36d V4L/DVB (9444): Initialize post process events to NULL
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Manu Abraham 763fbaf65a V4L/DVB (9443): Bug: Bandwidth calculation
Bug #1: The 5 tap equaliser is set to correct simple perturbations
like reflections on the IF cable for DVB-S. In the case of DVB-S2
a more powerful equalizer is used to correct the filter group delay
allowing the bandwidth to be reduced by a factor of 1/3

Bug #2: The ZIF tuner takes badwidth to be set in Hz

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Manu Abraham 27a330d124 V4L/DVB (9442): Revert back previous change to 90MHz
Note:
* At High Symbol Rates we do not have enouph machine cycles to handle the
  incoming symbols and hence might run into problems at the very end of the
  specified definition
* Most of the equations have been calculated for a master clock of 99 MHz,
  running at 90MHz, raises lot of issues such as the need to recalculate
  all of them , which is eventually very painful.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Manu Abraham 72f7841613 V4L/DVB (9441): Code simplification: clock is already initialized, no need to initialize again.
Thanks to Marko Schluessler <marco@lordzodiac.de> for pointing it out

Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:21 -02:00
Arvo Jarve d0a41e8f8f V4L/DVB (9440): Bug in previous commit
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham 1b792e05e9 V4L/DVB (9439): Bug! SFRL nibble got swapped
The Bug was found by Arvo Jarve <arvo@softshark.ee>

It was a wonder how it worked in the case with this bug,
STM verified this that this nibble was in fact insignificant
and can be ignored.

But still we need to fix all inconsistencies.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Arvo Jarve eadf29b941 V4L/DVB (9438): Bug! RTF is signed
Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham ba8862a83f V4L/DVB (9437): Disable Symbol rate auto scan feature
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham 9efdd297bc V4L/DVB (9436): Fix a typo in the previous commit
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Manu Abraham b168e351a5 V4L/DVB (9435): Add post process interfaces
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Arvo Jarve 1e3d8abe6d V4L/DVB (9433): Limit bandwidth with a 3dB response fall
In this case, we will be sure that there exists a carrier
and the center frequency would be simply f1 - f2. In such
a circumstance, the TR loop is simplified to doing a simple
check for timing, rather than searching for the same.

Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:20 -02:00
Arvo Jarve b655b6cbc9 V4L/DVB (9430): stb0899: avoid parameter overwriting
BUG! Setting CRL parameter overwrote the CR Algorithm type,
eventually leading to wrong search algorithm to be employed in
the DVB-S carrier loop optimization.

Symptom: Once the CR optimization stage is passed either way, in
a successful or failed manner, the very next carrier search will
fail, due to no Carrier Search Algorithm specified.

Signed-off-by: Arvo Jarve <arvo@softshark.ee>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Marko Schluessler 7d8f1e5764 V4L/DVB (9428): Fix: assignment of wrong values
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Manu Abraham 7e4e8c52e3 V4L/DVB (9427): Code simplification: Sleep only for the required time interval.
* Saves 70 mS LOCK time on the STB6100 based
* Saves 100 mS LOCK time on the TDA8261 based

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Manu Abraham ddbee1c6e2 V4L/DVB (9426): Add a missing break
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:19 -02:00
Manu Abraham c1f0ce2228 V4L/DVB (9423): Though insignificant, removes an unnecessary read of the LOCK_LOSS register,
which should have happenend in the DVB-S2 mode only, but reading it as it is
for the other delivery systems causes nothing to say but LOCK_LOST, which
just causes confusion amongst users.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham 417dd69de8 V4L/DVB (9420): return -EINVAL for invalid parameters
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham cf6efeb670 V4L/DVB (9419): Bug: unnecessary large current causes large phasor errors
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham 6199ceef8b V4L/DVB (9418): DVB_ATTACH for STB0899, STB6100, TDA8261
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham ae9902da96 V4L/DVB (9417): DVB_ATTACH for STB0899, STB6100, TDA8261
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham e0ee77acb1 V4L/DVB (9416): Hmmph, a proper calculation broke the working behaviour.
Need some thoughts, temporary for now ..

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham 6c1022cbc8 V4L/DVB (9414): Initialize DiSEqC
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:18 -02:00
Manu Abraham baa40e48d9 V4L/DVB (9413): Bug: Set Auxilliary Clock Register correctly
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham 3479474b36 V4L/DVB (9411): Bug! Timing recovery was calculated for 99MHz not 90 MHz
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham f6e6382764 V4L/DVB (9408): tda8261: check status to avoid lock loss
We need to check for tuner LOCK LOSS, especially in the case of simple PLL's

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham d98c02859f V4L/DVB (9407): Optimizations Reduce capture range from 10MHz to 3Mhz
* Reduces szapping time a lot
* increased stability at Low Symbol rates
* overall increases reliability in tuning

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:17 -02:00
Manu Abraham b48e2de3b2 V4L/DVB (9402): TT S2 3200 shouldn't need Inversion ON and Inversion AUTO at the same time
This is a racy situation.
Inversion is default OFF on the TT S2 3200 hardware,
unlike the KNC1 where it is default Inverted

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham ecdec31180 V4L/DVB (9401): Code Simplification
Use an enumeration for I/Q Swap rather than an int,
easier to spot the nasty ones

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham db1d3b80b3 V4L/DVB (9400): stb6100: Code Simplification
The 2 callbacks created nothing more than confusion

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham c7d85a2deb V4L/DVB (9397): fix some bugs at tda8261
Fix bug obviously, some enhancements as well

* enable i2c_gate before doing any transaction
* read is one single message with 2 words
* reduce sleep from 100mS to 20mS

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham de29eb8259 V4L/DVB (9396): Fix clocks at stb0899
Really silly! Disabled all clocks and expected it to run.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:16 -02:00
Manu Abraham 41e1151b33 V4L/DVB (9395): Add initial support for two KNC1 DVB-S2 boards
Add initial support for:
* KNC1 DVB-S2 Plus
* KNC1 DVB-S2 OEM (known as Satelco DVB-S2)

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham 0b8f15dceb V4L/DVB (9394): cache last successful state
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham 654dbad45d V4L/DVB (9393): Add TDA8261 to build
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham 00360205b9 V4L/DVB (9392): initial go at TDA8261 tuner
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Marko Schluessler 43498ade8a V4L/DVB (9391): Register definition bugs
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Marko Schluessler 08bcdbec68 V4L/DVB (9390): Offset Freq has been set in reg
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Marko Schluessler a18d43156a V4L/DVB (9389): Use kzalloc instead of kmalloc
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Marko Schluessler 3e3263e665 V4L/DVB (9388): Reference Clock is in kHz
Signed-off-by: Marko Schluessler <marco@lordzodiac.de>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham 57ad94a635 V4L/DVB (9387): FIX: Write to the correct register
Thanks to Marko Schluessler <marco@lordzodiac.de> for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:15 -02:00
Manu Abraham d189f3ef9e V4L/DVB (9386): FIX: Add in missing inversion (should be ideally in the config struct)
Thanks to Marco Schluessler <marco@lordzodiac.de> for pointing it out

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham 381d804703 V4L/DVB (9384): FIX: register value is not reset to 0 after write
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham bb29cc6ffa V4L/DVB (9383): Let's neither sleep nor wakeup for now
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham 795b72b21a V4L/DVB (9382): Use a delay for tracking acquisition status
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham 54c358fc23 V4L/DVB (9381): On the KNC1 cards the CLOCK is clamped to a maximum limit of 90MHz, eventhough
not limited in hardware, this causes instabilities at a higher clock due to
issues such as thermal, also the divider wraps around, which causes the
demodulator core to actually run at a lower frequency. This needs to be
empirically tested whether it affects other cards. If found necessary, this
parameter needs to be moved out to the config struct such that it can be made
hardware dependant.

Reducing the CLOCK from 99MHz to 90MHz improved the acquisition time taken on
the KNC1 cards and hence such a change.

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham b797c20616 V4L/DVB (9380): FIX: a possible division by zero
Thanks to Marko Schluessler <marco@lordzodiac.de>

Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham b3332a983d V4L/DVB (9379): FIX: fix a bug in the charge pump setting
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham 040dcc3e51 V4L/DVB (9378): Add STB6100 Support
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham c46b656210 V4L/DVB (9377): Add STB6100 Support
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:14 -02:00
Manu Abraham e50e8e3338 V4L/DVB (9376): Add STB0899 to build
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Manu Abraham 8bd135bab9 V4L/DVB (9375): Add STB0899 support
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Mauro Carvalho Chehab f71f11ed46 V4L/DVB (9367): Move lgdt3304 driver to the proper place and allow it to compile
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Mauro Carvalho Chehab c2e591fcb7 V4L/DVB (9366): Move S921 driver to the proper place and allow it to compile
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:13 -02:00
Markus Rechberger a9dbe5dc2e V4L/DVB (9362): zl10353: add new register configuration for zl10353/especially 6mhz taiwan.
Signed-off-by: Markus Rechberger <mrechberger@sundtek.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-29 17:53:12 -02:00
roel kluin 891bd1331e V4L/DVB (9524): af9013: fix bug in status reading
- ! has a higher precedence than &

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-11-11 08:11:29 -02:00
Devin Heitmueller 11fc9a4a44 V4L/DVB (9316): s5h1411: Power down s5h1411 when not in use
Power down the s5h1411 demodulator when not in use (on the Pinnacle 801e, this
brings idle power from 123ma down to 84ma).

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:06 -02:00
Devin Heitmueller 50eac6bc46 V4L/DVB (9315): s5h1411: Skip reconfiguring demod modulation if already at the desired modulation
If we are already at the desired modulation, there is no need to reconfigure
the demod (at a tuning time cost)

Note that this change revealed that although the datasheet says the demod
starts out in VSB-8 mode, the first tuning was failing consistently unless
we went through the work of setting the registers.  So add a field to denote
this case so we always do the enable_frontend call, even if the first tuning
request is for VSB-8.

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:04 -02:00
Devin Heitmueller f0d041e50b V4L/DVB (9314): s5h1411: Perform s5h1411 soft reset after tuning
If you instruct the tuner to change frequencies, it can take up to 2500ms to
get a demod lock.  By performing a soft reset after the tuning call (which
is consistent with how the Pinnacle 801e Windows driver behaves), you get
a demod lock inside of 300ms

Signed-off-by: Devin Heitmueller <devin.heitmueller@gmail.com>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:31:01 -02:00
Steven Toth 1874c44328 V4L/DVB (9313): s5h1411: Add the #define for an existing supporting I/F
s5h1411: Add the #define for an existing supporting I/F

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:59 -02:00
Steven Toth 5bd47311fe V4L/DVB (9312): s5h1411: Remove meaningless code
s5h1411: Remove meaningless code

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:55 -02:00
Steven Toth 1af46b450f V4L/DVB (9311): s5h1411: bugfix: Setting serial or parallel mode could destroy bits
Adding a serialmode function to read/and/or/write the register for safety.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:51 -02:00
Steven Toth e16c63de92 V4L/DVB (9310): s5h1411: read_status() locking detection fixes.
This includes new bit definitions for previously unknown bits.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:48 -02:00
Steven Toth c96de5197d V4L/DVB (9309): s5h1411: I/F related bugfix for 3.25 and remove spurious define
This should improve performance.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:43 -02:00
Steven Toth f4ef033ee0 V4L/DVB (9308): s5h1411: Improvements to the default registers
s5h1411: Improvements to the default registers

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-21 14:30:36 -02:00
Igor M. Liplianin d4305c68cc V4L/DVB (9296): Patch to remove warning message during cx88-dvb compilation
Remove warning message during cx88-dvb compilation.
Also fixes double underline in function and struct names.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:41:30 -03:00
Geert Uytterhoeven 64decbfe0d V4L/DVB (9275): dvb: input data pointer of cx24116_writeregN() should be const
| drivers/media/dvb/frontends/cx24116.c:573: warning: passing argument 3 of 'cx24116_writeregN' discards qualifiers from pointer target type

Make the `data' input pointer parameter of cx24116_writeregN() const to
kill the warning.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:31:00 -03:00
Christophe Thommeret 745632147d V4L/DVB (9270): cx24116: optimise emulated auto-pilot
Christophe divulged the following:
"Since 8PSK (and higher mod) signals are very likely to have pilot symbols,
pilot_auto should start with pilot_on for 8PSK.
And since QPSK signals are unlikely to have pilot, pilot_auto should start
with pilot_off for QPSK.

Without the patch:
QPSK tuning delay: ~100ms
8PSK tuning delay: ~900ms
with patch:
QPSK tuning delay: ~100ms
8PSK tuning delay: ~100ms
"

This patch does as Cristophe asks. In emulated auto-pilot we
choose pilot-on for tuning PSK_8 and pilot-off for
tuning QPSK.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:29:46 -03:00
Steven Toth 93504abfeb V4L/DVB (9260): cx24123: Checkpatch compliance
cx24123: Checkpatch compliance

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:56 -03:00
Steven Toth b431c61642 V4L/DVB (9259): s5h1411: Checkpatch compliance
s5h1411: Checkpatch compliance

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:52 -03:00
Steven Toth b7709c0de2 V4L/DVB (9258): s5h1409: Checkpatch compliance
s5h1409: Checkpatch compliance

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:48 -03:00
Steven Toth 98c9482369 V4L/DVB (9257): cx24116: Checkpatch compliance #3
cx24116: Checkpatch compliance #3

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:45 -03:00
Steven Toth 4e3599a5f0 V4L/DVB (9256): cx22702: Checkpatch compliance
cx22702: Checkpatch compliance

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:42 -03:00
Steven Toth 5c2a164aad V4L/DVB (9255): tda10048: Checkpatch compliance
tda10048: Checkpatch compliance

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:38 -03:00
Steven Toth f11ec7d4ee V4L/DVB (9254): cx24116: Checkpatch compliance #2
cx24116: Checkpatch compliance #2

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:34 -03:00
Steven Toth d93356a220 V4L/DVB (9253): cx24116: Checkpatch compliance
cx24116: Checkpatch compliance

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17 17:27:29 -03:00
Steven Toth b40d29e0af V4L/DVB (9184): cx24116: Change the default SNR units back to percentage by default.
cx24116: Change the default SNR units back to percentage by default.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:28:29 -02:00
Steven Toth 8953db793d V4L/DVB (9178): cx24116: Add module parameter to return SNR as ESNO.
I've retained the older percentage code after discussing this with
Darron Broad, but made the ESNO option default.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:27:31 -02:00
Steven Toth 0a6393ae21 V4L/DVB (9177): S2API: Change _8PSK / _16APSK to PSK_8 and APSK_16
... and cleanup any drivers using them.
I've also removed NBC_QPSK and modified the cx24116 driver to check
the delivery_type also, removing some excess namespace baggage.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:27:24 -02:00
Igor M. Liplianin 8a4949b7e9 V4L/DVB (9176): Add support for DvbWorld USB cards with STV0288 demodulator.
Add support for DvbWorld USB cards with STV0288 demodulator.
Those cards use Earda EDS-1547 tuner.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:27:03 -02:00
Igor M. Liplianin ceab2fe849 V4L/DVB (9175): Remove NULL pointer in stb6000 driver.
Remove NULL pointer in stb6000 driver,
as it raises error for DvbWorld USB card.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:26:25 -02:00
Igor M. Liplianin de9be0eaae V4L/DVB (9174): Allow custom inittab for ST STV0288 demodulator.
Allow custom inittab for ST STV0288 demodulator,
as it is needed for DvbWorld USB card.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:26:01 -02:00
Darron Broad 01a8f038c0 V4L/DVB (9170): cx24116: Sanity checking to data input via S2API to the cx24116 demod.
Add some sanity checking to data input via S2API to the cx24116 demod.
This patch is valid for both s2-mfe and s2.

It was found when testing KAFFEINE with S2API support that invalid
modulation modes amongst other parameters were being delivered to
the demod. In order to debug this sanity checking has been added.

An example session would involve kaffeine setting QAM_AUTO when
querying DVB-T, then later when trying to tune to DVB-S this
cached value would be presented in error.

Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 12:24:55 -02:00
Michael Krufky adeeac3b79 V4L/DVB (9149): hvr950q: led feedback based on snr
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 07:15:57 -02:00
Antti Palosaari 541dfa87f9 V4L/DVB (9146): af901x: fix some compiler errors and warnings
- cast firmware data to u8
- remove cpu_to_le16 from switch-case label

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 07:15:48 -02:00
Antti Palosaari d4e80beae1 V4L/DVB (9145): af901x: clean-up
- remove unnecessary #undef's

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-13 07:15:45 -02:00
Janne Grunau 07c6bb9e6e V4L/DVB (9105): correct Makefile symbol for stv0288 frontend
Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:14 -02:00
Igor M. Liplianin e4aab64cb7 V4L/DVB (9026): Add support for ST STV0288 demodulator and cards with it.
Add support for ST STV0288 demodulator and cards with it,
such as TeVii S420.
Patch is co-authored with Georg Acher <acher@baycom.de>

Signed-off-by: Georg Acher <acher@baycom.de>
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:07 -02:00
Igor M. Liplianin 04ad28c991 V4L/DVB (9017): Add support for Silicon Laboratories SI2109/2110 demodulators.
Add support for Silicon Laboratories SI2109/2110 demodulator
and cards with it, such as DvbWorld PCI2002.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:06 -02:00
Darron Broad 681faa0b7a V4L/DVB (9015): S2API: cx24116 register description fixes.
From the author:
Here is a simple patch detailing some reverse engineered
register detail lost in my latest merge. The comments
in the code refer to this register but it is never
defined. This corrects this.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:06 -02:00
Igor M. Liplianin c063a48923 V4L/DVB (9014): History update: MPEG initialization in cx24116.
Adjust MPEG initialization in cx24116 in order to accomodate different
MPEG CLK position and polarity in different cards. For example, HVR4000
uses 0x02 value, but DvbWorld & TeVii USB cards uses 0x01. Without it MPEG
stream was broken on that cards for symbol rates > 30000 kSyms/s.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:06 -02:00
Darron Broad 7396d3ea94 V4L/DVB (9013): S2API: cx24116 Rolloff changes, sysctls cleanup, isl power changes.
Remove the debugging sysctls.
Rolloff was broken, not it works as expected and has been tested in kaffeine.
Power related changes for the isl6421 are not implemented on the HVR4000/4000LITE.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:06 -02:00
Darron Broad 490c868408 V4L/DVB (9011): S2API: A number of cleanusp from the last 24 months.
I was given these changes by Darron Broad and Igor Liplianin and represent a series
of patches they've been making to the cx24116 driver over the last two years.

Changes for handling symbolrates >30Ksps
Tone handling changes.
Diseqc support.
Sleep support, shutting down the clocks correctly.
Cleanup on ROLL_OFF and PILOT support.

*** ST - We need to cleanup the sysclt control, this is abnormal
    in a demod driver. We should work towards understanding the missing
    API's and ensure we have them in S2API.  ***

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Darron Broad <darron@kewl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:06 -02:00
Steven Toth bfbf2dae30 V4L/DVB (9004): S2API: Implement GET/SET handing to the demods
The frontends will be notified (if they chose) of all _get and _set commands
so they can help determine result or action. Results are now returned
to userspace correctly.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:05 -02:00
Steven Toth e7fee0f3aa V4L/DVB (8996): S2API: typedefs replaced, _SEQ_'s removed, fixed 16 command arrays replaced
After discussion the following changes were made:
1. Removed the typedefs in frontend.h, use structures.
2. In the frontend.h, remove the 16 command limit on the API and
   switch to a flexible variable length API. For practical reasons
   a #define limits this to 64, this should be discussed.
3. Changed dvb-core ioctl handing to deal with variable sequences
   of commands.

tune-v0.0.3.c is required to use this API, it contains the interface changes.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Steven Toth 56f0680a28 V4L/DVB (8995): S2API: tv_ / TV_ to dtv_ / DTV_ namespace changes
The group preferred dtv_ over tv_, this implements it.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Igor M. Liplianin cc8c4f3a9c V4L/DVB (8994): Adjust MPEG initialization in cx24116
Adjust MPEG initialization in cx24116 in order to accomodate different
MPEG CLK position and polarity in different cards.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Igor M. Liplianin 3f8e51add2 V4L/DVB (8993): cx24116: Fix lock for high (above 30000 kSyms) symbol rates
cx24116: Fix lock for high (above 30000 kSyms) symbol rates

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:04 -02:00
Steven Toth 0d46748c3f V4L/DVB (8986): cx24116: Adding DVB-S2 demodulator support
Adds support for the COnexant cx24116 DVB-S2 demodulator.

TODO: checkpatch cleanup.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Antti Palosaari 28f947a953 V4L/DVB (8973): af9013: fix compile error coming from u64 div
- fix compile error coming from u64 div

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:03 -02:00
Antti Palosaari 825b967080 V4L/DVB (8971): initial driver for af9013 demodulator
- initial driver for the Afatech AF9013 demodulator

Signed-off-by: Antti Palosaari <crope@iki.fi>
[mchehab.redhat.com: having a global var called 'debug' is not a good idea. rename it to af9013_debug]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:02 -02:00
Hans Verkuil 942648af36 V4L/DVB (8946): dib7000m: fix powerpc build error
The dib7000m_i2c_enumeration() function is not used by any public drivers,
however some prototype board use it. So '#if 0' for now, but don't remove it.

Thanks to Patrick Boettcher for clarifying this.

Cc: Patrick Boettcher <patrick.boettcher@desy.de>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:37:00 -02:00
Hans Verkuil d45b9b8ab4 V4L/DVB (8906): v4l-dvb: fix assorted sparse warnings
Fix sparse warnings. None are serious, but cutting down on these helps find
future serious sparse warnings/errors.

Redid the av7710.c patch based on a suggestion by Oliver Endriss.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:58 -02:00
Oliver Endriss 83512e2074 V4L/DVB (8890): budget: Add callback to load firmware for the TDHD1 tuner
Supply callback to load firmware for the TDHD1 tuner (using request_firmware).

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:57 -02:00
Oliver Endriss 81ae953b68 V4L/DVB (8888): budget: Support Activy DVB-T with TDHD1 tuner
Support Fujitsu-Siemens Activy DVB-T card rev AL (ALPS TDHD1-204A tuner).

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:56 -02:00
Patrick Boettcher bccd7003ae V4L/DVB (8866): Add dummy FE to the Kconfig-file and fix it
Reactivated dummy frontend driver which is extremely useful for debugging.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:56 -02:00
Hans Verkuil eda9e4e294 V4L/DVB (8746): v4l-dvb: fix compile warnings.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:52 -02:00
Mauro Carvalho Chehab 06fcadbf8b V4L/DVB (8730): drx397xD: fix compilation error caused by changeset 71046dfb0853
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:51 -02:00
Harvey Harrison 95908ece60 V4L/DVB (8725): drx397xD.c sparse annotations
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:51 -02:00
Felipe Balbi 06a3f58496 V4L/DVB (8724): dvb: drx397xD: checkpatch.pl cleanups
This driver sure needs some rework. For now, let's
try to clean it up a bit before start reimplementing
anything.

checkpatch.pl still not happy with this driver after
this patch, but the most annoying errors are gone,
comments now use C-style only, labels are well placed
and some other minor fixes.

Some more clean up patches will come as I work on this
driver. Please review it carefully.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Henk Vergonet <henk.vergonet@gmail.com>
[mchehab@infradead.org: Manually fixed some conflicts with a previous patch]
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:51 -02:00
Michael Krufky 3a6b974d37 V4L/DVB (8658): lgs8gl5: fix build warnings
Fix the following build warnings:

lgs8gl5.c: In function 'lgs8gl5_read_reg':
lgs8gl5.c:95: warning: unused variable 'j'
lgs8gl5.c: In function 'lgs8gl5_update_alt_reg':
lgs8gl5.c:135: warning: unused variable 'j'
lgs8gl5.c: In function 'lgs8gl5_read_ber':
lgs8gl5.c:300: warning: unused variable 'state'
lgs8gl5.c: In function 'lgs8gl5_read_ucblocks':
lgs8gl5.c:332: warning: unused variable 'state'
lgs8gl5.c: At top level:
lgs8gl5.c:181: warning: 'lgs8gl5_set_inversion' defined but not used

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:49 -02:00
Timothy Lee dfbdce0490 V4L/DVB (8657): cxusb: add lgs8gl5 and support for Magic-Pro DMB-TH usb stick
Add support for Magic-Pro DMB-TH usb stick.  DMB-TH is the HDTV broadcast
standard used in Hong Kong and China.
[...]
I've also attached a second patch against the dvb-apps repository which
adds a DMB-TH scan file for Hong Kong.

Since the ProHDTV stick contains a DMB-TH decoder (lgs8gl5) onboard,
it outputs MPEG-TS to the PC.

Signed-off-by: Timothy Lee <timothy.lee@siriushk.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:49 -02:00
Michael Krufky 2e06d2ff54 V4L/DVB (8656): fix DVB_FE_CUSTOMISE for DVB_DIB7000P and DVB_TUNER_DIB0070 with dvb-usb-cxusb
Allow dvb-usb-cxusb to be built without dib7000p or dib0070 selected

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:49 -02:00
Anton Blanchard 8d79898897 V4L/DVB (8654): cxusb: add support for DViCO FusionHDTV DVB-T Dual Digital 4 (rev 2)
Add support for revision 2 of the DViCO FusionHDTV DVB-T Dual Digital 4
which has new tuners and demodulators (2 x DIB7070p). With this patch
both DVB reception and IR works.

The dib7000p driver currently hardwires the output mode to
OUTMODE_MPEG2_SERIAL regardless of what we ask for. Modify it to allow
OUTMODE_MPEG2_PAR_GATED_CLK to be set. Longer term we should remove the
check completely and set the output mode correctly in all the callers.

Add Kconfig bits to ensure the dib7000p and dib0070 modules are enabled.
It would be nice to only do this for the !DVB_FE_CUSTOMISE case, but
this is what the other DIB7070 module does (there are a number of
module dependencies in the attach code).

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:49 -02:00
Alexander Beregalov 95fc2ead84 V4L/DVB (8560): replace __FUNCTION__ with __func__
v4l/drx397xD: replace __FUNCTION__ with __func__

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:46 -02:00
Patrick Boettcher bda1cda54b V4L/DVB (9043): S5H1420: Fix size of shadow-array to avoid overflow
The array size of 'shadow' still needs to be fixed in order to not overflow when reading register 0x00.

Thanks to Oliver Endriss for pointing that out.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-04 23:01:21 -03:00
Patrick Boettcher c18c5ffe13 V4L/DVB (9037): Fix support for Hauppauge Nova-S SE
Different backends have different input busses (saa7146, flexcop).
To reflect that a config-option to the s5h1420-driver was added which makes
the output mode selectable.

Furthermore the s5h1420-driver is now doing the same i2c-method as it was done
before adding support for other i2c-users.

This patch needs to go into the current release of the kernel, as this driver
is currently broken.

(Thanks to Eberhard Kaltenhaeuser for helping out to debug this issue.)

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-04 23:00:46 -03:00
Adrian Bunk 877b5f4eda V4L/DVB (8843): tda10048_firmware_upload(): fix a memory leak
This patch fixes a memory leak ("fw" wasn't freed).

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:54 -03:00
Jean Delvare 1d434012f2 V4L/DVB (8837): dvb: fix I2C adapters name size
Some DVB drivers are incorrectly assuming that the size of
i2c_adapter.name is I2C_NAME_SIZE.  Here's a fix.

Also change strncpy to strlcpy, as the former is error-prone (and was
indeed incorrectly used.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Uwe Bugla <uwe.bugla@gmx.de>
Reviewed-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:50 -03:00
Steven Toth 6d8976164d V4L/DVB (8805): Steven Toth email address change
I need this so I can better isolate my linux email from my
corporate email.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:21 -03:00
Steven Toth 5ca947a999 V4L/DVB (8804): s5h1411: Enable QAM_AUTO mode
If apps pass QAM_AUTO then we need to obey it.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:20 -03:00
Steven Toth 4fc85c74b4 V4L/DVB (8803): s5h1409: Enable QAM_AUTO mode
If apps pass QAM_AUTO then we need to obey it.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-03 18:37:19 -03:00
Michael Krufky 3e3e2a8f1f V4L/DVB (8599): au8522: remove if frequency settings from vsb/qam modulation tables
Since IF frequency is set after the vsb/qam modulation tables are written,
remove the redundant register settings from the vsb/qam modulation tables.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:21 -03:00
Michael Krufky df76de098d V4L/DVB (8598): au8522: clean up function au8522_set_if
re-write this function to make it simpler

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:20 -03:00
Michael Krufky 2e7acd75cb V4L/DVB (8555): au8522: add mechanism to configure IF frequency for vsb and qam
Add a mechanism to configure IF frequency for vsb and qam.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-09-03 18:36:18 -03:00
Adrian Bunk 886f8d678a V4L/DVB (8562): DVB_DRX397XD: remove FW_LOADER select
Also for the new DVB_DRX397XD driver the FW_LOADER select and the
corresponding dependency on HOTPLUG can be removed.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-08-06 06:57:05 -03:00
Adrian Bunk 445c2714cf V4L/DVB (8534): remove select's of FW_LOADER
After commit d9b19199e4
(always enable FW_LOADER unless EMBEDDED=y) we can remove
the FW_LOADER select's and corresponding dependencies
on HOTPLUG.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-27 12:24:37 -03:00
Mauro Carvalho Chehab e81cf44428 V4L/DVB (8433): Fix macro name at z0194a.h
As reported by Hans Verkuil:

In file included from /home/v4l/master/v4l/dw2102.c:14:
/home/v4l/master/v4l/z0194a.h:93: error: 'STV0229_LOCKOUTPUT_1' undeclared here (not in a function)

This is due to some typos that were fixed on stv0299.

This patch renames it in accord with that fix.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23 16:42:53 -03:00
Igor M Liplianin 7fd4828f6c V4L/DVB (8421): Adds support for Dvbworld DVB-S 2102 USB card
Signed-off-by: Igor M Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23 08:09:17 -03:00
David Howells e272ae088f V4L/DVB (8247): Fix a const pointer assignment error in the drx397xD demodulator driver
Fix an assignment of a const pointer to a non-const pointer in the drx397xD
demodulator driver.

This was introduced in patch eb9bd0e567365d4f607d32d8c41e201da65aa971.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23 08:09:14 -03:00
Roman Zippel 22b0119e09 V4L/DVB (7812): 2.6.25-rc5-mm1 specifc div64_u64 fixes
Rename a few more div64_u64 which are only in -mm.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23 08:09:13 -03:00
Mauro Carvalho Chehab 29e031d5b0 V4L/DVB (7737): drx397xD: fix math usage
The previous code were using a div64 math specific to i386. Replace for an
asm-generic one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23 08:09:11 -03:00
Henk Vergonet 89f9257c06 V4L/DVB (7736): This patch adds support for the Micronas DRX3975D/DRX3977D DVB-T demodulator
The module needs an external firmware file.

The module has been tested on a Pinnacle 330e, but with modules that
are currently not part of the linux-dvb tree. So consider this highly
experimental, don't use this code unless you are an experienced kernel
developer.

 create mode 100644 drivers/media/dvb/frontends/drx397xD.c
 create mode 100644 drivers/media/dvb/frontends/drx397xD.h
 create mode 100644 drivers/media/dvb/frontends/drx397xD_fw.h

Signed-off-by: Henk Vergonet <henk.vergonet@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-23 08:07:31 -03:00
Oliver Endriss 4ee48c4257 V4L/DVB (8334): tda10023: Fix typo in tda10023_attach dummy routine
Fix compiler warning caused by a typo in the tda10023_attach dummy routine.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:08 -03:00
Michael Krufky c0f4c0adfd V4L/DVB (8146): lgdt330x: add additional FEC control configuration option
Allow the following configuration, by passing clock_polarity_flip = 2:

Enable FEC automatic reset. Disable spectrum inversion.
Enable viterbi resynchronization. Set polarity indicator high.
Enable error flag insertion.

Thanks to Daniel Gimpelevich, for discovering that this configuration
is used on the AVerMedia AVerTVHD Volar.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
CC: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:14:05 -03:00
Antti Palosaari e75888661a V4L/DVB (8030): TDA10023: make TS output mode configurable
- make TS output mode configurable

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:09:24 -03:00
Michael Krufky 54b6550e43 V4L/DVB (7921): s5h1411.c shouldn't #include "dvb-pll.h"
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:06:32 -03:00
Michael Krufky bbe09cbe3f V4L/DVB (7920): s5h1409.c shouldn't #include "dvb-pll.h"
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:06:27 -03:00
Michael Krufky 073204326d V4L/DVB (7917): au8522.c shouldn't #include "dvb-pll.h"
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:06:22 -03:00
Antti Palosaari 139dfeb261 V4L/DVB (7913): DVB-PLL: add Samsung DTOS403IH102A tuner
- add Samsung DTOS403IH102A tuner

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:06:12 -03:00
Antti Palosaari 4388c3b4fe V4L/DVB (7912): TDA10023: make few parameters configurable
- separate TDA10021 and TDA10023 attach
- configurable Xtal settings
- configurable input freq offset + baseband conversion type settings

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:06:06 -03:00
David Woodhouse bc179153ae dvb frontends: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10 14:26:31 +01:00
Steven Toth 836c28584d V4L/DVB (8096): au8522: prevent false-positive lock status
This decreases scan time in Queens, New York from 28 minutes to 7 minutes,
with the exact same services found.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:58 -03:00
Oliver Endriss 7876ad75b1 V4L/DVB (8075): stv0299: Uncorrected block count and bit error rate fixed
Fix uncorrected block counter and bit error rate to follow DVB API spec:
- Unsupported controls return -ENOSYS.
- UNC must never be set to 0.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:57 -03:00
Oliver Endriss c9fa2b1eee V4L/DVB (8071): tda10023: Fix possible kernel oops during initialisation
If the i2c write fails during initialisation, an oops happens
because state->frontend.dvb is still undefined. Fixed.

Thanks to Sigmund Augdal for reporting this bug,
and to Hartmut Birr for suggesting the fix.

Thanks-to: Sigmund Augdal <sigmund@snap.tv>
Thanks-to: Hartmut Birr <e9hack@gmail.com>

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-06-26 15:58:55 -03:00