GitHub/LineageOS/android_kernel_motorola_exynos9610.git
7 years agomedia: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency
Arnd Bergmann [Tue, 5 Sep 2017 07:13:20 +0000 (09:13 +0200)]
media: leds: as3645a: add V4L2_FLASH_LED_CLASS dependency

We get a link error when V4L2_FLASH_LED_CLASS=m and AS3645A is built-in:

drivers/leds/leds-as3645a.o: In function `as3645a_v4l2_setup':
leds-as3645a.c:(.text+0x258): undefined reference to `v4l2_flash_init'
leds-as3645a.c:(.text+0x284): undefined reference to `v4l2_flash_indicator_init'
leds-as3645a.c:(.text+0x2a4): undefined reference to `v4l2_flash_release'
drivers/leds/leds-as3645a.o: In function `as3645a_remove':
leds-as3645a.c:(.text+0x784): undefined reference to `v4l2_flash_release'

This adds the same Kconfig dependency that the other V4L2 flash
drivers in drivers/leds use, to avoid that broken configuration.

Fixes: a56ba8fbcb55 ("media: leds: as3645a: Add LED flash class driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: get rid of removed DMX_GET_CAPS and DMX_SET_SOURCE leftovers
Mauro Carvalho Chehab [Tue, 5 Sep 2017 12:23:42 +0000 (08:23 -0400)]
media: get rid of removed DMX_GET_CAPS and DMX_SET_SOURCE leftovers

Those two ioctls were never used within the Kernel. Still, there
used to have compat32 code there (and an if #0 block at the core).

Get rid of them.

Fixes: 286fe1ca3fa1 ("media: dmx.h: get rid of DMX_GET_CAPS")
Fixes: 13adefbe9e56 ("media: dmx.h: get rid of DMX_SET_SOURCE")
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: Revert "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt...
Rob Herring [Thu, 20 Jul 2017 22:06:22 +0000 (18:06 -0400)]
media: Revert "[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay"

This reverts commit d2180e0cf77dc7a7049671d5d57dfa0a228f83c1.

The commit was flawed in that if the device_node pointers are different,
then in fact a different device is present and the device node could be
different in ways other than full_name.

As Frank Rowand explained:

"When an overlay (1) is removed, all uses and references to the nodes and
properties in that overlay are no longer valid.  Any driver that uses any
information from the overlay _must_ stop using any data from the overlay.
Any driver that is bound to a new node in the overlay _must_ unbind.  Any
driver that became bound to a pre-existing node that was modified by the
overlay (became bound after the overlay was applied) _must_ adjust itself
to account for any changes to that node when the overlay is removed.  One
way to do this is to unbind when notified that the overlay is about to
be removed, then to re-bind after the overlay is completely removed.

If an overlay (2) is subsequently applied, a node with the same
full_name as from overlay (1) may exist.  There is no guarantee
that overlay (1) and overlay (2) are the same overlay, even if
that node has the same full_name in both cases."

Also, there's not sufficient overlay support in mainline to actually
remove and re-apply an overlay to hit this condition as overlays can
only be applied from in kernel APIs.

Fixes: d2180e0cf77d ("[media] v4l: async: make v4l2 coexist with devicetree nodes in a dt overlay")

Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Javi Merino <javi.merino@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space
Sergei A. Trusov [Wed, 2 Aug 2017 08:00:01 +0000 (04:00 -0400)]
media: staging: atomisp: sh_css_calloc shall return a pointer to the allocated space

The calloc function returns either a null pointer or a pointer to the
allocated space. Add the second case that is missed.

Fixes: da22013f7df4 ("atomisp: remove indirection from sh_css_malloc")
Signed-off-by: Sergei A. Trusov <sergei.a.trusov@ya.ru>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: Revert "[media] lirc_dev: remove superfluous get/put_device() calls"
Sean Young [Fri, 4 Aug 2017 14:12:03 +0000 (10:12 -0400)]
media: Revert "[media] lirc_dev: remove superfluous get/put_device() calls"

This reverts commit 5be2b76a9ca4ea5fd3e221114d62eeb0d78267ca.

Only when the lirc device is freed, should we drop our reference to
rc_dev, else we the rc_dev is freed to early. If userspace has
a file descriptor open during unplug, it goes bang.

==================================================================
BUG: KASAN: use-after-free in __lock_acquire+0x7bb/0x1e10
Read of size 8 at addr ffff8801d7d61ed0 by task ir-rec/2609

-snip-
 mutex_lock_nested+0x1b/0x20
 ? mutex_lock_nested+0x1b/0x20
 rc_close.part.6+0x20/0x60 [rc_core]
 rc_close+0x13/0x20 [rc_core]
 lirc_dev_fop_close+0x62/0xd0 [lirc_dev]
 __fput+0x236/0x410
 ? fput+0xb0/0xb0
 ? do_raw_spin_trylock+0x110/0x110
 ? set_rq_offline.part.70+0xa0/0xa0
 ____fput+0xe/0x10
 task_work_run+0x116/0x180
 ? task_work_cancel+0x170/0x170
 ? _raw_spin_unlock+0x27/0x40
 ? switch_task_namespaces+0x5f/0x90
 do_exit+0x68b/0xe80

Cc: stable@vger.kernel.org # For Kernel 4.13
Fixes: 5be2b76a9ca4 ("[media] lirc_dev: remove superfluous get/put_device() calls")
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: add qcom_camss.rst to v4l-drivers rst file
Mauro Carvalho Chehab [Tue, 5 Sep 2017 11:06:40 +0000 (07:06 -0400)]
media: add qcom_camss.rst to v4l-drivers rst file

Avoid this warning:
/devel/v4l/docs/Documentation/media/v4l-drivers/qcom_camss.rst:: WARNING: document isn't included in any toctree

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb headers: make checkpatch happier
Mauro Carvalho Chehab [Tue, 5 Sep 2017 11:02:44 +0000 (07:02 -0400)]
media: dvb headers: make checkpatch happier

Adjust dvb ca.h, dmx.h and frontend.h in order to make
checkpatch happier. Now, it only complains about the typedefs,
and those are there just to provide backward userspace
compatibility.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb uapi: move frontend legacy API to another part of the book
Mauro Carvalho Chehab [Tue, 5 Sep 2017 10:47:08 +0000 (06:47 -0400)]
media: dvb uapi: move frontend legacy API to another part of the book

There's a chapter for the legacy APIs. Move the frontend DVBv3
API to it, and update the chapter's introduction accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: pixfmt-srggb12p.rst: better format the table for PDF output
Mauro Carvalho Chehab [Mon, 4 Sep 2017 20:37:30 +0000 (16:37 -0400)]
media: pixfmt-srggb12p.rst: better format the table for PDF output

Adjust the table to be better displayed on PDF output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: docs-rst: media: Don't use \small for V4L2_PIX_FMT_SRGGB10 documentation
Sakari Ailus [Sun, 3 Sep 2017 20:12:33 +0000 (16:12 -0400)]
media: docs-rst: media: Don't use \small for V4L2_PIX_FMT_SRGGB10 documentation

There appears to be an issue in using \small in certain cases on Sphinx
1.4 and 1.5. Other format documents don't use \small either, remove it
from here as well.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
[mchehab@s-opensource.com: kept tabularcolumns - readjusted - and
 add a few blank lines for it to display better]
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: index.rst: don't write "Contents:" on PDF output
Mauro Carvalho Chehab [Sun, 3 Sep 2017 18:39:51 +0000 (14:39 -0400)]
media: index.rst: don't write "Contents:" on PDF output

Right now, Sphinx unconditionally creates a blank page with
just "Contents:" on it, on PDF output. While this makes sense
for html, it doesn't o PDF, as LaTeX does what's required
automatically.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: pixfmt*.rst: replace a two dots by a comma
Mauro Carvalho Chehab [Sun, 3 Sep 2017 11:04:33 +0000 (07:04 -0400)]
media: pixfmt*.rst: replace a two dots by a comma

On several tables, the color sample location table preamble is
written as:
Color Sample Location..
Instead of:
Color Sample Location:

I suspect that the repetition of such pattern was due to some
copy-and-paste (or perhaps some error during DocBook conversion).

Anyway, fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: vidioc-g-fmt.rst: adjust table format
Mauro Carvalho Chehab [Sun, 3 Sep 2017 09:46:06 +0000 (05:46 -0400)]
media: vidioc-g-fmt.rst: adjust table format

While doing a visual inspection with Sphinx 1.5, I noticed that
one of the columns was smaller than the text written there.

As this is the only thing I noticed with Sphinx 1.5, I suspect
that this was also a problem with Sphinx 1.4. Yet, I opted to
touch it in a way that wouldn't cause backward issues.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: vivid.rst: add a blank line to correct ReST format
Mauro Carvalho Chehab [Sun, 3 Sep 2017 09:44:19 +0000 (05:44 -0400)]
media: vivid.rst: add a blank line to correct ReST format

On all vivid parameters, there's an space after the parameter,
except for "DV Timings Signal Mode". That makes this single one
to be written in bold, and, at PDF output, at the same line as
its description.

Use the same convention as the other parameters, in order to
adjust its output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: v4l2 uapi book: get rid of driver programming's chapter
Mauro Carvalho Chehab [Sun, 3 Sep 2017 09:13:22 +0000 (05:13 -0400)]
media: v4l2 uapi book: get rid of driver programming's chapter

It doesn't make any sense having a driver programming's chapter
at the uAPI book, as this is related to kernel API. Also,
we now have such kAPI book where V4L2 driver programming is covered.

So, get rid of this left-over.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: format.rst: use the right markup for important notes
Mauro Carvalho Chehab [Sun, 3 Sep 2017 09:10:44 +0000 (05:10 -0400)]
media: format.rst: use the right markup for important notes

There's an important note there, but it is not using the
ReST markup. So, it doesn't get any visual highlight on
the output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: docs-rst: cardlists: change their format to flat-tables
Mauro Carvalho Chehab [Sun, 3 Sep 2017 02:08:13 +0000 (22:08 -0400)]
media: docs-rst: cardlists: change their format to flat-tables

Most tables there don't fit on 80 columns. Some are very big.

While those tables are actually generated via scripts, every
time a new board is added, the entire table could be reformatted.
>From the diffstat PoV, that's bad, as it is hard to see what
happened.

One such example is at changeset 4868f6e1fce6 ("media:
em28xx-cardlist.rst: update to reflect last changes"):

The USB ID for "Plextor ConvertX PX-AV100U" was added to card
number 9, with caused the entire table to be reformatted.

So, instead, use flat-tables. While here, fix PDF output,
by adding tablecolumns to the tables that need it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: em28xx-cardlist.rst: update to reflect last changes
Mauro Carvalho Chehab [Sun, 3 Sep 2017 02:07:20 +0000 (22:07 -0400)]
media: em28xx-cardlist.rst: update to reflect last changes

There were some new board additions. Update the cardlist
accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: v4l2-event.rst: adjust table to fit on PDF output
Mauro Carvalho Chehab [Sun, 3 Sep 2017 01:28:51 +0000 (21:28 -0400)]
media: v4l2-event.rst: adjust table to fit on PDF output

The tables there don't quite fit on PDF output.

Adjust it by adding a tabularcolumns macro.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: docs: don't show ToC for each part on PDF output
Mauro Carvalho Chehab [Sun, 3 Sep 2017 00:25:36 +0000 (20:25 -0400)]
media: docs: don't show ToC for each part on PDF output

The "Table of Contents" of a PDF file is generated only once,
at the beginning fo the output. It doesn't produce it on
each part.

So, don't output this text on each part of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: cec uapi: Adjust table sizes for PDF output
Mauro Carvalho Chehab [Sun, 3 Sep 2017 00:02:42 +0000 (20:02 -0400)]
media: cec uapi: Adjust table sizes for PDF output

Several tables at this media book chapter have issues
when PDF is produced. Adjust them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: mc uapi: adjust some table sizes for PDF output
Mauro Carvalho Chehab [Sat, 2 Sep 2017 23:29:53 +0000 (19:29 -0400)]
media: mc uapi: adjust some table sizes for PDF output

Some cells are too small to fit the text written to it.

Increase it. No text changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: rc-sysfs-nodes.rst: better use literals
Mauro Carvalho Chehab [Sat, 2 Sep 2017 22:59:25 +0000 (18:59 -0400)]
media: rc-sysfs-nodes.rst: better use literals

A literal box provides a better visual when pdf and html output
is generated for things like the output of a sysfs devnode.
It alsod matches other conventions used within the media book.

So, use it.

While here, use literals for protocol names.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: docs: fix PDF build with Sphinx 1.4
Mauro Carvalho Chehab [Sat, 2 Sep 2017 21:46:52 +0000 (17:46 -0400)]
media: docs: fix PDF build with Sphinx 1.4

Commit 70b074df4ed1 ("media: fix pdf build with Spinx 1.6") caused
a regression at Sphinx 1.4 PDF build: although it produces a full
document in batch mode, it returns errors on interactive mode:

[63]
Runaway argument?
{\relax
! Paragraph ended before \multicolumn was complete.
<to be read again>
                   \par
l.7703 \hline\end{tabulary}

The error seems to be due to some bug at Sphinx PDF output:
when multicolumns is used, it doesn't accept an empty string.

Just removing the :cpan:`1` and replacing by two empty
columns fix the issue.

Fixes: 70b074df4ed1 ("media: fix pdf build with Spinx 1.6")

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: v4l uAPI docs: adjust some tables for PDF output
Mauro Carvalho Chehab [Sat, 2 Sep 2017 20:50:45 +0000 (16:50 -0400)]
media: v4l uAPI docs: adjust some tables for PDF output

On tests with Spinx 1.4, some tables are still writing text
outside cells. Adjust those tables.

PS.: As this was revisited several times, I suspect that this
will only be fully fixed if we add tabularcolumns to all tables
at the V4L2 part of the book.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: vidioc-g-tuner.rst: Fix table number of cols
Mauro Carvalho Chehab [Sat, 2 Sep 2017 20:48:28 +0000 (16:48 -0400)]
media: vidioc-g-tuner.rst: Fix table number of cols

The Tuner Audio Matrix table is broken: the first row has 7
columns instead of 6, causing it to be parsed wrong and displayed
very badly on PDF output.

Fix it and adjust the table to look nice at PDF output

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: vidioc-querycap: use a more realistic value for KERNEL_VERSION
Mauro Carvalho Chehab [Sat, 2 Sep 2017 20:32:15 +0000 (16:32 -0400)]
media: vidioc-querycap: use a more realistic value for KERNEL_VERSION

In the past, V4L2 versions were 0.x.y, but that changed years
ago. Since Kernel 3.1, however, the numbering schema was changed
to match the Kernel version.

However, the presented example still uses the old numerating
schema, with is a misleading information.

So, update it to the new schema.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: v4l uAPI: add descriptions for arguments to all ioctls
Mauro Carvalho Chehab [Sat, 2 Sep 2017 13:54:48 +0000 (09:54 -0400)]
media: v4l uAPI: add descriptions for arguments to all ioctls

Several ioctls are missing descriptions for the third argument
of the ioctl() command. They should have a description, as
otherwise the output won't be ok, and will sound like something
is missing.

So, add them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca.h: document ca_msg and the corresponding ioctls
Mauro Carvalho Chehab [Mon, 4 Sep 2017 12:03:40 +0000 (08:03 -0400)]
media: ca.h: document ca_msg and the corresponding ioctls

Usually, CA messages are sent/received via reading/writing at
the CA device node. However, two drivers (dst_ca and firedtv-ci)
also implement it via ioctls.

Apparently, on both cases, the net result is the same.

Anyway, let's document it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca docs: document CA_SET_DESCR ioctl and structs
Mauro Carvalho Chehab [Mon, 4 Sep 2017 00:50:17 +0000 (20:50 -0400)]
media: ca docs: document CA_SET_DESCR ioctl and structs

The av7110 driver uses CA_SET_DESCR to store the descrambler
control words at the CA descrambler slots.

Document it.

Thanks-to: Honza Petrouš <jpetrous@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: net.h: add kernel-doc and use it at Documentation/
Mauro Carvalho Chehab [Fri, 1 Sep 2017 19:45:47 +0000 (15:45 -0400)]
media: net.h: add kernel-doc and use it at Documentation/

As we did with frontend.h, ca.h and dmx.h, move the struct
definition to net.h.

That should help to keep it updated, as more stuff gets
added there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: frontend.h: Avoid the term DVB when doesn't refer to a delivery system
Mauro Carvalho Chehab [Fri, 1 Sep 2017 19:05:28 +0000 (15:05 -0400)]
media: frontend.h: Avoid the term DVB when doesn't refer to a delivery system

The DVB term can either refer to the subsystem or to a delivery
system. Avoid it in the first case at the kernel-doc markups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: intro.rst: don't assume audio and video codecs to be MPEG2
Mauro Carvalho Chehab [Fri, 1 Sep 2017 18:44:31 +0000 (14:44 -0400)]
media: intro.rst: don't assume audio and video codecs to be MPEG2

Originally, when DVB was introduced, all codecs would be part of
MPEG2 standard. That's not true anymore, as there are a large
number of codec standards used on digital TV nowadays.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvbstb.svg: use dots for the optional parts of the hardware
Mauro Carvalho Chehab [Fri, 1 Sep 2017 18:14:48 +0000 (14:14 -0400)]
media: dvbstb.svg: use dots for the optional parts of the hardware

The hardware description mentions that some parts are optional.
Make it clearer at the drawing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dmx-get-pes-pids.rst: document the ioctl
Mauro Carvalho Chehab [Fri, 1 Sep 2017 17:44:28 +0000 (13:44 -0400)]
media: dmx-get-pes-pids.rst: document the ioctl

This ioctl is supported by the DVB core, but was never
documented.

Add a documentation for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb uAPI docs: minor editorial changes
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:21:49 +0000 (12:21 -0400)]
media: dvb uAPI docs: minor editorial changes

Do minor editorial changes to improve documentation readability:

- mark literals as such;
- add table markups to hint sizes;
- define what PES means;
- instead of hardcoding devnode numbers to zero (like adapter0/) use a
  question mark, to indicate that multiple devnodes may exist;
- add cross-references where useful.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvbapi.rst: add an entry to DVB revision history
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:32:44 +0000 (12:32 -0400)]
media: dvbapi.rst: add an entry to DVB revision history

There are several missing items at the API history. Yet,
as we're doing a significant change there, add a new entry.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb-frontend-parameters.rst: fix the name of a struct
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:31:43 +0000 (12:31 -0400)]
media: dvb-frontend-parameters.rst: fix the name of a struct

The struct that contains an union of DVB parameters is
called dvb_frontend_parameters (and not FrontendParameters).

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dmx-fread.rst: specify how DMX_CHECK_CRC works
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:30:16 +0000 (12:30 -0400)]
media: dmx-fread.rst: specify how DMX_CHECK_CRC works

