Commit Graph

3726 Commits (56835e6cc053c29bf1a15a07dbeb78f219a15214)

Author SHA1 Message Date
Mauro Carvalho Chehab 3626479e48 [media] dvb_frontend: Fix a regression when switching back to DVB-S
There are some softwares (Kaffeine and likely xine) that uses a
DVBv5 call to switch to DVB-S2, but expects that a DVBv3 call to
switch back to DVB-S. Well, this is not right, as a DVBv3 call
doesn't know anything about delivery systems.

However, as, by accident, this used to work, we need to restore its
behavior, in order to avoid regressions with those softwares.

Reported on this Fedora 16 bugzilla:
	https://bugzilla.redhat.com/show_bug.cgi?id=812895

Reported-by: Dieter Roever <Dieter.Roever@gmx.de>
Cc: stable@kernel.org # for version 3.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-18 11:03:18 -03:00
Linus Torvalds 39f86a608a Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:

 - dvb core: there is a regression found when used with xine.  For
   whatever unknown reason, xine (and xine-lib clients) wants that the
   frontend to tell what frequency he is using even before the PLL lock
   (or at least, it expects a non-zero frequency).

   On DVB, the frequency is only actually known after a frequency
   zig-zag seek, done by the DVB core.  Anyway, the fix was trivial.
   That solves Fedora BZ#808871.

 - ivtv: fix a regression when selecting the language channel

 - uvc: fix a race-related crash

 - it913x: fixes firmware loading

 - two trivial patches (a dependency issue at a radio driver at sound
   Kconfig, and a warning fix on dvb).

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] uvcvideo: Fix race-related crash in uvc_video_clock_update()
  [media] Drivers/media/radio: Fix build error
  [media] dvb_frontend: fix compiler warning
  [media] it913x: fix firmware loading errors
  [media] ivtv: Fix AUDIO_(BILINGUAL_)CHANNEL_SELECT regression
  [media] dvb_frontend: regression fix: userspace ABI broken for xine
2012-04-11 11:05:34 -07:00
Dan Carpenter 3fd7e4341e [media] mxl111sf: remove an unused variable
We don't use this any more after 3be5bb71fb "[media] mxl111sf: fix error
on stream stop in mxl111sf_ep6_streaming_ctrl()" and it makes GCC
complain.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:57:20 -03:00
Antti Palosaari 852f0d9d6f [media] af9035: disable frontend0 I2C-gate control
Seems like tuners used for frontend0 are not behind demodulator
I2C-gate thus gate control is not needed. Disable it for sure as
it can cause problems some situations.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:57:14 -03:00
Antti Palosaari b55b4b7a10 [media] af9035: reorganise USB ID and device list
Add and rename "Afatech AF9035 reference design" as a first
device in the list since it sounds logical to keep reference
design IDs on top of the list.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:56:42 -03:00
Antti Palosaari daacd5b27f [media] af9035: minor changes for af9035_fc0011_tuner_callback()
Change function to use same logic than existing functions.
Debugs log writings are done in error case, earlier it was
just returning error code.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:56:20 -03:00
Pierangelo Terzulli dbac01ffbb [media] af9035: add AVerMedia Twinstar (A825) [07ca:0825]
[crope@iki.fi: applied manually since erroneous patch]
Signed-off-by: Pierangelo Terzulli <pierigno@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:55:59 -03:00
Antti Palosaari de7f14fcad [media] af9033: do some minor changes for .get_frontend()
Minor functionality and style changes.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:55:46 -03:00
Gianluca Gennari 0a4df239af [media] af9033: implement get_frontend
Implement the get_frontend function.
The code is derived from the old af9033 driver by Antti Palosaari.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:55:21 -03:00
Antti Palosaari f2b61d0c39 [media] af9035: initial support for IT9135 chip
AF9035 code needed for IT9135 chip support. Needs still small
changes for AF9033 and totally new tuner driver in order to
get that chip version working.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:54:58 -03:00
Michael Büsch de2bec5e54 [media] af9035: Use usleep_range() in fc0011 support code
Use usleep_range() instead of msleep() to improve power saving opportunities.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:53:59 -03:00
Antti Palosaari ad30e91bef [media] af9035: fix and enhance I2C adapter
There was a bug I2C adapter writes and reads one byte too much.
As the most I2C clients has auto-increment register addressing
this leads next register from the target register overwritten by
garbage data.

As a change remove whole register address byte usage and write
data directly to the I2C bus without saying what are register
address bytes to firmware.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Michael Buesch <m@bues.ch>
Cc: Hans-Frieder Vogt <hfvogt@gmx.net>
Cc: Gianluca Gennari <gennarone@gmail.com>
Tested-by: Michael Buesch <m@bues.ch>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:53:30 -03:00
Gianluca Gennari 48bf7e1a9d [media] af9035: use module_usb_driver macro
Let's save a few lines of code using the module_usb_driver macro.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:52:48 -03:00
Gianluca Gennari ce1fe3799c [media] af9035: add support for the tda18218 tuner
Add basic support for the tda18218 tuner and the AVerMedia A835 devices.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:52:34 -03:00
Gianluca Gennari 728827b8d3 [media] af9035: add USB id for 07ca:a867
New USB id for the Avermedia A867 stick (Sky Digital Key with blue led).

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:52:00 -03:00
Hans-Frieder Vogt 540fd4ba05 [media] af9035: add Avermedia Volar HD (A867R) support
Support of AVerMedia AVerTV HD Volar, with tuner MxL5007t.

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:51:47 -03:00
Michael Büsch 1083a0f9b8 [media] af9035: Add Afatech USB PIDs
Add some generic Afatech USB PIDs used by "Cabstone" sticks and others.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:51:08 -03:00
Michael Büsch ffc501f654 [media] af9035: Add fc0011 tuner support
This adds Fitipower fc0011 tuner support to the af9035 driver.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:50:45 -03:00
Gianluca Gennari 6ec12988c0 [media] af9035: fix warning
On a 32 bit system:

af9035.c: In function 'af9035_download_firmware':
af9035.c:446:3: warning: format '%lu' expects argument of type 'long unsigned
int', but argument 3 has type 'unsigned int' [-Wformat]

%zu avoids any warning on both 32 and 64 bit systems.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:46:15 -03:00
Michael Büsch b1a9599a0d [media] af9035: Add USB read checksumming
This adds USB message read checksumming to protect against
device and bus errors.
It also adds a read length check to avoid returning garbage from
the buffer, if the device truncated the message.

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:45:37 -03:00
Hans-Frieder Vogt 812fe6d942 [media] af9035: i2c read fix
Enable i2c read requests.

I2C read fix (necessary e.g. for mxl5007t tuner, because it
sends a 2 bytes for a read request, thus msg[0].len != msg[1].len).

