linux-2.6-block.git
9 years ago[media] rc/keymaps: add keytable for Terratec Cinergy S2 HD
Jan Klötzke [Sat, 6 Jun 2015 19:58:11 +0000 (16:58 -0300)]
[media] rc/keymaps: add keytable for Terratec Cinergy S2 HD

This RC map was taken from Christoph Pinkl's patch
(http://patchwork.linuxtv.org/patch/7217/). It is used solely by the respective
mantis based card because the encoding is not known.

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rc/keymaps: add keytable for Terratec Cinergy C PCI
Jan Klötzke [Sat, 6 Jun 2015 19:58:10 +0000 (16:58 -0300)]
[media] rc/keymaps: add keytable for Terratec Cinergy C PCI

This RC map was taken from Christoph Pinkl's patch
(http://patchwork.linuxtv.org/patch/7217/). It is used solely by the respective
mantis based card because the encoding is not known.

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rc/keymaps: add RC keytable for TechniSat TS35
Jan Klötzke [Sat, 6 Jun 2015 19:58:09 +0000 (16:58 -0300)]
[media] rc/keymaps: add RC keytable for TechniSat TS35

The TS35 remote is distributed with TechniSat CableStar HD2 cards (mantis
chipset). The exact protocol type is unknown, making this rc map probably only
usable by mantis cards.

Signed-off-by: Jan Klötzke <jan@kloetzke.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb-core: prevent some corruption the legacy ioctl
Dan Carpenter [Sat, 6 Jun 2015 16:55:22 +0000 (13:55 -0300)]
[media] dvb-core: prevent some corruption the legacy ioctl

Quite a few of the ->diseqc_send_master_cmd() implementations don't
check cmd->msg_len so it can lead to memory corruption.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] saa7164: Improvements for I2C handling"
Olli Salonen [Sat, 6 Jun 2015 07:44:58 +0000 (04:44 -0300)]
[media] saa7164: Improvements for I2C handling"

This reverts commit ad90b6b0f10566d4a5546e27fe455ce3b5e6b6c7.

This patch breaks I2C communication towards Si2168. After reverting and
applying the other patch in this series the I2C communication is
correct.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] saa7164: change Si2168 reglen to 0 bit
Olli Salonen [Sat, 6 Jun 2015 07:44:57 +0000 (04:44 -0300)]
[media] saa7164: change Si2168 reglen to 0 bit

The i2c_reg_len for Si2168 should be 0 for correct I2C communication.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] s5k5baf: Convert use of __constant_cpu_to_be16 to cpu_to_be16
Vaishali Thakkar [Sat, 6 Jun 2015 01:53:27 +0000 (22:53 -0300)]
[media] s5k5baf: Convert use of __constant_cpu_to_be16 to cpu_to_be16

In little endian cases, macro cpu_to_be16 unfolds to __swab16 which
provides special case for constants. In big endian cases,
__constant_cpu_to_be16 and cpu_to_be16 expand directly to the
same expression. So, replace __constant_cpu_to_be16 with
cpu_to_be16 with the goal of getting rid of the definition of
__constant_cpu_to_be16 completely.

The semantic patch that performs this transformation is as follows:

@@expression x;@@

- __constant_cpu_to_be16(x)
+ cpu_to_be16(x)

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] lmedm04: Enable dont_poll for TS2020 tuner
Malcolm Priestley [Fri, 5 Jun 2015 10:55:07 +0000 (07:55 -0300)]
[media] lmedm04: Enable dont_poll for TS2020 tuner

Following a change made to TS2020 tuner in patches
ts2020: Provide DVBv5 API signal strength
ts2020: Allow stats polling to be suppressed

Polling on the driver must be suppressed because
the demuxer is stopped by I2C messages.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ts2020: Allow stats polling to be suppressed
David Howells [Wed, 3 Jun 2015 11:35:08 +0000 (08:35 -0300)]
[media] ts2020: Allow stats polling to be suppressed

Statistics polling can not be done by lmedm04 driver's implementation of
M88RS2000/TS2020 because I2C messages stop the device's demuxer, so allow
polling for statistics to be suppressed in the ts2020 driver by setting
dont_poll in the ts2020_config struct.

Reported-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ts2020: Copy loop_through from the config to the internal data
David Howells [Wed, 3 Jun 2015 11:34:13 +0000 (08:34 -0300)]
[media] ts2020: Copy loop_through from the config to the internal data

Copy the loop_through setting from the ts2020_config struct to the internal
ts2020_priv struct so that it can actually be used.

Whilst we're at it, group the bitfields together in the same order in both
structs so that the compiler has a good chance to copy them in one go.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ts2020: Provide DVBv5 API signal strength
David Howells [Tue, 26 May 2015 15:04:07 +0000 (12:04 -0300)]
[media] ts2020: Provide DVBv5 API signal strength

Provide a DVBv5 API signal strength.  This is in units of 0.001 dBm rather
than a percentage.

>From Antti Palosaari's testing with a signal generator, it appears that the
gain calculated according to Montage's specification if negated is a
reasonable representation of the signal strength of the generator.

To this end:

 (1) Polled statistic gathering needed to be implemented in the TS2020 driver.
     This is done in the ts2020_stat_work() function.

 (2) The calculated gain is placed as the signal strength in the
     dtv_property_cache associated with the front end with the scale set to
     FE_SCALE_DECIBEL.

 (3) The DVBv3 format signal strength then needed to be calculated from the
     signal strength stored in the dtv_property_cache rather than accessing
     the value when ts2020_read_signal_strength() is called.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] TS2020: Calculate tuner gain correctly
David Howells [Tue, 26 May 2015 15:04:00 +0000 (12:04 -0300)]
[media] TS2020: Calculate tuner gain correctly

The TS2020 and TS2022 tuners take an input from the demodulator indicating the
AGC setting on that component that is then used to influence the tuner's own
gain.  This should be taken into account when calculating the gain and signal
strength.

