GitHub/moto-9609/android_kernel_motorola_exynos9610.git
8 years ago[media] doc-rst: document LIRC_GET_LENGTH ioctl
Mauro Carvalho Chehab [Tue, 12 Jul 2016 09:49:06 +0000 (06:49 -0300)]
[media] doc-rst: document LIRC_GET_LENGTH ioctl

Put documentation for this ioctl on its own page.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: document LIRC_GET_*_TIMEOUT ioctls
Mauro Carvalho Chehab [Mon, 11 Jul 2016 11:36:29 +0000 (08:36 -0300)]
[media] doc-rst: document LIRC_GET_*_TIMEOUT ioctls

Improve the documentation for those ioctls, adding them to
a separate file, in order to look like the rest of the
book, and to later allow to generate a man page for those
ioctls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: document LIRC_SET_SEND_DUTY_CYCLE
Mauro Carvalho Chehab [Mon, 11 Jul 2016 02:27:31 +0000 (23:27 -0300)]
[media] doc-rst: document LIRC_SET_SEND_DUTY_CYCLE

Add a separate page for this ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: document LIRC_GET_REC_RESOLUTION
Mauro Carvalho Chehab [Mon, 11 Jul 2016 11:25:30 +0000 (08:25 -0300)]
[media] doc-rst: document LIRC_GET_REC_RESOLUTION

Improve the documentation for this ioctl, adding it to
a separate file, in order to look like the rest of the
book, and to later allow to generate a man page for this
ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: document ioctl LIRC_GET_REC_MODE
Mauro Carvalho Chehab [Mon, 11 Jul 2016 01:46:12 +0000 (22:46 -0300)]
[media] doc-rst: document ioctl LIRC_GET_REC_MODE

Move the documentation of this ioctl from lirc_ioctl to its
own file, and add a short description about the pulse mode
used by IR RX.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: fix some lirc cross-references
Mauro Carvalho Chehab [Tue, 12 Jul 2016 09:12:32 +0000 (06:12 -0300)]
[media] doc-rst: fix some lirc cross-references

Some references were broken. It was also mentioning LIRC_MODE_RAW,
with it is not implemented on current LIRC drivers.

So, fix the references.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: document ioctl LIRC_GET_SEND_MODE
Mauro Carvalho Chehab [Mon, 11 Jul 2016 01:35:21 +0000 (22:35 -0300)]
[media] doc-rst: document ioctl LIRC_GET_SEND_MODE

Move the documentation of this ioctl from lirc_ioctl to its
own file, and add a short description about the pulse mode
used by IR TX.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: Fix LIRC_GET_FEATURES references
Mauro Carvalho Chehab [Mon, 11 Jul 2016 14:46:57 +0000 (11:46 -0300)]
[media] doc-rst: Fix LIRC_GET_FEATURES references

The references pointed by LIRC_GET_FEATURES ioctl are broken.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: remove not used ioctls from documentation
Mauro Carvalho Chehab [Mon, 11 Jul 2016 13:27:32 +0000 (10:27 -0300)]
[media] doc-rst: remove not used ioctls from documentation

As we removed those ioctls from the header file, do the
same at the documentation side.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] lirc.h: remove several unused ioctls
Mauro Carvalho Chehab [Mon, 11 Jul 2016 12:45:32 +0000 (09:45 -0300)]
[media] lirc.h: remove several unused ioctls

While reviewing the documentation gaps on LIRC, it was
noticed that several ioctls aren't used by any LIRC drivers
(nor at staging or mainstream).

It doesn't make sense to document them, as they're not used
anywhere. So, let's remove those from the lirc header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: add media/uapi/rc/lirc-header.rst
Mauro Carvalho Chehab [Mon, 11 Jul 2016 13:25:00 +0000 (10:25 -0300)]
[media] doc-rst: add media/uapi/rc/lirc-header.rst

changeset 68cd5e0bed99 ("[media] doc-rst: add LIRC header to the book")
did everything but adding the lirc-reader.rst :-p

My fault: I forgot to do a git add for this guy on such
changeset.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: Document ioctl LIRC_GET_FEATURES
Mauro Carvalho Chehab [Mon, 11 Jul 2016 01:33:57 +0000 (22:33 -0300)]
[media] doc-rst: Document ioctl LIRC_GET_FEATURES

The documentation for this ioctl was really crappy.

Add a better documentation, using the lirc.4 man pages as a
reference, plus what was written originally at the lirc-ioctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: improve display of notes and warnings
Mauro Carvalho Chehab [Sun, 10 Jul 2016 14:57:43 +0000 (11:57 -0300)]
[media] doc-rst: improve display of notes and warnings

