Commit Graph

27 Commits (f8eaaf4f2a2810d6e486da2916ef07f7e00665c9)

Author SHA1 Message Date
Matthias Schwarzott 8420fa7ee2 V4L/DVB (10662): remove redundant memset after kzalloc
Hi there!

While having a look at the allocation of struct dvb_frontend in *_attach
functions, I found some cases calling memset after kzalloc. This is
redundant, and the attached patch removes these calls.
I also changed one case calling kmalloc and memset to kzalloc.

Regards
Matthias

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:52 -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
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
Patrick Boettcher ca06fa79a5 V4L/DVB (7470): CX24123: preparing support for CX24113 tuner
To support a new device based on CX24123 (using the CX24113-tuner) the following was done:

- added two parameters to de-select the internal PLL-driver (for CX24108) and a AGC-function callback.
- added a virtual i2c-adapter which allow simple access behind the i2c-gate
- cleanup up some code

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:56 -03:00
Mauro Carvalho Chehab 9c12224a60 V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files
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>
2007-10-09 22:06:17 -03:00
Mauro Carvalho Chehab 3ea9661538 V4L/DVB (5840): fix dst and cx24123: tune() callback changed signess for delay
tune() dvb_frontend callback changed delay signess:
        int (*tune)(struct dvb_frontend* fe,
                    struct dvb_frontend_parameters* params,
                    unsigned int mode_flags,
-                   int *delay,
+                   unsigned int *delay,

This change caused warnings on cx24123 and dst modules:

/home/v4l/master/v4l/cx24123.c:1034: warning: initialization from incompatible pointer type
/home/v4l/master/v4l/dst.c:1782: warning: initialization from incompatible pointer type
/home/v4l/master/v4l/dst.c:1808: warning: initialization from incompatible pointer type
/home/v4l/master/v4l/dst.c:1837: warning: initialization from incompatible pointer type
/home/v4l/master/v4l/dst.c:1860: warning: initialization from incompatible pointer type

This patch corrects the function prototype on both modules to follow the
core change.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:24:46 -03:00
Ahmed S. Darwish 0496daa7d8 V4L/DVB (5202): DVB: Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:18 -02:00
Steven Toth 9b5a4a676a V4L/DVB (4699): CX24109 patch to eliminate the weird mis-tunings
A number of people have been reporting wierd tuning problems with various
cards. Yeasah tracked down the problem to a miss-read datasheet. This
resolves the problems.

Signed-off-by: Yeasah Pell <yeasah@schwide.net>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-03 15:15:04 -03:00
Yeasah Pell ef76856d26 V4L/DVB (4479): LNB voltage control was inverted for the benefit of geniatech cards on Kworld
1) It sets LNBDCPol differently based on the card type. Now it should
work properly for both the kworld and geniatech cards.
2) It stops returning an error for the SEC_VOLTAGE_OFF voltage command
(the cx88-dvb level handles the actual voltage on/off, but it still
passes the ioctl down to the cx24123 level, which previously rejected
the OFF as invalid so the ioctl would report failure)

Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Yeasah Pell <yeasah@schwide.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 12:30:14 -03:00
Mauro Carvalho Chehab d93f8860cc V4L/DVB (4477): Improve hardware algorithm by setting the appropriate registers
Hardware algorithm needs to be configured to:
1) Increase timeout constants, to detect weaker signals;
2) do a wider zigzag search.
Acked-by: Manu Abraham <manu@linuxtv.org>

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:51 -03:00
Yeasah Pell 174ff219b7 V4L/DVB (4435): HW algo
Change this card to use HW ALGO tuning

Signed-off-by: Yeasah Pell <yeasah@schwide.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:38 -03:00
Yeasah Pell 18c053b3c5 V4L/DVB (4434): Change BER config
Change the bit error counter configuration to be the actual BER.
Originally it was reporting UCB.

Signed-off-by: Yeasah Pell <yeasah@schwide.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:38 -03:00
Yeasah Pell d12a9b911c V4L/DVB (4433): Soft decision threshold
Set the Soft decision threshold properly for the specified FEC

Signed-off-by: Yeasah Pell <yeasah@schwide.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-09-26 11:53:37 -03:00
Saqeb Akhter ccd214b273 V4L/DVB (4284): Cx24123: fix set_voltage function according to the specs
The set_voltage function in cx24123.c was corrected to match how it is
described in the CX24123 specs, producing the correct behaviour for cards
that require it.
Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net>

