Commit Graph

21 Commits (f41b177157718abe9a93868bb76e47d4a6f3681d)

Author SHA1 Message Date
Devin Heitmueller adcd8de6de V4L/DVB (13332): s5h1409: remove a set register that would cause lock to be lost.
On particularly weak signals, changing register 0xab after setting the
interleave mode will cause the FEC lock to get lost (while still holding the
EQ lock).  So remove the write entirely, which seems to have had no adverse
effect in either of my ClearQAM environments (and in particular resolves the
customer's reported issue).

Also flip around the order of the amhum optimization and the interleave setup
to be consistent with the windows driver, which has the side-benefit of doing
them both in the same call (since the amhum optimization can only be done once
the interleave setup).

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:23 -02:00
Devin Heitmueller f0cd44b4a1 V4L/DVB (13330): s5h1409: properly handle QAM optimization after lock achieved
The sh51409 driver was only doing the QAM optimization a single time, and it
would only occur if you received a lock instantaneously after the tuning
request.  Restructure the code so that the optimization occurs once you reach
a signal lock.

Note that this depends on the caller polling for status, but we don't have
much choice at this point without an independent thread monitoring the lock
status.  Also, at this point pretty much every application polls for status
lock after doing the tune, so the likelihood of the optimization not occurring
in the real world is pretty low.

The state machine has also been reworked such that setting the interleave mode
is now a dependency of doing the QAM optimization.  Before both were mutually
exclusive, which was not consistent with the Windows driver.  We now have a
single state machine that controls both.

The changes as-is are only enabled for the HVR-1600.  Once the changes are
tested with some of the other boards, this change should be made generic and
the "_legacy" functions should be removed.

This work was sponsored by ONELAN Limited.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:22 -02:00
Devin Heitmueller af5c8e1523 V4L/DVB (13329): s5h1409: provide HVR-1600 specific optimizations
Perform some optimization of the register configuration based on a trace
of the HVR-1600 Windows i2c traffic (and consultation with Steven Toth).
Note that some of these values may be able to be moved into the common driver,
but I am holding off on that until they can be tested with other boards.

This work was sponsored by ONELAN Limited.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:41:22 -02:00
Matthias Schwarzott 084e24acc9 V4L/DVB (12440): Use kzalloc for frontend states to have struct dvb_frontend properly
This patch changes most frontend drivers to allocate their state structure via
kzalloc and not kmalloc. This is done to properly initialize the
embedded "struct dvb_frontend frontend" field, that they all have.

The visible effect of this struct being uninitalized is, that the member "id"
that is used to set the name of kernel thread is totally random.

Some board drivers (for example cx88-dvb) set this "id" via
videobuf_dvb_alloc_frontend but most do not.

So I at least get random id values for saa7134, flexcop and ttpci based cards.
It looks like this in dmesg:
DVB: registering adapter 1 frontend -10551321 (ST STV0299 DVB-S)

The related kernel thread then also gets a strange name
like "kdvb-ad-1-fe--1".

Cc: Michael Krufky <mkrufky@linuxtv.org>
Cc: Steven Toth <stoth@linuxtv.org>
Cc: Timothy Lee <timothy.lee@siriushk.com>
Cc: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Acked-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-08-13 20:39:14 -03:00
Devin Heitmueller 67e70baf04 V4L/DVB (10411): s5h1409: Perform s5h1409 soft reset after tuning
Just like with the s5h1411, the s5h1409 needs a soft-reset in order for it
to know that the tuner has been told to change frequencies.  This change
changes the behavior from "random tuning times between 500ms to complete
tuning lock failures" to "tuning lock consistently within 700ms".

Thanks to Robert Krakora <rob.krakora@messagenetsystems.com> for doing
initial testing of the patch on the KWorld 330U.

Thanks to Andy Walls <awalls@radix.net> for doing testing of the patch on
the HVR-1600.

Thanks to Michael Krufky <mkrufky@linuxtv.org> for doing additional testing.

Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-01 10:41:02 -02: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 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 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 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
Harvey Harrison 271ddbf702 V4L/DVB (7514): media/dvb/frontends replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:58 -03:00
Douglas Schilling Landgraf ff699e6bd0 V4L/DVB (7094): static memory
- Static memory is always initialized with 0.
- Replaced in some cases C99 comments for /* */

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 13:42:20 -03:00
Michael Krufky 8e08af3c30 V4L/DVB (7495): s5h1409: fix blown-away bit in function s5h1409_set_gpio
Preserve all other bits when setting gpio.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-06 17:13:19 -03:00
Steven Toth dfc1c08aab V4L/DVB (7041): s5h1409: Bug fix for parallel support
Parallel support was not working with the s5h1409 and the Pinnacle HD800i.
This patch fixes the demodulator driver and ensures that all existing
s5h1409 based products configure the demodulator correctly.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:05 -02:00
Steven Toth a57ed8a1f7 V4L/DVB (7008): s5h1409: Ensure the silicon is initialized during attach
If not it impacts on analog tuner quality.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:04:50 -02:00
Michael Krufky 6b7daa88f2 V4L/DVB (6822): s5h1409: use VSB IF frequency ( 44 / 5.38 MHz ) unless otherwise specified
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>
2008-01-25 19:03:45 -02:00
Michael Krufky 2b03238a79 V4L/DVB (6821): s5h1409: fix IF frequency configuration
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>
2008-01-25 19:03:44 -02:00
Steven Toth 2300317f30 V4L/DVB (6820): s5h1409: QAM SNR related fixes
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>
2007-12-13 17:58:06 -02:00
Steven Toth dd7d5013cd V4L/DVB (6402): s5h1409: Fix broken QAM support
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>
2007-11-04 21:41:19 -02:00
Michael Krufky 3873dd0414 V4L/DVB (5950): whitespace cleanup for mt2131 and s5h1409
- trivial whitespace cleanups
- add "c-basic-offset: 8" to enforce tabbing style in emacs

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:40 -03:00
Michael Krufky a45c92756e V4L/DVB (5949): s5h1409: use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:39 -03:00
Steven Toth 89885558ad V4L/DVB (5948): Adding support for the S5H1409/CX24227 8VSB/QAM demodulator.
This patch adds support for the Samsung S5H1409 demodulator, also known
as the Conexant CX24227 demodulator. 8VSB mode has been tested and QAM
has been implemented based on the spec, although it's untested.

The S5H1409 / CX24227 appears on various Hauppauge boards.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:38 -03:00