summaryrefslogtreecommitdiff
path: root/Documentation/media/uapi/cec
AgeCommit message (Collapse)Author
2020-04-14media: docs: move uAPI book to userspace-api/mediaMauro Carvalho Chehab
Since 2017, there is an space reserved for userspace API, created by changeset 1d596dee3862 ("docs: Create a user-space API guide"). As the media subsystem was one of the first subsystems to use Sphinx, until this patch, we were keeping things on a separate place. Let's just use the new location, as having all uAPI altogether will likely make things easier for developers. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-02-24media: Documentation/media/uapi: more readable unionsHans Verkuil
Avoid adding an extra columns when describing unions in the documentation. That makes it much harder to read. See e.g. VIDIOC_QUERY_EXT_CTRLS. Instead start off a union with 'union {' and end it with an extra row containing '}'. This leaves a lot more space for the description of the fields. This formatting technique was used in a few places already, but this patches fixes all remaining occurrences of 'union' in the media uAPI. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: Nicolas Dufresne <nicolas@ndufresne.ca> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-12-13media: cec-ioc-g-mode.rst: remove trailing 'i'Hans Verkuil
Remove spurious trailing 'i'. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2019-10-01media: cec: document CEC_ADAP_G_CONNECTOR_INFO and capabilityDariusz Marcinkiewicz
Document the new CEC_ADAP_G_CONNECTOR_INFO ioctl and the new CEC_CAP_CONNECTOR_INFO capability. Co-developed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Dariusz Marcinkiewicz <darekm@google.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: added CEC_CAP_CONNECTOR_INFO] [hverkuil-cisco@xs4all.nl: added DQEVENT have_conn_info] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-06-05media: Documentation: update email addressHans Verkuil
Use hverkuil-cisco@xs4all.nl instead of hans.verkuil@cisco.com. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-23media: cec-ioc-g-mode.rst: be more specific when EPERM is returnedHans Verkuil
Document which capability is required, rather than just saying that "root permissions" are required. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-05-23media: cec-ioc-receive.rst: document CEC_MSG_FL_RAWHans Verkuil
Document this new cec_msg flag. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-05media: add SPDX header to media uAPI filesMauro Carvalho Chehab
All those files are under GFDL 1.1 or later, with no invariant sections. Tag them as such. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-05media: remove text encoding from rst filesMauro Carvalho Chehab
This is not needed there. Also, the same UTF-8 encoding should be used on all documents. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-10-05media: cec: add new tx/rx status bits to detect aborts/timeoutsHans Verkuil
If the HDMI cable is disconnected or the CEC adapter is manually unconfigured, then all pending transmits and wait-for-replies are aborted. Signal this with new status bits (CEC_RX/TX_STATUS_ABORTED). If due to (usually) a driver bug a transmit never ends (i.e. the transmit_done was never called by the driver), then when this times out the message is marked with CEC_TX_STATUS_TIMEOUT. This should not happen and is an indication of a driver bug. Without a separate status bit for this it was impossible to detect this from userspace. The 'transmit timed out' kernel message is now a warning, so this should be more prominent in the kernel log as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-09-11media: cec-func-poll.rst/func-poll.rst: update EINVAL descriptionHans Verkuil
nfds depends on RLIMIT_NOFILE, not OPEN_MAX. Update the description for cec and v4l2. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25media: cec-ioc-dqevent.rst: document the new 5V eventsHans Verkuil
Document the two new 5V events. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-05-25media: cec: improve cec status documentationHans Verkuil
Clarify the description of status bits, particularly w.r.t. ERROR and NACK. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-03-22media: cec-pin-error-inj.rst: document CEC Pin Error InjectionHans Verkuil
The CEC Pin framework adds support for Error Injection. Document all the error injections commands and how to use it. 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: 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>