Commit Graph

170 Commits

Author SHA1 Message Date
Hans Verkuil bb77c5776b [media] vidioc-g-dv-timings.rst: document the v4l2_bt_timings reserved field
This field was never documented, and neither was it mentioned that
it should be zeroed by the application.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 10:19:38 -03:00
Ricardo Ribalda f22bede313 [media] Documentation: Fix V4L2_CTRL_FLAG_VOLATILE
V4L2_CTRL_FLAG_VOLATILE behaviour when V4L2_CTRL_FLAG_EXECUTE_ON_WRITE
is set was not properly explained.

Also set some hyperlink to ease the Documentation browsing.

Credit-to: Hans Verkuil <hansverk@cisco.com>

[mchehab@s-opensource.com: fix a trivial merge conflict]
Reported-by: Dimitrios Katsaros <patcherwork@gmail.com>
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 10:02:07 -03:00
Hans Verkuil 3f8d56b022 [media] media: doc-rst: document ENODATA for cropping ioctls
Document that the cropping ioctls can return ENODATA if the operation
isn't supported for the current input or output.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 09:58:02 -03:00
Hans Verkuil 926605d05c [media] pixfmt-007.rst: fix copy-and-paste error in SMPTE-240M doc
Instead of referring to Y', Cb and Cr, it referred to Yc', Cbc and
Crc, which were accidentally copied from the BT.2020 constant luminance
text.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 08:42:31 -03:00
Hans Verkuil 45d130d267 [media] pixfmt-007.rst: fix a messed up note in the DCI-P3 doc
The text of the note included text that shouldn't have been part
of the note. Move that out of the note into the proper place.

[mchehab@s-opensource.com: fix a trivial merge conflict]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 08:42:00 -03:00
Hans Verkuil dda3aeaa16 [media] pixfmt.rst: drop V4L2_YCBCR_ENC_SYCC from the documentation
The V4L2_YCBCR_ENC_SYCC encoding is identical to V4L2_YCBCR_ENC_601.
Remove V4L2_YCBCR_ENC_SYCC from the documentation since it should not
be used.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 08:38:31 -03:00
Hans Verkuil 9ddbf68d26 [media] v4l2-tpg-core: drop SYCC, use higher precision 601 conversion matrix
The SYCC Y'CbCr encoding is identical to the 601 encoding. Since the
SYCC define is about to be removed for use in the kernel we need to
drop it in the TPG code as well.

This patch also adds a 4th decimal to the 601 conversion matrix.
That was specified by the sYCC spec and it makes sense to use this
across the board.

[mchehab@s-opensource.com: fix conflicts with LaTeX math expression patch]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 08:36:11 -03:00
Hans Verkuil 7e0739cd9c [media] videodev2.h: fix sYCC/AdobeYCC default quantization range
The default quantization range of the Y'CbCr encodings of sRGB
and AdobeRGB are full range instead of limited range according to
the corresponding standards.

Fix this in the V4L2_MAP_QUANTIZATION_DEFAULT macro.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 08:17:10 -03:00
Nick Dyer 233b213a31 [media] Documentation: add support for V4L touch devices
Document the new touch API.

Signed-off-by: Nick Dyer <nick@shmanahar.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: fix up videodev2.h.rst.exceptions]

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2016-08-23 16:39:23 -03:00
Mauro Carvalho Chehab 859b01cdc0 [media] docs-rst: fix some .. note:: occurrences
On some places, either an space or the second ':' is missing.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:24:06 -03:00
Mauro Carvalho Chehab 5ccbb182d7 [media] docs-rst: Convert MC uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.

While here, improve the documentation to make them to look more
like the rest of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:52 -03:00
Mauro Carvalho Chehab 15c190146c [media] docs-rst: Convert LIRC uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.

While here, improve the documentation to make them to look more
like the rest of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:46 -03:00
Mauro Carvalho Chehab 9954783662 [media] docs-rst: Convert CEC uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.

While here, improve the documentation to make them to look more
like the rest of the document.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:40 -03:00
Mauro Carvalho Chehab cf8076c314 [media] docs-rst: Convert DVB uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.

