Commit graph

519695 commits

Author SHA1 Message Date
Dan Carpenter 8d7e506350 [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>
2015-06-10 11:47:56 -03:00
Olli Salonen 5dce1ee611 [media] saa7164: Improvements for I2C handling"
This reverts commit ad90b6b0f1.

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>
2015-06-10 11:46:03 -03:00
Olli Salonen d976872891 [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>
2015-06-10 11:44:44 -03:00
Vaishali Thakkar 555416f987 [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>
2015-06-10 11:43:19 -03:00
Malcolm Priestley 9e8715c91d [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>
2015-06-10 11:12:42 -03:00
David Howells c7275ae161 [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>
2015-06-10 11:12:25 -03:00
David Howells 0f20baad24 [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>
2015-06-10 11:11:38 -03:00
David Howells 3366cd5d72 [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>
2015-06-10 11:11:03 -03:00
David Howells 0f91c9d6ba [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>
2015-06-10 11:10:27 -03:00
Antti Palosaari 76b91be3d3 [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>
2015-06-10 11:09:20 -03:00
Antti Palosaari 478932b160 [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>
2015-06-10 11:08:50 -03:00
Antti Palosaari 7978b8a1bc [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>
2015-06-10 11:05:58 -03:00
David Howells 80868c8e5c [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>
2015-06-10 11:00:06 -03:00
Antti Palosaari f158cbceb1 [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>
2015-06-10 10:59:25 -03:00
Antti Palosaari e6ad9ce3e9 [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>
2015-06-10 10:58:48 -03:00
Antti Palosaari 2ca58f45cc [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>
2015-06-10 10:55:58 -03:00
Antti Palosaari af9d525553 [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>
2015-06-10 10:55:09 -03:00
Hans Verkuil 95a86e4318 [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>
2015-06-10 10:01:16 -03:00
Heiko Stübner 64657066f5 [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>
2015-06-10 07:48:39 -03:00
Tina Ruchandani 9056a23ba1 [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>
2015-06-09 21:09:51 -03:00
Jemma Denson d3525b632a [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>
2015-06-09 20:57:56 -03:00
Takeshi Yoshimura 25e057fdde [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>
2015-06-09 19:40:33 -03:00
Piotr S. Staszewski ee8defecea [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>
2015-06-09 19:20:18 -03:00
Ksenija Stanojevic 3466835061 [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>
2015-06-09 18:45:59 -03:00
Mauro Carvalho Chehab bba795fc0e [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>
2015-06-09 18:43:47 -03:00
Dmitry Eremin-Solenikov de983454d6 [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>
2015-06-09 18:43:00 -03:00
Jemma Denson 4b7574fb3c [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>
2015-06-09 18:37:56 -03:00
Tommi Rantala eee1d06dc2 [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>
2015-06-09 18:37:08 -03:00
Arnd Bergmann ae1c75d6ce [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: 9a1a8f9953 ("[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>
2015-06-09 18:36:04 -03:00
Mauro Carvalho Chehab 09f2082e23 [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>
2015-06-09 18:30:09 -03:00
Mauro Carvalho Chehab fa8cb6444c [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>
2015-06-09 18:13:46 -03:00
Hans Verkuil 04bd844a03 [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>
2015-06-09 18:12:57 -03:00
Fabien Dessenne 34b6beb65b [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>
2015-06-09 18:12:28 -03:00
Fabien Dessenne 28ffeebbb7 [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>
2015-06-09 18:10:41 -03:00
Fabien Dessenne 5a54cd2a3f [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>
2015-06-09 17:54:09 -03:00
Mauro Carvalho Chehab 6eab8043f9 [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>
2015-06-09 17:47:38 -03:00
Mauro Carvalho Chehab 6c72edab02 [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>
2015-06-09 17:47:38 -03:00
Mauro Carvalho Chehab 486ef85e93 [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>
2015-06-09 17:47:37 -03:00
Mauro Carvalho Chehab 81a7c6d9bb [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>
2015-06-09 17:47:37 -03:00
Mauro Carvalho Chehab 76add03db9 [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>
2015-06-09 17:47:37 -03:00
Mauro Carvalho Chehab 429c2024cb [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>
2015-06-09 17:47:36 -03:00
Mauro Carvalho Chehab b1e28ffaeb [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>
2015-06-09 17:47:36 -03:00
Mauro Carvalho Chehab af6392dec9 [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>
2015-06-09 17:47:36 -03:00
Mauro Carvalho Chehab 0df289a209 [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/*
2015-06-09 17:47:35 -03:00
Mauro Carvalho Chehab fe557e40f5 [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>
2015-06-09 17:47:35 -03:00
Mauro Carvalho Chehab d21ddba826 [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>
2015-06-09 17:47:34 -03:00
Mauro Carvalho Chehab b35f6ba978 [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>
2015-06-09 17:47:34 -03:00
Mauro Carvalho Chehab ff50574c17 [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>
2015-06-09 17:47:33 -03:00
Mauro Carvalho Chehab 448bac1031 [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>
2015-06-09 17:47:33 -03:00
Mauro Carvalho Chehab 8092cd7fc6 [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>
2015-06-09 17:47:33 -03:00