Further, the existing TS2020 driver miscalculates the signal strength as the
result of its calculations can exceed the storage capacity of the 16-bit word
used to return it to userspace.

To this end:

 (1) Add a callback function (->get_agc_pwm()) in the ts2020_config struct that
     the tuner can call to get the AGC PWM value from the demodulator.

 (2) Modify the TS2020 driver to calculate the gain according to Montage's
     specification with the adjustment that we produce a negative value and
     scale it to 0.001dB units (which is what the DVBv5 API will require):

     (a) Callback to the demodulator to retrieve the AGC PWM value and then
       turn that into Vagc for incorporation in the calculations.  If the
       callback is unset, assume a Vagc of 0.

     (b) Calculate the tuner gain from a combination of Vagc and the tuner's RF
       gain and baseband gain settings.

 (3) Turn this into a percentage signal strength as per Montage's
     specification for return to userspace with the DVBv3 API.

 (4) Provide a function in the M88DS3103 demodulator driver that can be used to
     get the AGC PWM value on behalf of the tuner.

 (5) The ts2020_config.get_agc_pwm function should be set by the code that
     stitches together the drivers for each card.

     For the DVBSky cards that use the M88DS3103 with the TS2020 or the TS2022,
     set the get_agc_pwm function to point to m88ds3103_get_agc_pwm.

I have tested this with a DVBSky S952 card which has an M88DS3103 and a TS2022.

Thanks to Montage for providing access to information about the workings of
these parts.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] em28xx: PCTV 461e use I2C client for demod and SEC
Antti Palosaari [Fri, 17 Apr 2015 01:55:31 +0000 (22:55 -0300)]
[media] em28xx: PCTV 461e use I2C client for demod and SEC

Use I2C client binding for demod and SEC.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] m88ds3103: use regmap for I2C register access
Antti Palosaari [Fri, 17 Apr 2015 01:43:52 +0000 (22:43 -0300)]
[media] m88ds3103: use regmap for I2C register access

Use regmap for I2C register access.
Remove own I2C repeated mutex as it should not be needed. I2C adapter
lock is already taken when I2C mux adapter is called, no need for
double locking.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] m88ds3103: rename variables and correct logging
Antti Palosaari [Fri, 17 Apr 2015 00:36:00 +0000 (21:36 -0300)]
[media] m88ds3103: rename variables and correct logging

Rename driver state from priv to dev.
Use I2C client for correct logging.
Use adapter and address from I2C client structure where needed.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ts2020: Add a comment about lifetime of on-stack pdata in ts2020_attach()
David Howells [Thu, 2 Apr 2015 11:03:11 +0000 (08:03 -0300)]
[media] ts2020: Add a comment about lifetime of on-stack pdata in ts2020_attach()

ts2020_attach() allocates a variable pdata on the stack and then passes a
pointer to it to i2c_new_device() which stashes the pointer in persistent
structures.

Add a comment to the effect that this isn't actually an error because the
contents of the variable are only used in ts2020_probe() and this is only
called ts2020_attach()'s stack frame exists.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ts2020: convert to regmap I2C API
Antti Palosaari [Fri, 27 Mar 2015 21:14:25 +0000 (18:14 -0300)]
[media] ts2020: convert to regmap I2C API

Use regmap to cover I2C register access.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ts2020: register I2C driver from legacy media attach
Antti Palosaari [Thu, 26 Mar 2015 23:20:42 +0000 (20:20 -0300)]
[media] ts2020: register I2C driver from legacy media attach

Register driver using I2C bindings internally when legacy media
attach is used. That is done by registering driver using I2C binding
from legacy attach. That way we can get valid I2C client, which is
needed for proper dev_() logging and regmap for example even legacy
binding is used.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ts2020: improve filter limit calc
Antti Palosaari [Thu, 26 Mar 2015 13:49:17 +0000 (10:49 -0300)]
[media] ts2020: improve filter limit calc

* We don't need calculate channel bandwidth from symbol rate as it
is calculated by DVB core.

* Use clamp() to force upper/lower limit of filter 3dB frequency.
Upper limit should never exceeded 40MHz (80MHz BW) in any case,
though...

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ts2020: re-implement PLL calculations
Antti Palosaari [Thu, 26 Mar 2015 13:04:09 +0000 (10:04 -0300)]
[media] ts2020: re-implement PLL calculations

Used frequency synthesizer is simple Integer-N PLL, with configurable
reference divider, output divider and of course N itself. Old
calculations were working fine, but not so easy to understand.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cobalt: fix 64-bit division
Hans Verkuil [Wed, 10 Jun 2015 05:45:45 +0000 (02:45 -0300)]
[media] cobalt: fix 64-bit division

There are still some 64-bit division problems in the cobalt code.
Replace it by div_u64.

[mchehab@osg.samsung.com: folded with an additional diff sent by
 Hans via a priv e-mail]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] rc: gpio-ir-recv: don't sleep in irq handler
Heiko Stübner [Tue, 2 Jun 2015 14:43:50 +0000 (11:43 -0300)]
[media] rc: gpio-ir-recv: don't sleep in irq handler

Don't allow sleep when getting the gpio value in the irq-handler.
On my rk3288 board this results in might_sleep warnings when receiving
data like:

BUG: sleeping function called from invalid context at drivers/gpio/gpiolib.c:1531
in_atomic(): 1, irqs_disabled(): 128, pid: 0, name: swapper/0
CPU: 0 PID: 0 Comm: swapper/0 Tainted: P                4.1.0-rc5+ #2011
Hardware name: Rockchip (Device Tree)
[<c00189a0>] (unwind_backtrace) from [<c0013b04>] (show_stack+0x20/0x24)
[<c0013b04>] (show_stack) from [<c0757970>] (dump_stack+0x8c/0xbc)
[<c0757970>] (dump_stack) from [<c0053188>] (___might_sleep+0x238/0x284)
[<c0053188>] (___might_sleep) from [<c0053264>] (__might_sleep+0x90/0xa4)
[<c0053264>] (__might_sleep) from [<c02ff4ac>] (gpiod_get_raw_value_cansleep+0x28/0x44)
[<c02ff4ac>] (gpiod_get_raw_value_cansleep) from [<bf0363c4>] (gpio_ir_recv_irq+0x24/0x6c [gpio_ir_recv])
[<bf0363c4>] (gpio_ir_recv_irq [gpio_ir_recv]) from [<c008a78c>] (handle_irq_event_percpu+0x164/0x550)
[<c008a78c>] (handle_irq_event_percpu) from [<c008abc4>] (handle_irq_event+0x4c/0x6c)
[<c008abc4>] (handle_irq_event) from [<c008df88>] (handle_edge_irq+0x128/0x150)
[<c008df88>] (handle_edge_irq) from [<c0089edc>] (generic_handle_irq+0x30/0x40)
[<c0089edc>] (generic_handle_irq) from [<c02fc4cc>] (rockchip_irq_demux+0x158/0x210)
[<c02fc4cc>] (rockchip_irq_demux) from [<c0089edc>] (generic_handle_irq+0x30/0x40)
[<c0089edc>] (generic_handle_irq) from [<c008a058>] (__handle_domain_irq+0x98/0xc0)
[<c008a058>] (__handle_domain_irq) from [<c00094a4>] (gic_handle_irq+0x4c/0x70)
[<c00094a4>] (gic_handle_irq) from [<c0014684>] (__irq_svc+0x44/0x5c)

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb-frontend: Replace timeval with ktime_t
Tina Ruchandani [Sun, 31 May 2015 07:17:06 +0000 (04:17 -0300)]
[media] dvb-frontend: Replace timeval with ktime_t

struct timeval uses a 32-bit seconds representation which will
overflow in the year 2038 and beyond. This patch replaces
the usage of struct timeval with ktime_t which is a 64-bit
timestamp and is year 2038 safe.
This patch is part of a larger attempt to remove all instances
of 32-bit timekeeping variables (timeval, timespec, time_t)
which are not year 2038 safe, from the kernel.

[mchehab@osg.samsung.com: add a missing parenthesis, breaking compilation]
Suggested-by: Arnd Bergmann <arndb@arndb.de>
Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] b2c2: Add option to skip the first 6 pid filters
Jemma Denson [Sat, 30 May 2015 18:10:06 +0000 (15:10 -0300)]
[media] b2c2: Add option to skip the first 6 pid filters

The flexcop bridge chip has two banks of hardware pid filters -
an initial 6, and on some chip revisions an additional bank of 32.

A bug is present on the initial 6 - when changing transponders
one of two PAT packets from the old transponder would be included
in the initial packets from the new transponder. This usually
transpired with userspace programs complaining about services
missing, because they are seeing a PAT that they would not be
expecting. Running in full TS mode does not exhibit this problem,
neither does using just the additional 32.

This patch adds in an option to not use the inital 6 and solely use
just the additional 32, and enables this option for the SkystarS2
card. Other cards can be added as required if they also have
this bug.

Signed-off-by: Jemma Denson <jdenson@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ddbridge: Do not free_irq() if request_irq() failed
Takeshi Yoshimura [Wed, 27 May 2015 14:28:14 +0000 (11:28 -0300)]
[media] ddbridge: Do not free_irq() if request_irq() failed

My static checker detected that free_irq() is called even after
request_irq() failed in ddb_probe(). In this case, the kernel may try to
free dev->pdev->irq although the IRQ is not assigned. This event rarely
occurs, but always introduces a warning if it happens.

"goto fail1" always results in disabling enabled MSI and releasing a
requested IRQ. It seems like the former handling is necessary. So I added
a conditional branch before the free_irq() (stat == 0 means request_irq()
succeeds).

Signed-off-by: Takeshi Yoshimura <yos@sslab.ics.keio.ac.jp>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] staging: media: omap4iss: Reformat overly long lines
Piotr S. Staszewski [Tue, 26 May 2015 15:02:06 +0000 (12:02 -0300)]
[media] staging: media: omap4iss: Reformat overly long lines

This reformats lines that were previously above 80 characters long,
improving readability and making checkpatch.pl happier.

Signed-off-by: Piotr S. Staszewski <p.staszewski@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Staging: media: lirc: Replace timeval with ktime_t
Ksenija Stanojevic [Fri, 22 May 2015 15:58:42 +0000 (12:58 -0300)]
[media] Staging: media: lirc: Replace timeval with ktime_t

'struct timeval last_tv' is used to get the time of last signal change
and 'struct timeval last_intr_tv' is used to get the time of last UART
interrupt.
32-bit systems using 'struct timeval' will break in the year 2038, so we
have to replace that code with more appropriate types.
Here struct timeval is replaced with ktime_t.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Documentation: update cardlists
Mauro Carvalho Chehab [Tue, 9 Jun 2015 21:43:47 +0000 (18:43 -0300)]
[media] Documentation: update cardlists

The card lists at Documentation/video4linux are missing some
boards. Add them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] saa7134: add AverMedia AverTV/505 card support
Dmitry Eremin-Solenikov [Thu, 21 May 2015 18:53:01 +0000 (15:53 -0300)]
[media] saa7134: add AverMedia AverTV/505 card support

Add AverMedia AverTV/505 card to saa7134 driver. It is a card bearing
SAA7130HL chip and FQ1216ME/IH-3 tuner.

Working: Composite, TV and IR remote control.
Untested: S-Video.