While here, improve the documentation, marking the deprecated
ioctls, and making the non-deprecated ones more like the rest
of the media book.

Also, add a notice for ioctls that still require documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:34 -03:00
Mauro Carvalho Chehab 41d804653e [media] docs-rst: Convert V4L2 uAPI to use C function references
Name all ioctl references and make them match the ioctls that
are documented. That will improve the cross-reference index,
as it will have all ioctls and syscalls there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:27 -03:00
Mauro Carvalho Chehab 1b81f010bf [media] docs-next: stop abusing on the cpp domain
Now that we have an override for the c domain that will do
the right thing for the Kernel, stop abusing on the cpp
domain.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:23:00 -03:00
Mauro Carvalho Chehab b7ff94df56 [media] pixfmt-007.rst: use Sphinx math:: expressions
Enrich math formulas by using the Sphinx math. That will allow
using those formulas on pdf documents as well.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 21:20:53 -03:00
Mauro Carvalho Chehab 43c78e11ea Merge remote-tracking branch 'docs-next/docs-next' into devel/docs-next
* docs-next/docs-next: (51 commits)
  docs-rst: add package adjustbox
  docs-rst: Fix an warning when in interactive mode
  docs-rst: Use better colors for note/warning/attention boxes
  docs-rst: conf.py: adjust the size of .. note:: tag
  docs-rst: add support for LaTeX output
  doc-rst: migrate ioctl CEC_DQEVENT to c-domain
  doc-rst: Revert "kernel-doc: fix handling of address_space tags"
  doc-rst: moved *duplicate* warnings to nitpicky mode
  doc-rst:c-domain: ref-name of a function declaration
  doc-rst: add boilerplate to customize c-domain
  docs: Sphinxify gdb-kernel-debugging.txt and move to dev-tools
  docs: sphinxify kmemcheck.txt and move to dev-tools
  docs: sphinxify kmemleak.txt and move it to dev-tools
  docs: sphinxify ubsan.txt and move it to dev-tools
  docs: sphinxify kasan.txt and move to dev-tools
  docs: sphinixfy gcov.txt and move to dev-tools
  docs: sphinxify kcov.txt and move to dev-tools
  docs: sphinxify sparse.txt and move to dev-tools
  docs: sphinxify coccinelle.txt and add it to dev-tools
  docs: create a new dev-tools directory
  ...
2016-08-22 21:20:18 -03:00
Markus Heiser 9cd3476c91 doc-rst: migrate ioctl CEC_DQEVENT to c-domain
This is only one example, demonstrating the benefits of the patch
series.  The CEC_DQEVENT ioctl is migrated to the sphinx c-domain and
referred by ":name: CEC_DQEVENT".

With this change the indirection using ":ref:`CEC_DQEVENT` is no longer
needed, we can refer the ioctl directly with ":c:func:`CEC_DQEVENT`". As
addition in the index, there is a entry "CEC_DQEVENT (C function)".

Signed-off-by: Markus Heiser <markus.heiser@darmarIT.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-08-22 15:20:00 -06:00
Hans Verkuil dcceb1eaf2 [media] cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flag
Currently if none of the requested logical addresses can be claimed, the
framework will fall back to the Unregistered logical address.

Add a flag to enable this explicitly. By default it will just go back to
the unconfigured state.

Usually Unregistered is not something you want since the functionality is
very limited. Unless the application has support for this, it will fail
to work correctly. So require that the application explicitly requests
this.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 14:00:51 -03:00
Hans Verkuil 277f963cea [media] cec: improve dqevent documentation
The documentation for the cec_event_state_change struct was incomplete.
This patch documents what happens in the corner cases.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 13:27:15 -03:00
Mauro Carvalho Chehab 8d4b231af9 [media] docs-rst: fix some .. note:: occurrences
On some places, either an space or the second ':' is missing.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:36:57 -03:00
Mauro Carvalho Chehab 8c978c0846 [media] docs-rst: fix some LaTeX errors when in interactive mode
There are several minor issues that are seen when building
PDF on interactive mode.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:35:47 -03:00
Mauro Carvalho Chehab b782434133 [media] cec-ioc-receive.rst: one table here should be longtable
The table is too big to fit into a single page on LaTeX format.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:34:40 -03:00
Mauro Carvalho Chehab a3045153a3 [media] subdev-formats.rst: adjust tables size for LaTeX output
There are two big tables here that are very hard to adjust its
size.