In the past, the documentation used to say that, if a CRC error
was found, a "-ECRC" error would be returned. That's not true:
the DVB core will just silently ignore such errors.

So, add an explicit note about that.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb uAPI docs: Prefer use "Digital TV instead of "DVB"
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:28:16 +0000 (12:28 -0400)]
media: dvb uAPI docs: Prefer use "Digital TV instead of "DVB"

The usage of the term "DVB" at the dvb API docs is confusing,
as, right now, it can refer to either the European digital TV
standard or to the subsystem.

So, prefer calling it as "Digital TV" on most places, to avoid
ambiguity.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca-fopen.rst: Fixes the device node name for CA
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:23:17 +0000 (12:23 -0400)]
media: ca-fopen.rst: Fixes the device node name for CA

The device node name for CA is wrong since ever. I suspect
that the name there was before DVBv3 (with was the first API
introduced at the Kernel).

Anyway, use the right name there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb uAPI docs: adjust return value ioctl descriptions
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:15:43 +0000 (12:15 -0400)]
media: dvb uAPI docs: adjust return value ioctl descriptions

There are several issues on the return value for ioctls:

- Text is confusing;
- Some error codes don't exist;
- The non-generic error codes should come before the text
  that points to the generic error codes;
- Tables don't contain column size hints;
- Some references are not marked as such.