Signed-off-by: Hans-Frieder Vogt <hfvogt@gmx.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:45:16 -03:00
Antti Palosaari 8e8a5ac763 [media] af9035: add log writing if unsupported Xtal freq is given
Supports currently only 12 MHz Xtals. It is better to print log
and not to attach frontend in that case.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:44:59 -03:00
Antti Palosaari e898ef6272 [media] af9033: implement .read_snr()
Returns values as 0.1 dB resolution as preferred nowadays.
Actual resolution is 1 dB.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:44:45 -03:00
Antti Palosaari 3a871ca270 [media] af9033: correct debug print
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:44:12 -03:00
Antti Palosaari 41d44a815a [media] af9035: add missing error check
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:43:57 -03:00
Antti Palosaari 77c5ff2d89 [media] af9035: reimplement firmware downloader
Big thanks to Daniel Glöckner <daniel-gl@gmx.net> for
revealing firmware structure on Linux Media mailing
list.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: Daniel Glöckner <daniel-gl@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:43:40 -03:00
Antti Palosaari 5a9abae497 [media] af9035: enhancement for unknown tuner ID handling
* do not attach frontend when tuner is not supported
* fix unkown tuner ID log write format
* add prefix for dvb-usb log writings

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:43:01 -03:00
Antti Palosaari 7f882c2e35 [media] Afatech AF9035 DVB USB driver
AF9035 is integrated DVB USB interface and DVB-T demodulator.
Integrated demodulator is AF9033 and its driver is attached
runtime as a own module.

Driver currently supports only one device,
TerraTec Cinergy T Stick [0ccd:0093].

TerraTec Cinergy T Stick is based of Afatech AF9035 +
Infineon TUA 9001 silicon tuner.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:42:19 -03:00
Antti Palosaari 4b64bb268f [media] Afatech AF9033 DVB-T demodulator driver
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 14:33:42 -03:00
Hans Petter Selasky c065f5b4ee [media] dvb_frontend: fix compiler warning
has_get_frontend() should return a boolean, not a pointer.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 09:42:11 -03:00
Malcolm Priestley 4da2876614 [media] it913x: fix firmware loading errors
On some systems the device does not respond or give obscure values after cold,
warm or firmware reboot.

This patch retries to get chip version and type 5 times. If it
fails it applies chip version 0x1 and type 0x9135.

This patch does not fix warm cycle problems from other operating
systems and indeed the reverse applies. Users should power off cold boot.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 09:42:10 -03:00
Chris Rankin 556a0442e0 [media] dvb_frontend: regression fix: userspace ABI broken for xine
The commit e399ce77e6 has broken the DVB ABI for xine:

The problem is that xine is expecting every event after a successful
FE_SET_FRONTEND ioctl to have a non-zero frequency parameter, regardless
of whether the tuning process has LOCKed yet. What used to happen is
that the events inherited the initial tuning parameters from the
FE_SET_FRONTEND call. However, the fepriv->parameters_out struct is now
not initialised until the status contains the FE_HAS_LOCK bit.

You might argue that this behaviour is intentional, except that if an
application other than xine uses the DVB adapter and manages to set the
parameters_out.frequency field to something other than zero, then xine
no longer has any problems until either the adapter is replugged or the
kernel modules reloaded. This can only mean that the
fepriv->parameters_out struct still contains the (stale) tuning
information from the previous application.

Signed-off-by: Chris Rankin <rankincj@yahoo.com>
Cc: stable@kernel.org # for kernel version 3.3
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-04-09 09:41:34 -03:00
Linus Torvalds 0195c00244 Disintegrate and delete asm/system.h
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIVAwUAT3NKzROxKuMESys7AQKElw/+JyDxJSlj+g+nymkx8IVVuU8CsEwNLgRk
 8KEnRfLhGtkXFLSJYWO6jzGo16F8Uqli1PdMFte/wagSv0285/HZaKlkkBVHdJ/m
 u40oSjgT013bBh6MQ0Oaf8pFezFUiQB5zPOA9QGaLVGDLXCmgqUgd7exaD5wRIwB
 ZmyItjZeAVnDfk1R+ZiNYytHAi8A5wSB+eFDCIQYgyulA1Igd1UnRtx+dRKbvc/m
 rWQ6KWbZHIdvP1ksd8wHHkrlUD2pEeJ8glJLsZUhMm/5oMf/8RmOCvmo8rvE/qwl
 eDQ1h4cGYlfjobxXZMHqAN9m7Jg2bI946HZjdb7/7oCeO6VW3FwPZ/Ic75p+wp45
 HXJTItufERYk6QxShiOKvA+QexnYwY0IT5oRP4DrhdVB/X9cl2MoaZHC+RbYLQy+
 /5VNZKi38iK4F9AbFamS7kd0i5QszA/ZzEzKZ6VMuOp3W/fagpn4ZJT1LIA3m4A9
 Q0cj24mqeyCfjysu0TMbPtaN+Yjeu1o1OFRvM8XffbZsp5bNzuTDEvviJ2NXw4vK
 4qUHulhYSEWcu9YgAZXvEWDEM78FXCkg2v/CrZXH5tyc95kUkMPcgG+QZBB5wElR
 FaOKpiC/BuNIGEf02IZQ4nfDxE90QwnDeoYeV+FvNj9UEOopJ5z5bMPoTHxm4cCD
 NypQthI85pc=
 =G9mT
 -----END PGP SIGNATURE-----

Merge tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system

Pull "Disintegrate and delete asm/system.h" from David Howells:
 "Here are a bunch of patches to disintegrate asm/system.h into a set of
  separate bits to relieve the problem of circular inclusion
  dependencies.

  I've built all the working defconfigs from all the arches that I can
  and made sure that they don't break.

  The reason for these patches is that I recently encountered a circular
  dependency problem that came about when I produced some patches to
  optimise get_order() by rewriting it to use ilog2().

  This uses bitops - and on the SH arch asm/bitops.h drags in
  asm-generic/get_order.h by a circuituous route involving asm/system.h.

  The main difficulty seems to be asm/system.h.  It holds a number of
  low level bits with no/few dependencies that are commonly used (eg.
  memory barriers) and a number of bits with more dependencies that
  aren't used in many places (eg.  switch_to()).

  These patches break asm/system.h up into the following core pieces:

    (1) asm/barrier.h

        Move memory barriers here.  This already done for MIPS and Alpha.

    (2) asm/switch_to.h

        Move switch_to() and related stuff here.

    (3) asm/exec.h

        Move arch_align_stack() here.  Other process execution related bits
        could perhaps go here from asm/processor.h.

    (4) asm/cmpxchg.h

        Move xchg() and cmpxchg() here as they're full word atomic ops and
        frequently used by atomic_xchg() and atomic_cmpxchg().

    (5) asm/bug.h

        Move die() and related bits.

    (6) asm/auxvec.h

        Move AT_VECTOR_SIZE_ARCH here.

  Other arch headers are created as needed on a per-arch basis."