Signed-off-by: Saqeb Akhter <johoja@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-30 15:59:45 -03:00
Patrick Boettcher dea74869f3 V4L/DVB (4028): Change dvb_frontend_ops to be a real field instead of a pointer field inside dvb_frontend
The dvb_frontend_ops is a pointer inside dvb_frontend. That's why every demod-driver
is having a field of dvb_frontend_ops in its private-state-struct and
using the reference for filling the pointer-field in dvb_frontend.
- It saves at least two lines of code per demod-driver,
- reduces object size (one less dereference per frontend_ops-access),
- be coherent with dvb_tuner_ops,
- makes it a little bit easier for newbies to understand how it works and
- avoids stupid mistakes because you would have to copy the dvb_frontend_ops
  always, before you could assign the static pointer directly, which was
  dangerous.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 02:00:42 -03:00
Andrew de Quincey cd20ca9f19 V4L/DVB (4012): Fix cx24123 diseqc
Rework diseqc support to be more in line with the other demod drivers.
Fix Nova-S-Plus/Nova-SE2 diseqc.
Cleanup API.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 02:00:21 -03:00
Andrew de Quincey 20b1456285 V4L/DVB (3869): Convert cx24123 to refactored tuner code
Convert to tuner_ops calls.
Remove pll function pointers from structure.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25 01:58:55 -03:00
Yeasah Pell 70047f9cca V4L/DVB (3804): Tweak bandselect setup fox cx24123
*) Allow forcing the bandselect value with a module parameter to 
facilitate determining the correct bandselect frequencies.
*) Changes the bandselect frequency thresholds based on experiments 
with the above parameter in conjunction with the values in the spec.

Signed-off-by: Yeasah Pell <yeasah at schwide.net>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:08 -03:00
Yeasah Pell 0e4558ab4a V4L/DVB (3803): Various correctness fixes to tuning.
*) Sets an additional tuner parameter (demodulator sample gain) that 
wasn't being set before.
*) Removes the low symbol rate tuner parameter tweaks in the previous 
patch -- it appears those tweaks are not necessary with the demodulator 
sample gain set correctly.
*) Cleanup and document the demodulator register initialization sequence.
*) Change set_fec routine to disable FEC auto scan when a specific code 
rate is selected.
*) Remove error message when reported FEC is invalid (which happens 
sometimes when the card has no signal)

Signed-off-by: Yeasah Pell <yeasah at schwide.net>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:07 -03:00
Yeasah Pell dce1dfc2a5 V4L/DVB (3797): Always wait for diseqc queue to become ready before transmitting a diseqc message
The previous DISEQC code didn't wait, so it was unreliable

Signed-off-by: Yeasah Pell <yeasah at schwide.net>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:05 -03:00
Mauro Carvalho Chehab caf970e09c V4L/DVB (3796): Add several debug messages to cx24123 code
Current debug messages at cx24123 are next to useless, since they don't
print the values sent/read to registers. With this patch, debug=1 will
show comprehensive messages. debug=2 will show also read/write operations
at I2C bus.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
2006-05-12 19:55:04 -03:00
Vadim Catana a74b51fca9 V4L/DVB (3795): Fix for CX24123 & low symbol rates
- fixed the reception of channels with low symbol rates.
  ( The VGA1 and VGA2 offsets recommended by cx24109 docs for
  symbol rates from 1 to 5 MSps do not work. I changed them
  to values found experimentally. The charge pump current
  and FILTUNE voltage are now set to values recommended in
  the docs. This improves reception for symbol rates < 15 MSps.
  The values written in the SYSSymbolRate registers are calculated
  with better precision. )
		     
- fixed the cx24123_get_fec() function. It was returning the values
  for DCII mode.
- removed some unused variables

Signed-off-by: Vadim Catana <skystar at moldova.cc>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-12 19:55:02 -03:00
Steven Toth 0144f31466 V4L/DVB (3130): cx24123: cleanup timout handling
- Cleanup timeout handling in cx24123_pll_writereg(), and
use a reasonable value for the timeout.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09 15:25:22 -02:00
Vadim Catana 1c956a3ac0 DVB (2451): Add support for KWorld DVB-S 100, based on the same chips as Hauppauge
- Add support for KWorld DVB-S 100, based on the same chips as Hauppauge
Nova-S Plus (CX23883/CX24123/CX24109), without the Intersil ISL6421,
which is used for LNB control.
- LNB voltage and tone are controled by LNBDC and LNBTone bits from
register 0x29 of the CX24123 demodulator.
- The MO_GP0_IO register from CX23883 is used to turn LNB power on and off.

Signed-off-by: Vadim Catana <skystar@moldova.cc>
Acked-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09 15:25:08 -02:00
Johannes Stezenbach e3b152bc9e DVB (2446): Minor cleanups.
- Minor cleanups.

Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09 15:25:08 -02:00
Steve Toth b79cb6531d DVB (2445): Added demodulator driver for Nova-S-Plus and Nova-SE2 DVB-S support.
- Added demodulator driver for Nova-S-Plus and Nova-SE2 DVB-S support.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2006-01-09 15:25:07 -02:00