Correct them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: gen-errors.rst: document ENXIO error code
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:20:12 +0000 (12:20 -0400)]
media: gen-errors.rst: document ENXIO error code

This error can be produced at least at the DVB subsystem.

As it is generic enough, document it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: gen-errors.rst: remove row number comments
Mauro Carvalho Chehab [Fri, 1 Sep 2017 16:19:17 +0000 (12:19 -0400)]
media: gen-errors.rst: remove row number comments

Those are introduced by the conversion scripts and don't
really help. Get rid of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb uapi docs: better organize header files
Mauro Carvalho Chehab [Fri, 1 Sep 2017 14:02:23 +0000 (10:02 -0400)]
media: dvb uapi docs: better organize header files

Instead of having one chapter per file, place all of them at
the same chapter. That better organize the chapters at the uAPI
documentation.

As a side effect, now all uAPI headers are at the same page,
at the html output, with makes easier to use it as a reference
index for the spec.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dst_ca: remove CA_SET_DESCR boilerplate
Mauro Carvalho Chehab [Fri, 1 Sep 2017 13:18:02 +0000 (09:18 -0400)]
media: dst_ca: remove CA_SET_DESCR boilerplate

This ioctl is not implemented at dst_ca driver. There's just
a boilerplate code there. Remove it, as it is unlikely that
anyone would implement it those days.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb rst: identify the documentation gap at the API
Mauro Carvalho Chehab [Fri, 1 Sep 2017 12:53:11 +0000 (08:53 -0400)]
media: dvb rst: identify the documentation gap at the API