The first one would fit into one page, but the latex.py logic
at Sphinx auto-switches to longtable when there are more than 30
rows. There's no way to override without coding.

The second one is really big, and won't fit on a single page.
So, it has to use tiny font to fit.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:34:23 -03:00
Mauro Carvalho Chehab 0c04622162 [media] extended-controls.rst: avoid going past page with LaTeX
It is painful to put code/verbatim code in bold. It seems that
the only way is to arrange it like:
	``foo``
	    bar

At least on LaTeX output, when this happens, the "foo" string
is not hidentable/breakable. The entire string should fit into
a single line.

Add a workaround for this ReST limitation by splitting the
foo string into two strings, on separate lines. The output
is not the best, but it works.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:34:02 -03:00
Mauro Carvalho Chehab 43e4138be3 [media] Fix a few additional tables at uAPI for LaTeX output
There are still a few tables with wrong columns at the uAPI
docs. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:32:16 -03:00
Mauro Carvalho Chehab fa92b04d98 [media] docs-rst: fix warnings introduced by LaTeX patchset
Sphinx is really pedantic with respect to the order where
table tags and references are created. Putting things at
the wrong order causes troubles.

The order that seems to work is:

	.. raw:: latex

	.. tabularcolumns::

	.. _foo_name:

	.. cssclass: longtable

	.. flat-table::

Reorder the tags to the above order, to avoid troubles, and
fix remaining warnings introduced by media recent patches.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:31:51 -03:00
Mauro Carvalho Chehab 42858b5552 [media] gen-errors.rst fix error table column limits
Fix the generic errors table to avoid column overflows on
LaTeX output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:31:14 -03:00
Mauro Carvalho Chehab 0d6821ec2f [media] uapi/cec: adjust tables on LaTeX output
Fix tables to avoid text to overflow the cell limits.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:30:54 -03:00
Mauro Carvalho Chehab d53c4261c6 [media] media-types.rst: adjust tables to fit on LaTeX output
A few tables at the media uAPI documentation have columns
not well dimentioned. Adjust them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:25:00 -03:00
Mauro Carvalho Chehab 16dac3541d [media] adjust remaining tables at DVB uAPI documentation
There are a few broken tables on LaTeX output at the DVB
uAPI documentation. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:24:37 -03:00
Mauro Carvalho Chehab e9012dc3d6 [media] fe_property_parameters.rst: Adjust column sizes
Add position hints for some tables, in order for them to be
shown properly on LaTeX output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:24:12 -03:00
Mauro Carvalho Chehab ed5d28d0b5 [media] fix v4l2-selection-*.rst tables for LaTeX output
Adjust the tables there to fit inside the page margins.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:23:53 -03:00
Mauro Carvalho Chehab 11d7512bfe [media] vidioc-g-tuner.rst: Fix tables to fit at LaTeX output
Several tables are missing column definitions and/or are too big
to fit into the page. Adjust them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:23:30 -03:00
Mauro Carvalho Chehab e19c1779fb [media] vidioc-g-tuner.rst: improve documentation for tuner type
The tuner type table misses descriptions for each type. While
most of stuff are obvious, the two SDR definitions aren't.

So, add descriptions to all of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:23:03 -03:00
Mauro Carvalho Chehab ef76c0685f [media] adjust some vidioc-*rst tables with wrong columns
Adjust simple cases where the columns on some vidioc files
are overriding their neighbours.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:22:46 -03:00
Mauro Carvalho Chehab e7eaeb37f6 [media] vidioc-g-sliced-vbi-cap.rst: make tables fit on LaTeX output
The tables don't fit at the page on this file. As noticed
before, Sphinx (or LaTeX?) does a crap job on tables with
cell span, and some work has to be done to make it fit.