[mchehab@osg.samsung.com: fix CodingStyle]
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] b2c2: Mismatch in config ifdefs for SkystarS2
Jemma Denson [Thu, 21 May 2015 09:29:23 +0000 (06:29 -0300)]
[media] b2c2: Mismatch in config ifdefs for SkystarS2

Compilation warning issued by kbuild test robot:
>> drivers/media/common/b2c2/flexcop-fe-tuner.c:31:12: warning: 'flexcop_fe_request_firmware' defined but not used [-Wunused-function]
    static int flexcop_fe_request_firmware(struct dvb_frontend *fe,

This patch fixes a mismatch in Kconfig define checks. One had a
check for just CX24120, the other is checking for both CX24120
and ISL6421.

Signed-off-by: Jemma Denson <jdenson@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx231xx: Add support for Terratec Grabby
Tommi Rantala [Wed, 20 May 2015 07:51:29 +0000 (04:51 -0300)]
[media] cx231xx: Add support for Terratec Grabby

Add support for the Terratec Grabby with USB ID 0ccd:00a6.

Signed-off-by: Tommi Rantala <tt.rantala@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] coda: remove extraneous TRACE_SYSTEM_STRING
Arnd Bergmann [Tue, 19 May 2015 21:34:33 +0000 (18:34 -0300)]
[media] coda: remove extraneous TRACE_SYSTEM_STRING

The coda tracing code causes lots of warnings like

In file included from /git/arm-soc/include/trace/define_trace.h:90:0,
                 from /git/arm-soc/drivers/media/platform/coda/trace.h:203,
                 from /git/arm-soc/drivers/media/platform/coda/coda-bit.c:34:
/git/arm-soc/include/trace/ftrace.h:28:0: warning: "TRACE_SYSTEM_STRING" redefined
 #define TRACE_SYSTEM_STRING __app(TRACE_SYSTEM_VAR,__trace_system_name)
 ^
In file included from /git/arm-soc/include/trace/define_trace.h:83:0,
                 from /git/arm-soc/drivers/media/platform/coda/trace.h:203,
                 from /git/arm-soc/drivers/media/platform/coda/coda-bit.c:34:
/git/arm-soc/drivers/media/platform/coda/./trace.h:12:0: note: this is the location of the previous definition
 #define TRACE_SYSTEM_STRING __stringify(TRACE_SYSTEM)

>From what I can tell, this is just the result of a bogus TRACE_SYSTEM_STRING
definition, and removing that one makes the warnings go away.

Fixes: 9a1a8f9953f ("[media] coda: Add tracing support")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] usb drivers: use BUG_ON() instead of if () BUG
Mauro Carvalho Chehab [Tue, 19 May 2015 11:00:56 +0000 (08:00 -0300)]
[media] usb drivers: use BUG_ON() instead of if () BUG

Some USB drivers have a logic at the VB buffer handling like:
if (in_interrupt())
BUG();
Use, instead:
BUG_ON(in_interrupt());

Btw, this logic looks weird on my eyes. We should convert them
to use VB2, in order to avoid those crappy things.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] ov2659: Don't depend on subdev API
Mauro Carvalho Chehab [Thu, 14 May 2015 22:27:45 +0000 (19:27 -0300)]
[media] ov2659: Don't depend on subdev API

The subdev API is optional. No driver should depend on it.

Avoid compilation breakages if subdev API is not selected:

drivers/media/i2c/ov2659.c: In function ‘ov2659_get_fmt’:
drivers/media/i2c/ov2659.c:1054:3: error: implicit declaration of function ‘v4l2_subdev_get_try_format’ [-Werror=implicit-function-declaration]
   mf = v4l2_subdev_get_try_format(sd, cfg, 0);
   ^
drivers/media/i2c/ov2659.c:1054:6: warning: assignment makes pointer from integer without a cast
   mf = v4l2_subdev_get_try_format(sd, cfg, 0);
      ^
drivers/media/i2c/ov2659.c: In function ‘ov2659_set_fmt’:
drivers/media/i2c/ov2659.c:1129:6: warning: assignment makes pointer from integer without a cast
   mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
      ^
drivers/media/i2c/ov2659.c: In function ‘ov2659_open’:
drivers/media/i2c/ov2659.c:1264:38: error: ‘struct v4l2_subdev_fh’ has no member named ‘pad’
     v4l2_subdev_get_try_format(sd, fh->pad, 0);
                                      ^

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
9 years ago[media] bdisp: update MAINTAINERS
Hans Verkuil [Mon, 8 Jun 2015 12:26:20 +0000 (09:26 -0300)]
[media] bdisp: update MAINTAINERS

Add entry for the bdisp driver to the MAINTAINERS file.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] bdisp: add debug file system
Fabien Dessenne [Tue, 12 May 2015 16:02:11 +0000 (13:02 -0300)]
[media] bdisp: add debug file system

Creates 5 debugfs entries to dump the last HW request, the last HW node
(=command), the HW registers and the recent HW performance (time & fps)

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] bdisp: 2D blitter driver using v4l2 mem2mem framework
Fabien Dessenne [Tue, 12 May 2015 16:02:10 +0000 (13:02 -0300)]
[media] bdisp: 2D blitter driver using v4l2 mem2mem framework

This v4l2 mem2mem driver is a 2D blitter for STMicroelectronics SoC.
It uses the v4l2 mem2mem framework.

The following features are supported and tested:
- Color format conversion (RGB32, RGB24, RGB16, NV12, YUV420P)
- Copy
- Scale
- Flip
- Deinterlace
- Wide (4K) picture support
- Crop

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: added missing slab.h include to bdisp-v4l2.c]

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] bdisp: add DT bindings documentation
Fabien Dessenne [Tue, 12 May 2015 16:02:09 +0000 (13:02 -0300)]
[media] bdisp: add DT bindings documentation