Now that DVB spec is almost in sync, document what's missing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb CA docs: place undocumented data together with ioctls
Mauro Carvalho Chehab [Fri, 1 Sep 2017 12:45:28 +0000 (08:45 -0400)]
media: dvb CA docs: place undocumented data together with ioctls

Right now, the same undocumented structs are on two places:
at ca_data_types.rst and together with their ioctls.

Move them to just one place and use the standard way to
represent them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca-get-descr-info.rst: document this ioctl
Mauro Carvalho Chehab [Fri, 1 Sep 2017 12:39:43 +0000 (08:39 -0400)]
media: ca-get-descr-info.rst: document this ioctl

Instead of a generic boilerplate, fill it with relevant
information about this ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca-get-slot-info.rst: document this ioctl
Mauro Carvalho Chehab [Fri, 1 Sep 2017 12:32:56 +0000 (08:32 -0400)]
media: ca-get-slot-info.rst: document this ioctl

Instead of a generic boilerplate, fill it with relevant
information about this ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca-get-cap.rst: document this ioctl
Mauro Carvalho Chehab [Fri, 1 Sep 2017 12:07:46 +0000 (08:07 -0400)]
media: ca-get-cap.rst: document this ioctl

Instead of a generic boilerplate, fill it with relevant
information about this ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca-reset.rst: add some description to this ioctl
Mauro Carvalho Chehab [Fri, 1 Sep 2017 11:59:59 +0000 (07:59 -0400)]
media: ca-reset.rst: add some description to this ioctl

