Commit graph

397 commits

Author SHA1 Message Date
Sakari Ailus
72e8138c5d [media] doc-rst: Correct the ordering of LSBs of the 10-bit raw packed formats
The 10-bit packed raw bayer format documented that the data of the first
pixel of a four-pixel group was found in the first byte and the two
highest bits of the fifth byte. This was not entirely correct. The two
bits in the fifth byte are the two lowest bits. The second pixel occupies
the second byte and third and fourth least significant bits and so on.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 11:04:04 -03:00
Mauro Carvalho Chehab
e9de2d89a7 [media] docs-rst: fix two wrong :name: tags
There's a typo there, causing 4 warnings:

  Documentation/media/uapi/rc/lirc-read.rst:26: WARNING: c:type reference target not found: name
  Documentation/media/uapi/rc/lirc-read.rst:26: WARNING: c:type reference target not found: lirc
  Documentation/media/uapi/v4l/func-poll.rst:25: WARNING: c:type reference target not found: name
  Documentation/media/uapi/v4l/func-poll.rst:25: WARNING: c:type reference target not found: v4l2

 Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:58:26 -03:00
Mauro Carvalho Chehab
16f8306b34 [media] media-ioc-g-topology.rst: fix a c domain reference
One reference there is still using :ref:. Fix it, to solve this
warning:
  Documentation/media/uapi/mediactl/media-ioc-g-topology.rst:236: WARNING: undefined label: media-v2-intf-devnode (if the link has no caption the label must precede a section header)

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:58:06 -03:00
Mauro Carvalho Chehab
8b98db6b2b [media] dev-sliced-vbi.rst: fix reference for v4l2_mpeg_vbi_ITV0
The struct v4l2_mpeg_vbi_ITV0 is identical to struct v4l2_mpeg_vbi_itv0,
except by its size, and it is documented at the same place at the
book.