There are several notes and warning mesages in the middle of
the media docbook. Use the ReST tags for that, as it makes
them visually better and hightlights them.

While here, modify a few ones to make them clearer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: improve DTV_BANDWIDTH_HZ notes
Mauro Carvalho Chehab [Sun, 10 Jul 2016 12:48:58 +0000 (09:48 -0300)]
[media] doc-rst: improve DTV_BANDWIDTH_HZ notes

There are several notes for this DTV property. Some are
outdated, so take some care of it, making it updated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: improve documentation for DTV_FREQUENCY
Mauro Carvalho Chehab [Sun, 10 Jul 2016 12:33:26 +0000 (09:33 -0300)]
[media] doc-rst: improve documentation for DTV_FREQUENCY

Make the note better formatted and documented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: Don't use captions for examples
Mauro Carvalho Chehab [Sun, 10 Jul 2016 11:22:19 +0000 (08:22 -0300)]
[media] doc-rst: Don't use captions for examples

Unfortunately, captions are new on Sphinx for c blocks: it was
added only on version 1.3. Also, it were already bad enough
not being able to auto-numerate them.

So, let's give up and use, instead, titles before the examples.
Not much is lost, and, as a side track, we don't need to
numerate them anymore.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: do cross-references between header and the doc
Mauro Carvalho Chehab [Sun, 10 Jul 2016 10:42:58 +0000 (07:42 -0300)]
[media] doc-rst: do cross-references between header and the doc

Now that the LIRC header was added, we can cross-reference it
and identify the documentation gaps.

There are lots of stuff missing there, but at least now we
can avoid the gap to increase.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: add LIRC header to the book
Mauro Carvalho Chehab [Sun, 10 Jul 2016 10:18:52 +0000 (07:18 -0300)]
[media] doc-rst: add LIRC header to the book

Just like the other parts of the document, let's add the LIRC
header, as it is part of the API.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: improve LIRC syscall documentation
Mauro Carvalho Chehab [Sun, 10 Jul 2016 00:03:57 +0000 (21:03 -0300)]
[media] doc-rst: improve LIRC syscall documentation

The lirc syscall documentation uses a very different and
simplified way than the rest of the media book. make it
closer. Still, there's just one page for all ioctls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: rename some RC files
Mauro Carvalho Chehab [Sat, 9 Jul 2016 23:37:04 +0000 (20:37 -0300)]
[media] doc-rst: rename some RC files

Some files start with an upper letter. Also, they have big
names. rename them.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: remove an extra label on V4L2 and CEC parts
Mauro Carvalho Chehab [Sat, 9 Jul 2016 23:33:11 +0000 (20:33 -0300)]
[media] doc-rst: remove an extra label on V4L2 and CEC parts

There's no need to say: Table of Contents there. Also, this
generates a duplicated caption xref. So, remove, to use the
same format on every part.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: Group function references together for MC
Mauro Carvalho Chehab [Sat, 9 Jul 2016 22:58:33 +0000 (19:58 -0300)]
[media] doc-rst: Group function references together for MC

Just like the other parts of the media book, group the MC
functions together on one chapter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: media: reordered top sectioning
Markus Heiser [Sat, 9 Jul 2016 15:06:26 +0000 (12:06 -0300)]
[media] doc-rst: media: reordered top sectioning

Within the old section hierarchy, all doc parts has been placed under
the introduction, e.g:

* Linux Media Infrastructure API
    + Introduction
        - Video for Linux API
        - Digital TV API
        - ...

With separating the introduction sibling to the other parts
we get a more common section hierarchy:

* Linux Media Infrastructure API
    + Introduction
    + Video for Linux API
    + Digital TV API
    + ...

BTW: compacting the intro text.

This patch is on top of media_tree/docs-next

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
8 years ago[media] doc-rst: make CEC look more like other parts of the book
Mauro Carvalho Chehab [Sat, 9 Jul 2016 14:20:46 +0000 (11:20 -0300)]
[media] doc-rst: make CEC look more like other parts of the book

Better organize the contents of the CEC part, moving the
introduction to chapter 1, placing all ioctls at chapter 2
and numerating all chapters and items.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: add CEC header file to the documentation
Mauro Carvalho Chehab [Sat, 9 Jul 2016 13:25:05 +0000 (10:25 -0300)]
[media] doc-rst: add CEC header file to the documentation

Adding the header file is interesting for several reasons:

1) It makes MC documentation consistend with other parts;
2) The header file can be used as a quick index to all API
   elements;
3) The cross-reference check helps to identify symbols that
   aren't documented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agoMerge branch 'topic/cec' into topic/docs-next
Mauro Carvalho Chehab [Sat, 9 Jul 2016 13:21:36 +0000 (10:21 -0300)]
Merge branch 'topic/cec' into topic/docs-next

