Commit Graph

27 Commits (fb223c32b4d3ee593c8dce07e983680d06abe387)

Author SHA1 Message Date
Devin Heitmueller 85ec9d7193 [media] dib7000p: setup dev.parent for i2c master built into 7000p
We need to set the dev.parent member on the dib7000p on its i2c master, or
else calls to request_firmware() will hit an oops in 2.6.31.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-07-27 17:52:28 -03:00
Olivier Grenie 5a0deeed57 [media] DiBxxxx: get rid of DMA buffer on stack
This patch removes the remaining on-stack buffer for USB DMA transfer.
This patch also reduces the stack memory usage.

Cc: stable@kernel.org
Cc: Florian Mickler <florian@mickler.org>
Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-05-20 09:30:52 -03:00
Mauro Carvalho Chehab 46f7296a52 [media] dib7000p: Fix 4-byte wrong alignments for some case statements
ERROR: switch and case should be at the same indent
 	switch (ch->u.ofdm.transmission_mode) {
[...]
+    case TRANSMISSION_MODE_4K:

WARNING: please, no spaces at the start of a line
+    case TRANSMISSION_MODE_4K:$

ERROR: switch and case should be at the same indent
 	switch (ch->u.ofdm.transmission_mode) {
[...]
+    case TRANSMISSION_MODE_4K:

WARNING: please, no spaces at the start of a line
+    case TRANSMISSION_MODE_4K:$

ERROR: switch and case should be at the same indent
 	switch (ch->u.ofdm.transmission_mode) {
[...]
+    case TRANSMISSION_MODE_4K:

WARNING: please, no spaces at the start of a line
+    case TRANSMISSION_MODE_4K:$

Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:43 -03:00
Olivier Grenie b4d6046e84 [media] DiBxxxx: Codingstype updates
This patchs fix several conding-style violations.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:43 -03:00
Olivier Grenie 713d54a8bd [media] DiB7090: add support for the dib7090 based
This patch adds support for the SoC DiB7090 DVB-T demodulator and its
melt-in UHF/VHF RF tuner.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-21 20:31:43 -03:00
Mauro Carvalho Chehab 2e94b53c55 [media] dib7000m/dib7000p: Add support for TRANSMISSION_MODE_4K
Fixes several warnings:

drivers/media/dvb/frontends/dib7000m.c: In function ‘dib7000m_set_channel’:
drivers/media/dvb/frontends/dib7000m.c:808:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:869:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c: In function ‘dib7000m_tune’:
drivers/media/dvb/frontends/dib7000m.c:1023:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:1033:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000m.c:1043:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_set_channel’:
drivers/media/dvb/frontends/dib7000p.c:720:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:773:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c: In function ‘dib7000p_tune’:
drivers/media/dvb/frontends/dib7000p.c:997:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:1007:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’
drivers/media/dvb/frontends/dib7000p.c:1017:3: warning: case value ‘255’ not in enumerated type ‘fe_transmit_mode_t’

The drivers were prepared to support 4K carriers, but as the define were added
later, they were using a "magic" value of 255.

Cc: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-12-29 08:17:13 -02:00
Olivier Grenie 970d14c6cc V4L/DVB: dib7000p: add disable sample and hold, and diversity delay parameter
This patch improves the overall driver performance in
diversity-reception scenarios.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-09-27 22:21:58 -03:00
Olivier Grenie 90e12cec70 V4L/DVB: dib7770: enable the current mirror
To improve performance on DiB7770-devices enabling the current mirror
is needed.

This patch adds an option to the dib7000p-driver to do that and it
creates a separate device-entry in dib0700-device to use those changes
on hardware which is using the DiB7770.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-09-27 22:21:57 -03:00
Andrew Morton 0b42760a75 V4L/DVB: dib7000p: reduce large stack usage fix
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:31 -03:00
Randy Dunlap 30d81bb086 V4L/DVB: dib7000p: reduce large stack usage
This patch reduces static stack usage of one of the 2 top offenders
as listed by 'make checkstack':

Building with CONFIG_FRAME_WARN=2048 produces:

drivers/media/dvb/frontends/dib7000p.c:1367: warning: the frame size of 2320 bytes is larger than 2048 bytes

and in 'make checkstack', the stack usage goes from:
0x00002409 dib7000p_i2c_enumeration [dib7000p]:		2328
to unlisted with this patch.

Also change one caller of dib7000p_i2c_enumeration() to check its
return value.

I don't have the hardware that is needed to test this patch.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-19 12:58:30 -03:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Olivier Grenie eac1fe1050 V4L/DVB (13051): DiB7000P: improve rebostness of HAS_LOCK indicator
Update the dib7000p:
The status is HAS_LOCK only if the demod is able to decode the TPS. Sometimes, there is a TPS data lock, even if the demod is not able to decode it (ex: no RF signal).
For the STK7770P: correct value for the charge pump

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:04 -02:00
Olivier Grenie f8731f4dde V4L/DVB (13049): dib8000: SNR in 10th of dB
dib7000p/dib8000: added pid filtering

dib8000: the SNR is in 10th of dB (not in dB)
dib7000p and dib8000: added the pid filtering. This feature is enabled by module option (dvb-usb module).

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:40:03 -02:00
Martin Samek 7646b9de26 V4L/DVB (13079): dib0700: fixed xc2028 firmware loading kernel oops
Fixing kernel oops when driver attemps to load xc2028 firmware.

Note by djh: the patch contribute by Martin is a port of a fix I made during
the PCTV 340e development.  It's a temporary workaround that fixes a regression
(an OOPS condition) and the real fix should be in the code that manages the
i2c master on the dib7000p.  But this fix does address the immmediate
regression and should be merged upstream until we do a cleaner fix.

Signed-off-by: Martin Samek <martin@marsark.sytes.net>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
CC: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-11-07 12:55:03 -02:00
Olivier Grenie ef80196490 V4L/DVB (12887): DIB7000P: SNR calcuation forr DiB7000P
Add the SNR monitoring for the dib7000p. The result is in dB.

Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19 00:14:10 -03:00
Julia Lawall 75b697f747 V4L/DVB (12483): Use DIV_ROUND_CLOSEST
The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

@depends on haskernel@
expression x,__divisor;
@@

- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:08 -03: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
Steven Toth a38d6e37c0 V4L/DVB (7672): dib7000p: Add output mode param to the attach struct
This allows future drivers to select the most appropriate output mode.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Reviewed-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:45 -03:00
Patrick Boettcher 904a82e3e2 V4L/DVB (7074): DiB7000P: correct tuning problem for 7MHz channel
Tuning problem for 7Mhz channels fixes

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:20 -02:00
Soeren Moch 853ea132c7 V4L/DVB (7070): Fix some tuning problems
The attached patch solves all my vdr tuning problems on a dib7000p
nova-t stick as far as I could check within the last weekend.

It disables streaming while tuning, like that the number of faulty TS
packets is reduced.

Signed-off-by: Soeren Moch <Soeren.Moch@stud.uni-hannover.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:17 -02:00
Patrick Boettcher 8d99996b09 V4L/DVB (5963): Module parameter description for SFN workaround
Thanks to Matt Doran I found that there the module parameter description 
was not OK.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:04:04 -03:00
Matt Doran 8f6956c7f9 V4L/DVB (5960): Add module parameter to enable SFN workaround
In some areas in the world the broadcasters are not using the same
cellid for each transmitter in a SFN. The DiBcom has problems with
that setup. The module parameter buggy_sfn_workaround makes it re-usable.

Signed-off-by: Matt Doran <matt.doran@papercut.biz>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:50 -03:00
Patrick Boettcher 01373a5c97 V4L/DVB (5955): Add support for DiB7070-based devices
This changeset adds support for DiB7070P-based devices by adding the
dib0070-driver and putting the appropriate layouts into
dib0700_devices.c

It also includes a new firmware for the dib0700 which is necessary to
make the DiB7070-boards work and it also should fix the i2c-problems
on some boards.

Signed-off-by: Jean-Philippe Sibers <jpsibers@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:44 -03:00
Patrick Boettcher b6884a17fc V4L/DVB (5954): Sync with DiBcom Driver Release 2.1.3 + some improvements
This changesets syncs the OpenSource driver for DiBcom demodulators
with version 2.1.3 of DiBcom reference driver. There were some
improvements since the last release for linux-dvb, e.g.:

- stepped AGC startup
- less space for initialization
- diversity synchronization

Furthermore this changeset contains the following things:

- latest AGC settings for MT2266-based devices (namely Nova-TD and other) will improve the sensitivity
- support for STK7700D reference design in dib0700-devices
- remove some line-breaks when debugging is enabled
- getting rid of layer between frontend_parameters and ofdm_channel used in dib*-drivers

Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:43 -03:00
Olivier DANET 54d75ebaa0 V4L/DVB (5914): Add initial support for Dual-DVB-T stick
Add initial support for Dual-DVB-T stick based on DiB7700 and MT2266

- Microtune MT2266 driver.
- Preliminary support for these dual tuner devices :
  - Pinnacle Dual DVB-T diversity
  - Terratec Cinergy DT USB XS diversity
  - Hauppauge Nova TD USB

Signed-off-by: Olivier DANET <odanet@caramail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:03:14 -03:00
Robert P. J. Day beb7dd86a1 Fix misspellings collected by members of KJ list.
Fix the misspellings of "propogate", "writting" and (oh, the shame
:-) "kenrel" in the source tree.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 07:14:03 +02:00
Patrick Boettcher a75763ffff V4L/DVB (4772): Add support for DiBcom DiB7000PC
This patch contains support for the DiB7000PC-driver.

Signed-off-by: Francois KANOUNNIKOFF <fkanounnikoff@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10 08:51:03 -02:00