While we don't have any documentation for it, based on what's
there at Kaffeine and VDR, it seems that this command should
be issued before start using CA. So, document it as such.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dst_ca: return a proper error code from CA errors
Mauro Carvalho Chehab [Fri, 1 Sep 2017 12:21:04 +0000 (08:21 -0400)]
media: dst_ca: return a proper error code from CA errors

Right now, on several places, the driver is returning a
"-1" error to userspace, instead of a proper error code.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca.h: document most CA data types
Mauro Carvalho Chehab [Fri, 1 Sep 2017 11:48:02 +0000 (07:48 -0400)]
media: ca.h: document most CA data types

For most of the stuff there, documenting is easy, as the
header file contains information.

Yet, I was unable to document two data structs:
ca_msg and ca_descr

As those two structs are used by a few drivers, keep them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca.h: get rid of CA_SET_PID
Mauro Carvalho Chehab [Fri, 1 Sep 2017 11:41:49 +0000 (07:41 -0400)]
media: ca.h: get rid of CA_SET_PID

This ioctl seems to be some attempt to support a feature
at the bt8xx dst_ca driver. Yet, as said there, it
"needs more work". Right now, the code there is just
a boilerplate.

At the end of the day, no driver uses this ioctl, nor it is
documented anywhere (except for "needs more work").

So, get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: net.rst: Fix the level of a section of the net chapter
Mauro Carvalho Chehab [Thu, 31 Aug 2017 23:34:02 +0000 (19:34 -0400)]
media: net.rst: Fix the level of a section of the net chapter

Due to a mistake, the DVB net chapter was actually broken
into two different chapters. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dmx.h: add kernel-doc markups and use it at Documentation/
Mauro Carvalho Chehab [Thu, 31 Aug 2017 16:28:52 +0000 (12:28 -0400)]
media: dmx.h: add kernel-doc markups and use it at Documentation/

The demux documentation is pretty poor nowadays: most of the
structs and enums aren't documented at all.

Add proper kernel-doc markups for them and use it.

Now, the demux API data structures are fully documented :-)

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dmx.h: get rid of GET_DMX_EVENT
Mauro Carvalho Chehab [Thu, 31 Aug 2017 23:09:06 +0000 (19:09 -0400)]
media: dmx.h: get rid of GET_DMX_EVENT

This seems to be a pure fictional API :-)

It only exists at the DVB book, with no code implemeting it.

So, just get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dmx.h: get rid of DMX_SET_SOURCE
Mauro Carvalho Chehab [Thu, 31 Aug 2017 18:21:43 +0000 (14:21 -0400)]
media: dmx.h: get rid of DMX_SET_SOURCE

No driver uses this ioctl, nor it is documented anywhere.

So, get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dmx.h: get rid of DMX_GET_CAPS
Mauro Carvalho Chehab [Thu, 31 Aug 2017 18:11:34 +0000 (14:11 -0400)]
media: dmx.h: get rid of DMX_GET_CAPS

There's no driver currently using it; it is also not
documented about what it would be supposed to do.

So, get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dmx.h: get rid of unused DMX_KERNEL_CLIENT
Mauro Carvalho Chehab [Thu, 31 Aug 2017 16:52:45 +0000 (12:52 -0400)]
media: dmx.h: get rid of unused DMX_KERNEL_CLIENT

There's a flag defined for Digital TV demux that is not used
anywhere, called DMX_KERNEL_CLIENT. Get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: fe_property_parameters.rst: better document bandwidth
Mauro Carvalho Chehab [Thu, 31 Aug 2017 11:17:21 +0000 (07:17 -0400)]
media: fe_property_parameters.rst: better document bandwidth