* topic/cec:
  [media] DocBook/media: add CEC documentation
  [media] s5p_cec: get rid of an unused var
  [media] move s5p-cec to staging
  [media] vivid: add CEC emulation
  [media] cec: s5p-cec: Add s5p-cec driver
  [media] cec: adv7511: add cec support
  [media] cec: adv7842: add cec support
  [media] cec: adv7604: add cec support
  [media] cec: add compat32 ioctl support
  [media] cec/TODO: add TODO file so we know why this is still in staging
  [media] cec: add HDMI CEC framework (api)
  [media] cec: add HDMI CEC framework (adapter)
  [media] cec: add HDMI CEC framework (core)
  [media] cec-funcs.h: static inlines to pack/unpack CEC messages
  [media] cec.h: add cec header
  [media] cec-edid: add module for EDID CEC helper functions
  [media] cec.txt: add CEC framework documentation
  [media] rc: Add HDMI CEC protocol handling
  Input: add HDMI CEC specific keycodes
  Input: add BUS_CEC type

8 years ago[media] doc-rst: add media.h header to media contrller
Mauro Carvalho Chehab [Sat, 9 Jul 2016 11:54:35 +0000 (08:54 -0300)]
[media] doc-rst: add media.h header to media contrller

Adding the header file is interesting for several reasons:

1) It makes MC documentation consistend with other parts;
2) The header file can be used as a quick index to all API
   elements;
3) The cross-reference check helps to identify symbols that
   aren't documented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: parse-headers: remove trailing spaces
Mauro Carvalho Chehab [Sat, 9 Jul 2016 12:35:34 +0000 (09:35 -0300)]
doc-rst: parse-headers: remove trailing spaces