This adds DT binding documentation for STMicroelectronics bdisp driver.

Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Change format for enum dmx_output documentation
Mauro Carvalho Chehab [Sun, 7 Jun 2015 22:29:43 +0000 (19:29 -0300)]
[media] DocBook: Change format for enum dmx_output documentation

Use a table for the Demux output. No new information added
here. They were all merged inside the table.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb: dmx.h: don't use anonymous enums
Mauro Carvalho Chehab [Sun, 7 Jun 2015 22:34:50 +0000 (19:34 -0300)]
[media] dvb: dmx.h: don't use anonymous enums

There are several anonymous enums here, used via a typedef.

Well, we don't like typedefs on Kernel, so let's de-anonimize
those enums. Then, latter, we may be able to get rid of the
typedefs, at least from Kernelspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb: frontend.h: add a note for the deprecated enums/structs
Mauro Carvalho Chehab [Sun, 7 Jun 2015 19:44:21 +0000 (16:44 -0300)]
[media] dvb: frontend.h: add a note for the deprecated enums/structs

Let be clear, at the header, about what got deprecated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb: frontend.h: improve dvb_frontent_parameters comment
Mauro Carvalho Chehab [Sun, 7 Jun 2015 19:33:30 +0000 (16:33 -0300)]
[media] dvb: frontend.h: improve dvb_frontent_parameters comment

The comment for struct dvb_frontend_parameters is weird, as it
mixes delivery system name (ATSC) with modulation names
(QPSK, QAM, OFDM).

Use delivery system names there on the frequency comment, as this
is clearer, specially after 2GEN delivery systems.

While here, add comments at the union, to make live easier for ones
that may try to understand the convention used by the legacy API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] frontend: Fix a typo at the comments
Mauro Carvalho Chehab [Sun, 7 Jun 2015 19:28:33 +0000 (16:28 -0300)]
[media] frontend: Fix a typo at the comments

The description of struct dtv_stats has a spmall typo:
FE_SCALE_DECIBELS instead of FE_SCALE_DECIBEL

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Remove comments before parsing enum values
Mauro Carvalho Chehab [Sun, 7 Jun 2015 19:17:56 +0000 (16:17 -0300)]
[media] DocBook: Remove comments before parsing enum values

The comments may affect enum value parsing. Use cpp to remove
them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] frontend: move legacy typedefs to the end
Mauro Carvalho Chehab [Sun, 7 Jun 2015 18:01:15 +0000 (15:01 -0300)]
[media] frontend: move legacy typedefs to the end

Just userspace need those typedefs. So, put it in the compat part
of the header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] frontend: Move legacy API enums/structs to the end
Mauro Carvalho Chehab [Sun, 7 Jun 2015 18:00:17 +0000 (15:00 -0300)]
[media] frontend: Move legacy API enums/structs to the end

In order to better organize the header file, move the legacy
API (DVBv3) support to the end, just before the ioctl definitions.

This way, we can use just one #if for all of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] dvb: Get rid of typedev usage for enums
Mauro Carvalho Chehab [Sun, 7 Jun 2015 17:53:52 +0000 (14:53 -0300)]
[media] dvb: Get rid of typedev usage for enums

The DVB API was originally defined using typedefs. This is against
Kernel CodingStyle, and there's no good usage here. While we can't
remove its usage on userspace, we can avoid its usage in Kernelspace.

So, let's do it.

This patch was generated by this shell script:

for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done

While here, make CodingStyle fixes on the affected lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> # for drivers/media/firewire/*
9 years ago[media] DocBook: add xrefs for enum fe_type
Mauro Carvalho Chehab [Sun, 7 Jun 2015 17:31:13 +0000 (14:31 -0300)]
[media] DocBook: add xrefs for enum fe_type

The only enum that was missing xrefs at frontend.h is fe_type.
Add xrefs for them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: properly document the delivery systems
Mauro Carvalho Chehab [Sun, 7 Jun 2015 17:21:09 +0000 (14:21 -0300)]
[media] DocBook: properly document the delivery systems

Use a table for the delivery systems. The table is organized
by the type (cable, satellite, terrestrial) and shows what
standards are not fully implemented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: better document the DVB-S2 rolloff factor
Mauro Carvalho Chehab [Sun, 7 Jun 2015 14:59:27 +0000 (11:59 -0300)]
[media] DocBook: better document the DVB-S2 rolloff factor

Instead of using a program listing, use a table and make clearer
what each define means.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Remove duplicated documentation for SEC_VOLTAGE_*
Mauro Carvalho Chehab [Sun, 7 Jun 2015 14:34:12 +0000 (11:34 -0300)]
[media] DocBook: Remove duplicated documentation for SEC_VOLTAGE_*

The table were documented at the legacy ioctl call. Move it
to the DVBv5 ioctl, and add a cross ref link on the legacy
section.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: document DVB-S2 pilot in a table
Mauro Carvalho Chehab [Sun, 7 Jun 2015 14:18:16 +0000 (11:18 -0300)]
[media] DocBook: document DVB-S2 pilot in a table

Putting it into a table allows to comment each possible
values, with makes more clear what field means.

Also, it allows to do cross-references with the frontend.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Add documentation for ATSC M/H properties
Mauro Carvalho Chehab [Sun, 7 Jun 2015 13:59:32 +0000 (10:59 -0300)]
[media] DocBook: Add documentation for ATSC M/H properties

Those data were retrieved by looking at A/153: ATSC Mobile DTV
Standard and guessing what makes more sense to each field.

Cc: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: add placeholders for ATSC M/H properties
Mauro Carvalho Chehab [Sun, 7 Jun 2015 10:14:14 +0000 (07:14 -0300)]
[media] DocBook: add placeholders for ATSC M/H properties

The ATSC M/H specific properties are not properly documented.
This became crearer when converting the existing data into
tables and adding cross references.

For now, just add placeholders, as a further investigation
about the meaning of each parameter is required.