Fix cross reference for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:57:44 -03:00
Mauro Carvalho Chehab
56683d7dea [media] docs-rst: fix cross-references for videodev2.h
There are several broken references there, due to the conversion to
C domain. Fix them using this shell script and manually adjust what's
broken:

	# funcs is a file with the broken functions/references
	for i in $(cat funcs|sort|uniq|perl -ne 'print "$1\n" if (m/(\S+)$/)'); do
		i=${i//-/_}
		echo $i
		j=${i//_/-}
		for k in $(git grep -l "_$j:" Documentation/); do
			sed s,\_$j\:,"c\:type\:\: $i", <$k >a && mv a $k
		done
		for k in $(git grep -l "$j" Documentation/media/*.exceptions); do
			sed s,$j,":c\:type\:\`$i\`", <$k >a && mv a $k
		done
		for k in $(git grep -l "$j" Documentation/); do
			sed "s,:ref:\`$i <$j>\`,:c:type:\`$i\`," <$k >a && mv a $k
			sed "s,:ref:\`$j\`,:c:type:\`$i\`," <$k >a && mv a $k
			sed -E "s,:ref:\`(.*)<$j>\`,:c:type:\`\1<$i>\`," <$k >a && mv a $k
		done
		for k in $(git grep -l "<$j>" include/media); do
			sed -E "s,:ref:\`(.*)<$j>\`,enum \&$i," <$k >a && mv a $k
		done
	done

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:57:23 -03:00
Mauro Carvalho Chehab
be831b34c2 [media] hist-v4l2.rst: don't do refs to old structures
Several structs were renamed or removed during V4L2 development.
Don't try to cross-reference the legacy ones.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:56:53 -03:00
Mauro Carvalho Chehab
e452134cee [media] libv4l-introduction.rst: improve crossr-references
Use C cross-references to mention the V4L2 API calls on all
places it occurs inside this file.

While here, also mark constants as such.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:56:33 -03:00
Mauro Carvalho Chehab
9281f251be [media] libv4l-introdution.rst: fix function definitions
c:type is not the right tag for function definitions.
Replace them by .. c:function::

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:56:03 -03:00
Mauro Carvalho Chehab
39b6b9005f [media] fix clock_gettime cross-references
Fix those warnings:

	Documentation/media/uapi/cec/cec-ioc-dqevent.rst:124: WARNING: c:func reference target not found: clock_gettime(2)

By replacing it with the right function name, using this shell script:

	for i in `find Documentation/media -type f`; do sed 's,clock_gettime(2),clock_gettime,' <$i >a && mv a $i; done

Please notice that this will make the nitpick mode to shut up
complaining about that, becasue clock_gettime is on its exclude list,
but the cross reference will be undefined until someone documents
this function at the core documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:55:43 -03:00
Mauro Carvalho Chehab
a17a954efd [media] docs-rst: fix some broken struct references
The :c:type: references point to the structure name, and not to
struct foo.

Fixed via this shell script:

	for i in `find Documentation/media -type f`; do perl -ne 'if (s/\:c\:type\:\`struct\s*(\S+)\`/struct :c:type:`$1`/) { s/struct\s+struct/struct/;  s/(struct\s+\:c\:type\:\`\S+\`)\s+structure/$1/;  } print $_' <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:55:18 -03:00
Mauro Carvalho Chehab
fc78c7c7a1 [media] docs-rst: simplify c:type: cross references
Instead of using c:type:`struct foo <foo>`, use:
	struct c:type:`foo`

This patch was generated via this shell script:

	for i in `find Documentation/media -type f`; do perl -ne 'if (m/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/) { $s=$1; $r=$2; if ($s eq $r) { s/\:c\:type\:\`struct\s+(\S+)\s*\<(\S+)\>\`/struct :c:type:`$2`/; s/struct\s+struct/struct/;  s/(struct\s+\:c\:type\:\`\S+\`)\s+structure/$1/;  }} print $_' <$i >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:54:54 -03:00
Mauro Carvalho Chehab
2606eee43c [media] docs-rst: fix cec bad cross-references
Fix some CEC cross references that are broken.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:54:21 -03:00
Mauro Carvalho Chehab
180965cb08 [media] docs-rst: fix dmx bad cross-references
Some structs are pointed via the typedef. As we replaced
those references, fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:53:54 -03:00
Mauro Carvalho Chehab
848d10314b [media] fix broken references on dvb/video*rst
Trivially fix those broken references, by copying the structs
fron the header, just like other API documentation at the
DVB side.

This doesn't have the level of quality used at the V4L2 side
of the API, but, as this documents a deprecated API, used
only by av7110 driver, it doesn't make much sense to invest
time making it better.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:53:35 -03:00
Mauro Carvalho Chehab
189d7243d2 [media] docs-rst: fix the remaining broken links for DVB CA API
Several links are broken, as they were using the typedef
name, instead of using the corresponding structs. Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:52:50 -03:00
Mauro Carvalho Chehab
cdb1c89681 [media] ca-set-pid.rst: document struct ca_pid
Add a table describing the fields on this struct, based
on ca.h header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:52:16 -03:00
Mauro Carvalho Chehab
63eb58b83b [media] ca-get-slot-info.rst: document struct ca_slot_info
Add documentation for struct ca_slot_info and for the two
sets of define used by it, according with what's there at the
ca.h header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:51:09 -03:00
Mauro Carvalho Chehab
e0927092b6 [media] ca-get-msg.rst: add a boilerplate for struct ca_msg
There are no descriptions at ca.h header for this struct.
Yet, as we want to get rid of the warnings, let's add a
boilerplate, with just the struct types and fields.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:49:34 -03:00
Mauro Carvalho Chehab
302397d003 [media] ca-get-descr-info.rst: add doc for for struct ca_descr_info
The documentation follows what's there at the ca.h header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:48:58 -03:00
Mauro Carvalho Chehab
f9c0455164 [media] ca-get-cap.rst: add a table for struct ca_caps
Add a flat-table describing struct ca_caps, as found at
the source file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:45:45 -03:00
Mauro Carvalho Chehab
836cf1db4e [media] docs-rst exceptions: use C domain references for DVB headers
Now that we moved away from the :ref: type of references,
we need to update the exceptions lists.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:45:24 -03:00
Mauro Carvalho Chehab
94d71e5807 [media] cec-ioc-dqevent.rst: fix some undefined references
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_state_change
Documentation/output/cec.h.rst:6: WARNING: c:type reference target not found: cec_event_lost_msgs

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:37:53 -03:00
Mauro Carvalho Chehab
ffa0441edc [media] docs-rst: use C domain for enum references on uapi
Change the parse-headers.pl and the corresponding files to use
the C domain for enum references.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:37:11 -03:00
Mauro Carvalho Chehab
6e862f3cbb [media] diff-v4l.rst: Fix V4L version 1 references
The V4L version 1 structures had long gone from the Linux Kernel.
It doesn't make sense to use cross-references for them, as they
won't be found.

So, get rid of them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:34:46 -03:00
Mauro Carvalho Chehab
e8be7e97e6 [media] docs-rst: convert uAPI structs to C domain
instead of declaring the uAPI structs using usual refs, e. g.:
	.. _foo-struct:

Use the C domain way:
	.. c:type:: foo_struct

This way, the kAPI documentation can use cross-references to
point to the uAPI symbols.

That solves about ~100 undefined warnings like:
	WARNING: c:type reference target not found: foo_struct

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09 09:34:01 -03:00
Hans Verkuil
708c05b8fa [media] media-types.rst: fix typo
Fix copy-and-paste error: the radio devices are /dev/radio, not /dev/vbi.

Signed-off-by: Hans Verkuil <<hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 16:55:25 -03:00
Mauro Carvalho Chehab
2ba775d0f6 [media] extended-controls.rst: fix a build warning
/devel/v4l/patchwork/Documentation/media/uapi/v4l/extended-controls.rst:2116: WARNING: Inline literal start-string without end-string.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-24 10:27:38 -03:00
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
Mauro Carvalho Chehab
5632442d6c [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>
2016-07-10 09:33:26 -03:00
Mauro Carvalho Chehab
282f02cb86 [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>
2016-07-10 08:31:24 -03:00
Mauro Carvalho Chehab
303393393d [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>
2016-07-10 07:50:14 -03:00
Mauro Carvalho Chehab
68cd5e0bed [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>
2016-07-10 07:50:13 -03:00
Mauro Carvalho Chehab
8a6ba5c02f [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>
2016-07-10 07:50:13 -03:00
Mauro Carvalho Chehab
055d111b11 [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>
2016-07-10 07:50:12 -03:00
Mauro Carvalho Chehab
05a0e4dc62 [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>
2016-07-10 07:50:11 -03:00
Mauro Carvalho Chehab
80bf8b6a27 [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>
2016-07-10 07:50:11 -03:00
Mauro Carvalho Chehab
da98a79ba7 [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>
2016-07-09 11:20:46 -03:00
Mauro Carvalho Chehab
96f69e0eef [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>
2016-07-09 11:07:10 -03:00
Mauro Carvalho Chehab
d2c6815031 [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>
2016-07-09 09:49:05 -03:00
Mauro Carvalho Chehab
2dd4f70985 [media] doc-rst: Add new types to media-types.rst
Changesets:
	eaa0b96bbb ("[media] media: Add video statistics computation functions")
and
	1179aab13d ("[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>
2016-07-09 08:24:32 -03:00
Mauro Carvalho Chehab
e972d3c87f [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>
2016-07-08 18:03:02 -03:00
Mauro Carvalho Chehab
b2a584367e [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>
2016-07-08 17:59:27 -03:00
Markus Heiser
21c6269449 [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>
2016-07-08 17:39:15 -03:00
Markus Heiser
e2460b1d57 [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>
2016-07-08 17:38:55 -03:00
Mauro Carvalho Chehab
4606ce4392 [media] doc-rst: fix the Z16 format definition
Changeset 811c6d6a42 ("[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>
2016-07-08 16:32:33 -03:00
Mauro Carvalho Chehab
071dedfead [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>
2016-07-08 15:47:00 -03:00
Mauro Carvalho Chehab
53ce523986 [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>
2016-07-08 15:39:03 -03:00
Mauro Carvalho Chehab
60c2820d0f 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>
2016-07-08 11:59:40 -03:00