The function that replace references add a "\ " at the end of
references, to avoid the ReST markup parser to not identify
them as references. That works fine except for the end of lines,
as a sequence of { '\', ' ', '\n' } characters makes Sphinx
to ignore the end of line. So, strip those escape/spaces at the
end of lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: Add new types to media-types.rst
Mauro Carvalho Chehab [Sat, 9 Jul 2016 11:24:32 +0000 (08:24 -0300)]
[media] doc-rst: Add new types to media-types.rst

Changesets:
eaa0b96bbb65 ("[media] media: Add video statistics computation functions")
and
1179aab13db3 ("[media] media: Add video processing entity functions")

added some new elements to the "media entity types" table at the
DocBook. We need to do the same at the reST version, in order to
keep it in sync with the DocBook version.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: reformat cec-api.rst
Mauro Carvalho Chehab [Fri, 8 Jul 2016 21:03:02 +0000 (18:03 -0300)]
[media] doc-rst: reformat cec-api.rst

Use the same format as the other parts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-dst: visually improve the CEC pages
Mauro Carvalho Chehab [Fri, 8 Jul 2016 20:59:27 +0000 (17:59 -0300)]
[media] doc-dst: visually improve the CEC pages

Adjust the widths and show error codes as constants.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: linux_tc CEC enhanced markup
Markus Heiser [Fri, 8 Jul 2016 18:55:43 +0000 (20:55 +0200)]
[media] doc-rst: linux_tc CEC enhanced markup

leaved content unchanged, only improved markup and references

* more man-like sections (add Name section)
* defined target for each stuct field description
* replace constant with ":ref:" to (field) description

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: linux_tv CEC part, DocBook to reST migration
Markus Heiser [Fri, 8 Jul 2016 18:55:42 +0000 (20:55 +0200)]
[media] doc-rst: linux_tv CEC part, DocBook to reST migration

This is the reST migration of media's CEC part.  The migration is based
on media_tree's cec branch:

 https://git.linuxtv.org/media_tree.git

 c7169ad * cec media_tree/cec [media] DocBook/media: add CEC documentation

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: fix the Z16 format definition
Mauro Carvalho Chehab [Fri, 8 Jul 2016 19:32:33 +0000 (16:32 -0300)]
[media] doc-rst: fix the Z16 format definition

Changeset 811c6d6a4243 ("[media] V4L: fix the Z16 format definition")
fixed the definition for DocBook, but we need to replicate it
also to ReST.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: mention the memory type to be set for all streaming I/O
Mauro Carvalho Chehab [Fri, 8 Jul 2016 18:47:00 +0000 (15:47 -0300)]
[media] doc-rst: mention the memory type to be set for all streaming I/O

Changeset 8c9f46095176 ("[media] DocBook: mention the memory type to
be set for all streaming I/O") updated the media DocBook to mention
the need of filling the memory types. We need to keep the ReST
doc updated to such change.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years ago[media] doc-rst: add dmabuf as streaming I/O in VIDIOC_REQBUFS description
Mauro Carvalho Chehab [Fri, 8 Jul 2016 18:39:03 +0000 (15:39 -0300)]
[media] doc-rst: add dmabuf as streaming I/O in VIDIOC_REQBUFS description

Commit 707e65831d3b("[media] DocBook: add dmabuf as streaming I/O
in VIDIOC_REQBUFS description") added DMABUF to reqbufs description,
but, as we're migrating to ReST markup, we need to keep it in sync
with the change.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc_rst: rename the media Sphinx suff to Documentation/media
Mauro Carvalho Chehab [Fri, 8 Jul 2016 14:40:06 +0000 (11:40 -0300)]
doc_rst: rename the media Sphinx suff to Documentation/media

The name of the subsystem is "media", and not "linux_tv". Also,
as we plan to add other stuff there in the future, let's
rename also the media uAPI book to media_uapi, to make it
clearer.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: remove an invalid include from the docs
Mauro Carvalho Chehab [Fri, 8 Jul 2016 12:58:00 +0000 (09:58 -0300)]
doc-rst: remove an invalid include from the docs

I suspect that this is a left over from Markus tests.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv/Makefile: Honor quiet make O=dir
Markus Heiser [Fri, 8 Jul 2016 12:15:05 +0000 (14:15 +0200)]
doc-rst: linux_tv/Makefile: Honor quiet make O=dir

To honor the:

  make O=dir [targets] Locate all output files in "dir"

* activate kernel-include directive
* export BUILDDIR=$(BUILDDIR)
* linux_tv: replace '.. include::' with '.. kernel-include:: $BUILDDIR/<foo.h.rst>'

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: add kernel-include directive
Markus Heiser [Fri, 8 Jul 2016 12:15:04 +0000 (14:15 +0200)]
doc-rst: add kernel-include directive

The kernel-include directive is needed to include the auto generated rst
content from a build (pre-) process. E.g. the linux_tv Makefile
generates intermediate reST-files from header files. Since there is a O=
option:

  make O=dir [targets] Locate all output files in "dir"

We need to include intermediate reST files from arbitrary (O=/tmp/foo)
locations:

The 'kernel-include' reST-directive is a replacement for the 'include'
directive. The 'kernel-include' directive expand environment variables
in the path name and allows to include files from arbitrary locations.

.. hint::

  Including files from arbitrary locations (e.g. from '/etc') is a
  security risk for builders. This is why the 'include' directive from
  docutils *prohibit* pathnames pointing to locations *above* the
  filesystem tree where the reST document with the include directive is
  placed.

Substrings of the form $name or ${name} are replaced by the value of
environment variable name. Malformed variable names and references to
non-existing variables are left unchanged.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: auto-generate: fixed include "output/*.h.rst" content
Markus Heiser [Fri, 8 Jul 2016 12:15:03 +0000 (14:15 +0200)]
doc-rst: auto-generate: fixed include "output/*.h.rst" content

Include auto-generate reST header files. BTW fixed linux_tv/Makefile.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv/Makefile: Honor quiet mode
Mauro Carvalho Chehab [Thu, 7 Jul 2016 12:29:48 +0000 (09:29 -0300)]
doc-rst: linux_tv/Makefile: Honor quiet mode

Cleanup the Makefile and handle the V=1 flag and make it
to work when specifying an output directory with O=dir

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: videodev2.h: add cross-references for defines
Mauro Carvalho Chehab [Fri, 8 Jul 2016 09:43:00 +0000 (06:43 -0300)]
doc-rst: videodev2.h: add cross-references for defines

Remove most of ignore stuff for defines, pointing them to the
proper tables/sections.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: document enum symbols
Mauro Carvalho Chehab [Thu, 7 Jul 2016 19:29:39 +0000 (16:29 -0300)]
doc-rst: document enum symbols

After checking that all enum fields are documented at the
corresponding table on the rst file, let's point to the
table, instead of ignore the symbols.

A few symbols are not meant to be documented, as they're
deprecated stuff. keep ignoring them.

One enum field is not documented. Either it is obsolete
or a documentation gap. So, produce warnings for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: videodev2.h: don't ignore V4L2_STD macros
Mauro Carvalho Chehab [Thu, 7 Jul 2016 19:21:17 +0000 (16:21 -0300)]
doc-rst: videodev2.h: don't ignore V4L2_STD macros

The content of those macros are all declared at the v4l2-std-id
table. So, point to it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv: Don't ignore pix formats
Mauro Carvalho Chehab [Thu, 7 Jul 2016 19:16:21 +0000 (16:16 -0300)]
doc-rst: linux_tv: Don't ignore pix formats

Now that the reference problems were solved, let's not
ignore anymore the pix formats, as all of them are already
documented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: fix some badly converted references
Mauro Carvalho Chehab [Thu, 7 Jul 2016 18:53:44 +0000 (15:53 -0300)]
doc-rst: fix some badly converted references

Several references were not converted right. That's why
so many symbols were lost when parsing videodev2.h header.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: autogenerate videodev2.h.rst file
Mauro Carvalho Chehab [Thu, 7 Jul 2016 14:05:38 +0000 (11:05 -0300)]
doc-rst: autogenerate videodev2.h.rst file

This file comes from the uAPI definitions for V4L2, with is dynamic
and updated on almost every Kernel version. So, this file
needs to be auto-updated, as otherwise the documentation will
become obsolete too early.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: parse-headers: don't do substituition references
Mauro Carvalho Chehab [Thu, 7 Jul 2016 16:04:01 +0000 (13:04 -0300)]
doc-rst: parse-headers: don't do substituition references

Add one extra escape character to avoid those warnings:
Documentation/linux_tv/videodev2.h.rst:6: WARNING: Inline substitution_reference start-string without end-string.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: parse-headers: add an option to ignore enum symbols
Mauro Carvalho Chehab [Thu, 7 Jul 2016 17:26:51 +0000 (14:26 -0300)]
doc-rst: parse-headers: add an option to ignore enum symbols

At videodev2.h, we have hundreds of symbols that don't
currently have a reference yet. Let's ignore for how, while
we don't improve those cross-refs.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: parse-headers: better handle comments at the source code
Mauro Carvalho Chehab [Thu, 7 Jul 2016 17:13:12 +0000 (14:13 -0300)]
doc-rst: parse-headers: better handle comments at the source code

We should not let comments to mangle with the symbols
parsing. Unfortunately, videodev2.h has lots of those
in the middle of enums and structs. So, we need to improve
our parser to discard them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: auto-generate video.h.rst
Mauro Carvalho Chehab [Thu, 7 Jul 2016 11:46:49 +0000 (08:46 -0300)]
doc-rst: auto-generate video.h.rst

This file comes from the uAPI definition header, and
should be auto-generated, to be in sync with Kernel changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: auto-generate net.h.rst
Mauro Carvalho Chehab [Thu, 7 Jul 2016 11:28:43 +0000 (08:28 -0300)]
doc-rst: auto-generate net.h.rst

This file comes from the uAPI definition header, and
should be auto-generated, to be in sync with Kernel changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: auto-generate ca.h.rst
Mauro Carvalho Chehab [Thu, 7 Jul 2016 10:51:03 +0000 (07:51 -0300)]
doc-rst: auto-generate ca.h.rst

This file comes from the uAPI definition header, and
should be auto-generated, to be in sync with Kernel changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: auto-generate audio.h.rst
Mauro Carvalho Chehab [Thu, 7 Jul 2016 10:42:18 +0000 (07:42 -0300)]
doc-rst: auto-generate audio.h.rst

This is an auto-generated header. Remove the hardcoded one
and do the right thing here.

NOTE: this is a deprecated API. So, we won't make any
effort to try identifying the meaning of this obscure
API that is used only on a legacy driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: auto-generate dmx.h.rst
Mauro Carvalho Chehab [Thu, 7 Jul 2016 10:11:46 +0000 (07:11 -0300)]
doc-rst: auto-generate dmx.h.rst

This file should be auto-generated from the header files,
and not hardcoded.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: parse-headers: fix multiline typedef handler
Mauro Carvalho Chehab [Thu, 7 Jul 2016 11:09:37 +0000 (08:09 -0300)]
doc-rst: parse-headers: fix multiline typedef handler

The typedef handler should do two things to be generic:
  1) parse typedef enums;
  2) accept both possible syntaxes:
 typedef struct foo { .. } foo_t;
 typedef struct { .. } foo_t;

Unfortunately, this is needed to parse some legacy DVB
files, like dvb/audio.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: parse-headers: better handle typedefs
Mauro Carvalho Chehab [Thu, 7 Jul 2016 10:20:27 +0000 (07:20 -0300)]
doc-rst: parse-headers: better handle typedefs

When typedef is used on its multiline format, we need to
also parse enum and struct in the same line.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: parse-headers: be more formal about the valid symbols
Mauro Carvalho Chehab [Thu, 7 Jul 2016 10:06:05 +0000 (07:06 -0300)]
doc-rst: parse-headers: be more formal about the valid symbols

Be more formal about the valid symbols that are expected by
the parser, to match what c language expects.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: fix parsing comments and '{' on a separate line
Mauro Carvalho Chehab [Thu, 7 Jul 2016 09:52:10 +0000 (06:52 -0300)]
doc-rst: fix parsing comments and '{' on a separate line

The dmx.h header has two things that causes the parser to
break while handling enums:
 per-header enums and the '{' starts on a new line

Both makes the parser to get lexical marks to be detected
as if they were symbols.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-dst: parse-headers: highlight deprecated comments
Mauro Carvalho Chehab [Thu, 7 Jul 2016 09:31:21 +0000 (06:31 -0300)]
doc-dst: parse-headers: highlight deprecated comments

When something is deprecated, highlight it, as we want it
to be clearer to the reader.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: parse-headers: improve delimiters to detect symbols
Mauro Carvalho Chehab [Thu, 7 Jul 2016 09:27:54 +0000 (06:27 -0300)]
doc-rst: parse-headers: improve delimiters to detect symbols

As we had to escape the symbols for the ReST markup to not do
the wrong thing, the logic to discover start/end of strings
are not trivial. Improve the end delimiter detection, in order
to highlight more occurrences of the strings.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: auto-build the frontend.h.rst
Mauro Carvalho Chehab [Thu, 7 Jul 2016 03:21:37 +0000 (00:21 -0300)]
doc-rst: auto-build the frontend.h.rst

This file is auto-generated with DocBook, from the uapi header.

Do the same with Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: add parse-headers.pl script
Mauro Carvalho Chehab [Thu, 7 Jul 2016 01:58:54 +0000 (22:58 -0300)]
doc-rst: add parse-headers.pl script

This script parses a header file and converts it into a
parsed-literal block, creating references for ioctls,
defines, typedefs, enums and structs.

It also allow an external file to modify the rules, in
order to fix the expressions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv/index: Rename the book name
Mauro Carvalho Chehab [Wed, 6 Jul 2016 11:29:00 +0000 (08:29 -0300)]
doc-rst: linux_tv/index: Rename the book name

There's no need for all caps at its name. As the book title is
now showing at the top of each page, let's use Camel Case, to
make it less bold.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: v4l2: Rename the V4L2 API title
Mauro Carvalho Chehab [Wed, 6 Jul 2016 11:22:16 +0000 (08:22 -0300)]
doc-rst: v4l2: Rename the V4L2 API title

The V4L2 is the only part of the doc that has the word "Specification"
and mentions its version on the title.

Having the version there was important in the past, while we were
getting rid of V4L version 1. But, as v1 is long gone, all it lasts
is history (with is, btw, covered on the spec). So, no need to keep
the version on its title.

So, rename it, to be more generic and look like the remaining
of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: Rename the title of the Digital TV section
Mauro Carvalho Chehab [Wed, 6 Jul 2016 11:16:07 +0000 (08:16 -0300)]
doc-rst: Rename the title of the Digital TV section

The Digital TV section is ackward for two reasons:

  1) it is the only one with everything in upper case;
  2) its name is associated with the European digital TV standard.