Cc: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: remove a wrong cut-and-paste data
Mauro Carvalho Chehab [Sun, 7 Jun 2015 09:54:37 +0000 (06:54 -0300)]
[media] DocBook: remove a wrong cut-and-paste data

By cut-and-paste mistake, TRANSMISSION_MODE_AUTO were documented
twice, one at the wrong place.

Remove the wrong one.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: add IDs for enum fe_bandwidth
Mauro Carvalho Chehab [Sun, 7 Jun 2015 09:37:20 +0000 (06:37 -0300)]
[media] DocBook: add IDs for enum fe_bandwidth

enum fe_bandwidth is documented at the frontend legacy xml
file.

Add xrefs for each entry there. This makes the hyperlinks at
frontend.h to go directly to the right documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Better document DTMB time interleaving
Mauro Carvalho Chehab [Sun, 7 Jun 2015 09:35:20 +0000 (06:35 -0300)]
[media] DocBook: Better document DTMB time interleaving

The DTMB time interleaving was not properly documented. Add
a documentation for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Add entry IDs for the enums defined at dvbproperty.xml
Mauro Carvalho Chehab [Sun, 7 Jun 2015 09:20:18 +0000 (06:20 -0300)]
[media] DocBook: Add entry IDs for the enums defined at dvbproperty.xml

There are lots of enums that are defined at dvbproperty.

Add xrefs for each entry there. This makes the hyperlinks at
frontend.h to go directly to the right documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Docbook: add entry IDs for enum fe_sec_voltage
Mauro Carvalho Chehab [Sun, 7 Jun 2015 09:12:28 +0000 (06:12 -0300)]
[media] Docbook: add entry IDs for enum fe_sec_voltage

enum fe_sec_voltage is documented together with FE_SET_VOLTAGE.

Add xrefs for each entry there. This makes the hyperlinks at
frontend.h to go directly to the right documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: add entry IDs for enum fe_sec_tone_mode
Mauro Carvalho Chehab [Sun, 7 Jun 2015 09:10:38 +0000 (06:10 -0300)]
[media] DocBook: add entry IDs for enum fe_sec_tone_mode

enum fe_sec_tone_mode is documented together with FE_SET_TONE.

Add xrefs for each entry there. This makes the hyperlinks at
frontend.h to go directly to the right documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: add entry IDs for enum fe_status
Mauro Carvalho Chehab [Sun, 7 Jun 2015 09:09:57 +0000 (06:09 -0300)]
[media] DocBook: add entry IDs for enum fe_status

enum fe_status is documented together with FE_READ_STATUS.

Add xrefs for each entry there. This makes the hyperlinks at
frontend.h to go directly to the right documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: add entry IDs for enum fe_sec_mini_cmd
Mauro Carvalho Chehab [Sun, 7 Jun 2015 08:49:51 +0000 (05:49 -0300)]
[media] DocBook: add entry IDs for enum fe_sec_mini_cmd

enum fe_sec_mini_cmd is documented together with
FE_DISEQC_SEND_BURST.

Add xrefs for each entry there. This makes the hyperlinks at
frontend.h to go directly to the right documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Add entry IDs for enum fe_caps
Mauro Carvalho Chehab [Sun, 7 Jun 2015 08:39:03 +0000 (05:39 -0300)]
[media] DocBook: Add entry IDs for enum fe_caps

enum fe_caps is documented at FE_GET_INFO ioctl. Add xrefs
for each entry there. This makes the hyperlinks at frontend.h
to go directly to the right documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: handle enums on frontend.h
Mauro Carvalho Chehab [Sun, 7 Jun 2015 08:21:51 +0000 (05:21 -0300)]
[media] DocBook: handle enums on frontend.h

In order to be sure that all enum definitions will be documented,
let's parse the enum values and add xref links to them.

Lots of missing references will be risen as we miss adding
id's to those symbols at the documentation. Next patches will
fix this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx231xx: fix compiler warning
Hans Verkuil [Sat, 6 Jun 2015 08:02:32 +0000 (05:02 -0300)]
[media] cx231xx: fix compiler warning

Fix this compiler warning by allocating a structure to read the eeprom instead
of doing it on the stack and worse: the eeprom array is static, so that can
cause problems if there are multiple cx231xx instances.

cx231xx-cards.c: In function 'cx231xx_card_setup':
cx231xx-cards.c:1110:1: warning: the frame size of 2064 bytes is larger than 2048 bytes [-Wframe-larger-than=]
 }
 ^

I did consider removing the code altogether since the result is actually
not used at the moment, but I decided against it since it is used in other
drivers and someone might want to start using it in this driver as well. And
then it is useful that the code is already there.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: Use interlaced info for cvt/gtf timing detection
Prashant Laddha [Fri, 22 May 2015 05:27:35 +0000 (02:27 -0300)]
[media] vivid: Use interlaced info for cvt/gtf timing detection

The detect_cvt/gtf() now supports timing calculations for interlaced
format.

Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-dv-timings: add interlace support in detect cvt/gtf
Prashant Laddha [Fri, 22 May 2015 05:27:34 +0000 (02:27 -0300)]
[media] v4l2-dv-timings: add interlace support in detect cvt/gtf

Extend detect_cvt/gtf API to indicate the format type (interlaced
or progressive). In case of interlaced, the vertical front and back
porch and vsync values for both (odd,even) fields are considered to
derive image height. Populated vsync, vertical front, back porch
values in bt timing structure for even and odd fields and updated
the flags appropriately.

Also modified the functions calling the detect_cvt/gtf(). As of now
these functions are calling detect_cvt/gtf() with interlaced flag
set to false.

Cc: Martin Bugge <marbugge@cisco.com>
Cc: Mats Randgaard <matrandg@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-dv-timings: support interlaced in v4l2_print_dv_timings
Hans Verkuil [Fri, 5 Jun 2015 08:30:02 +0000 (05:30 -0300)]
[media] v4l2-dv-timings: support interlaced in v4l2_print_dv_timings