Move the see also reference to a footnote, break one paragraph
into two and adjust the table columns to make it visible.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:22:21 -03:00
Mauro Carvalho Chehab 2bff552536 [media] vidioc-enumstd.rst: adjust video standards table
This table is too big for LaTeX output, and lacks columns
specs for LaTeX format.

Also, it has a hidden column, as there are some cell spans
with the wrong values.

Fix it, so it can be displayed properly on LaTeX/PDF.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:21:59 -03:00
Mauro Carvalho Chehab 64f6838a2b [media] vidioc-dv-timings-cap.rst: Adjust LaTeX columns
Some tables are not properly displayed on LaTeX. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:21:39 -03:00
Mauro Carvalho Chehab 0e9411ac56 [media] vidioc-dqevent.rst: adjust two table columns for LaTeX output
There are two tables with mangled columns. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:21:18 -03:00
Mauro Carvalho Chehab 201784b5be [media] vidioc-decoder-cmd.rst: better adjust column widths
Better adjust the columns for LaTeX output

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:21:01 -03:00
Mauro Carvalho Chehab 3532d9d6c5 [media] diff-v4l.rst: Make capabilities table fit in LaTeX
This table has several troubles:
	- a duplicated "struct" on its name;
	- a reference to a V4L version 1 struct that will never
	  point to something (as we got rid of V4L1 API a long
	  time ago);
	- misses hints for LaTeX output (column size and longtable
	  style).

Fix them.

It should be noticed that the first column of this table is
not aligned with the rest. I suspect that this is a bug at
the flat-table extension.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:20:42 -03:00
Mauro Carvalho Chehab 2ec708745f [media] subdev-formats.rst: adjust most of the tables to fill in page
Fix mosto fo the tables there in order to make them fit at the
page size.

There are, however, two exceptions: RGB and YUV big tables,
where adding the raw latex adjustbox caused the tables to not
be properly formatted. I suspect that the problem is because
those are long tables, but not really sure.

The thing is that Sphinx lacks an "adjustbox" tag that would
avoid the raw latex hacks.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:20:21 -03:00
Mauro Carvalho Chehab 3772b56a05 [media] dev-subdev.rst: make table fully visible on LaTeX
The table there is too big and doesn't have format hints for
LaTeX output.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:19:58 -03:00
Mauro Carvalho Chehab 352ca7e7f8 [media] dev-rds.rst: adjust table dimentions for LaTeX
One of the tables has wrong column dimentions. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:19:36 -03:00
Mauro Carvalho Chehab 0101036c7b [media] dev-sliced-vbi.rst: Adjust tables on LaTeX output
Better format the tables in a way that will fit inside the
page.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:19:17 -03:00
Mauro Carvalho Chehab 23c751f036 [media] dev-sliced-vbi.rst: use a footnote for VBI images
Just like on dvb-raw-vbi.rst, the LaTeX output doesn't work
well with cell spans. Also, this is actually a note, so, move
it to a footnote.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:18:51 -03:00
Mauro Carvalho Chehab 605c606536 [media] docs-rst: re-generate vbi_525.pdf and vbi_625.pdf
Originally, each image were one page big, causing them to be
displayed on separate pages at the PDF output. Re-generate
them from the gif files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:18:16 -03:00
Mauro Carvalho Chehab 6138e30321 [media] dev-raw-vbi.rst: adjust table columns for LaTeX output
Add the needed tags to fix LaTeX output of the tables there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:17:40 -03:00
Mauro Carvalho Chehab 0522322ce2 [media] dev-raw-vbi.rst: add a footnote for the count limits
There's a bug with LaTeX output on flat-tables with Sphinx 1.4.5
that prevents references at a cell span to be broken. As the
text is indeed too long, it makes sense to place the reference
to the pictures showing the VBI limits as a footnote.