Fixed up some conflicts from other header file cleanups and moving code
around that has happened in the meantime, so David's testing is somewhat
weakened by that.  We'll find out anything that got broken and fix it..

* tag 'split-asm_system_h-for-linus-20120328' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system: (38 commits)
  Delete all instances of asm/system.h
  Remove all #inclusions of asm/system.h
  Add #includes needed to permit the removal of asm/system.h
  Move all declarations of free_initmem() to linux/mm.h
  Disintegrate asm/system.h for OpenRISC
  Split arch_align_stack() out from asm-generic/system.h
  Split the switch_to() wrapper out of asm-generic/system.h
  Move the asm-generic/system.h xchg() implementation to asm-generic/cmpxchg.h
  Create asm-generic/barrier.h
  Make asm-generic/cmpxchg.h #include asm-generic/cmpxchg-local.h
  Disintegrate asm/system.h for Xtensa
  Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt]
  Disintegrate asm/system.h for Tile
  Disintegrate asm/system.h for Sparc
  Disintegrate asm/system.h for SH
  Disintegrate asm/system.h for Score
  Disintegrate asm/system.h for S390
  Disintegrate asm/system.h for PowerPC
  Disintegrate asm/system.h for PA-RISC
  Disintegrate asm/system.h for MN10300
  ...
2012-03-28 15:58:21 -07:00
David Howells 9ffc93f203 Remove all #inclusions of asm/system.h
Remove all #inclusions of asm/system.h preparatory to splitting and killing
it.  Performed with the following command:

perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *`

Signed-off-by: David Howells <dhowells@redhat.com>
2012-03-28 18:30:03 +01:00
Linus Torvalds 69a7aebcf0 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Pull trivial tree from Jiri Kosina:
 "It's indeed trivial -- mostly documentation updates and a bunch of
  typo fixes from Masanari.

  There are also several linux/version.h include removals from Jesper."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
  kcore: fix spelling in read_kcore() comment
  constify struct pci_dev * in obvious cases
  Revert "char: Fix typo in viotape.c"
  init: fix wording error in mm_init comment
  usb: gadget: Kconfig: fix typo for 'different'
  Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
  writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
  writeback: fix typo in the writeback_control comment
  Documentation: Fix multiple typo in Documentation
  tpm_tis: fix tis_lock with respect to RCU
  Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
  Doc: Update numastat.txt
  qla4xxx: Add missing spaces to error messages
  compiler.h: Fix typo
  security: struct security_operations kerneldoc fix
  Documentation: broken URL in libata.tmpl
  Documentation: broken URL in filesystems.tmpl
  mtd: simplify return logic in do_map_probe()
  mm: fix comment typo of truncate_inode_pages_range
  power: bq27x00: Fix typos in comment
  ...
2012-03-20 21:12:50 -07:00
Klaus Schmidinger 0e377819b9 [media] stb0899: fix the limits for signal strength values
stb0899: fix the limits for signal strength values

stb0899_read_signal_strength() adds an offset to the result of the table lookup.
That offset must correspond to the lowest value in the lookup table, to make sure
the result doesn't get below 0, which would mean a "very high" value since the
parameter is unsigned.
'strength' and 'snr' need to be initialized to 0 to make sure they have a
defined result in case there is no "internal->lock".

Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 23:06:40 -03:00
Michael Krufky 3be5bb71fb [media] mxl111sf: fix error on stream stop in mxl111sf_ep6_streaming_ctrl()
Remove unnecessary register access in mxl111sf_ep6_streaming_ctrl()

This code breaks driver operation in kernel 3.3 and later, although
it works properly in 3.2  Disable register access to 0x12 for now.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 22:24:40 -03:00
Malcolm Priestley 593a2ce0ae [media] m88rs2000 ver 1.13 Correct deseqc and tuner gain functions
Remove incorrect SEC_MINI_B settings-TODO complete this section.

Correct break and remove return -EINVAL within set tone. It appears
there is a bug that occasionally something other than ON/OFF is
sent stalling the driver. Just continue and write back registers.

Set register b2 in setup. This is the set voltage pin which
isn't used in lmedm04 driver but it is always set to 0x1.

Correct the if statements in set_tuner_rf.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:51:03 -03:00
Antti Palosaari 6d535bd882 [media] af9015: fix i2c failures for dual-tuner devices - part 2
Some changes for previous patch I liked to do.
Just move tuner init and sleep to own functions from the demod
init and sleep functions.  Functionality remains still almost the same.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:41:07 -03:00
Gordon Hecker be4a5e7f0e [media] af9015: fix i2c failures for dual-tuner devices
The i2c failures were caused by enabling both i2c gates
at the same time while putting the tuners asleep.

This patch removes the init() and sleep() callbacks from the tuner,
to prevent frontend.c from calling
  i2c_gate_ctrl
  tuner init / sleep
  i2c_gate_ctrl
without holding the lock.
tuner init() and sleep() are instead called in frontend init() and
sleep().

Signed-off-by: Gordon Hecker <ghecker@gmx.de>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:40:58 -03:00
Jean Delvare d3db22e10b [media] dib0700: Fix memory leak during initialization
Reported by kmemleak.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:35:57 -03:00
Jean Delvare 3ef7675948 [media] dib0700: Drop useless check when remote key is pressed
struct dvb_usb_device *d can never be NULL so don't waste time
checking for this.

Rationale: the urb's context is set when usb_fill_bulk_urb() is called
in dib0700_rc_setup(), and never changes after that. d is dereferenced
unconditionally in dib0700_rc_setup() so it can't be NULL or the
driver would crash right away.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:17:58 -03:00
Michael Krufky ef3d2dc366 [media] au8522: bug-fix: enable modulation AFTER tune (instead of before tuning)
The au8522 driver programs the tuner after programming the demodulator,
but the tuner should be programmed first. This patch fixes this behavior.

EDIT: Apparantly Devin created a similar patch some time ago, but hasn't
submitted it for merge.  I never saw his patch, but I thank him anyhow
for his efforts.  In addition, Devin pointed out a flaw in my patch:

This newly generated patch takes Devin's comments into account.

Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 19:05:46 -03:00
Akihiro Tsukada cd7334d6d6 [media] dvb: earth-pt1: remove unsupported net subdevices
PT1 and PT2 do not have net functions.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:48:13 -03:00
Akihiro Tsukada 7ff04760f7 [media] dvb: earth-pt1: decrease the too large DMA buffer size
Current default value of "nr_tables" option corresponds to the DMA
buffer of about 10 to 48 seconds long, which is obviously too much.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:47:38 -03:00
Akihiro Tsukada 6988111098 [media] dvb: earth-pt1: add an error check/report on the incoming data
This patch adds a data integrity check using the sequence counter and
error flags added by the bridge chip.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:47:15 -03:00
Akihiro Tsukada 847e876596 [media] dvb: earth-pt1: stop polling data when no one accesses the device
The driver started a kthread to poll the DMA buffers soon after probing,
which relsuleted in 1000/sec sleeps and wakeups of the thread doing nothing
useful until someone started feeding.
This patch changes the creation and destruction of the kthread depending on the number of users.

Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:46:36 -03:00
Malcolm Priestley 1d53160111 [media] lmedm04 - support for m88rs2000 missing kconfig option
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 15:32:48 -03:00
Malcolm Priestley 4f3b7fed46 [media] lmedm04 ver 1.99 support for m88rs2000 v2
Support for m88rs2000 module.

The driver also attempts to overcome occasional lock problems.

Call backs are now used for read_status, signal level and SNR.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:55:37 -03:00
Mauro Carvalho Chehab 40841e7469 [media] m88rs2000: Don't fill info.type
This field is handled internally by the DVB core, with uses the
selected delivery system to fill it, when a DVBv3 call is
handled. So, drivers should not touch on it.

Cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:55:27 -03:00
Malcolm Priestley ae8dc8ee2b [media] m88rs2000 1.12 v2 DVB-S frontend and tuner module
Support for m88rs2000 chip used in lmedm04 driver.

Note there are still lock problems.

Slow channel change due to the large block of registers sent in set_frontend.

Version 2 differences.
Front end is completely shut down when in sleep mode. This allow user to regain
control of device.
Kaffeine scan problem solved by removing register calls from get_frontend.
Kaffeine seems to call get_frontend when updating signal data. This can happen
in the middle of a tune stalling the driver.
Change calculations to those in the DS3000 driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:52:59 -03:00
Malcolm Priestley 77c2402dc6 [media] lmedm04 v1.98 Remove clear halt
These were in the original lme2510 device driver.

Removing them significantly speeds up the driver.

All tuners tested.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:48:33 -03:00
Santosh Nayak 3caaa20121 [media] dvb: negative value assigned to unsigned int in CDRXD()
In CDRXD(), Negative number is assigned to unsigned variable
'state->noise_cal.tdCal2.

Members of 'SNoiseCal' should be 'signed short'.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:39:14 -03:00
Alexey Khoroshilov f3033aecf2 [media] dib9000: implement error handling for DibAcquireLock
DibAcquireLock() is implemented as mutex_lock_interruptible()
but the driver does not handle unsuccessful locking.
As a result it may lead to unlock of an unheld mutex.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:36:24 -03:00
Alexey Khoroshilov 9bb24a7e49 [media] dib9000: fix explicit lock mismatches
There are several error paths, where &state->platform.risc.mem_mbx_lock
is not unlocked. The patch fixes it.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:36:17 -03:00
Jose Alberto Reguero 962f8f67e4 [media] Add CI support to az6007 driver
This patch add CI support to az6007 driver.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:15:16 -03:00
Malcolm Priestley 1a611d8cd0 [media] lmedm04 ver 1.97 Remove delays required for STV0288
Remove delays added for STV0288 frontend.

This patch significantly speeds up channel change and scan.

It requires patch 10161-STV0288 increase delay between carrier search.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:12:53 -03:00
Malcolm Priestley 77768e4b75 [media] STV0288 increase delay between carrier search
The current delay of 30uS is too short to recover any carrier.

In the lmedm04 driver delays were added to overcome carrier lock
problems. The typical delay was 30mS (2 x 15ms register write
0x2c and read 0x24).

Other drivers that use STV0288 don't appear to have any delay are
likely to have also suffered this problem.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 14:12:32 -03:00
Mauro Carvalho Chehab 9ce28d827f Merge tag 'v3.3' into staging/for_v3.4
* tag 'v3.3': (1646 commits)
  Linux 3.3
  Don't limit non-nested epoll paths
  netfilter: ctnetlink: fix race between delete and timeout expiration
  ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu.
  nilfs2: fix NULL pointer dereference in nilfs_load_super_block()
  nilfs2: clamp ns_r_segments_percentage to [1, 99]
  afs: Remote abort can cause BUG in rxrpc code
  afs: Read of file returns EBADMSG
  C6X: remove dead code from entry.S
  wimax/i2400m: fix erroneous NETDEV_TX_BUSY use
  net/hyperv: fix erroneous NETDEV_TX_BUSY use
  net/usbnet: reserve headroom on rx skbs
  bnx2x: fix memory leak in bnx2x_init_firmware()
  bnx2x: fix a crash on corrupt firmware file
  sch_sfq: revert dont put new flow at the end of flows
  ipv6: fix icmp6_dst_alloc()
  MAINTAINERS: Add Serge as maintainer of capabilities
  drivers/video/backlight/s6e63m0.c: fix corruption storing gamma mode
  MAINTAINERS: add entry for exynos mipi display drivers
  MAINTAINERS: fix link to Gustavo Padovans tree
  ...
2012-03-19 13:41:24 -03:00
Andreas Regel ef3d23de05 [media] stb0899: fixed reading of IF_AGC_GAIN register
When reading IF_AGC_GAIN register a wrong value for the base address
register was used (STB0899_DEMOD instead of STB0899_S2DEMOD). That
lead to a wrong signal strength value on DVB-S2 transponders.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Acked-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 11:22:52 -03:00
Andreas Regel 91caad3195 [media] stb0899: set FE_HAS_SIGNAL flag in read_status
In stb0899_read_status the FE_HAS_SIGNAL flag was not set in case of a
successful carrier lock. This change fixes that.

Signed-off-by: Andreas Regel <andreas.regel@gmx.de>
Acked-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 11:22:19 -03:00
Antti Palosaari 2b49fad595 [media] tda10071: fix the delivery system
Commit b2a29b578d sets accidentally
supported delivery systems as DVB-T/T2 whilst it should be
DVB-S/S2. Due to that frontend cannot be used at all.

Reported-by: Jiří Zelenka <klacek@bubakov.net>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Cc: stable@kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19 10:47:50 -03:00
Linus Torvalds 72c79bdbda Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab:
 "For 4 fixes for 3.3 (all trivial):
       - uvc video driver: fixes a division by zero;
       - davinci: add module.h to fix compilation;
       - smsusb: fix the delivery system setting;
       - smsdvb: the get_frontend implementation there is broken.

  The smsdvb patch has 127 lines, but it is trivial: instead of
  returning a cache of the set_frontend (with is wrong, as it doesn't
  have the updated values for the data, and the implementation there is
  buggy), it copies the information of the detected DVB parameters from
  the smsdvb private structures into the corresponding DVBv5 struct
  fields."

* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] smsdvb: fix get_frontend
  [media] smsusb: fix the default delivery system setting
  [media] media: davinci: added module.h to resolve unresolved macros
  [media] [FOR,v3.3] uvcvideo: Avoid division by 0 in timestamp calculation
2012-03-15 17:06:05 -07:00
Jesper Juhl f1ed321944 [media] [trivial] DiB0090: remove redundant '; ' from dib0090_fw_identify()
One semi-colon is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-11 09:40:44 -03:00
Paolo Pantò 9d1760059f [media] rtl28xxu: add another Freecom usb id
Besides sticks with the usb id 14AA:0160, there exists also some
with 14AA:0161 - this is the output in /var/log/messages:

usb 1-1: new high-speed USB device number 2 using ehci_hcd
usb 1-1: New USB device found, idVendor=14aa, idProduct=0161
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: Freecom DVB-T
usb 1-1: Manufacturer: Freecom DVB-T
usb 1-1: SerialNumber: 00000000000036742

The patch is based on the code at
http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/heads/realtek

Signed-off-by: Paolo Pantò <munix9@googlemail.com>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:26:10 -03:00
Gianluca Gennari d138210ffa [media] smsdvb: fix get_frontend
In the get_frontend function, an internal copy of the dtv_frontend_properties
struct (which is never initialized) is copied over the frontend property cache
data structure, resetting everything to 0.
In particular, the delivery system is reset to 0 (which is an invalid value)
so the driver stops working as soon as a DVBv3 application calls the
get_frontend function, giving this error:

dvb_frontend_ioctl_legacy: doesn't know how to handle a DVBv3 call to delivery
system 0

This patch eliminates the unused internal copy of the dtv_frontend_properties
struct, and gives a proper implementation of the get_frontend function.

The original author of the patch is Panagiotis Malakoudis, who also tested
this new version on Ubuntu 11.10 with the latest media_build tree installed.
The original patch has been used on MIPS set-top-boxes for over one year,
but it was never posted on the linux-media list.
I ported the code to the current media_build tree (converting it to use the
dtv_frontend_properties struct) and added basic support for ISDB-T (untested).

Signed-off-by: Panagiotis Malakoudis <malakudi@gmail.com>
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 11:20:12 -03:00
Andy Shevchenko 6797e7ad9c [media] media: dvb: append $(srctree) to -I parameters
Without this we have got the warnings like following if build with "make W=1
O=/var/tmp":
  cc1: warning: drivers/media/dvb/dvb-core: No such file or directory [enabled by default]

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 10:41:22 -03:00
Xi Wang 34817174fc [media] lgdt330x: fix signedness error in i2c_read_demod_bytes()
The error handling in lgdt3303_read_status() and lgdt330x_read_ucblocks()
doesn't work, because i2c_read_demod_bytes() returns a u8 and (err < 0)
is always false.

        err = i2c_read_demod_bytes(state, 0x58, buf, 1);
        if (err < 0)
                return err;

Change the return type of i2c_read_demod_bytes() to int.  Also change
the return value on error to -EIO to make (err < 0) work.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 09:01:12 -03:00
Jean Delvare 06302ffbb4 [media] cx22702: Fix signal strength
The signal strength value returned is not quite correct, it decreases
when I increase the gain of my antenna, and vice versa. It also
doesn't span over the whole 0x0000-0xffff range. Compute a value which
at least increases when signal strength increases, and spans the whole
allowed range.

In practice I get 67% with my antenna fully amplified and 51% with
no amplification. This is close enough to what I get on my other
DVB-T adapter with the same antenna.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:54:42 -03:00
Malcolm Priestley 6c5637e4ed [media] it913x-fe ver 1.15 read signal strenght using reg VAR_P_INBAND
Read signal strength using VAR_P_INBAND and apply FEC preferred values.

Note this does not work on IT9137 devices even with dvb-usb-it9135-01.fw
firmware.

Config read_sl allows switch between read signal strength and signal
level.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:53:39 -03:00
Malcolm Priestley aaa589fc5e [media] it913x ver 1.27 Allow PID 8192 to turn PID filter off
Allow PID 8192 to turn PID filter off in USB high speed.

The PID number is still written to the PID index and will only
turn on again if that index is set to 0.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:52:56 -03:00
Malcolm Priestley 46f3da990b [media] it913x ver 1.26 change to remove interruptible mutex locks
Some virtual I2C commands are missed along some PID filtering
commands resulting complete stall of driver.

Since dvb-usb cannot handle the -EAGAIN error and commands
generally should not be missed mutex_lock is used instead.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:52:25 -03:00
Axel Lin c6e8d86fff [media] convert drivers/media/* to use module_i2c_driver()
This patch converts the drivers in drivers/media/* to use the
module_i2_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Heungjun Kim <riverful.kim@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: Johannes Obermaier <johannes.obermaier@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 08:48:01 -03:00
Gianluca Gennari 479e3492a2 [media] rtl2830: __udivdi3 undefined
Il 29/02/2012 22:30, Geert Uytterhoeven ha scritto:
> http://kisskb.ellerman.id.au/kisskb/buildresult/5759200/ ERROR:
> "__udivdi3" [drivers/media/dvb/frontends/rtl2830.ko] undefined!
>
The following patch fixed the warning on my 32 bit system.

Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-08 07:13:57 -03:00
Mauro Carvalho Chehab 9bd58e77e6 [media] smsusb: fix the default delivery system setting
There are two issues on the default delivery system setting for smsusb:

	1) instead of filling the delivery system for the per-client
	   frontend.ops, it were changing the global structure;

	2) The client->frontend.ops copy were keeping the previous value
	   of the template. So, the first time the device was inserted,
	   it was using the wrong value.

Reported-by: Eddi De Pieri <eddi@depieri.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-01 07:29:02 -03:00
Antti Palosaari a8567cf22e [media] rtl2830: prevent .read_status() when sleeping
Hardware is not accessible when device is sleeping.
Preventing such IOCTLs when sleep should be job of DVB CORE...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:44:25 -03:00
Antti Palosaari 9935eea5ac [media] rtl28xxu: many small tweaks
* some style issues
* remove rtl2832u device IDs
* move USB IDs to correct place

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:43:39 -03:00
Antti Palosaari fba16b133e [media] rtl28xxu: make it compile against current Kernel
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:43:12 -03:00
Antti Palosaari 0485a7089b [media] rtl2830: correct I2C functionality
Implement I2C functionality according to real RTL2830 demod.

Do not send register page in first byte of each I2C write, instead
use logic to set page using own write when needed. Page register is
physical register 0 as generally used.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:42:23 -03:00
Antti Palosaari 34ec293348 [media] rtl28xx: reimplement I2C adapter
It is almost perfect now!

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:41:45 -03:00
Antti Palosaari b5cbaa43a6 [media] rtl28xx: initial support for rtl2832u
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:41:20 -03:00
Antti Palosaari e9320ece9e [media] rtl28xx: fix rtl2831u with tuner mxl5005s
Do not return error for demod attach in case of mxl5005s tuner.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:40:22 -03:00
Antti Palosaari 831e0b718c [media] Realtek RTL28xxU serie DVB USB interface driver
For now it supports only Realtek RTL2831U chip.
RTL2831U is integrated DVB USB interface and DVB-T demod.
DVB-T demod integrated to RTL2831U is Realtek RTL2830.
Supported tuners are QT1010, MT2060 and MXL5005S.

Signed-off-by: Antti Palosaari <crope@iki.fi>
[mchehab@redhat.com: fix a small typo]
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:40:11 -03:00
Antti Palosaari c0adca7340 [media] Realtek RTL2830 DVB-T demodulator driver
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-28 18:31:37 -03:00
Masanari Iida 9a56ec5b03 [media] [trivial] mantis: Fix typo in mantis_hif.c
Correct typo "Adater" to "Adapter" in
drivers/media/dvb/mantis/mantis_hif.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-27 08:47:04 -03:00
Malcolm Priestley 88495030dc [media] lmedm04 ver 1.96 Turn off PID filter by default
Problems with the PID setting stalling demux on applications like VDR and MythTV.

The PID filter is now defaulted to OFF.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14 17:17:25 -02:00
Simon Arlott 45145b67f5 [media] dvb-core: fix DVBFE_ALGO_HW retune bug
Commit 7e07222 breaks DVBFE_ALGO_HW tuning after a retune is requested,
which causes bad tuning on my TBS 6920.

[    0.769091] pci 0000:06:00.0: [14f1:8852] type 0 class 0x000400
[   19.733530] CORE cx23885[0]: subsystem: 6920:8888, board: TurboSight TBS 6920 [card=14,autodetected]
[  762.824912] cx24116_load_firmware: FW version 1.23.86.1

7e0722215a [media] dvb-core: Don't pass DVBv3 parameters on tune() fops

Although re_tune is set to true when FESTATE_RETUNE occurs, it is never
set back to false which the old code used to do when !FESTATE_RETUNE.

This patch sets re_tune to false if !(state & FESTATE_RETUNE).

$ szap-s2 -a 2 "Channel 5"
reading channels from file '/home/simon/.szap/channels.conf'
zapping to 247 'Channel 5':
delivery DVB-S, modulation QPSK
sat 0, frequency 10964 MHz H, symbolrate 22000000, coderate 5/6, rolloff 0.35
vpid 0x092a, apid 0x092b, sid 0x092d
using '/dev/dvb/adapter2/frontend0' and '/dev/dvb/adapter2/demux0'
status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr eb33 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cf40 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cec0 | snr eccd | ber 00000000 | unc 00000000 | FE_HAS_LOCK
status 1f | signal cec0 | snr 0000 | ber 00000000 | unc 00000000 | FE_HAS_LOCK

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14 17:15:25 -02:00
Masanari Iida 546c973628 [media] [trivial] frontends: Fix typo in tda1004x.c
Correct spelling "alocate" to "allocate" in
drivers/media/dvb/frontends/tda1004x.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14 17:13:22 -02:00
Malcolm Priestley 3691a0dd3a [media] it913x v1.25 support different for remotes
Support for different types of remote.

ITE remotes share common device IDs with differently assigned keys.

Two versions of remote maps have been created there are likely to be more.
v1 for all other IDs
v2 for USB_PID_ITETECH_IT9135_9005.

This patch also separates the configuration parts from it913x_identify_state function.

TODO
remotes for HID interfaces.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14 16:49:18 -02:00
Hans Verkuil 85eeece773 [media] cx18/ddbridge: remove unused headers
The cx18 and ddbridge drivers include linux/dvb/audio.h and video.h
without using them.

Remove those includes.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-14 13:44:52 -02:00
Masanari Iida d4b48ba395 mantis: Fix typo in mantis_hif.c
Correct typo "Adater" to "Adapter" in
drivers/media/dvb/mantis/mantis_hif.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-09 23:09:37 +01:00
Malcolm Priestley fc594e3e51 [media] it913x ver 1.24 Make 0x60 default on version 2 devices
Some version 2 devices have different tuner IDs. ID 0x38
appears to have weak signal strength.

Apply default 0x60 to unknown IDs.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-08 10:53:59 -02:00
Jose Alberto Reguero dc66d7f455 [media] drxk: Fix get_tune_settings for DVB-T
DVB-T also use step_size=0.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-08 10:52:27 -02:00
Masanari Iida 0d616ca371 [media] [trivial] lmedm04: Fix typo
Correct spelling "reseting" to "resetting" in
drivers/media/dvb/dvb-usb/lmedm04.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-08 10:49:21 -02:00
Jose Alberto Reguero 260a8f7b06 [media] az6007: add another Terratec H7 usb id
Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-02-08 10:38:03 -02:00
Masanari Iida 3472a2caa4 frontends: Fix typo in tda1004x.c
Correct spelling "alocate" to "allocate" in
drivers/media/dvb/frontends/tda1004x.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-05 17:14:47 +01:00
Masanari Iida b6d60fde1c media: Fix typo in lmedm04.c
Correct spelling "reseting" to "resetting" in
drivers/media/dvb/dvb-usb/lmedm04.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-05 17:14:46 +01:00
Jiri Kosina 972c5ae961 Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to a newer
code (namely drivers/gpu/drm/gma500/psb_intel_lvds.c)
2012-02-03 23:13:05 +01:00
Jesper Juhl 64f3e70be6 drivers/media/dvb/frontends/drxk_hard.c does not need to include linux/version.h
This patch removes the unneeded include.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2012-02-03 22:48:11 +01:00
Linus Torvalds 74ea15d909 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] cinergyT2-fe: Fix bandwdith settings
  [media] V4L: atmel-isi: add clk_prepare()/clk_unprepare() functions
  [media] cxd2820r: sleep on DVB-T/T2 delivery system switch
  [media] anysee: fix CI init
  [media] cxd2820r: remove unused parameter from cxd2820r_attach
  [media] cxd2820r: fix dvb_frontend_ops
2012-01-26 17:04:47 -08:00
Jesper Juhl e4b444369c [media] drxk_hard: does not need to include linux/version.h
This patch removes the unneeded include.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-26 15:35:25 -02:00
Antti Palosaari cf427952ad [media] anysee: repeat failed USB control messages
Control message load increased heavily after CI/CAM support due
to dvb_ca_en50221. It looks like CI/CAM drops to non-working
state easily after error is returned to its callbacks. Due to
that, add some logic to avoid errors repeating failed messages.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-26 14:46:09 -02:00
Mauro Carvalho Chehab c79eba9240 [media] cinergyT2-fe: Fix bandwdith settings
Changeset 7830bbaff9 mangled the bandwidth field for CinergyT2.
Properly fill it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:34:53 -02:00
Mauro Carvalho Chehab 59b30294e1 Merge branch 'v4l_for_linus' into staging/for_v3.4
* v4l_for_linus:
  [media] cxd2820r: sleep on DVB-T/T2 delivery system switch
  [media] anysee: fix CI init
  [media] cxd2820r: remove unused parameter from cxd2820r_attach
  [media] cxd2820r: fix dvb_frontend_ops
2012-01-23 18:11:30 -02:00
Antti Palosaari 7256522460 [media] cxd2820r: sleep on DVB-T/T2 delivery system switch
Fix bug introduced by multi-frontend to single-frontend change.
It is safer to put DVB-T parts sleeping when auto-switching to DVB-T2
and vice versa. That was original behaviour.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:52 -02:00
Antti Palosaari 46de20a78a [media] anysee: fix CI init
No more error that error seen when device is plugged:
dvb_ca adapter 0: Invalid PC card inserted :(

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:43 -02:00
Antti Palosaari c2bbbe7b5e [media] cxd2820r: remove unused parameter from cxd2820r_attach
Fix bug introduced by multi-frontend to single-frontend change.
This parameter is no longer used after multi-frontend to single-frontend change.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:36 -02:00
Antti Palosaari 9bf31efa84 [media] cxd2820r: fix dvb_frontend_ops
Fix bug introduced by multi-frontend to single-frontend change.

* Add missing DVB-C caps
* Change frontend name as single frontend does all the standards

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 18:10:26 -02:00
Malcolm Priestley a8ea021862 [media] it913x v1.23 use it913x_config.chip_ver to select firmware
As recommended by Jason at ITE, the chip version should select firmware.

However, to continue to support IT9137 firmware with different configuration
the driver will use udev->descriptor.idVendor to select the difference
between IT9135 and IT9137.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 17:52:05 -02:00
Mauro Carvalho Chehab aa104b2fea [media] cinergyT2-fe: Fix bandwdith settings
Changeset 7830bbaff9 mangled the bandwidth field for CinergyT2.
Properly fill it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-23 13:15:22 -02:00
Mauro Carvalho Chehab 19c22c34dc Merge tag 'v3.3-rc1' into staging/for_v3.3
* tag 'v3.3-rc1': (8187 commits)
  Linux 3.3-rc1
  x86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bits
  qnx4: don't leak ->BitMap on late failure exits
  qnx4: reduce the insane nesting in qnx4_checkroot()
  qnx4: di_fname is an array, for crying out loud...
  KEYS: Permit key_serial() to be called with a const key pointer
  keys: fix user_defined key sparse messages
  ima: fix cred sparse warning
  uml: fix compile for x86-64
  MPILIB: Add a missing ENOMEM check
  tpm: fix (ACPI S3) suspend regression
  nvme: fix merge error due to change of 'make_request_fn' fn type
  xen: using EXPORT_SYMBOL requires including export.h
  gpio: tps65910: Use correct offset for gpio initialization
  acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec
  intel_idle: Split up and provide per CPU initialization func
  ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
  tg3: Fix single-vector MSI-X code
  openvswitch: Fix multipart datapath dumps.
  ipv6: fix per device IP snmp counters
  ...
2012-01-21 23:23:15 -02:00
Mauro Carvalho Chehab 9e5e3097a3 [media] az6007: CodingStyle fixes
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:52:39 -02:00
Mauro Carvalho Chehab 44744f9b98 [media] az6007: Enable the driver at the building system
Add the corresponding entries to allow building this driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:47:20 -02:00
Mauro Carvalho Chehab 083995477d [media] az6007: Use the right keycode for Terratec H7
Instead of using a fake keycode, just for testing, use the
right one, for Terratec H7.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:47:15 -02:00
Mauro Carvalho Chehab d3d076aaa7 [media] az6007: Convert IR to use the rc_core logic
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:47:11 -02:00
Mauro Carvalho Chehab 9165144033 [media] az6007: Fix IR handling
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:47:07 -02:00
Mauro Carvalho Chehab 711e1398d3 [media] az6007: Be sure to use kmalloc'ed buffer for transfers
USB data transfers may not work if the buffer is allocated at
the stack. Be sure to use kmalloc on all places where a buffer
is needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:47:02 -02:00
Mauro Carvalho Chehab a2c35d346d [media] az6007: Protect read/write calls with a mutex
This will avoid interference with CI and IR I/O operations.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:56 -02:00
Mauro Carvalho Chehab 04e3ece715 [media] az6007: Driver cleanup
Remove commented test code, remove unused poweroff stuff, and
fix the copyright data.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:51 -02:00
Mauro Carvalho Chehab b19280cf2b [media] az6007: code cleanups and fixes
Several changes were needed to make az6007 to work, producing
the same commands as the original driver. This patch does
that.

While here, be less verbose when debug is not enabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:44 -02:00
Mauro Carvalho Chehab d585681374 [media] drxk: Allow enabling MERR/MVAL cfg
Those two settings are different when used with az6007. Add
a config option to enable it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:39 -02:00
Mauro Carvalho Chehab 6fb65a66a2 [media] drxk: add support for Mpeg output clock drive strength config
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:35 -02:00
Mauro Carvalho Chehab 6e5caf8493 [media] az6007: Use DRX-K dynamic clock mode
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:25 -02:00
Mauro Carvalho Chehab 67f0461737 [media] drxk: Allow setting it on dynamic_clock mode
This is used on az6007.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:19 -02:00
Mauro Carvalho Chehab 978c26c367 [media] az6007: Use a per device private struct
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:13 -02:00
Mauro Carvalho Chehab 781dacc82a [media] az6007: Change it to use the MFE solution adopted at dvb-usb
This driver were written to use a previous solution for MFE at dvb-usb.
Due to the internal API changes, change the binding to work with the
new way.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:08 -02:00
Mauro Carvalho Chehab 1c9a284fbd [media] az6007: Use the new MFE support at dvb-usb
Use the newly dvb-usb MFE support added by
changeset 9bd9e3bd2c.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:46:04 -02:00
Mauro Carvalho Chehab 9b01f3d498 [media] az6007: improve the error messages for az6007 read/write calls
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:58 -02:00
Mauro Carvalho Chehab 2d5161b771 [media] az6007: Fix IR receive code
The code still needs to be commented, as there's a mutex
missing at the az6007_read() call. A mutex there is needed,
in order to prevent RC (or CI) calls while other operations
are in progress.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:53 -02:00
Mauro Carvalho Chehab ba02473eaa [media] az6007: Simplify the code by removing an uneeded function
Everything to reset the demod is already at
az6007_frontend_poweron().

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:49 -02:00
Mauro Carvalho Chehab 3aecf2c5a9 [media] az6007: Simplify the read/write logic
This patch introduces no functional changes. It basically defines
a macro for each different req found at the driver, and cleans the
code to use them, making easier to understand the code.

With regards to the IR handling code, although the original code
doesn't define what's the request, it is clear, from the USB logs,
that 0xc5 is for IR polling.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:44 -02:00
Mauro Carvalho Chehab 3af2f4f15a [media] az6007: Change the az6007 read/write routine parameter
Use usb_device for those routines, as it allows using them on
all places. While there, rename to better express the meaning.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:40 -02:00
Mauro Carvalho Chehab 81091144eb [media] az6007: Fix some init sequences and use the right firmwares
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:36 -02:00
Mauro Carvalho Chehab c108a5a0ef [media] az6007: need to define drivers name before including dvb-usb.h
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:30 -02:00
Mauro Carvalho Chehab da989e0bc7 [media] drxk: Don't assume a default firmware name
Move the ngene/ddbridge firmware into their drivers.

There are two reasons for that:
	1) The firmware used there didn't work for a few devices
I tested here (Terratec H5, H6 and H7);
	2) At least Terratec H7 doesn't seem to require a firmware
for it to work.

After this change, if firmware is not specified, the driver will
use a rom-based firmware (this seems to be the case for Terratec
H7, although I need to better check the USB dumps to be sure about
that).

In any case, the firmware seems to be optional, as the DRX-K driver
don't return the firmware load error.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:25 -02:00
Mauro Carvalho Chehab f2ba9e5dda [media] az6007: make driver less verbose
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:20 -02:00
Mauro Carvalho Chehab 067fb88c9d [media] az6007: move device PID's to the proper place
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:17 -02:00
Mauro Carvalho Chehab 25c1646670 [media] az6007: Replace the comments at the beginning of the driver
The comments there is wrong.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:13 -02:00
Mauro Carvalho Chehab 70fa444d81 [media] az6007: Get rid of az6007.h
The header file serves for no purpose and exports some things
that should be static.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:07 -02:00
Mauro Carvalho Chehab 93b32126f9 [media] az6007: CodingStyle cleanup
make checkpatch.pl happy

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:45:01 -02:00
Mauro Carvalho Chehab 357535800d [media] az6007: Remove some dead code that doesn't seem to be needed
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:44:55 -02:00
Mauro Carvalho Chehab 2212501ffa [media] az6007: Comment the gate_ctl mutex
The mutex is there to protect the I2C gate. However, for some reason,
it is being called twice:

[ 2103.542796] usbcore: registered new interface driver dvb_usb_az6007
[ 2103.772392] az6007: drxk_gate_ctrl: enable
[ 2103.793900] az6007: drxk_gate_ctrl: enable

For now, let's just comment, to allow the driver to run.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:44:50 -02:00
Mauro Carvalho Chehab d20a7f7277 [media] az6007: Fix the I2C code in order to handle mt2063
mt2063 uses a one-byte transfer. This requires a special handling
inside the i2c code. Fix it to properly accept i2c reads. This
is needed to make the mt2063 to be detected.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:44:44 -02:00
Mauro Carvalho Chehab caa1a700ed [media] az6007: Fix it to allow loading it without crash
Add some fixes to allow frontend attachment. The patch is not
complete yet, as just the frontend 0 is initialized. So, more
changes will be needed, including some changes at dvb-usb core.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:44:39 -02:00
Mauro Carvalho Chehab 6da3470650 [media] az6007: Fix compilation troubles at az6007
Some changes are needed, in order to make az6007 compile with the
upstream tree. Most of the changes are due to the upstream drxk
module.

Even allowing its compilation, the driver is not working yet.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:44:33 -02:00
Mauro Carvalho Chehab 71d6763456 [media] dvb: Add a new driver for az6007
Import the az6007 driver from Terratec H7 source, as-is.

It won't compile or run, so latter patches are needed in order
to fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-21 13:44:26 -02:00
Linus Torvalds 4a7c1ff236 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (57 commits)
  [media] as3645a: Fix compilation by including slab.h
  [media] s5p-fimc: Remove linux/version.h include from fimc-mdevice.c
  [media] s5p-mfc: Remove linux/version.h include from s5p_mfc.c
  [media] ds3000: using logical && instead of bitwise &
  [media] v4l2-ctrls: make control names consistent
  [media] DVB: dib0700, add support for Nova-TD LEDs
  [media] DVB: dib0700, add corrected Nova-TD frontend_attach
  [media] DVB: dib0700, separate stk7070pd initialization
  [media] DVB: dib0700, move Nova-TD Stick to a separate set
  [media] : add MODULE_FIRMWARE to dib0700
  [media] DVB-CORE: remove superfluous DTV_CMDs
  [media] s5p-jpeg: adapt to recent videobuf2 changes
  [media] s5p-g2d: fixed a bug in controls setting function
  [media] s5p-mfc: Fix volatile controls setup
  [media] drivers/media/video/s5p-mfc/s5p_mfc.c: adjust double test
  [media] drivers/media/video/s5p-fimc/fimc-capture.c: adjust double test
  [media] s5p-fimc: Fix incorrect control ID assignment
  [media] dvb_frontend: Don't call get_frontend() if idle
  [media] DocBook/dvbproperty.xml: Remove DTV_MODULATION from ISDB-T
  [media] DocBook/dvbproperty.xml: Fix ISDB-T delivery system parameters
  ...
2012-01-18 12:53:54 -08:00
Dan Carpenter 3a9888f913 [media] ds3000: using logical && instead of bitwise &
The intent here was to test if the FE_HAS_LOCK was set.  The current
test is equivalent to "if (status) { ..."

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:05:13 -02:00
Jiri Slaby d43272a4e8 [media] DVB: dib0700, add support for Nova-TD LEDs
Add an override of read_status to intercept lock status. This allows
us to switch LEDs appropriately on and off with signal un/locked.

The second phase is to override sleep to properly turn off both.

This is a hackish way to achieve that.

Thanks to Mike Krufky for his help.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:02:41 -02:00
Jiri Slaby 2b05b881ec [media] DVB: dib0700, add corrected Nova-TD frontend_attach
This means cut & paste from the former f. attach. But while at it write
to the right GPIO to turn on the right LED. Also turn the other two
off jsut for sure.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-01-17 23:02:15 -02:00