Use a table to document the supported bandwidths. That makes
it clearer to readers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: fe_property_parameters.rst: better define properties usage
Mauro Carvalho Chehab [Thu, 31 Aug 2017 11:16:17 +0000 (07:16 -0400)]
media: fe_property_parameters.rst: better define properties usage

Several frontend properties are specific to a subset of the
delivery systems. Make it clearer when describing each
property.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb frontend docs: use kernel-doc documentation
Mauro Carvalho Chehab [Wed, 30 Aug 2017 17:45:20 +0000 (13:45 -0400)]
media: dvb frontend docs: use kernel-doc documentation

Now that frontend.h contains most documentation for the frontend,
remove the duplicated information from Documentation/ and use the
kernel-doc auto-generated one instead.

That should simplify maintainership of DVB frontend uAPI, as most
of the documentation will stick with the header file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb/frontend.h: document the uAPI file
Mauro Carvalho Chehab [Wed, 30 Aug 2017 12:12:38 +0000 (08:12 -0400)]
media: dvb/frontend.h: document the uAPI file

Most of the stuff at the Digital TV frontend header file
are documented only at the Documentation. However, a few
kernel-doc markups are there, several of them with parsing
issues.

Add the missing documentation, copying definitions from the
Documentation when it applies, fixing some bugs.

Please notice that DVBv3 stuff that were deprecated weren't
commented by purpose. Instead, they were clearly tagged as
such.

This patch prepares to move part of the documentation from
Documentation/ to kernel-doc comments.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb/frontend.h: move out a private internal structure
Mauro Carvalho Chehab [Wed, 30 Aug 2017 11:55:47 +0000 (07:55 -0400)]
media: dvb/frontend.h: move out a private internal structure

struct dtv_cmds_h is just an ancillary struct used by the
dvb_frontend.c to internally store frontend commands.

It doesn't belong to the userspace header, nor it is used anywhere,
except inside the DVB core. So, remove it from the header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb/intro: adjust the notices about optional hardware
Mauro Carvalho Chehab [Wed, 30 Aug 2017 09:25:20 +0000 (05:25 -0400)]
media: dvb/intro: adjust the notices about optional hardware

Both CA and decoders are optional. Also, the presence or
absence has nothing to do on being a PCI card or not.

Nowadays, most hardware leaves the decoders to either the
GPU or to some ISP inside the SoC, instead of implementing
it inside the Digital TV part of the device.

So, change the wording to reflect the hardware changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb/intro: update the history part of the document
Mauro Carvalho Chehab [Wed, 30 Aug 2017 09:20:45 +0000 (05:20 -0400)]
media: dvb/intro: update the history part of the document

Convergence doesn't exist anymore. The community itself maintains
the spec. Update accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb/intro: update references for TV standards
Mauro Carvalho Chehab [Wed, 30 Aug 2017 09:19:25 +0000 (05:19 -0400)]
media: dvb/intro: update references for TV standards

The references there are only for DVB. Add missing references for
ATSC and ISDB standards.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb/intro: use the term Digital TV to refer to the system
Mauro Carvalho Chehab [Wed, 30 Aug 2017 09:15:40 +0000 (05:15 -0400)]
media: dvb/intro: use the term Digital TV to refer to the system

On several places at the introduction, a digital TV board and its
kernel support is called as DVB. The reason is simple: by the
time the document was written, there were no other digital TV
standards :-)

Modernize the specs by referring to them as Digital TV.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dmx.h: split typedefs from structs
Mauro Carvalho Chehab [Fri, 1 Sep 2017 10:09:14 +0000 (06:09 -0400)]
media: dmx.h: split typedefs from structs

Using typedefs inside the Kernel is against CodingStyle, and
there's no good usage here.

Just like we did at frontend.h, at commit 0df289a209e0
("[media] dvb: Get rid of typedev usage for enums"), let's keep
those typedefs only to provide userspace backward compatibility.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: ca.h: split typedefs from structs
Mauro Carvalho Chehab [Fri, 1 Sep 2017 09:43:39 +0000 (05:43 -0400)]
media: ca.h: split typedefs from structs

Using typedefs inside the Kernel is against CodingStyle, and
there's no good usage here.