Rename the part name, and add a notice that it refers to what's
known as "DVB API".

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: remote_controllers: fix conversion issues
Mauro Carvalho Chehab [Wed, 6 Jul 2016 11:09:58 +0000 (08:09 -0300)]
doc-rst: remote_controllers: fix conversion issues

Make it look like V4L, DVB and MC docbooks initial page.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: gen-errors: Improve table layout
Mauro Carvalho Chehab [Wed, 6 Jul 2016 10:58:20 +0000 (07:58 -0300)]
doc-rst: gen-errors: Improve table layout

Add a :widths: at the flat-table, to make it to look nicer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: media-ioc-enum-entities: better format the table
Mauro Carvalho Chehab [Wed, 6 Jul 2016 10:55:55 +0000 (07:55 -0300)]
doc-rst: media-ioc-enum-entities: better format the table

Add a :widths: at the flat-table, to improve the visual.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: media-ioc-g-topology: Fix tables
Mauro Carvalho Chehab [Wed, 6 Jul 2016 10:31:59 +0000 (07:31 -0300)]
doc-rst: media-ioc-g-topology: Fix tables

The tables were not properly converted. It looked a little
ackward already at DocBook, but the conversion made it worse.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: mediactl: fix some wrong cross references
Mauro Carvalho Chehab [Tue, 5 Jul 2016 20:12:37 +0000 (17:12 -0300)]
doc-rst: mediactl: fix some wrong cross references