The v4l2_print_dv_timings() didn't log the interlaced format correctly. The timings
for the bottom field weren't logged and the fields per second value was half of what
it should have been.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-dv-timing: avoid rounding twice in gtf hblank calc
Prashant Laddha [Fri, 5 Jun 2015 08:13:31 +0000 (05:13 -0300)]
[media] v4l2-dv-timing: avoid rounding twice in gtf hblank calc

Currently, in gtf hblank calculations, the rounding is used twice,
one at intermediate division and one at final state where hblank
is rounded to nearest multiple of twice cell granularity. This
error got introduced in 'commit d7ed5a3ddaec ("[media]
v4l2-dv-timings: fix rounding in hblank and hsync calculation"),
where it missed combining the rounding step. Correcting the same
in this patch.

Signed-off-by: Prashant Laddha <prladdha@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv7604: log alt-gamma and HDMI colorspace
Hans Verkuil [Sun, 7 Jun 2015 10:32:35 +0000 (07:32 -0300)]
[media] adv7604: log alt-gamma and HDMI colorspace

Log the alternate gamma state and the HDMI colorspace that the adv
device detected.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv7604: fix broken saturator check
Hans Verkuil [Sun, 7 Jun 2015 10:32:34 +0000 (07:32 -0300)]
[media] adv7604: fix broken saturator check

The logging of the saturator status was wrong due to an incorrect
condition.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv7604: log infoframes
Hans Verkuil [Sun, 7 Jun 2015 10:32:33 +0000 (07:32 -0300)]
[media] adv7604: log infoframes

Add support for logging the detected InfoFrames for the adv76xx. Helps in
debugging what is actually received on the HDMI link.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv7511: log the currently set infoframes
Hans Verkuil [Sun, 7 Jun 2015 10:32:32 +0000 (07:32 -0300)]
[media] adv7511: log the currently set infoframes

The adv7511 sets up InfoFrames that are used when transmitting video.
Log the contents of those InfoFrames so it is possible to see exactly what
the transmitter is sending.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv7842: replace uintX_t by uX for consistency
Hans Verkuil [Sun, 7 Jun 2015 10:32:31 +0000 (07:32 -0300)]
[media] adv7842: replace uintX_t by uX for consistency

Currently this driver mixes u8/u32 and uint8_t/uint32_t. Standardize on
u8/u32.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] adv7511: replace uintX_t by uX for consistency
Hans Verkuil [Sun, 7 Jun 2015 10:32:30 +0000 (07:32 -0300)]
[media] adv7511: replace uintX_t by uX for consistency

Currently this driver mixes u8/u16 and uint8_t/uint16_t. Standardize on
u8/u16.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vim2m: add create_bufs and prepare_buf support
Hans Verkuil [Fri, 5 Jun 2015 14:28:52 +0000 (11:28 -0300)]
[media] vim2m: add create_bufs and prepare_buf support

Add support for the missing VIDIOC_CREATE_BUFS and VIDIOC_PREPARE_BUF
ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-mem2mem: add support for prepare_buf
Hans Verkuil [Fri, 5 Jun 2015 14:28:50 +0000 (11:28 -0300)]
[media] v4l2-mem2mem: add support for prepare_buf

This was never added for some reason, so add it now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] fc2580: add missing error status when probe() fails
Antti Palosaari [Sat, 6 Jun 2015 11:15:34 +0000 (08:15 -0300)]
[media] fc2580: add missing error status when probe() fails

We must return -ENODEV error on case probe() fails to detect chip.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] tda10071: add missing error status when probe() fails
Antti Palosaari [Sat, 6 Jun 2015 11:11:16 +0000 (08:11 -0300)]
[media] tda10071: add missing error status when probe() fails

We must return -ENODEV error on case probe() fails to detect chip.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] m88ds3103: a couple missing error codes
Dan Carpenter [Tue, 2 Jun 2015 10:20:00 +0000 (07:20 -0300)]
[media] m88ds3103: a couple missing error codes

We need to set some error codes here.

Fixes: f01919e8f54f ('[media] m88ds3103: add I2C client binding')

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Use constant tag for monospaced fonts
Mauro Carvalho Chehab [Tue, 2 Jun 2015 19:41:01 +0000 (16:41 -0300)]
[media] DocBook: Use constant tag for monospaced fonts

As reminded by Jonathan, several places where emphasys
role="tt" were used are actually trying to change the font to
monospaced.

We do that, on other places, by using the constant tag.

So, use it here too.

Reported-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: fix some syntax issues at dvbproperty.xml
Mauro Carvalho Chehab [Tue, 2 Jun 2015 19:17:16 +0000 (16:17 -0300)]
[media] DocBook: fix some syntax issues at dvbproperty.xml

Some minor English syntax fixes.

Reported-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] Docbook: typo fix: use note(d) instead of notice(d)
Mauro Carvalho Chehab [Tue, 2 Jun 2015 17:59:07 +0000 (14:59 -0300)]
[media] Docbook: typo fix: use note(d) instead of notice(d)

We don't want to announce anything, but to add a note ;)
So:
notice  -> note
notided -> noted

While here, fix another typo at media_api.tmpl:
with -> which

Reported-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: Change DTD schema to version 4.5
Mauro Carvalho Chehab [Tue, 2 Jun 2015 11:36:36 +0000 (08:36 -0300)]
[media] DocBook: Change DTD schema to version 4.5

According with the docs at docbook.org, no backward compatible
changes were done between 4.2 and 4.5 schemas. Some fixes were
added, together with new features. So, let's use the latest
4.x schema.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: specify language and encoding for the document
Mauro Carvalho Chehab [Tue, 2 Jun 2015 10:40:53 +0000 (07:40 -0300)]
[media] DocBook: specify language and encoding for the document