Just like we did at frontend.h, at commit 0df289a209e0 ("[media] dvb:
Get rid of typedev usage for enums"), let's keep those typedefs only
to provide userspace backward compatibility.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: serial_ir: fix tx timing calculation on 32-bit
Sean Young [Wed, 23 Aug 2017 15:06:04 +0000 (11:06 -0400)]
media: serial_ir: fix tx timing calculation on 32-bit

Move the calculation to where it is needed, so the result doesn't
need to be stored in the device struct.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: rc: gpio-ir-tx: use ktime accessor functions
Sean Young [Fri, 25 Aug 2017 14:45:47 +0000 (10:45 -0400)]
media: rc: gpio-ir-tx: use ktime accessor functions

Prefer using accessor functions so we are not dependent on the ktime_t
type.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: rc: use ktime accessor functions
Jasmin Jessich [Fri, 25 Aug 2017 09:59:41 +0000 (05:59 -0400)]
media: rc: use ktime accessor functions

Prefer using accessor functions so we are not dependent on the ktime_t
type.

Signed-off-by: Jasmin Jessich <jasmin@anw.at>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: max2175: Propagate the real error on devm_clk_get() failure
Fabio Estevam [Sun, 27 Aug 2017 16:30:35 +0000 (12:30 -0400)]
media: max2175: Propagate the real error on devm_clk_get() failure

When devm_clk_get() fails we should return the real error code
instead of always returning -ENODEV.

This allows defer probe to happen in the case the clock provider has
not been enabled by the time max2175 driver gets probed.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: cx23885: Explicitly list Hauppauge model numbers of HVR-4400 and HVR-5500
Matthias Schwarzott [Sun, 27 Aug 2017 12:26:07 +0000 (08:26 -0400)]
media: cx23885: Explicitly list Hauppauge model numbers of HVR-4400 and HVR-5500

Add two new model numbers to suppress this message in kernel log:
  cx23885: cx23885[0]: warning: unknown hauppauge model #121029

Add these model numbers:
* Model 121019 - WinTV-HVR4400
* Model 121029 - WinTV-HVR5500

For WinTV-HVR4400 the documentation and my hardware differ:

Documentation says it supports DVB-S/S2 and DVB-T,
but my hardware also supports DVB-C.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: i2c: adv748x: Export I2C device table entries as module aliases
Javier Martinez Canillas [Wed, 9 Aug 2017 09:37:30 +0000 (05:37 -0400)]
media: i2c: adv748x: Export I2C device table entries as module aliases

The I2C core always reports a MODALIAS of the form i2c:<foo> even if the
device was registered via OF, and the driver is only exporting the OF ID
table entries as module aliases.

So if the driver is built as module, autoload won't work since udev/kmod
won't be able to match the registered OF device with its driver module.

Before this patch:

$ modinfo drivers/media/i2c/adv748x/adv748x.ko | grep alias
alias:          of:N*T*Cadi,adv7482C*
alias:          of:N*T*Cadi,adv7482
alias:          of:N*T*Cadi,adv7481C*
alias:          of:N*T*Cadi,adv7481

After this patch:

modinfo drivers/media/i2c/adv748x/adv748x.ko | grep alias
alias:          of:N*T*Cadi,adv7482C*
alias:          of:N*T*Cadi,adv7482
alias:          of:N*T*Cadi,adv7481C*
alias:          of:N*T*Cadi,adv7481
alias:          i2c:adv7482
alias:          i2c:adv7481

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: staging/imx: always select VIDEOBUF2_DMA_CONTIG
Arnd Bergmann [Mon, 7 Aug 2017 10:49:18 +0000 (06:49 -0400)]
media: staging/imx: always select VIDEOBUF2_DMA_CONTIG

I ran into a rare build error during randconfig testing:

drivers/staging/media/imx/imx-media-capture.o: In function `capture_stop_streaming':
imx-media-capture.c:(.text+0x224): undefined reference to `vb2_buffer_done'
drivers/staging/media/imx/imx-media-capture.o: In function `imx_media_capture_device_register':
imx-media-capture.c:(.text+0xe60): undefined reference to `vb2_queue_init'
imx-media-capture.c:(.text+0xfa0): undefined reference to `vb2_dma_contig_memops'

While VIDEOBUF2_DMA_CONTIG was already selected by the camera driver,
it wasn't necessarily there with just the base driver enabled.
This moves the 'select' statement to the top-level option to make
sure it's always available.

Fixes: 64b5a49df486 ("[media] media: imx: Add Capture Device Interface")

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dw2102: make dvb_usb_device_description structures const
Bhumika Goyal [Thu, 3 Aug 2017 10:00:32 +0000 (06:00 -0400)]
media: dw2102: make dvb_usb_device_description structures const

dvb_usb_device_description structures are only used during a copy
operation. Therefore, declare them as const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: mn88473: reset stream ID reg if no PLP given
Olli Salonen [Sun, 30 Jul 2017 12:34:49 +0000 (08:34 -0400)]
media: mn88473: reset stream ID reg if no PLP given

If the PLP given is NO_STREAM_ID_FILTER (~0u) don't try to set that into the PLP register. Set PLP to 0 instead.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: mn88472: reset stream ID reg if no PLP given
Olli Salonen [Sun, 30 Jul 2017 12:34:48 +0000 (08:34 -0400)]
media: mn88472: reset stream ID reg if no PLP given

If the PLP given is NO_STREAM_ID_FILTER (~0u) don't try to set that into the PLP register. Set PLP to 0 instead.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb_frontend: initialize variable s with FE_NONE instead of 0
Colin Ian King [Fri, 21 Jul 2017 16:01:00 +0000 (12:01 -0400)]
media: dvb_frontend: initialize variable s with FE_NONE instead of 0

GIT_AUTHOR_NAME=Colin King
GIT_AUTHOR_EMAIL=colin.king@canonical.com

In a previous commit, we added FE_NONE as an unknown fe_status.
Initialize variable s to FE_NONE instead of the more opaque value 0.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: docs-next: update the fe_status documentation for FE_NONE
Colin Ian King [Fri, 21 Jul 2017 16:12:38 +0000 (12:12 -0400)]
media: docs-next: update the fe_status documentation for FE_NONE

Recently added FE_NONE to the enum fe_status, so update the
documentation accordingly.

[mchehab@s-opensource.com: change description to actually
 reflect what FE_NONE means: no lock of any kind]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb_frontend: ensure that inital front end status initialized
Colin Ian King [Thu, 20 Jul 2017 22:12:07 +0000 (18:12 -0400)]
media: dvb_frontend: ensure that inital front end status initialized

The fe_status variable s is not initialized meaning it can have any
random garbage status.  This could be problematic if fe->ops.tune is
false as s is not updated by the call to fe->ops.tune() and a
subsequent check on the change status will using a garbage value.
Fix this by adding FE_NONE to the enum fe_status and initializing
s to this.

Detected by CoverityScan, CID#112887 ("Uninitialized scalar variable")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvbproperty.rst: minor editorial changes
Mauro Carvalho Chehab [Sat, 26 Aug 2017 10:07:14 +0000 (06:07 -0400)]
media: dvbproperty.rst: minor editorial changes

Do some minor editorial changes to make this chapter visually
better, and the example a little bit clearer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvbproperty.rst: improve notes about legacy frontend calls
Mauro Carvalho Chehab [Sat, 26 Aug 2017 10:07:13 +0000 (06:07 -0400)]
media: dvbproperty.rst: improve notes about legacy frontend calls

The description of the DVBv5 API was written a long time ago,
where the API was still new, and there were not apps using it.

Now that the API is stable and used by new applications, clarify
that DVBv3 calls should not be used and why.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: frontend.rst: mention MMT at the documentation
Mauro Carvalho Chehab [Sat, 26 Aug 2017 10:07:12 +0000 (06:07 -0400)]
media: frontend.rst: mention MMT at the documentation

The ATSC 3.0 uses MPEG Media Transport, with is not currently
supported. Yet, we'll need to implement it sooner or later.
So, mention about it at the specs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: frontend.rst: convert SEC note into footnote
Mauro Carvalho Chehab [Sat, 26 Aug 2017 10:07:11 +0000 (06:07 -0400)]
media: frontend.rst: convert SEC note into footnote

The description of what SEC means fits well as a footnote.
That makes the need of saying that SEC is only for Satellite
when it was mentioned, as the footnote already says that.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: frontend.rst: fix supported delivery systems
Mauro Carvalho Chehab [Sat, 26 Aug 2017 10:07:10 +0000 (06:07 -0400)]
media: frontend.rst: fix supported delivery systems

The introduction for the frontend chapter is not quite
correct:
  - it tells that it supports only three types of
    delivery systems, in opposite to three *groups*;
  - It adds ISDB-C to the list of supported systems,
    but, this is not true.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dvb/intro.rst: Use verbatim font where needed
Mauro Carvalho Chehab [Sat, 26 Aug 2017 10:07:09 +0000 (06:07 -0400)]
media: dvb/intro.rst: Use verbatim font where needed

The device numbering for DVB uses "M" and "N" as vars for the
number of the device, but sometimes this is printed using normal
font instead of verbatim.

While here, remove an extra space after quotation marks.

This is a minor cleanup with no changes at the text.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: usbvision: Improve a size determination in usbvision_alloc()
Markus Elfring [Sat, 26 Aug 2017 20:22:13 +0000 (16:22 -0400)]
media: usbvision: Improve a size determination in usbvision_alloc()

Replace the specification of a data structure by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer according to the Linux coding style convention.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: usbvision: Adjust eight checks for null pointers
Markus Elfring [Sat, 26 Aug 2017 20:16:52 +0000 (16:16 -0400)]
media: usbvision: Adjust eight checks for null pointers

The script “checkpatch.pl” pointed information out like the following.

Comparison to NULL could be written !…

Thus fix the affected source code places.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: usbvision: Delete an error message for a failed memory allocation in usbvision...
Markus Elfring [Sat, 26 Aug 2017 20:06:05 +0000 (16:06 -0400)]
media: usbvision: Delete an error message for a failed memory allocation in usbvision_probe()

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: Staging: media: radio-bcm2048: make video_device const
Bhumika Goyal [Sat, 26 Aug 2017 11:32:53 +0000 (07:32 -0400)]
media: Staging: media: radio-bcm2048: make video_device const

Make this const as it is only used in a copy operation.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: radio: make video_device const
Bhumika Goyal [Sat, 26 Aug 2017 08:43:43 +0000 (04:43 -0400)]
media: radio: make video_device const

Make these const as they are only used in a copy operation.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dib8000: remove some bogus dead code
Dan Carpenter [Sat, 26 Aug 2017 06:18:41 +0000 (02:18 -0400)]
media: dib8000: remove some bogus dead code

This function is broken.  It sets the wrong front_end to NULL.  But it's
not used, so let's just delete it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: dib9000: delete some unused broken code
Dan Carpenter [Sat, 26 Aug 2017 06:18:16 +0000 (02:18 -0400)]
media: dib9000: delete some unused broken code

The dib9000_remove_slave_frontend() function isn't used.

I was reviewing it because my static checker claims it writes one
element beyond the end of the array.  That's a false positive.  What it
actually does is, if there are two or more front ends, then it prints a
debug message to say that it removed the first one, stored in
state->fe[1], and then it "removes" (scare quotes on purpose) the second
one, stored in state->fe[2].  Deleting a front end from the middle is
not really supported and breaks code like dib9000_release() which
assumes the first NULL front end marks the end of the list.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: staging: omap4iss: make v4l2_file_operations const
Bhumika Goyal [Sat, 26 Aug 2017 06:15:53 +0000 (02:15 -0400)]
media: staging: omap4iss: make v4l2_file_operations const

Make this const as it is only stored in a const field of a
video_device structure.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
7 years agomedia: usbtv: make v4l2_file_operations const
Bhumika Goyal [Sat, 26 Aug 2017 06:13:46 +0000 (02:13 -0400)]
media: usbtv: make v4l2_file_operations const

Make this const as it is only stored in a const field of a
video_device structure.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>