summaryrefslogtreecommitdiff
path: root/Documentation/media/uapi/cec
AgeCommit message (Collapse)Author
2017-09-23media: cec-ioc-dqevent.rst: document new CEC_EVENT_PIN_HPD_LOW/HIGH eventsHans Verkuil
Document these new CEC events. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-23media: cec-core.rst/cec-ioc-receive.rst: clarify CEC_TX_STATUS_ERRORHans Verkuil
CEC_TX_STATUS_ERROR can be used if the HW cannot tell LOST_ARB and LOW_DRIVE apart, or when some other error occurs. It is not a replacement for NACK. So the hardware must be able to tell the difference between OK, NACK and 'something else'. Clarify the documentation (both public and kernel API) on this point. Also fix two small typos (this messages -> this message). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-23media: cec-ioc-dqevent.rst: fix typoHans Verkuil
The documentation talked about INITIAL_VALUE when the actual define is INITIAL_STATE. Fix this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-05media: docs: don't show ToC for each part on PDF outputMauro Carvalho Chehab
The "Table of Contents" of a PDF file is generated only once, at the beginning fo the output. It doesn't produce it on each part. So, don't output this text on each part of the document. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-05media: cec uapi: Adjust table sizes for PDF outputMauro Carvalho Chehab
Several tables at this media book chapter have issues when PDF is produced. Adjust them. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-20media: cec: rename pin events/functionHans Verkuil
The CEC_EVENT_PIN_LOW/HIGH defines and the cec_queue_pin_event() function did not specify that these were about CEC pin events. Since in the future there will also be HPD pin events it is wise to rename the event defines and function to CEC_EVENT_PIN_CEC_LOW/HIGH and cec_queue_pin_cec_event() now before these become part of the ABI. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09media: cec-ioc-g-mode.rst: improve description of message, processingHans Verkuil
The description of how messages are processed by the core was not always very clear. Reword it to improve this. In particular for the USER_CONTROL_* messages a critical bit was missing in that the core also checks for the CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU flag. This was confusing. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-09media: cec-ioc-adap-g-log-addrs.rst: fix wrong quotesHans Verkuil
`CEC_LOG_ADDRS_FL_CDC_ONLY` should be ``CEC_LOG_ADDRS_FL_CDC_ONLY``. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-08media: cec: documentation fixesHans Verkuil
Various references to open() et al were wrong. Fix this so following the link will get you to the correct place. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-21media: get rid of a new bogus Sphinx 1.5 warningMauro Carvalho Chehab
Documentation/media/uapi/cec/cec-api.rst:17: WARNING: uapi/cec/cec-funcs is already assigned section numbers (nested numbered toctree?) Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-18media: cec: document the new CEC pin capability, events and modeHans Verkuil
Document CEC_CAP_MONITOR_PIN, CEC_EVENT_PIN_LOW/HIGH, CEC_EVENT_FL_DROPPED_EVENTS and CEC_MODE_MONITOR_PIN. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-07-18media: cec: clear all cec_log_addrs fieldsHans Verkuil
The CEC version, vendor ID and OSD name were not cleared when clearing the current set of logical addresses. This was unexpected and somewhat confusing, so reset all these fields to their default values. Also document this since the documentation wasn't quite clear either. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-20[media] cec-ioc-adap-g-caps.rst: document CEC_CAP_NEEDS_HPDHans Verkuil
Document the new CEC_CAP_NEEDS_HPD capability. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-22[media] cec: document the special unconfigured caseHans Verkuil
Even when the CEC device is unconfigured due to an invalid physical address it is still allowed to send a message from 0xf (Unregistered) to 0 (TV). This is a corner case explicitly allowed by the CEC specification. Document this corner case. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-22[media] cec: document the error codesHans Verkuil
Document all the various error codes returned by the CEC ioctls. These were never documented, instead the documentation relied on a reference to the generic error codes, but that's not sufficient. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-22[media] cec: documentation fixesHans Verkuil
Fixed a few spelling mistakes, but mostly incorrect rst syntax that caused wrong references or font style. No actual documentation changes, just fixes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30[media] cec-intro.rst: mention the v4l-utils package and CEC utilitiesHans Verkuil
Mention where to find the CEC utilities. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30[media] cec rst: remove "This API is not yet finalized" noticeHans Verkuil
The API is now finalized, so this notice should be dropped. Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec-ioc-adap-g-log-addrs.rst: describe CEC_LOG_ADDRS_FL_CDC_ONLYMauro Carvalho Chehab
The CEC_LOG_ADDRS_FL_CDC_ONLY flag is missing at the documentation, causing this warning: Documentation/output/cec.h.rst:6: WARNING: undefined label: cec-log-addrs-fl-cdc-only (if the link has no caption the label must precede a section header) Add a documentation for it, based on the commit that introduced the flag. Fixes: a69a168a1bd4 ("[media] cec: add proper support for CDC-Only CEC devices") Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec: accept two replies for CEC_MSG_INITIATE_ARCHans Verkuil
The CEC_MSG_INITIATE_ARC message is special since it is the ONLY CEC message that accepts two possible valid replies: CEC_MSG_REPORT_ARC_INITIATED and CEC_MSG_REPORT_ARC_TERMINATED. So if the transmitted message is CEC_MSG_INITIATE_ARC and the remote side replied with CEC_MSG_REPORT_ARC_INITIATED or CEC_MSG_REPORT_ARC_TERMINATED, then a msg->reply value of CEC_MSG_REPORT_ARC_INITIATED or CEC_MSG_REPORT_ARC_TERMINATED will match either reply. I thought about either adding a second reply2 field, but that's ugly for all other messages that have only one reply, and what if in the future a new message is added that can have three replies? Another option would be to add a cec_msg flag, but really, the combination of CEC_MSG_REPORT_ARC_INITIATED and a reply value of one of the two possible replies already functions as a flag. Another advantage of this approach is that it is safe to re-use a cec_msg struct. No need to zero a flags field or a reply2 field. So since this really is an exception in the CEC specification, I decided to implement it as an exception as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec: add CEC_MSG_FL_REPLY_TO_FOLLOWERSHans Verkuil
Give the caller more control over how replies to a transmit are handled. By default the reply will only go to the filehandle that called CEC_TRANSMIT. If this new flag is set, then the reply will also go to all followers. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec: add flag to cec_log_addrs to enable RC passthroughHans Verkuil
By default the CEC_MSG_USER_CONTROL_PRESSED/RELEASED messages are passed on to the follower(s) only. If the new CEC_LOG_ADDRS_FL_ALLOW_RC_PASSTHRU flag is set in the flags field of struct cec_log_addrs then these messages are also passed on to the remote control input subsystem and they will appear as keystrokes. This used to be the default behavior, but now you have to explicitly enable it. This is done to force the caller to think about possible security issues (e.g. if these messages are used to enter passwords). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-16[media] cec rst: convert tables and drop the 'row' commentsHans Verkuil
This uses Laurent's python script to convert all tables, dropping the useless 'row' comments. See commit c2b66cafdf02 ("[media] v4l: doc: Remove row numbers from tables") for the script that was used. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-05Merge tag 'v4.8' into patchworkMauro Carvalho Chehab
Linux 4.8 * tag 'v4.8': (1761 commits) Linux 4.8 ARM: 8618/1: decompressor: reset ttbcr fields to use TTBR0 on ARMv7 MIPS: CM: Fix mips_cm_max_vp_width for non-MT kernels on MT systems include/linux/property.h: fix typo/compile error ocfs2: fix deadlock on mmapped page in ocfs2_write_begin_nolock() mm: workingset: fix crash in shadow node shrinker caused by replace_page_cache_page() MAINTAINERS: Switch to kernel.org email address for Javi Merino x86/entry/64: Fix context tracking state warning when load_gs_index fails x86/boot: Initialize FPU and X86_FEATURE_ALWAYS even if we don't have CPUID x86/vdso: Fix building on big endian host x86/boot: Fix another __read_cr4() case on 486 sctp: fix the issue sctp_diag uses lock_sock in rcu_read_lock sctp: change to check peer prsctp_capable when using prsctp polices sctp: remove prsctp_param from sctp_chunk sctp: move sent_count to the memory hole in sctp_chunk tg3: Avoid NULL pointer dereference in tg3_io_error_detected() x86/init: Fix cr4_init_shadow() on CR4-less machines MIPS: Fix detection of unsupported highmem with cache aliases MIPS: Malta: Fix IOCU disable switch read for MIPS64 MIPS: Fix BUILD_ROLLBACK_PROLOGUE for microMIPS ...
2016-09-09[media] fix clock_gettime cross-referencesMauro Carvalho Chehab
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[media] docs-rst: fix some broken struct referencesMauro Carvalho Chehab
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[media] docs-rst: fix cec bad cross-referencesMauro Carvalho Chehab
Fix some CEC cross references that are broken. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-09-09[media] cec-ioc-dqevent.rst: fix some undefined referencesMauro Carvalho Chehab
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[media] docs-rst: convert uAPI structs to C domainMauro Carvalho Chehab
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-08-22[media] docs-rst: Convert CEC uAPI to use C function referencesMauro Carvalho Chehab
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[media] docs-next: stop abusing on the cpp domainMauro Carvalho Chehab
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-22Merge remote-tracking branch 'docs-next/docs-next' into devel/docs-nextMauro Carvalho Chehab
* 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-22doc-rst: migrate ioctl CEC_DQEVENT to c-domainMarkus Heiser
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[media] cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flagHans Verkuil
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[media] cec: improve dqevent documentationHans Verkuil
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[media] cec-ioc-receive.rst: one table here should be longtableMauro Carvalho Chehab
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[media] docs-rst: fix warnings introduced by LaTeX patchsetMauro Carvalho Chehab
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[media] uapi/cec: adjust tables on LaTeX outputMauro Carvalho Chehab
Fix tables to avoid text to overflow the cell limits. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-22[media] docs-rst: add tabularcolumns to all tablesMauro Carvalho Chehab
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[media] docs-rst: better use the .. note:: tagMauro Carvalho Chehab
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-07-23[media] doc-rst: better organize the media booksMauro Carvalho Chehab
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-19[media] doc-rst: cec: update documentationHans Verkuil
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-13[media] doc-rst: fix an undefined referenceMauro Carvalho Chehab
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[media] doc-rst: improve CEC documentationHans Verkuil
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-13Revert "[media] docs-rst: escape [] characters"Mauro Carvalho Chehab
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 ffbab694ede33c294e5864a5e0bf4d1474446a71.
2016-07-13[media] doc-rst: update CEC_RECEIVEHans Verkuil
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-12[media] docs-rst: escape [] charactersMauro Carvalho Chehab
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-10[media] doc-rst: improve display of notes and warningsMauro Carvalho Chehab
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[media] doc-rst: remove an extra label on V4L2 and CEC partsMauro Carvalho Chehab
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-09[media] doc-rst: make CEC look more like other parts of the bookMauro Carvalho Chehab
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>