That makes the text easier to read and also solves the issue
with LaTeX output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:17:19 -03:00
Mauro Carvalho Chehab 0fb29313f3 [media] dev-overlay.rst: don't ident a note
There's one note there that it is indented for no good reason.
Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:16:59 -03:00
Mauro Carvalho Chehab 8b5efbeb97 [media] buffer.rst: Adjust table columns for LaTeX output
The table columns are not properly displayed. Also, some
tables are too big to fit into just one page. So, fix them,
in order to better display the tables.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:16:40 -03:00
Mauro Carvalho Chehab 4810923765 [media] docs-rst: remove width hints from pixfmt byte order tables
Those hints are wrong, and doesn't really improve the look
of those tables. So, keep them only when they're useful.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:16:18 -03:00
Mauro Carvalho Chehab 1c3fd7e7af [media] pixfmt-packed-yuv.rst: adjust tables to fit in LaTeX
Adjust the table to fit at the LaTeX and PDF outputs, just like
what was done with pixfmt-packed-rgb.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:15:45 -03:00
Mauro Carvalho Chehab b315a63bf5 [media] pixfmt-packed-rgb.rst: adjust tables to fit in LaTeX
Adjust the tables to fit at the LaTeX and PDF outputs.

I wrote a previous patch RFC to show the big table in landscape,
but it makes harder to read on displays.

So, instead, let's use the adjustbox to shrink the size of those
long tables, as the table size can still be visible on screen,
and it is a way better to read in horizontal position and
visible if printed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:15:24 -03:00
Mauro Carvalho Chehab fdb45d73ea [media] pixfmt-packed-rgb.rst: Fix cell spans
There is an extra column just before eack pack of bits, to
improve table reading, but the header file didn't take this
into account.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:09:18 -03:00
Mauro Carvalho Chehab 83eaeb85a5 [media] docs-rst: add column hints for pixfmt-002 and pixfmt-006
Add column hints for LaTeX to format columns on the tables inside
pixfmt-002.rst and pixfmt-006.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:08:33 -03:00
Mauro Carvalho Chehab 1300c93089 [media] extended-controls.rst: fix table sizes
Lots of tables at extended-controls.rst need explicit hints for
LaTeX to adjust their widths. Provide that.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:08:07 -03:00
Mauro Carvalho Chehab ca10257487 [media] control.rst: Fix table width
Manually adjust the table width for it to look nice on PDF output.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:07:37 -03:00
Mauro Carvalho Chehab 5bd4bb7817 [media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.

As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:

my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
	if (!$table_header) {
		$has_cols = 1 if (m/..\s+tabularcolumns::/);
		if (m/..\s+flat-table::/) {
			$table_header = 1;
			$header = $_;
			next;
		}
		$out .= $_;
		next;
	}
	$header .= $_;
	@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
	if (m/^\n$/) {
		if (!$has_cols && @widths) {
			my ($tot, $t, $i) = (0, 0, 0);
			foreach my $v(@widths) { $tot += $v; };
			$out .= ".. tabularcolumns:: |";
			for ($i = 0; $i < scalar @widths - 1; $i++) {
				my $v = $widths[$i];
				my $w = round(10 * ($v * $line_size) / $tot) / 10;
				$out .= sprintf "p{%.1fcm}|", $w;
				$t += $w;
			}
			my $w = $line_size - $t;
			$out .= sprintf "p{%.1fcm}|\n\n", $w;
		}
		$out .= $header;
		$table_header = 0;
		$has_cols = 0;
		$header = "";
		@widths = ();
	}
}
print $out;

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:07:12 -03:00
Mauro Carvalho Chehab 48f6993793 [media] vidioc-querycap.rst: Better format tables on PDF output
Both tables on this rst file were not shown right, as they miss
the proper tag (tabularcolumns) to specify the column widths
required for PDF and LaTeX output.