Those cross references should point to media control syscalls,
and not to V4L ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: media-controller-model: fix a typo
Mauro Carvalho Chehab [Tue, 5 Jul 2016 20:05:03 +0000 (17:05 -0300)]
doc-rst: media-controller-model: fix a typo

Remove a 'm' at the end of the last phrase.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: media-controller.rst: add missing copy symbol
Mauro Carvalho Chehab [Tue, 5 Jul 2016 20:01:31 +0000 (17:01 -0300)]
doc-rst: media-controller.rst: add missing copy symbol

Just like V4L and DVB parts, add the copyright symbol.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: media-controller: missing credits
Mauro Carvalho Chehab [Tue, 5 Jul 2016 19:58:53 +0000 (16:58 -0300)]
doc-rst: media-controller: missing credits

When I wrote the MC next gen patches, I also improved the media
controller documentation and added documentation for
MEDIA_IOC_G_TOPOLOGY, but I forgot to add the credits on that
time.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: media-controller: fix conversion issues
Mauro Carvalho Chehab [Tue, 5 Jul 2016 19:55:06 +0000 (16:55 -0300)]
doc-rst: media-controller: fix conversion issues

Make it look just like v4l and DVB parts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: intro: remove obsolete headers
Mauro Carvalho Chehab [Tue, 5 Jul 2016 19:08:58 +0000 (16:08 -0300)]
doc-rst: intro: remove obsolete headers