Define the usage of UTF-8 encoding and let clear that the document
is in English.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook: document DVB net API
Mauro Carvalho Chehab [Mon, 1 Jun 2015 11:56:49 +0000 (08:56 -0300)]
[media] DocBook: document DVB net API

The DVB network API was not documented. There are just some
placeholders there.

Replace it by a proper documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-ioctl: log buffer type 0 correctly
Hans Verkuil [Fri, 5 Jun 2015 14:28:51 +0000 (11:28 -0300)]
[media] v4l2-ioctl: log buffer type 0 correctly

If userspace passed the invalid buffer type 0 to the kernel, then the
kernel log would show 'type=(null)' since there was no string defined
for type 0. Fix this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] DocBook media: correct description of reserved fields
Hans Verkuil [Fri, 5 Jun 2015 08:11:15 +0000 (05:11 -0300)]
[media] DocBook media: correct description of reserved fields

Make sure that the documentation clearly states who is zeroing reserved
fields: drivers and/or applications.

This patch syncs the documentation with the checks that v4l2-compliance
and valgrind do.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l2-ioctl: clear the reserved field of v4l2_create_buffers
Hans Verkuil [Fri, 5 Jun 2015 08:11:14 +0000 (05:11 -0300)]
[media] v4l2-ioctl: clear the reserved field of v4l2_create_buffers

This field was never cleared by the kernel making future extensions
hard to implement. Clear it now.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid-tpg: improve Y16 color setup
Hans Verkuil [Fri, 5 Jun 2015 06:45:38 +0000 (03:45 -0300)]
[media] vivid-tpg: improve Y16 color setup

Currently the colors for the Y16 and Y16_BE pixelformats are in the range
0x0000-0xff00. So pure white (0xffff) is never created.

Improve this by making white really white. For other colors the lsb remains 0
so vivid can be used to detect endian problems.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Ricardo Ribalda <ricardo.ribalda@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] radio-si470x-i2c: Pass the IRQF_ONESHOT flag
Fabio Estevam [Mon, 1 Jun 2015 17:14:07 +0000 (14:14 -0300)]
[media] radio-si470x-i2c: Pass the IRQF_ONESHOT flag

Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests")
threaded IRQs without a primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] stk1160: add DMABUF support
Hans Verkuil [Mon, 1 Jun 2015 11:18:31 +0000 (08:18 -0300)]
[media] stk1160: add DMABUF support

Implement DMABUF exporting and importing.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] vivid: move video loopback control to the capture device
Hans Verkuil [Mon, 1 Jun 2015 10:15:53 +0000 (07:15 -0300)]
[media] vivid: move video loopback control to the capture device

This has been on my TODO list for some time now: the control that enables the video
loopback was part of the controls of the video output device instead of the video
capture device. In practice this was quite annoying since you expect it at the capture
side since that's where you want to make the decision whether to use the TPG or looped
video.

This patch moves the control from the output to the capture side.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] omap_vout: use swap() in omapvid_init()
Fabian Frederick [Mon, 18 May 2015 17:54:17 +0000 (14:54 -0300)]
[media] omap_vout: use swap() in omapvid_init()

Use kernel.h macro definition.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] saa7134: switch tuner FMD1216ME_MK3 to analog
Juergen Gier [Thu, 14 May 2015 11:55:04 +0000 (08:55 -0300)]
[media] saa7134: switch tuner FMD1216ME_MK3 to analog

The tuner FMD1216ME_MK3 suffers the same problem as FMD1216MEX_MK3,
as described in saa7134-cards.c (disabled IF, enabled DVB-T). The
card does work under MS Windows, after soft reboot into Linux it
continues to work, only then tda9887 is loaded as well.
I copied the relevant code from the BEHOLD_H6 section to MD7134.

The CTX946 TV card doesn't detect a signal after cold boot, seems

Signed-off-by: Juergen Gier <juergen.gier@gmx.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] v4l: of: Correct pclk-sample for BT656 bus
Nikhil Devshatwar [Tue, 5 May 2015 13:49:59 +0000 (10:49 -0300)]
[media] v4l: of: Correct pclk-sample for BT656 bus

Current v4l2_of_parse_parallel_bus function attempts to parse the
DT properties for the parallel bus as well as BT656 bus.
If the pclk-sample property is defined for the BT656 bus, it is still
marked as a parallel bus.
Fix this by parsing the pclk after the bus_type is selected.
Only when hsync or vsync properties are specified, the bus_type should
be set to V4L2_MBUS_PARALLEL.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx23885: Hauppauge WinTV-HVR5525 bind I2C SEC
Antti Palosaari [Mon, 20 Apr 2015 20:08:01 +0000 (17:08 -0300)]
[media] cx23885: Hauppauge WinTV-HVR5525 bind I2C SEC

Bind a8293 SEC using I2C binding.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx23885: Hauppauge WinTV-HVR4400/HVR5500 bind I2C demod and SEC
Antti Palosaari [Mon, 20 Apr 2015 18:01:51 +0000 (15:01 -0300)]
[media] cx23885: Hauppauge WinTV-HVR4400/HVR5500 bind I2C demod and SEC

Bind tda10071 demod and a8293 SEC using I2C binding.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx23885: Hauppauge WinTV Starburst bind I2C demod and SEC
Antti Palosaari [Mon, 20 Apr 2015 17:48:33 +0000 (14:48 -0300)]
[media] cx23885: Hauppauge WinTV Starburst bind I2C demod and SEC

Bind tda10071 demod and a8293 SEC using I2C binding.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
9 years ago[media] cx23885: add support for DVB I2C SEC client
Antti Palosaari [Thu, 16 Apr 2015 16:59:46 +0000 (13:59 -0300)]
[media] cx23885: add support for DVB I2C SEC client

Add support for I2C SEC (satellite equipment controller) client.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>