Commit Graph

3552 Commits

Author SHA1 Message Date
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
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
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
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 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