Also, the second table is too big to fit into one page. So,
it should use the longtable class to allow it to be split into
two pages.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:05:19 -03:00
Mauro Carvalho Chehab 806da2986f [media] docs-rst: get rid of code-block inside tables
There are two tables with a C code-block inside it. Unfortunately,
that causes LaTeX output to break. Yet, there's nothing special
there, so let's remove the code-block from them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:04:16 -03:00
Mauro Carvalho Chehab b6b6e67824 [media] docs-rst: better use the .. note:: tag
Change multi-line note tags to be more symetric, e. g. not starting
the text together witht the tag.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:02:29 -03:00
Mauro Carvalho Chehab 187594418d [media] vidioc-enumstd.rst: remove bullets from sound carrier
The items at the sound carrier had a bullet. Those are not needed.

So, get rid of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:01:47 -03:00
Mauro Carvalho Chehab edec4f446d [media] vidioc-enumstd.rst: fix a broken reference
Somehow, the conversion broke a reference here. Re-add it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:01:16 -03:00
Mauro Carvalho Chehab 1bf0907b59 [media] pixfmt-nv12mt.rst: use PNG instead of GIF
pdflatex doesn't like gif images:
	None:None: WARNING: no matching candidate for image URI u'media/uapi/v4l/pixfmt-nv12mt_files/nv12mt.*'
	None:None: WARNING: no matching candidate for image URI u'media/uapi/v4l/pixfmt-nv12mt_files/nv12mt_example.*'

But it works fine with png. So, convert them. As a plus, PNG images
are smaller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22 10:00:34 -03:00
Mauro Carvalho Chehab da83c888bf [media] doc-rst: better organize the media books
The uAPI book has 5 parts, but they lost numeration after
conversion to rst. Manually number those parts, and make
the main index with 1 depth, to only show the parts and
the annexes.

At each part, use :maxwidth: 5, in order to show a more
complete index.

While here, fix the cross-references between different
books.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Hans Verkuil e5208ed280 [media] doc-rst: cec: update documentation
Update and expand the CEC documentation. Especially w.r.t. non-blocking
mode.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-19 13:33:29 -03:00
Mauro Carvalho Chehab cc0fe5cd98 [media] doc-rst: fix an undefined reference
Documentation/media/uapi/cec/cec-ioc-dqevent.rst:43: WARNING: undefined label: cec_event_state_change (if the link has no caption the label must precede a section header)

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13 10:56:27 -03:00
Hans Verkuil 1267c60aa9 [media] doc-rst: improve CEC documentation
Lots of fixups relating to references.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13 10:56:26 -03:00
Mauro Carvalho Chehab 6710ea47fd [media] doc-rst: fix htmldocs build warnings
Fix those warnings:
	Documentation/output/videodev2.h.rst:6: WARNING: undefined label: vidioc_unsubscribe_event (if the link has no caption the label must precede a section header)
	Documentation/media/uapi/v4l/dev-overlay.rst:248: WARNING: Title underline too short.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13 10:56:21 -03:00
Mauro Carvalho Chehab 8968da9b86 Revert "[media] docs-rst: escape [] characters"
This patch touches on places where it shouldn't: image
files and code examples. Also, it doesn't fix all array
occurrences.

So, let's revert it.

This reverts commit ffbab694ed.
2016-07-13 08:43:30 -03:00
Hans Verkuil d2cd627be0 [media] doc-rst: update CEC_RECEIVE
The timestamp field was split into rx_ts and tx_ts, and the rx/tx_status
fields were moved. Update the doc accordingly.