The video, audio and OSD APIs are obsolete. V4L2 should be
used instead. So, remove them from this intro item.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dvb/intro: Better show the needed include blocks
Mauro Carvalho Chehab [Tue, 5 Jul 2016 19:07:56 +0000 (16:07 -0300)]
doc-rst: dvb/intro: Better show the needed include blocks

The include blocks were not properly displayed. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: fix intro_files/dvbstb.png image
Mauro Carvalho Chehab [Tue, 5 Jul 2016 19:05:12 +0000 (16:05 -0300)]
doc-rst: fix intro_files/dvbstb.png image

The png image was not base64 decoded correctly.
Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dvbapi: Fix conversion issues
Mauro Carvalho Chehab [Tue, 5 Jul 2016 18:59:52 +0000 (15:59 -0300)]
doc-rst: dvbapi: Fix conversion issues

The conversion of this file didn't happen too well. We want
the items numbered, and format it just like what we did with
part 1 of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dev-overlay: fix the last warning
Mauro Carvalho Chehab [Tue, 5 Jul 2016 18:25:39 +0000 (15:25 -0300)]
doc-rst: dev-overlay: fix the last warning

Fixes this warning:

Documentation/linux_tv/media/v4l/dev-overlay.rst:247: WARNING: Title underline too short.

struct v4l2_clip [4]_
----------------

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dmabuf: Fix the cross-reference
Mauro Carvalho Chehab [Tue, 5 Jul 2016 18:27:52 +0000 (15:27 -0300)]
doc-rst: dmabuf: Fix the cross-reference

Fixes this warning:
    Documentation/linux_tv/media/v4l/dmabuf.rst:150: WARNING: undefined label: vidioc_dqbuf (if the link has no caption the label must precede a section header)

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv: use :cpp:function:: on all syscalls
Mauro Carvalho Chehab [Tue, 5 Jul 2016 18:22:59 +0000 (15:22 -0300)]
doc-rst: linux_tv: use :cpp:function:: on all syscalls

Now that we have one syscall per page, using :cpp:function::
cleans up almost all warnings, with is a great thing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv: don't use uppercases for syscall sections
Mauro Carvalho Chehab [Tue, 5 Jul 2016 18:14:35 +0000 (15:14 -0300)]
doc-rst: linux_tv: don't use uppercases for syscall sections

On the syscall conversions, we used uppercase for the sections,
but this is too bold. So, convert them to Camel Case, as it
looks visually better.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: customize RTD theme, captions & inline literal
Markus Heiser [Sun, 3 Jul 2016 08:14:03 +0000 (05:14 -0300)]
doc-rst: customize RTD theme, captions & inline literal

The layout of (table) captions in the RTD theme is a bit ugly and the
bordered, red colored of inline literals is a bit to gaudy. The
requirements has been discussed in the ML [1].

captions:

  - captions should have 100% (not 85%) font size
  - hide the permalink symbol as long as link is not hovered

inline literal:

  - drop the borderbox and red color

[1] http://article.gmane.org/gmane.linux.drivers.video-input-infrastructure/101099

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
8 years agodoc-rst: customize RTD theme, table & full width
Markus Heiser [Sun, 3 Jul 2016 08:09:32 +0000 (05:09 -0300)]
doc-rst: customize RTD theme, table & full width

The default table layout of the RTD theme does not fit for vast tables,
like the ones we have in the linux_tv project. This has been discussed
on the ML [1].

The RTD theme is a two column layout, with a navigation column on the
left and a content column on the right:

content column

 RTD theme's default is 800px as max width for the content, but we have
 tables with tons of columns, which need the full width of the
 view-port (BTW: *full width* is what DocBook's HTML is).

table

   - sequences of whitespace should collapse into a single whitespace.
   - make the overflow auto (scrollbar if needed)
   - align caption "left" ("center" is unsuitable on vast tables)

[1] http://article.gmane.org/gmane.linux.kernel/2216509

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
8 years agodoc-rst: remove Documentation/linux_tv/conf.py file
Mauro Carvalho Chehab [Tue, 5 Jul 2016 17:37:04 +0000 (14:37 -0300)]
doc-rst: remove Documentation/linux_tv/conf.py file

This file is actually not used to build the media uAPI docbook.
So, remove it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: boilerplate HTML theme customization
Markus Heiser [Sun, 3 Jul 2016 08:05:28 +0000 (10:05 +0200)]
doc-rst: boilerplate HTML theme customization

Implements the minimal boilerplate for Sphinx HTML theme customization.

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv: dvb: put return value at the end
Mauro Carvalho Chehab [Tue, 5 Jul 2016 14:36:55 +0000 (11:36 -0300)]
doc-rst: linux_tv: dvb: put return value at the end

On some syscall descriptions, the tables are described after
the return value. Do that inside descriptions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv: dvb: use lowercase for filenames
Mauro Carvalho Chehab [Tue, 5 Jul 2016 14:22:28 +0000 (11:22 -0300)]
doc-rst: linux_tv: dvb: use lowercase for filenames

There are some ioctls in upper case. This is not the standard.
Put them on lowercase, to match what's done with other ioctls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv: reformat all syscall pages
Mauro Carvalho Chehab [Tue, 5 Jul 2016 10:58:48 +0000 (07:58 -0300)]
doc-rst: linux_tv: reformat all syscall pages

The syscall pages are written to be used also as man-pages.

However, they don't match the format used by kernel-doc
generated pages from DocBook. Rewrite them to match it.

One side effect is that now all such pages at the book
will have the same format, reducing the format differences
between DVB and the other parts of the book.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv: split DVB function call documentation
Mauro Carvalho Chehab [Tue, 5 Jul 2016 13:37:31 +0000 (10:37 -0300)]
doc-rst: linux_tv: split DVB function call documentation

Just like V4L, split the DVB function calls into one file per
system call. This is a requirement for the man pages creator
on Sphinx to work, and makes the document easier to maintain.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: libv4l-introduction: improve format
Mauro Carvalho Chehab [Mon, 4 Jul 2016 22:03:49 +0000 (19:03 -0300)]
doc-rst: libv4l-introduction: improve format

Fix some cross-references and improve the layout of this
page.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: subdev-formats: Improve figure caption
Mauro Carvalho Chehab [Mon, 4 Jul 2016 21:53:54 +0000 (18:53 -0300)]
doc-rst: subdev-formats: Improve figure caption

Add a numbering for the figure.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dev-subdev: fix some format issues
Mauro Carvalho Chehab [Mon, 4 Jul 2016 21:47:13 +0000 (18:47 -0300)]
doc-rst: dev-subdev: fix some format issues

The conversion from DocBook made somethings look ugly.
Improve them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dev-sliced-vbi: convert table captions into headers
Mauro Carvalho Chehab [Mon, 4 Jul 2016 21:37:48 +0000 (18:37 -0300)]
doc-rst: dev-sliced-vbi: convert table captions into headers

Sphinx doesn't format nice table captions, nor auto-numberate
them. So, convert tables into chapters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dev-raw-vbi fix conversion issues
Mauro Carvalho Chehab [Mon, 4 Jul 2016 21:32:02 +0000 (18:32 -0300)]
doc-rst: dev-raw-vbi fix conversion issues

There are several things that didn't convert well. Fix them,
in order to improve the layout of the formatted document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: linux_tv: Use references for read()/write()
Mauro Carvalho Chehab [Mon, 4 Jul 2016 21:16:57 +0000 (18:16 -0300)]
doc-rst: linux_tv: Use references for read()/write()

Use cross-references for read()/write() on a few places
where they weren't used.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dev-codec: Fix a reference for _STREAMON
Mauro Carvalho Chehab [Mon, 4 Jul 2016 21:05:55 +0000 (18:05 -0300)]
doc-rst: dev-codec: Fix a reference for _STREAMON

The referenced ioctl there is only VIDIOC_STREAMON, so we
should override the name, to avoid it to also show _STREAMOFF.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
8 years agodoc-rst: dev-osd: Fix some issues due to conversion
Mauro Carvalho Chehab [Mon, 4 Jul 2016 21:01:04 +0000 (18:01 -0300)]
doc-rst: dev-osd: Fix some issues due to conversion

The conversion to ReST broke a minor things. Fix them.

While here, also make EBUSY constant, just like on other places.

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