Also fix a bug that stated that a non-zero tx_status field signaled an
error. That's not true, since TX_STATUS_OK is 1, not 0.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-13 08:39:00 -03:00
Mauro Carvalho Chehab ffbab694ed [media] docs-rst: escape [] characters
Those characters are used for citations. Better to escape, to
avoid them to be misinterpreted.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 15:20:11 -03:00
Mauro Carvalho Chehab 4855307b81 [media] doc-rst: use the right markup for footnotes
According with ReST spec, footnotes should be like:
[#name], and not [name]. So, change them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 15:15:23 -03:00
Hans Verkuil 53ae925160 [media] vidioc-g-dv-timings.rst: document interlaced defines
Document V4L2_DV_PROGRESSIVE and V4L2_DV_INTERLACED and
fix missing references.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 12:46:26 -03:00
Hans Verkuil 0a07ab9a80 [media] pixfmt-006.rst: add missing V4L2_YCBCR_ENC_SMPTE240M
Fix missing documentation, and its cross reference.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 12:31:10 -03:00
Mauro Carvalho Chehab e70fb059a4 [media] doc-rst: fix a missing reference for V4L2_BUF_FLAG_LAST
Fix it by adding a header to the flat-table to match to
the list of define symbols.

As a side-effect, it also removes some exceptions from
videodev2.h.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 11:49:17 -03:00
Mauro Carvalho Chehab bd6a63f2e6 [media] doc-rst: reorganize LIRC ReST files
Reorganize the LIRC rst files, using "-" instead of "_" on
their names, and creating a separate chapter for syscalls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 09:43:04 -03:00
Mauro Carvalho Chehab 048eb3ef75 [media] doc-rst: document LIRC set mode ioctls
Add LIRC_SET_[REC|SEND]_MODE ioctls to the corresponding
GET functions, and put all LIRC modes altogether.

As now everything is already documented on its own ioctl
pages, get rid of lirc_ioctl.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 09:42:59 -03:00
Mauro Carvalho Chehab f27637f96f [media] doc-rst: document LIRC_SET_WIDEBAND_RECEIVER
Put documentation for this ioctl on a separate page and
improve it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 09:42:58 -03:00
Mauro Carvalho Chehab ae94d4c9d4 [media] doc-rst: add documentation for LIRC_SET_MEASURE_CARRIER_MODE
Place documentation for this ioctl on its own page.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 09:42:57 -03:00
Mauro Carvalho Chehab 572c194b88 [media] doc-rst: document LIRC_SET_REC_TIMEOUT_REPORTS
Add a separate page for this ioctl and improve its documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 09:42:56 -03:00
Mauro Carvalho Chehab 98a7b04eed [media] doc-rst: document LIRC_SET_REC_TIMEOUT
Add a separate page for this ioctl and adds the cross-references.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 09:42:56 -03:00
Mauro Carvalho Chehab 191fbb903b [media] doc-rst: document LIRC_SET_TRANSMITTER_MASK
Add proper documentation for this ioctl, providing some
additional information about its usage.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 09:42:55 -03:00
Mauro Carvalho Chehab 910f4461d1 [media] doc-rst: document LIRC set carrier ioctls
Put each ioctl on its own page and improve documentation, adding
cross-references for LIRC_SET_REC_CARRIER_RANGE and LIRC_SET_REC_CARRIER,
with can be used together to set a carrier frequency range.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-12 09:42:54 -03:00
Mauro Carvalho Chehab 5413b648d0 [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>
2016-07-12 09:42:49 -03:00
Mauro Carvalho Chehab 76e23479f9 [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>
2016-07-12 09:29:31 -03:00
Mauro Carvalho Chehab 978084b193 [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>
2016-07-12 09:29:30 -03:00
Mauro Carvalho Chehab 6d9f4d799b [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>
2016-07-12 06:22:17 -03:00
Mauro Carvalho Chehab dbe678dd21 [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>
2016-07-12 06:15:31 -03:00
Mauro Carvalho Chehab 4ed030af4f [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>
2016-07-12 06:12:32 -03:00
Mauro Carvalho Chehab 3f3427c466 [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>
2016-07-11 13:07:41 -03:00
Mauro Carvalho Chehab 1a2e50a4df [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>
2016-07-11 11:47:39 -03:00
Mauro Carvalho Chehab 76d816d835 [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>
2016-07-11 10:51:28 -03:00
Mauro Carvalho Chehab 2d14c31c00 [media] doc-rst: add media/uapi/rc/lirc-header.rst
changeset 68cd5e0bed ("[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>
2016-07-11 10:45:28 -03:00
Mauro Carvalho Chehab 2779afef9e [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>
2016-07-11 10:31:19 -03:00
Mauro Carvalho Chehab 706f8a9975 [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>
2016-07-10 12:06:28 -03:00
Mauro Carvalho Chehab fed7b888f6 [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>
2016-07-10 09:50:07 -03:00