Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'docs/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull documentation updates from Mauro Carvalho Chehab:
"A series of patches addressing warnings produced by make htmldocs.
This includes:

- kernel-doc markup fixes

- ReST fixes

- Updates at the build system in order to support newer versions of
the docs build toolchain (Sphinx)

After this series, the number of html build warnings should reduce
significantly, and building with Sphinx 3.1 or later should now be
supported (although it is still recommended to use Sphinx 2.4.4).

As agreed with Jon, I should be sending you a late pull request by the
end of the merge window addressing remaining issues with docs build,
as there are a number of warning fixes that depends on pull requests
that should be happening along the merge window.

The end goal is to have a clean htmldocs build on Kernel 5.10.

PS. It should be noticed that Sphinx 3.0 is not currently supported,
as it lacks support for C domain namespaces. Such feature, needed in
order to document uAPI system calls with Sphinx 3.x, was added only on
Sphinx 3.1"

* tag 'docs/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (75 commits)
PM / devfreq: remove a duplicated kernel-doc markup
mm/doc: fix a literal block markup
workqueue: fix a kernel-doc warning
docs: virt: user_mode_linux_howto_v2.rst: fix a literal block markup
Input: sparse-keymap: add a description for @sw
rcu/tree: docs: document bkvcache new members at struct kfree_rcu_cpu
nl80211: docs: add a description for s1g_cap parameter
usb: docs: document altmode register/unregister functions
kunit: test.h: fix a bad kernel-doc markup
drivers: core: fix kernel-doc markup for dev_err_probe()
docs: bio: fix a kerneldoc markup
kunit: test.h: solve kernel-doc warnings
block: bio: fix a warning at the kernel-doc markups
docs: powerpc: syscall64-abi.rst: fix a malformed table
drivers: net: hamradio: fix document location
net: appletalk: Kconfig: Fix docs location
dt-bindings: fix references to files converted to yaml
memblock: get rid of a :c:type leftover
math64.h: kernel-docs: Convert some markups into normal comments
media: uAPI: buffer.rst: remove a left-over documentation
...

+1952 -2275
+5 -6
Documentation/admin-guide/pm/cpufreq.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 .. include:: <isonum.txt> 3 3 4 - .. |struct cpufreq_policy| replace:: :c:type:`struct cpufreq_policy <cpufreq_policy>` 5 4 .. |intel_pstate| replace:: :doc:`intel_pstate <intel_pstate>` 6 5 7 6 ======================= ··· 91 92 all of those CPUs simultaneously. 92 93 93 94 Sets of CPUs sharing hardware P-state control interfaces are represented by 94 - ``CPUFreq`` as |struct cpufreq_policy| objects. For consistency, 95 - |struct cpufreq_policy| is also used when there is only one CPU in the given 95 + ``CPUFreq`` as struct cpufreq_policy objects. For consistency, 96 + struct cpufreq_policy is also used when there is only one CPU in the given 96 97 set. 97 98 98 - The ``CPUFreq`` core maintains a pointer to a |struct cpufreq_policy| object for 99 + The ``CPUFreq`` core maintains a pointer to a struct cpufreq_policy object for 99 100 every CPU in the system, including CPUs that are currently offline. If multiple 100 101 CPUs share the same hardware P-state control interface, all of the pointers 101 - corresponding to them point to the same |struct cpufreq_policy| object. 102 + corresponding to them point to the same struct cpufreq_policy object. 102 103 103 - ``CPUFreq`` uses |struct cpufreq_policy| as its basic data type and the design 104 + ``CPUFreq`` uses struct cpufreq_policy as its basic data type and the design 104 105 of its user space interface is based on the policy concept. 105 106 106 107
+2 -8
Documentation/admin-guide/pstore-blk.rst
··· 154 154 Only a block device driver cares about these configurations. A block device 155 155 driver uses ``register_pstore_blk`` to register to pstore/blk. 156 156 157 - .. kernel-doc:: fs/pstore/blk.c 158 - :identifiers: register_pstore_blk 159 - 160 157 A non-block device driver uses ``register_pstore_device`` with 161 158 ``struct pstore_device_info`` to register to pstore/blk. 162 159 163 160 .. kernel-doc:: fs/pstore/blk.c 164 - :identifiers: register_pstore_device 165 - 166 - .. kernel-doc:: include/linux/pstore_blk.h 167 - :identifiers: pstore_device_info 161 + :export: 168 162 169 163 Compression and header 170 164 ---------------------- ··· 231 237 :internal: 232 238 233 239 .. kernel-doc:: fs/pstore/blk.c 234 - :export: 240 + :internal: 235 241 236 242 .. kernel-doc:: include/linux/pstore_blk.h 237 243 :internal:
+6 -6
Documentation/block/blk-mq.rst
··· 63 63 ~~~~~~~~~~~~~~~~~~~~~~~ 64 64 65 65 The block IO subsystem adds requests in the software staging queues 66 - (represented by struct :c:type:`blk_mq_ctx`) in case that they weren't sent 66 + (represented by struct blk_mq_ctx) in case that they weren't sent 67 67 directly to the driver. A request is one or more BIOs. They arrived at the 68 - block layer through the data structure struct :c:type:`bio`. The block layer 69 - will then build a new structure from it, the struct :c:type:`request` that will 68 + block layer through the data structure struct bio. The block layer 69 + will then build a new structure from it, the struct request that will 70 70 be used to communicate with the device driver. Each queue has its own lock and 71 71 the number of queues is defined by a per-CPU or per-node basis. 72 72 ··· 102 102 Hardware dispatch queues 103 103 ~~~~~~~~~~~~~~~~~~~~~~~~ 104 104 105 - The hardware queue (represented by struct :c:type:`blk_mq_hw_ctx`) is a struct 105 + The hardware queue (represented by struct blk_mq_hw_ctx) is a struct 106 106 used by device drivers to map the device submission queues (or device DMA ring 107 107 buffer), and are the last step of the block layer submission code before the 108 108 low level device driver taking ownership of the request. To run this queue, the ··· 110 110 dispatch to the hardware. 111 111 112 112 If it's not possible to send the requests directly to hardware, they will be 113 - added to a linked list (:c:type:`hctx->dispatch`) of requests. Then, 113 + added to a linked list (``hctx->dispatch``) of requests. Then, 114 114 next time the block layer runs a queue, it will send the requests laying at the 115 - :c:type:`dispatch` list first, to ensure a fairness dispatch with those 115 + ``dispatch`` list first, to ensure a fairness dispatch with those 116 116 requests that were ready to be sent first. The number of hardware queues 117 117 depends on the number of hardware contexts supported by the hardware and its 118 118 device driver, but it will not be more than the number of cores of the system.
+4 -4
Documentation/block/inline-encryption.rst
··· 52 52 Design 53 53 ====== 54 54 55 - We add a :c:type:`struct bio_crypt_ctx` to :c:type:`struct bio` that can 55 + We add a struct bio_crypt_ctx to struct bio that can 56 56 represent an encryption context, because we need to be able to pass this 57 57 encryption context from the upper layers (like the fs layer) to the 58 58 device driver to act upon. ··· 85 85 ================================================================= 86 86 87 87 We add a pointer to a ``bi_crypt_context`` and ``keyslot`` to 88 - :c:type:`struct request`. These will be referred to as the ``crypto fields`` 88 + struct request. These will be referred to as the ``crypto fields`` 89 89 for the request. This ``keyslot`` is the keyslot into which the 90 90 ``bi_crypt_context`` has been programmed in the KSM of the ``request_queue`` 91 91 that this request is being sent to. ··· 118 118 If a ``request queue``'s inline encryption hardware claimed to support the 119 119 encryption context specified with a bio, then it will not be handled by the 120 120 ``blk-crypto-fallback``. We will eventually reach a point in blk-mq when a 121 - :c:type:`struct request` needs to be allocated for that bio. At that point, 121 + struct request needs to be allocated for that bio. At that point, 122 122 blk-mq tries to program the encryption context into the ``request_queue``'s 123 123 keyslot_manager, and obtain a keyslot, which it stores in its newly added 124 124 ``keyslot`` field. This keyslot is released when the request is completed. ··· 188 188 The device driver also needs to tell the KSM how to actually manipulate the 189 189 IE hardware in the device to do things like programming the crypto key into 190 190 the IE hardware into a particular keyslot. All this is achieved through the 191 - :c:type:`struct blk_ksm_ll_ops` field in the KSM that the device driver 191 + struct blk_ksm_ll_ops field in the KSM that the device driver 192 192 must fill up after initing the ``blk_keyslot_manager``. 193 193 194 194 The KSM also handles runtime power management for the device when applicable
+62 -3
Documentation/conf.py
··· 47 47 # 48 48 if major >= 3: 49 49 sys.stderr.write('''WARNING: The kernel documentation build process 50 - does not work correctly with Sphinx v3.0 and above. Expect errors 51 - in the generated output. 52 - ''') 50 + support for Sphinx v3.0 and above is brand new. Be prepared for 51 + possible issues in the generated output. 52 + ''') 53 + if minor > 0 or patch >= 2: 54 + # Sphinx c function parser is more pedantic with regards to type 55 + # checking. Due to that, having macros at c:function cause problems. 56 + # Those needed to be scaped by using c_id_attributes[] array 57 + c_id_attributes = [ 58 + # GCC Compiler types not parsed by Sphinx: 59 + "__restrict__", 60 + 61 + # include/linux/compiler_types.h: 62 + "__iomem", 63 + "__kernel", 64 + "noinstr", 65 + "notrace", 66 + "__percpu", 67 + "__rcu", 68 + "__user", 69 + 70 + # include/linux/compiler_attributes.h: 71 + "__alias", 72 + "__aligned", 73 + "__aligned_largest", 74 + "__always_inline", 75 + "__assume_aligned", 76 + "__cold", 77 + "__attribute_const__", 78 + "__copy", 79 + "__pure", 80 + "__designated_init", 81 + "__visible", 82 + "__printf", 83 + "__scanf", 84 + "__gnu_inline", 85 + "__malloc", 86 + "__mode", 87 + "__no_caller_saved_registers", 88 + "__noclone", 89 + "__nonstring", 90 + "__noreturn", 91 + "__packed", 92 + "__pure", 93 + "__section", 94 + "__always_unused", 95 + "__maybe_unused", 96 + "__used", 97 + "__weak", 98 + "noinline", 99 + 100 + # include/linux/memblock.h: 101 + "__init_memblock", 102 + "__meminit", 103 + 104 + # include/linux/init.h: 105 + "__init", 106 + "__ref", 107 + 108 + # include/linux/linkage.h: 109 + "asmlinkage", 110 + ] 111 + 53 112 else: 54 113 extensions.append('cdomain') 55 114
+2
Documentation/core-api/genericirq.rst
··· 419 419 .. kernel-doc:: kernel/irq/manage.c 420 420 421 421 .. kernel-doc:: kernel/irq/chip.c 422 + :export: 422 423 423 424 Internal Functions Provided 424 425 =========================== ··· 432 431 .. kernel-doc:: kernel/irq/handle.c 433 432 434 433 .. kernel-doc:: kernel/irq/chip.c 434 + :internal: 435 435 436 436 Credits 437 437 =======
-6
Documentation/core-api/kernel-api.rst
··· 231 231 Hardware Interfaces 232 232 =================== 233 233 234 - Interrupt Handling 235 - ------------------ 236 - 237 - .. kernel-doc:: kernel/irq/manage.c 238 - :export: 239 - 240 234 DMA Channels 241 235 ------------ 242 236
+2
Documentation/core-api/workqueue.rst
··· 396 396 ====================================== 397 397 398 398 .. kernel-doc:: include/linux/workqueue.h 399 + 400 + .. kernel-doc:: kernel/workqueue.c
+3 -3
Documentation/dev-tools/kgdb.rst
··· 726 726 - contains an arch-specific trap catcher which invokes 727 727 kgdb_handle_exception() to start kgdb about doing its work 728 728 729 - - translation to and from gdb specific packet format to :c:type:`pt_regs` 729 + - translation to and from gdb specific packet format to struct pt_regs 730 730 731 731 - Registration and unregistration of architecture specific trap 732 732 hooks ··· 846 846 the UART driver. 847 847 848 848 When using kgdboc with a UART, the UART driver must implement two 849 - callbacks in the :c:type:`struct uart_ops <uart_ops>`. 849 + callbacks in the struct uart_ops. 850 850 Example from ``drivers/8250.c``:: 851 851 852 852 ··· 875 875 The core polled keyboard driver for PS/2 type keyboards is in 876 876 ``drivers/char/kdb_keyboard.c``. This driver is hooked into the debug core 877 877 when kgdboc populates the callback in the array called 878 - :c:type:`kdb_poll_funcs[]`. The kdb_get_kbd_char() is the top-level 878 + :c:expr:`kdb_poll_funcs[]`. The kdb_get_kbd_char() is the top-level 879 879 function which polls hardware for single character input. 880 880 881 881 kgdboc and kms
+1 -1
Documentation/devicetree/bindings/display/tilcdc/tilcdc.txt
··· 37 37 supports a single port with a single endpoint. 38 38 39 39 - See also Documentation/devicetree/bindings/display/tilcdc/panel.txt and 40 - Documentation/devicetree/bindings/display/bridge/ti,tfp410.txt for connecting 40 + Documentation/devicetree/bindings/display/bridge/ti,tfp410.yaml for connecting 41 41 tfp410 DVI encoder or lcd panel to lcdc 42 42 43 43 [1] There is an errata about AM335x color wiring. For 16-bit color mode
+1 -1
Documentation/devicetree/bindings/mailbox/omap-mailbox.txt
··· 69 69 the interrupt routes between the IP and the main GIC 70 70 controllers. See the following binding for additional 71 71 details, 72 - Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.txt 72 + Documentation/devicetree/bindings/interrupt-controller/ti,sci-intr.yaml 73 73 74 74 Child Nodes: 75 75 ============
+1 -1
Documentation/devicetree/bindings/media/i2c/tvp5150.txt
··· 56 56 instead of using the autodetection mechnism. Please look at 57 57 [1] for more information. 58 58 59 - [1] Documentation/devicetree/bindings/display/connector/analog-tv-connector.txt. 59 + [1] Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml. 60 60 61 61 Example - three input sources: 62 62 #include <dt-bindings/display/sdtv-standards.h>
+1 -1
Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.yaml
··· 14 14 Google's ChromeOS EC PWM is a simple PWM attached to the Embedded Controller 15 15 (EC) and controlled via a host-command interface. 16 16 An EC PWM node should be only found as a sub-node of the EC node (see 17 - Documentation/devicetree/bindings/mfd/cros-ec.txt). 17 + Documentation/devicetree/bindings/mfd/google,cros-ec.yaml). 18 18 19 19 properties: 20 20 compatible:
+1 -1
Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml
··· 20 20 present and this subnode may contain children that designate regulator 21 21 resources. 22 22 23 - Refer to Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt 23 + Refer to Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml 24 24 for information on the regulator subnodes that can exist under the 25 25 rpm_requests. 26 26
+1 -1
Documentation/devicetree/bindings/sound/google,cros-ec-codec.yaml
··· 13 13 Google's ChromeOS EC codec is a digital mic codec provided by the 14 14 Embedded Controller (EC) and is controlled via a host-command interface. 15 15 An EC codec node should only be found as a sub-node of the EC node (see 16 - Documentation/devicetree/bindings/mfd/cros-ec.txt). 16 + Documentation/devicetree/bindings/mfd/google,cros-ec.yaml). 17 17 18 18 properties: 19 19 compatible:
+8
Documentation/doc-guide/kernel-doc.rst
··· 490 490 .. kernel-doc:: lib/idr.c 491 491 :identifiers: 492 492 493 + no-identifiers: *[ function/type ...]* 494 + Exclude documentation for each *function* and *type* in *source*. 495 + 496 + Example:: 497 + 498 + .. kernel-doc:: lib/bitmap.c 499 + :no-identifiers: bitmap_parselist 500 + 493 501 functions: *[ function/type ...]* 494 502 This is an alias of the 'identifiers' directive and deprecated. 495 503
+4 -15
Documentation/driver-api/basics.rst
··· 12 12 13 13 .. kernel-doc:: include/linux/mod_devicetable.h 14 14 :internal: 15 + :no-identifiers: pci_device_id 16 + 15 17 16 18 Delaying, scheduling, and timer routines 17 19 ---------------------------------------- ··· 57 55 .. kernel-doc:: kernel/time/hrtimer.c 58 56 :export: 59 57 60 - Workqueues and Kevents 61 - ---------------------- 62 - 63 - .. kernel-doc:: include/linux/workqueue.h 64 - :internal: 65 - 66 - .. kernel-doc:: kernel/workqueue.c 67 - :export: 68 - 69 58 Internal Functions 70 59 ------------------ 71 60 ··· 98 105 99 106 .. kernel-doc:: include/linux/kernel.h 100 107 :internal: 108 + :no-identifiers: kstrtol kstrtoul 101 109 102 110 .. kernel-doc:: kernel/printk/printk.c 103 111 :export: 112 + :no-identifiers: printk 104 113 105 114 .. kernel-doc:: kernel/panic.c 106 - :export: 107 - 108 - .. kernel-doc:: kernel/rcu/tree.c 109 - :export: 110 - 111 - .. kernel-doc:: kernel/rcu/update.c 112 115 :export: 113 116 114 117 .. kernel-doc:: include/linux/overflow.h
+4 -9
Documentation/driver-api/device_link.rst
··· 1 - .. |struct dev_pm_domain| replace:: :c:type:`struct dev_pm_domain <dev_pm_domain>` 2 - .. |struct generic_pm_domain| replace:: :c:type:`struct generic_pm_domain <generic_pm_domain>` 3 - 4 - 5 1 .. _device_link: 6 2 7 3 ============ ··· 162 166 is the same as if the MMU was the parent of the master device. 163 167 164 168 The fact that both devices share the same power domain would normally 165 - suggest usage of a |struct dev_pm_domain| or |struct generic_pm_domain|, 169 + suggest usage of a struct dev_pm_domain or struct generic_pm_domain, 166 170 however these are not independent devices that happen to share a power 167 171 switch, but rather the MMU device serves the busmaster device and is 168 172 useless without it. A device link creates a synthetic hierarchical ··· 198 202 Alternatives 199 203 ============ 200 204 201 - * A |struct dev_pm_domain| can be used to override the bus, 205 + * A struct dev_pm_domain can be used to override the bus, 202 206 class or device type callbacks. It is intended for devices sharing 203 207 a single on/off switch, however it does not guarantee a specific 204 208 suspend/resume ordering, this needs to be implemented separately. ··· 207 211 suspended. Furthermore it cannot be used to enforce a specific shutdown 208 212 ordering or a driver presence dependency. 209 213 210 - * A |struct generic_pm_domain| is a lot more heavyweight than a 214 + * A struct generic_pm_domain is a lot more heavyweight than a 211 215 device link and does not allow for shutdown ordering or driver presence 212 216 dependencies. It also cannot be used on ACPI systems. 213 217 ··· 317 321 API 318 322 === 319 323 320 - .. kernel-doc:: drivers/base/core.c 321 - :functions: device_link_add device_link_del device_link_remove 324 + See device_link_add(), device_link_del() and device_link_remove().
+2 -2
Documentation/driver-api/fpga/fpga-bridge.rst
··· 4 4 API to implement a new FPGA bridge 5 5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 6 6 7 - * struct :c:type:`fpga_bridge` — The FPGA Bridge structure 8 - * struct :c:type:`fpga_bridge_ops` — Low level Bridge driver ops 7 + * struct fpga_bridge — The FPGA Bridge structure 8 + * struct fpga_bridge_ops — Low level Bridge driver ops 9 9 * devm_fpga_bridge_create() — Allocate and init a bridge struct 10 10 * fpga_bridge_register() — Register a bridge 11 11 * fpga_bridge_unregister() — Unregister a bridge
+3 -3
Documentation/driver-api/fpga/fpga-mgr.rst
··· 101 101 API for implementing a new FPGA Manager driver 102 102 ---------------------------------------------- 103 103 104 - * ``fpga_mgr_states`` — Values for :c:member:`fpga_manager->state`. 105 - * struct :c:type:`fpga_manager` — the FPGA manager struct 106 - * struct :c:type:`fpga_manager_ops` — Low level FPGA manager driver ops 104 + * ``fpga_mgr_states`` — Values for :c:expr:`fpga_manager->state`. 105 + * struct fpga_manager — the FPGA manager struct 106 + * struct fpga_manager_ops — Low level FPGA manager driver ops 107 107 * devm_fpga_mgr_create() — Allocate and init a manager struct 108 108 * fpga_mgr_register() — Register an FPGA manager 109 109 * fpga_mgr_unregister() — Unregister an FPGA manager
+1 -1
Documentation/driver-api/fpga/fpga-programming.rst
··· 15 15 * lock the mutex of the region's FPGA manager 16 16 * build a list of FPGA bridges if a method has been specified to do so 17 17 * disable the bridges 18 - * program the FPGA using info passed in :c:member:`fpga_region->info`. 18 + * program the FPGA using info passed in :c:expr:`fpga_region->info`. 19 19 * re-enable the bridges 20 20 * release the locks 21 21
+3 -3
Documentation/driver-api/fpga/fpga-region.rst
··· 45 45 API to add a new FPGA region 46 46 ---------------------------- 47 47 48 - * struct :c:type:`fpga_region` — The FPGA region struct 48 + * struct fpga_region — The FPGA region struct 49 49 * devm_fpga_region_create() — Allocate and init a region struct 50 50 * fpga_region_register() — Register an FPGA region 51 51 * fpga_region_unregister() — Unregister an FPGA region ··· 61 61 62 62 The FPGA region will need to specify which bridges to control while programming 63 63 the FPGA. The region driver can build a list of bridges during probe time 64 - (:c:member:`fpga_region->bridge_list`) or it can have a function that creates 64 + (:c:expr:`fpga_region->bridge_list`) or it can have a function that creates 65 65 the list of bridges to program just before programming 66 - (:c:member:`fpga_region->get_bridges`). The FPGA bridge framework supplies the 66 + (:c:expr:`fpga_region->get_bridges`). The FPGA bridge framework supplies the 67 67 following APIs to handle building or tearing down that list. 68 68 69 69 * fpga_bridge_get_to_list() — Get a ref of an FPGA bridge, add it to a
+1 -1
Documentation/driver-api/iio/buffers.rst
··· 2 2 Buffers 3 3 ======= 4 4 5 - * struct :c:type:`iio_buffer` — general buffer structure 5 + * struct iio_buffer — general buffer structure 6 6 * :c:func:`iio_validate_scan_mask_onehot` — Validates that exactly one channel 7 7 is selected 8 8 * :c:func:`iio_buffer_get` — Grab a reference to the buffer
+3 -3
Documentation/driver-api/iio/core.rst
··· 10 10 Industrial I/O Devices 11 11 ---------------------- 12 12 13 - * struct :c:type:`iio_dev` - industrial I/O device 13 + * struct iio_dev - industrial I/O device 14 14 * iio_device_alloc() - allocate an :c:type:`iio_dev` from a driver 15 15 * iio_device_free() - free an :c:type:`iio_dev` from a driver 16 16 * iio_device_register() - register a device with the IIO subsystem ··· 66 66 IIO device channels 67 67 =================== 68 68 69 - struct :c:type:`iio_chan_spec` - specification of a single channel 69 + struct iio_chan_spec - specification of a single channel 70 70 71 71 An IIO device channel is a representation of a data channel. An IIO device can 72 72 have one or multiple channels. For example: ··· 77 77 * an accelerometer can have up to 3 channels representing acceleration on X, Y 78 78 and Z axes. 79 79 80 - An IIO channel is described by the struct :c:type:`iio_chan_spec`. 80 + An IIO channel is described by the struct iio_chan_spec. 81 81 A thermometer driver for the temperature sensor in the example above would 82 82 have to describe its channel as follows:: 83 83
+1 -1
Documentation/driver-api/iio/hw-consumer.rst
··· 8 8 :file:`drivers/iio/buffer/hw-consumer.c` 9 9 10 10 11 - * struct :c:type:`iio_hw_consumer` — Hardware consumer structure 11 + * struct iio_hw_consumer — Hardware consumer structure 12 12 * :c:func:`iio_hw_consumer_alloc` — Allocate IIO hardware consumer 13 13 * :c:func:`iio_hw_consumer_free` — Free IIO hardware consumer 14 14 * :c:func:`iio_hw_consumer_enable` — Enable IIO hardware consumer
+1 -1
Documentation/driver-api/iio/triggered-buffers.rst
··· 10 10 * :c:func:`iio_triggered_buffer_setup` — Setup triggered buffer and pollfunc 11 11 * :c:func:`iio_triggered_buffer_cleanup` — Free resources allocated by 12 12 :c:func:`iio_triggered_buffer_setup` 13 - * struct :c:type:`iio_buffer_setup_ops` — buffer setup related callbacks 13 + * struct iio_buffer_setup_ops — buffer setup related callbacks 14 14 15 15 A typical triggered buffer setup looks like this:: 16 16
+2 -2
Documentation/driver-api/iio/triggers.rst
··· 2 2 Triggers 3 3 ======== 4 4 5 - * struct :c:type:`iio_trigger` — industrial I/O trigger device 5 + * struct iio_trigger — industrial I/O trigger device 6 6 * :c:func:`devm_iio_trigger_alloc` — Resource-managed iio_trigger_alloc 7 7 * :c:func:`devm_iio_trigger_register` — Resource-managed iio_trigger_register 8 8 iio_trigger_unregister ··· 63 63 IIO trigger ops 64 64 =============== 65 65 66 - * struct :c:type:`iio_trigger_ops` — operations structure for an iio_trigger. 66 + * struct iio_trigger_ops — operations structure for an iio_trigger. 67 67 68 68 Notice that a trigger has a set of operations attached: 69 69
-1
Documentation/driver-api/index.rst
··· 27 27 component 28 28 message-based 29 29 infiniband 30 - sound 31 30 frame-buffer 32 31 regulator 33 32 iio/index
+1 -3
Documentation/driver-api/infrastructure.rst
··· 6 6 7 7 .. kernel-doc:: include/linux/device.h 8 8 :internal: 9 + :no-identifiers: device_link_state 9 10 10 11 Device Drivers Base 11 12 ------------------- ··· 28 27 29 28 .. kernel-doc:: drivers/base/node.c 30 29 :internal: 31 - 32 - .. kernel-doc:: drivers/base/firmware_loader/main.c 33 - :export: 34 30 35 31 .. kernel-doc:: drivers/base/transport_class.c 36 32 :export:
+1 -1
Documentation/driver-api/libata.rst
··· 508 508 509 509 2. ATA_QCFLAG_ACTIVE is cleared from qc->flags. 510 510 511 - 3. :c:func:`qc->complete_fn` callback is invoked. If the return value of the 511 + 3. :c:expr:`qc->complete_fn` callback is invoked. If the return value of the 512 512 callback is not zero. Completion is short circuited and 513 513 :c:func:`ata_qc_complete` returns. 514 514
+1 -1
Documentation/driver-api/media/cec-core.rst
··· 98 98 The following low-level adapter operations have to be implemented in 99 99 your driver: 100 100 101 - .. c:type:: struct cec_adap_ops 101 + .. c:struct:: cec_adap_ops 102 102 103 103 .. code-block:: none 104 104
+2 -2
Documentation/driver-api/media/dtv-frontend.rst
··· 125 125 detect a channel, as defined at enum :c:func:`dvbfe_algo`. 126 126 127 127 The algorithm to be used is obtained via ``.get_frontend_algo``. If the driver 128 - doesn't fill its field at struct :c:type:`dvb_frontend_ops`, it will default to 128 + doesn't fill its field at struct dvb_frontend_ops, it will default to 129 129 ``DVBFE_ALGO_SW``, meaning that the dvb-core will do a zigzag when tuning, 130 130 e. g. it will try first to use the specified center frequency ``f``, 131 131 then, it will do ``f`` + |delta|, ``f`` - |delta|, ``f`` + 2 x |delta|, ··· 140 140 a third type (``DVBFE_ALGO_CUSTOM``), in order to allow the driver to 141 141 define its own hardware-assisted algorithm. Very few hardware need to 142 142 use it nowadays. Using ``DVBFE_ALGO_CUSTOM`` require to provide other 143 - function callbacks at struct :c:type:`dvb_frontend_ops`. 143 + function callbacks at struct dvb_frontend_ops. 144 144 145 145 Attaching frontend driver to the bridge driver 146 146 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+12 -12
Documentation/driver-api/media/mc-core.rst
··· 36 36 Media device 37 37 ^^^^^^^^^^^^ 38 38 39 - A media device is represented by a struct :c:type:`media_device` 39 + A media device is represented by a struct media_device 40 40 instance, defined in ``include/media/media-device.h``. 41 41 Allocation of the structure is handled by the media device driver, usually by 42 42 embedding the :c:type:`media_device` instance in a larger driver-specific ··· 49 49 Entities 50 50 ^^^^^^^^ 51 51 52 - Entities are represented by a struct :c:type:`media_entity` 52 + Entities are represented by a struct media_entity 53 53 instance, defined in ``include/media/media-entity.h``. The structure is usually 54 54 embedded into a higher-level structure, such as 55 55 :c:type:`v4l2_subdev` or :c:type:`video_device` ··· 67 67 ^^^^^^^^^^ 68 68 69 69 Interfaces are represented by a 70 - struct :c:type:`media_interface` instance, defined in 70 + struct media_interface instance, defined in 71 71 ``include/media/media-entity.h``. Currently, only one type of interface is 72 72 defined: a device node. Such interfaces are represented by a 73 - struct :c:type:`media_intf_devnode`. 73 + struct media_intf_devnode. 74 74 75 75 Drivers initialize and create device node interfaces by calling 76 76 :c:func:`media_devnode_create()` ··· 79 79 80 80 Pads 81 81 ^^^^ 82 - Pads are represented by a struct :c:type:`media_pad` instance, 82 + Pads are represented by a struct media_pad instance, 83 83 defined in ``include/media/media-entity.h``. Each entity stores its pads in 84 84 a pads array managed by the entity driver. Drivers usually embed the array in 85 85 a driver-specific structure. ··· 87 87 Pads are identified by their entity and their 0-based index in the pads 88 88 array. 89 89 90 - Both information are stored in the struct :c:type:`media_pad`, 91 - making the struct :c:type:`media_pad` pointer the canonical way 90 + Both information are stored in the struct media_pad, 91 + making the struct media_pad pointer the canonical way 92 92 to store and pass link references. 93 93 94 94 Pads have flags that describe the pad capabilities and state. ··· 104 104 Links 105 105 ^^^^^ 106 106 107 - Links are represented by a struct :c:type:`media_link` instance, 107 + Links are represented by a struct media_link instance, 108 108 defined in ``include/media/media-entity.h``. There are two types of links: 109 109 110 110 **1. pad to pad links**: ··· 187 187 188 188 Due to the wide differences between drivers regarding power management 189 189 needs, the media controller does not implement power management. However, 190 - the struct :c:type:`media_entity` includes a ``use_count`` 190 + the struct media_entity includes a ``use_count`` 191 191 field that media drivers 192 192 can use to track the number of users of every entity for power management 193 193 needs. ··· 213 213 The function will mark all entities connected to the given entity through 214 214 enabled links, either directly or indirectly, as streaming. 215 215 216 - The struct :c:type:`media_pipeline` instance pointed to by 216 + The struct media_pipeline instance pointed to by 217 217 the pipe argument will be stored in every entity in the pipeline. 218 - Drivers should embed the struct :c:type:`media_pipeline` 218 + Drivers should embed the struct media_pipeline 219 219 in higher-level pipeline structures and can then access the 220 - pipeline through the struct :c:type:`media_entity` 220 + pipeline through the struct media_entity 221 221 pipe field. 222 222 223 223 Calls to :c:func:`media_pipeline_start()` can be nested.
+1 -1
Documentation/driver-api/media/v4l2-controls.rst
··· 27 27 life as easy as possible for the driver developer. 28 28 29 29 Note that the control framework relies on the presence of a struct 30 - :c:type:`v4l2_device` for V4L2 drivers and struct :c:type:`v4l2_subdev` for 30 + :c:type:`v4l2_device` for V4L2 drivers and struct v4l2_subdev for 31 31 sub-device drivers. 32 32 33 33
+4 -4
Documentation/driver-api/media/v4l2-dev.rst
··· 67 67 file operation is called this lock will be taken by the core and released 68 68 afterwards. See the next section for more details. 69 69 70 - - :c:type:`video_device`->queue: a pointer to the struct :c:type:`vb2_queue` 70 + - :c:type:`video_device`->queue: a pointer to the struct vb2_queue 71 71 associated with this device node. 72 72 If queue is not ``NULL``, and queue->lock is not ``NULL``, then queue->lock 73 73 is used for the queuing ioctls (``VIDIOC_REQBUFS``, ``CREATE_BUFS``, ··· 81 81 82 82 - :c:type:`video_device`->prio: keeps track of the priorities. Used to 83 83 implement ``VIDIOC_G_PRIORITY`` and ``VIDIOC_S_PRIORITY``. 84 - If left to ``NULL``, then it will use the struct :c:type:`v4l2_prio_state` 84 + If left to ``NULL``, then it will use the struct v4l2_prio_state 85 85 in :c:type:`v4l2_device`. If you want to have a separate priority state per 86 86 (group of) device node(s), then you can point it to your own struct 87 87 :c:type:`v4l2_prio_state`. ··· 95 95 but it is used by both a raw video PCI device (cx8800) and a MPEG PCI device 96 96 (cx8802). Since the :c:type:`v4l2_device` cannot be associated with two PCI 97 97 devices at the same time it is setup without a parent device. But when the 98 - struct :c:type:`video_device` is initialized you **do** know which parent 98 + struct video_device is initialized you **do** know which parent 99 99 PCI device to use and so you set ``dev_device`` to the correct PCI device. 100 100 101 101 If you use :c:type:`v4l2_ioctl_ops`, then you should set ··· 138 138 ------------------ 139 139 140 140 The V4L core provides optional locking services. The main service is the 141 - lock field in struct :c:type:`video_device`, which is a pointer to a mutex. 141 + lock field in struct video_device, which is a pointer to a mutex. 142 142 If you set this pointer, then that will be used by unlocked_ioctl to 143 143 serialize all ioctls. 144 144
+3 -3
Documentation/driver-api/media/v4l2-device.rst
··· 3 3 V4L2 device instance 4 4 -------------------- 5 5 6 - Each device instance is represented by a struct :c:type:`v4l2_device`. 6 + Each device instance is represented by a struct v4l2_device. 7 7 Very simple devices can just allocate this struct, but most of the time you 8 8 would embed this struct inside a larger struct. 9 9 ··· 18 18 19 19 Drivers that want integration with the media device framework need to set 20 20 dev->driver_data manually to point to the driver-specific device structure 21 - that embed the struct :c:type:`v4l2_device` instance. This is achieved by a 21 + that embed the struct v4l2_device instance. This is achieved by a 22 22 ``dev_set_drvdata()`` call before registering the V4L2 device instance. 23 - They must also set the struct :c:type:`v4l2_device` mdev field to point to a 23 + They must also set the struct v4l2_device mdev field to point to a 24 24 properly initialized and registered :c:type:`media_device` instance. 25 25 26 26 If :c:type:`v4l2_dev <v4l2_device>`\ ->name is empty then it will be set to a
+5 -5
Documentation/driver-api/media/v4l2-event.rst
··· 44 44 45 45 So to summarize: 46 46 47 - - struct :c:type:`v4l2_fh` has two lists: one of the ``subscribed`` events, 47 + - struct v4l2_fh has two lists: one of the ``subscribed`` events, 48 48 and one of the ``available`` events. 49 49 50 - - struct :c:type:`v4l2_subscribed_event` has a ringbuffer of raised 50 + - struct v4l2_subscribed_event has a ringbuffer of raised 51 51 (pending) events of that particular type. 52 52 53 - - If struct :c:type:`v4l2_subscribed_event` is associated with a specific 53 + - If struct v4l2_subscribed_event is associated with a specific 54 54 object, then that object will have an internal list of 55 - struct :c:type:`v4l2_subscribed_event` so it knows who subscribed an 55 + struct v4l2_subscribed_event so it knows who subscribed an 56 56 event to that object. 57 57 58 - Furthermore, the internal struct :c:type:`v4l2_subscribed_event` has 58 + Furthermore, the internal struct v4l2_subscribed_event has 59 59 ``merge()`` and ``replace()`` callbacks which drivers can set. These 60 60 callbacks are called when a new event is raised and there is no more room. 61 61
+8 -8
Documentation/driver-api/media/v4l2-fh.rst
··· 3 3 V4L2 File handlers 4 4 ------------------ 5 5 6 - struct :c:type:`v4l2_fh` provides a way to easily keep file handle specific 6 + struct v4l2_fh provides a way to easily keep file handle specific 7 7 data that is used by the V4L2 framework. 8 8 9 9 .. attention:: 10 - New drivers must use struct :c:type:`v4l2_fh` 10 + New drivers must use struct v4l2_fh 11 11 since it is also used to implement priority handling 12 12 (:ref:`VIDIOC_G_PRIORITY`). 13 13 ··· 16 16 by testing the ``V4L2_FL_USES_V4L2_FH`` bit in :c:type:`video_device`->flags. 17 17 This bit is set whenever :c:func:`v4l2_fh_init` is called. 18 18 19 - struct :c:type:`v4l2_fh` is allocated as a part of the driver's own file handle 19 + struct v4l2_fh is allocated as a part of the driver's own file handle 20 20 structure and ``file->private_data`` is set to it in the driver's ``open()`` 21 21 function by the driver. 22 22 23 - In many cases the struct :c:type:`v4l2_fh` will be embedded in a larger 23 + In many cases the struct v4l2_fh will be embedded in a larger 24 24 structure. In that case you should call: 25 25 26 26 #) :c:func:`v4l2_fh_init` and :c:func:`v4l2_fh_add` in ``open()`` ··· 102 102 memory can be freed. 103 103 104 104 105 - If struct :c:type:`v4l2_fh` is not embedded, then you can use these helper functions: 105 + If struct v4l2_fh is not embedded, then you can use these helper functions: 106 106 107 107 :c:func:`v4l2_fh_open <v4l2_fh_open>` 108 108 (struct file \*filp) 109 109 110 - - This allocates a struct :c:type:`v4l2_fh`, initializes it and adds it to 111 - the struct :c:type:`video_device` associated with the file struct. 110 + - This allocates a struct v4l2_fh, initializes it and adds it to 111 + the struct video_device associated with the file struct. 112 112 113 113 :c:func:`v4l2_fh_release <v4l2_fh_release>` 114 114 (struct file \*filp) 115 115 116 - - This deletes it from the struct :c:type:`video_device` associated with the 116 + - This deletes it from the struct video_device associated with the 117 117 file struct, uninitialised the :c:type:`v4l2_fh` and frees it. 118 118 119 119 These two functions can be plugged into the v4l2_file_operation's ``open()``
+1 -1
Documentation/driver-api/media/v4l2-subdev.rst
··· 110 110 err = media_entity_pads_init(&sd->entity, npads, pads); 111 111 112 112 The pads array must have been previously initialized. There is no need to 113 - manually set the struct :c:type:`media_entity` function and name fields, but the 113 + manually set the struct media_entity function and name fields, but the 114 114 revision field must be initialized if needed. 115 115 116 116 A reference to the entity will be automatically acquired/released when the
+1 -1
Documentation/driver-api/mei/mei.rst
··· 38 38 configuration, the driver by default allows only a privileged 39 39 user to access it. 40 40 41 - The session is terminated calling :c:func:`close(int fd)`. 41 + The session is terminated calling :c:expr:`close(fd)`. 42 42 43 43 A code snippet for an application communicating with Intel AMTHI client: 44 44
+30 -35
Documentation/driver-api/pm/cpuidle.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 .. include:: <isonum.txt> 3 3 4 - .. |struct cpuidle_governor| replace:: :c:type:`struct cpuidle_governor <cpuidle_governor>` 5 - .. |struct cpuidle_device| replace:: :c:type:`struct cpuidle_device <cpuidle_device>` 6 - .. |struct cpuidle_driver| replace:: :c:type:`struct cpuidle_driver <cpuidle_driver>` 7 - .. |struct cpuidle_state| replace:: :c:type:`struct cpuidle_state <cpuidle_state>` 8 - 9 4 ======================== 10 5 CPU Idle Time Management 11 6 ======================== ··· 49 54 operated on by them cannot depend on any hardware architecture or platform 50 55 design details as well. 51 56 52 - The governor itself is represented by a |struct cpuidle_governor| object 57 + The governor itself is represented by a struct cpuidle_governor object 53 58 containing four callback pointers, :c:member:`enable`, :c:member:`disable`, 54 59 :c:member:`select`, :c:member:`reflect`, a :c:member:`rating` field described 55 60 below, and a name (string) used for identifying it. ··· 78 83 int (*enable) (struct cpuidle_driver *drv, struct cpuidle_device *dev); 79 84 80 85 The role of this callback is to prepare the governor for handling the 81 - (logical) CPU represented by the |struct cpuidle_device| object pointed 82 - to by the ``dev`` argument. The |struct cpuidle_driver| object pointed 86 + (logical) CPU represented by the struct cpuidle_device object pointed 87 + to by the ``dev`` argument. The struct cpuidle_driver object pointed 83 88 to by the ``drv`` argument represents the ``CPUIdle`` driver to be used 84 89 with that CPU (among other things, it should contain the list of 85 - |struct cpuidle_state| objects representing idle states that the 90 + struct cpuidle_state objects representing idle states that the 86 91 processor holding the given CPU can be asked to enter). 87 92 88 93 It may fail, in which case it is expected to return a negative error ··· 97 102 void (*disable) (struct cpuidle_driver *drv, struct cpuidle_device *dev); 98 103 99 104 Called to make the governor stop handling the (logical) CPU represented 100 - by the |struct cpuidle_device| object pointed to by the ``dev`` 105 + by the struct cpuidle_device object pointed to by the ``dev`` 101 106 argument. 102 107 103 108 It is expected to reverse any changes made by the ``->enable()`` ··· 111 116 bool *stop_tick); 112 117 113 118 Called to select an idle state for the processor holding the (logical) 114 - CPU represented by the |struct cpuidle_device| object pointed to by the 119 + CPU represented by the struct cpuidle_device object pointed to by the 115 120 ``dev`` argument. 116 121 117 122 The list of idle states to take into consideration is represented by the 118 - :c:member:`states` array of |struct cpuidle_state| objects held by the 119 - |struct cpuidle_driver| object pointed to by the ``drv`` argument (which 123 + :c:member:`states` array of struct cpuidle_state objects held by the 124 + struct cpuidle_driver object pointed to by the ``drv`` argument (which 120 125 represents the ``CPUIdle`` driver to be used with the CPU at hand). The 121 126 value returned by this callback is interpreted as an index into that 122 127 array (unless it is a negative error code). ··· 131 136 asking the processor to enter the idle state). 132 137 133 138 This callback is mandatory (i.e. the :c:member:`select` callback pointer 134 - in |struct cpuidle_governor| must not be ``NULL`` for the registration 139 + in struct cpuidle_governor must not be ``NULL`` for the registration 135 140 of the governor to succeed). 136 141 137 142 :c:member:`reflect` ··· 162 167 other parts of ``CPUIdle`` and the hardware. 163 168 164 169 First of all, a ``CPUIdle`` driver has to populate the :c:member:`states` array 165 - of |struct cpuidle_state| objects included in the |struct cpuidle_driver| object 170 + of struct cpuidle_state objects included in the struct cpuidle_driver object 166 171 representing it. Going forward this array will represent the list of available 167 172 idle states that the processor hardware can be asked to enter shared by all of 168 173 the logical CPUs handled by the given driver. 169 174 170 175 The entries in the :c:member:`states` array are expected to be sorted by the 171 - value of the :c:member:`target_residency` field in |struct cpuidle_state| in 176 + value of the :c:member:`target_residency` field in struct cpuidle_state in 172 177 the ascending order (that is, index 0 should correspond to the idle state with 173 178 the minimum value of :c:member:`target_residency`). [Since the 174 179 :c:member:`target_residency` value is expected to reflect the "depth" of the 175 - idle state represented by the |struct cpuidle_state| object holding it, this 180 + idle state represented by the struct cpuidle_state object holding it, this 176 181 sorting order should be the same as the ascending sorting order by the idle 177 182 state "depth".] 178 183 179 - Three fields in |struct cpuidle_state| are used by the existing ``CPUIdle`` 184 + Three fields in struct cpuidle_state are used by the existing ``CPUIdle`` 180 185 governors for computations related to idle state selection: 181 186 182 187 :c:member:`target_residency` ··· 198 203 any idle state at all. [There are other flags used by the ``CPUIdle`` 199 204 core in special situations.] 200 205 201 - The :c:member:`enter` callback pointer in |struct cpuidle_state|, which must not 206 + The :c:member:`enter` callback pointer in struct cpuidle_state, which must not 202 207 be ``NULL``, points to the routine to execute in order to ask the processor to 203 208 enter this particular idle state: 204 209 ··· 207 212 void (*enter) (struct cpuidle_device *dev, struct cpuidle_driver *drv, 208 213 int index); 209 214 210 - The first two arguments of it point to the |struct cpuidle_device| object 215 + The first two arguments of it point to the struct cpuidle_device object 211 216 representing the logical CPU running this callback and the 212 - |struct cpuidle_driver| object representing the driver itself, respectively, 213 - and the last one is an index of the |struct cpuidle_state| entry in the driver's 217 + struct cpuidle_driver object representing the driver itself, respectively, 218 + and the last one is an index of the struct cpuidle_state entry in the driver's 214 219 :c:member:`states` array representing the idle state to ask the processor to 215 220 enter. 216 221 217 - The analogous ``->enter_s2idle()`` callback in |struct cpuidle_state| is used 222 + The analogous ``->enter_s2idle()`` callback in struct cpuidle_state is used 218 223 only for implementing the suspend-to-idle system-wide power management feature. 219 224 The difference between in and ``->enter()`` is that it must not re-enable 220 225 interrupts at any point (even temporarily) or attempt to change the states of ··· 222 227 223 228 Once the :c:member:`states` array has been populated, the number of valid 224 229 entries in it has to be stored in the :c:member:`state_count` field of the 225 - |struct cpuidle_driver| object representing the driver. Moreover, if any 230 + struct cpuidle_driver object representing the driver. Moreover, if any 226 231 entries in the :c:member:`states` array represent "coupled" idle states (that 227 232 is, idle states that can only be asked for if multiple related logical CPUs are 228 - idle), the :c:member:`safe_state_index` field in |struct cpuidle_driver| needs 233 + idle), the :c:member:`safe_state_index` field in struct cpuidle_driver needs 229 234 to be the index of an idle state that is not "coupled" (that is, one that can be 230 235 asked for if only one logical CPU is idle). 231 236 232 237 In addition to that, if the given ``CPUIdle`` driver is only going to handle a 233 238 subset of logical CPUs in the system, the :c:member:`cpumask` field in its 234 - |struct cpuidle_driver| object must point to the set (mask) of CPUs that will be 239 + struct cpuidle_driver object must point to the set (mask) of CPUs that will be 235 240 handled by it. 236 241 237 242 A ``CPUIdle`` driver can only be used after it has been registered. If there 238 243 are no "coupled" idle state entries in the driver's :c:member:`states` array, 239 - that can be accomplished by passing the driver's |struct cpuidle_driver| object 244 + that can be accomplished by passing the driver's struct cpuidle_driver object 240 245 to :c:func:`cpuidle_register_driver()`. Otherwise, :c:func:`cpuidle_register()` 241 246 should be used for this purpose. 242 247 243 - However, it also is necessary to register |struct cpuidle_device| objects for 248 + However, it also is necessary to register struct cpuidle_device objects for 244 249 all of the logical CPUs to be handled by the given ``CPUIdle`` driver with the 245 250 help of :c:func:`cpuidle_register_device()` after the driver has been registered 246 251 and :c:func:`cpuidle_register_driver()`, unlike :c:func:`cpuidle_register()`, 247 252 does not do that automatically. For this reason, the drivers that use 248 253 :c:func:`cpuidle_register_driver()` to register themselves must also take care 249 - of registering the |struct cpuidle_device| objects as needed, so it is generally 254 + of registering the struct cpuidle_device objects as needed, so it is generally 250 255 recommended to use :c:func:`cpuidle_register()` for ``CPUIdle`` driver 251 256 registration in all cases. 252 257 253 - The registration of a |struct cpuidle_device| object causes the ``CPUIdle`` 258 + The registration of a struct cpuidle_device object causes the ``CPUIdle`` 254 259 ``sysfs`` interface to be created and the governor's ``->enable()`` callback to 255 260 be invoked for the logical CPU represented by it, so it must take place after 256 261 registering the driver that will handle the CPU in question. 257 262 258 - ``CPUIdle`` drivers and |struct cpuidle_device| objects can be unregistered 263 + ``CPUIdle`` drivers and struct cpuidle_device objects can be unregistered 259 264 when they are not necessary any more which allows some resources associated with 260 265 them to be released. Due to dependencies between them, all of the 261 - |struct cpuidle_device| objects representing CPUs handled by the given 266 + struct cpuidle_device objects representing CPUs handled by the given 262 267 ``CPUIdle`` driver must be unregistered, with the help of 263 268 :c:func:`cpuidle_unregister_device()`, before calling 264 269 :c:func:`cpuidle_unregister_driver()` to unregister the driver. Alternatively, 265 270 :c:func:`cpuidle_unregister()` can be called to unregister a ``CPUIdle`` driver 266 - along with all of the |struct cpuidle_device| objects representing CPUs handled 271 + along with all of the struct cpuidle_device objects representing CPUs handled 267 272 by it. 268 273 269 274 ``CPUIdle`` drivers can respond to runtime system configuration changes that ··· 272 277 battery or the other way around). Upon a notification of such a change, 273 278 a ``CPUIdle`` driver is expected to call :c:func:`cpuidle_pause_and_lock()` to 274 279 turn ``CPUIdle`` off temporarily and then :c:func:`cpuidle_disable_device()` for 275 - all of the |struct cpuidle_device| objects representing CPUs affected by that 280 + all of the struct cpuidle_device objects representing CPUs affected by that 276 281 change. Next, it can update its :c:member:`states` array in accordance with 277 282 the new configuration of the system, call :c:func:`cpuidle_enable_device()` for 278 - all of the relevant |struct cpuidle_device| objects and invoke 283 + all of the relevant struct cpuidle_device objects and invoke 279 284 :c:func:`cpuidle_resume_and_unlock()` to allow ``CPUIdle`` to be used again.
+9 -17
Documentation/driver-api/pm/devices.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 2 2 .. include:: <isonum.txt> 3 3 4 - .. |struct dev_pm_ops| replace:: :c:type:`struct dev_pm_ops <dev_pm_ops>` 5 - .. |struct dev_pm_domain| replace:: :c:type:`struct dev_pm_domain <dev_pm_domain>` 6 - .. |struct bus_type| replace:: :c:type:`struct bus_type <bus_type>` 7 - .. |struct device_type| replace:: :c:type:`struct device_type <device_type>` 8 - .. |struct class| replace:: :c:type:`struct class <class>` 9 - .. |struct wakeup_source| replace:: :c:type:`struct wakeup_source <wakeup_source>` 10 - .. |struct device| replace:: :c:type:`struct device <device>` 11 - 12 4 .. _driverapi_pm_devices: 13 5 14 6 ============================== ··· 99 107 100 108 Device power management operations, at the subsystem level as well as at the 101 109 device driver level, are implemented by defining and populating objects of type 102 - |struct dev_pm_ops| defined in :file:`include/linux/pm.h`. The roles of the 110 + struct dev_pm_ops defined in :file:`include/linux/pm.h`. The roles of the 103 111 methods included in it will be explained in what follows. For now, it should be 104 112 sufficient to remember that the last three methods are specific to runtime power 105 113 management while the remaining ones are used during system-wide power ··· 107 115 108 116 There also is a deprecated "old" or "legacy" interface for power management 109 117 operations available at least for some subsystems. This approach does not use 110 - |struct dev_pm_ops| objects and it is suitable only for implementing system 118 + struct dev_pm_ops objects and it is suitable only for implementing system 111 119 sleep power management methods in a limited way. Therefore it is not described 112 120 in this document, so please refer directly to the source code for more 113 121 information about it. ··· 117 125 ----------------------- 118 126 119 127 The core methods to suspend and resume devices reside in 120 - |struct dev_pm_ops| pointed to by the :c:member:`ops` member of 121 - |struct dev_pm_domain|, or by the :c:member:`pm` member of |struct bus_type|, 122 - |struct device_type| and |struct class|. They are mostly of interest to the 128 + struct dev_pm_ops pointed to by the :c:member:`ops` member of 129 + struct dev_pm_domain, or by the :c:member:`pm` member of struct bus_type, 130 + struct device_type and struct class. They are mostly of interest to the 123 131 people writing infrastructure for platforms and buses, like PCI or USB, or 124 132 device type and device class drivers. They also are relevant to the writers of 125 133 device drivers whose subsystems (PM domains, device types, device classes and ··· 148 156 driver) can physically support wakeup events. The 149 157 :c:func:`device_set_wakeup_capable()` routine affects this flag. The 150 158 :c:member:`power.wakeup` field is a pointer to an object of type 151 - |struct wakeup_source| used for controlling whether or not the device should use 159 + struct wakeup_source used for controlling whether or not the device should use 152 160 its system wakeup mechanism and for notifying the PM core of system wakeup 153 161 events signaled by the device. This object is only present for wakeup-capable 154 162 devices (i.e. devices whose :c:member:`can_wakeup` flags are set) and is created ··· 410 418 will also switch off power supplies or reduce voltages. [Drivers supporting 411 419 runtime PM may already have performed some or all of these steps.] 412 420 413 - If :c:func:`device_may_wakeup(dev)` returns ``true``, the device should be 421 + If :c:func:`device_may_wakeup()` returns ``true``, the device should be 414 422 prepared for generating hardware wakeup signals to trigger a system wakeup event 415 423 when the system is in the sleep state. For example, :c:func:`enable_irq_wake()` 416 424 might identify GPIO signals hooked up to a switch or other external hardware, ··· 705 713 sub-domain of the parent domain. 706 714 707 715 Support for power domains is provided through the :c:member:`pm_domain` field of 708 - |struct device|. This field is a pointer to an object of type 709 - |struct dev_pm_domain|, defined in :file:`include/linux/pm.h`, providing a set 716 + struct device. This field is a pointer to an object of type 717 + struct dev_pm_domain, defined in :file:`include/linux/pm.h`, providing a set 710 718 of power management callbacks analogous to the subsystem-level and device driver 711 719 callbacks that are executed for the given device during all power transitions, 712 720 instead of the respective subsystem-level callbacks. Specifically, if a
+2 -2
Documentation/driver-api/regulator.rst
··· 116 116 allows error conditions to be reported to the core. 117 117 118 118 Registration should be triggered by explicit setup done by the platform, 119 - supplying a struct :c:type:`regulator_init_data` for the regulator 119 + supplying a struct regulator_init_data for the regulator 120 120 containing constraint and supply information. 121 121 122 122 Machine interface ··· 144 144 consumers are rated for. 145 145 146 146 This is done at driver registration time` by providing a 147 - struct :c:type:`regulation_constraints`. 147 + struct regulation_constraints. 148 148 149 149 The constraints may also specify an initial configuration for the 150 150 regulator in the constraints, which is particularly useful for use with
-54
Documentation/driver-api/sound.rst
··· 1 - Sound Devices 2 - ============= 3 - 4 - .. kernel-doc:: include/sound/core.h 5 - :internal: 6 - 7 - .. kernel-doc:: sound/sound_core.c 8 - :export: 9 - 10 - .. kernel-doc:: include/sound/pcm.h 11 - :internal: 12 - 13 - .. kernel-doc:: sound/core/pcm.c 14 - :export: 15 - 16 - .. kernel-doc:: sound/core/device.c 17 - :export: 18 - 19 - .. kernel-doc:: sound/core/info.c 20 - :export: 21 - 22 - .. kernel-doc:: sound/core/rawmidi.c 23 - :export: 24 - 25 - .. kernel-doc:: sound/core/sound.c 26 - :export: 27 - 28 - .. kernel-doc:: sound/core/memory.c 29 - :export: 30 - 31 - .. kernel-doc:: sound/core/pcm_memory.c 32 - :export: 33 - 34 - .. kernel-doc:: sound/core/init.c 35 - :export: 36 - 37 - .. kernel-doc:: sound/core/isadma.c 38 - :export: 39 - 40 - .. kernel-doc:: sound/core/control.c 41 - :export: 42 - 43 - .. kernel-doc:: sound/core/pcm_lib.c 44 - :export: 45 - 46 - .. kernel-doc:: sound/core/hwdep.c 47 - :export: 48 - 49 - .. kernel-doc:: sound/core/pcm_native.c 50 - :export: 51 - 52 - .. kernel-doc:: sound/core/memalloc.c 53 - :export: 54 -
-12
Documentation/driver-api/target.rst
··· 41 41 .. kernel-doc:: drivers/scsi/iscsi_boot_sysfs.c 42 42 :export: 43 43 44 - 45 - iSCSI transport class 46 - ===================== 47 - 48 - The file drivers/scsi/scsi_transport_iscsi.c defines transport 49 - attributes for the iSCSI class, which sends SCSI packets over TCP/IP 50 - connections. 51 - 52 - .. kernel-doc:: drivers/scsi/scsi_transport_iscsi.c 53 - :export: 54 - 55 - 56 44 iSCSI TCP interfaces 57 45 ==================== 58 46
+1 -1
Documentation/driver-api/usb/URB.rst
··· 47 47 The URB structure 48 48 ================= 49 49 50 - Some of the fields in struct :c:type:`urb` are:: 50 + Some of the fields in struct urb are:: 51 51 52 52 struct urb 53 53 {
+5 -5
Documentation/driver-api/usb/gadget.rst
··· 176 176 177 177 Gadget drivers declare themselves through a struct 178 178 :c:type:`usb_gadget_driver`, which is responsible for most parts of enumeration 179 - for a struct :c:type:`usb_gadget`. The response to a set_configuration usually 180 - involves enabling one or more of the struct :c:type:`usb_ep` objects exposed by 181 - the gadget, and submitting one or more struct :c:type:`usb_request` buffers to 179 + for a struct usb_gadget. The response to a set_configuration usually 180 + involves enabling one or more of the struct usb_ep objects exposed by 181 + the gadget, and submitting one or more struct usb_request buffers to 182 182 transfer data. Understand those four data types, and their operations, 183 183 and you will understand how this API works. 184 184 ··· 339 339 necessarily sharing a given configuration). There is however an optional 340 340 framework which makes it easier to reuse and combine functions. 341 341 342 - Devices using this framework provide a struct :c:type:`usb_composite_driver`, 343 - which in turn provides one or more struct :c:type:`usb_configuration` 342 + Devices using this framework provide a struct usb_composite_driver, 343 + which in turn provides one or more struct usb_configuration 344 344 instances. Each such configuration includes at least one struct 345 345 :c:type:`usb_function`, which packages a user visible role such as "network 346 346 link" or "mass storage device". Management functions may also exist,
+1 -1
Documentation/driver-api/usb/hotplug.rst
··· 122 122 Most USB device drivers should pass these tables to the USB subsystem as 123 123 well as to the module management subsystem. Not all, though: some driver 124 124 frameworks connect using interfaces layered over USB, and so they won't 125 - need such a struct :c:type:`usb_driver`. 125 + need such a struct usb_driver. 126 126 127 127 Drivers that connect directly to the USB subsystem should be declared 128 128 something like this::
+7 -1
Documentation/driver-api/usb/typec_bus.rst
··· 91 91 Driver API 92 92 ---------- 93 93 94 + Alternate mode structs 95 + ~~~~~~~~~~~~~~~~~~~~~~ 96 + 97 + .. kernel-doc:: include/linux/usb/typec_altmode.h 98 + :functions: typec_altmode_driver typec_altmode_ops 99 + 94 100 Alternate mode driver registering/unregistering 95 101 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 96 102 97 - .. kernel-doc:: drivers/usb/typec/bus.c 103 + .. kernel-doc:: include/linux/usb/typec_altmode.h 98 104 :functions: typec_altmode_register_driver typec_altmode_unregister_driver 99 105 100 106 Alternate mode driver operations
+36 -38
Documentation/filesystems/fscrypt.rst
··· 436 436 437 437 The FS_IOC_SET_ENCRYPTION_POLICY ioctl sets an encryption policy on an 438 438 empty directory or verifies that a directory or regular file already 439 - has the specified encryption policy. It takes in a pointer to a 440 - :c:type:`struct fscrypt_policy_v1` or a :c:type:`struct 441 - fscrypt_policy_v2`, defined as follows:: 439 + has the specified encryption policy. It takes in a pointer to 440 + struct fscrypt_policy_v1 or struct fscrypt_policy_v2, defined as 441 + follows:: 442 442 443 443 #define FSCRYPT_POLICY_V1 0 444 444 #define FSCRYPT_KEY_DESCRIPTOR_SIZE 8 ··· 464 464 465 465 This structure must be initialized as follows: 466 466 467 - - ``version`` must be FSCRYPT_POLICY_V1 (0) if the struct is 468 - :c:type:`fscrypt_policy_v1` or FSCRYPT_POLICY_V2 (2) if the struct 469 - is :c:type:`fscrypt_policy_v2`. (Note: we refer to the original 470 - policy version as "v1", though its version code is really 0.) For 471 - new encrypted directories, use v2 policies. 467 + - ``version`` must be FSCRYPT_POLICY_V1 (0) if 468 + struct fscrypt_policy_v1 is used or FSCRYPT_POLICY_V2 (2) if 469 + struct fscrypt_policy_v2 is used. (Note: we refer to the original 470 + policy version as "v1", though its version code is really 0.) 471 + For new encrypted directories, use v2 policies. 472 472 473 473 - ``contents_encryption_mode`` and ``filenames_encryption_mode`` must 474 474 be set to constants from ``<linux/fscrypt.h>`` which identify the ··· 508 508 replaced with ``master_key_identifier``, which is longer and cannot 509 509 be arbitrarily chosen. Instead, the key must first be added using 510 510 `FS_IOC_ADD_ENCRYPTION_KEY`_. Then, the ``key_spec.u.identifier`` 511 - the kernel returned in the :c:type:`struct fscrypt_add_key_arg` must 512 - be used as the ``master_key_identifier`` in the :c:type:`struct 513 - fscrypt_policy_v2`. 511 + the kernel returned in the struct fscrypt_add_key_arg must 512 + be used as the ``master_key_identifier`` in 513 + struct fscrypt_policy_v2. 514 514 515 515 If the file is not yet encrypted, then FS_IOC_SET_ENCRYPTION_POLICY 516 516 verifies that the file is an empty directory. If so, the specified ··· 590 590 The FS_IOC_GET_ENCRYPTION_POLICY_EX ioctl retrieves the encryption 591 591 policy, if any, for a directory or regular file. No additional 592 592 permissions are required beyond the ability to open the file. It 593 - takes in a pointer to a :c:type:`struct fscrypt_get_policy_ex_arg`, 593 + takes in a pointer to struct fscrypt_get_policy_ex_arg, 594 594 defined as follows:: 595 595 596 596 struct fscrypt_get_policy_ex_arg { ··· 637 637 encryption policy, if any, for a directory or regular file. However, 638 638 unlike `FS_IOC_GET_ENCRYPTION_POLICY_EX`_, 639 639 FS_IOC_GET_ENCRYPTION_POLICY only supports the original policy 640 - version. It takes in a pointer directly to a :c:type:`struct 641 - fscrypt_policy_v1` rather than a :c:type:`struct 642 - fscrypt_get_policy_ex_arg`. 640 + version. It takes in a pointer directly to struct fscrypt_policy_v1 641 + rather than struct fscrypt_get_policy_ex_arg. 643 642 644 643 The error codes for FS_IOC_GET_ENCRYPTION_POLICY are the same as those 645 644 for FS_IOC_GET_ENCRYPTION_POLICY_EX, except that ··· 679 680 encrypted using that key appear "unlocked", i.e. in plaintext form. 680 681 It can be executed on any file or directory on the target filesystem, 681 682 but using the filesystem's root directory is recommended. It takes in 682 - a pointer to a :c:type:`struct fscrypt_add_key_arg`, defined as 683 - follows:: 683 + a pointer to struct fscrypt_add_key_arg, defined as follows:: 684 684 685 685 struct fscrypt_add_key_arg { 686 686 struct fscrypt_key_specifier key_spec; ··· 708 710 __u8 raw[]; 709 711 }; 710 712 711 - :c:type:`struct fscrypt_add_key_arg` must be zeroed, then initialized 713 + struct fscrypt_add_key_arg must be zeroed, then initialized 712 714 as follows: 713 715 714 716 - If the key is being added for use by v1 encryption policies, then 715 717 ``key_spec.type`` must contain FSCRYPT_KEY_SPEC_TYPE_DESCRIPTOR, and 716 718 ``key_spec.u.descriptor`` must contain the descriptor of the key 717 719 being added, corresponding to the value in the 718 - ``master_key_descriptor`` field of :c:type:`struct 719 - fscrypt_policy_v1`. To add this type of key, the calling process 720 - must have the CAP_SYS_ADMIN capability in the initial user 721 - namespace. 720 + ``master_key_descriptor`` field of struct fscrypt_policy_v1. 721 + To add this type of key, the calling process must have the 722 + CAP_SYS_ADMIN capability in the initial user namespace. 722 723 723 724 Alternatively, if the key is being added for use by v2 encryption 724 725 policies, then ``key_spec.type`` must contain ··· 734 737 735 738 - ``key_id`` is 0 if the raw key is given directly in the ``raw`` 736 739 field. Otherwise ``key_id`` is the ID of a Linux keyring key of 737 - type "fscrypt-provisioning" whose payload is a :c:type:`struct 738 - fscrypt_provisioning_key_payload` whose ``raw`` field contains the 739 - raw key and whose ``type`` field matches ``key_spec.type``. Since 740 - ``raw`` is variable-length, the total size of this key's payload 741 - must be ``sizeof(struct fscrypt_provisioning_key_payload)`` plus the 742 - raw key size. The process must have Search permission on this key. 740 + type "fscrypt-provisioning" whose payload is 741 + struct fscrypt_provisioning_key_payload whose ``raw`` field contains 742 + the raw key and whose ``type`` field matches ``key_spec.type``. 743 + Since ``raw`` is variable-length, the total size of this key's 744 + payload must be ``sizeof(struct fscrypt_provisioning_key_payload)`` 745 + plus the raw key size. The process must have Search permission on 746 + this key. 743 747 744 748 Most users should leave this 0 and specify the raw key directly. 745 749 The support for specifying a Linux keyring key is intended mainly to ··· 858 860 encryption key from the filesystem, and possibly removes the key 859 861 itself. It can be executed on any file or directory on the target 860 862 filesystem, but using the filesystem's root directory is recommended. 861 - It takes in a pointer to a :c:type:`struct fscrypt_remove_key_arg`, 862 - defined as follows:: 863 + It takes in a pointer to struct fscrypt_remove_key_arg, defined 864 + as follows:: 863 865 864 866 struct fscrypt_remove_key_arg { 865 867 struct fscrypt_key_specifier key_spec; ··· 954 956 The FS_IOC_GET_ENCRYPTION_KEY_STATUS ioctl retrieves the status of a 955 957 master encryption key. It can be executed on any file or directory on 956 958 the target filesystem, but using the filesystem's root directory is 957 - recommended. It takes in a pointer to a :c:type:`struct 958 - fscrypt_get_key_status_arg`, defined as follows:: 959 + recommended. It takes in a pointer to 960 + struct fscrypt_get_key_status_arg, defined as follows:: 959 961 960 962 struct fscrypt_get_key_status_arg { 961 963 /* input */ ··· 1146 1148 Encryption context 1147 1149 ------------------ 1148 1150 1149 - An encryption policy is represented on-disk by a :c:type:`struct 1150 - fscrypt_context_v1` or a :c:type:`struct fscrypt_context_v2`. It is 1151 - up to individual filesystems to decide where to store it, but normally 1152 - it would be stored in a hidden extended attribute. It should *not* be 1151 + An encryption policy is represented on-disk by 1152 + struct fscrypt_context_v1 or struct fscrypt_context_v2. It is up to 1153 + individual filesystems to decide where to store it, but normally it 1154 + would be stored in a hidden extended attribute. It should *not* be 1153 1155 exposed by the xattr-related system calls such as getxattr() and 1154 1156 setxattr() because of the special semantics of the encryption xattr. 1155 1157 (In particular, there would be much confusion if an encryption policy ··· 1247 1249 filesystem-specific hash(es) needed for directory lookups. This 1248 1250 allows the filesystem to still, with a high degree of confidence, map 1249 1251 the filename given in ->lookup() back to a particular directory entry 1250 - that was previously listed by readdir(). See :c:type:`struct 1251 - fscrypt_nokey_name` in the source for more details. 1252 + that was previously listed by readdir(). See 1253 + struct fscrypt_nokey_name in the source for more details. 1252 1254 1253 1255 Note that the precise way that filenames are presented to userspace 1254 1256 without the key is subject to change in the future. It is only meant
+1 -1
Documentation/filesystems/fsverity.rst
··· 84 84 -------------------- 85 85 86 86 The FS_IOC_ENABLE_VERITY ioctl enables fs-verity on a file. It takes 87 - in a pointer to a :c:type:`struct fsverity_enable_arg`, defined as 87 + in a pointer to a struct fsverity_enable_arg, defined as 88 88 follows:: 89 89 90 90 struct fsverity_enable_arg {
+25 -4
Documentation/gpu/i915.rst
··· 636 636 .. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 637 637 :functions: i915_oa_poll_wait 638 638 639 - All i915 Perf Internals 640 - ----------------------- 639 + Other i915 Perf Internals 640 + ------------------------- 641 641 642 - This section simply includes all currently documented i915 perf internals, in 643 - no particular order, but may include some more minor utilities or platform 642 + This section simply includes all other currently documented i915 perf internals, 643 + in no particular order, but may include some more minor utilities or platform 644 644 specific details than found in the more high-level sections. 645 645 646 646 .. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 647 647 :internal: 648 + :no-identifiers: 649 + i915_perf_init 650 + i915_perf_fini 651 + i915_perf_register 652 + i915_perf_unregister 653 + i915_perf_open_ioctl 654 + i915_perf_release 655 + i915_perf_add_config_ioctl 656 + i915_perf_remove_config_ioctl 657 + read_properties_unlocked 658 + i915_perf_open_ioctl_locked 659 + i915_perf_destroy_locked 660 + i915_perf_read i915_perf_ioctl 661 + i915_perf_enable_locked 662 + i915_perf_disable_locked 663 + i915_perf_poll i915_perf_poll_locked 664 + i915_oa_stream_init i915_oa_read 665 + i915_oa_stream_enable 666 + i915_oa_stream_disable 667 + i915_oa_wait_unlocked 668 + i915_oa_poll_wait 648 669 649 670 Style 650 671 =====
+10 -8
Documentation/networking/ieee802154.rst
··· 26 26 Socket API 27 27 ========== 28 28 29 - .. c:function:: int sd = socket(PF_IEEE802154, SOCK_DGRAM, 0); 29 + :: 30 + 31 + int sd = socket(PF_IEEE802154, SOCK_DGRAM, 0); 30 32 31 33 The address family, socket addresses etc. are defined in the 32 34 include/net/af_ieee802154.h header or in the special header ··· 133 131 134 132 Freeing registered PHY. 135 133 136 - .. c:function:: void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi): 134 + .. c:function:: void ieee802154_rx_irqsafe(struct ieee802154_hw *hw, struct sk_buff *skb, u8 lqi) 137 135 138 136 Telling 802.15.4 module there is a new received frame in the skb with 139 137 the RF Link Quality Indicator (LQI) from the hardware device. 140 138 141 - .. c:function:: void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, bool ifs_handling): 139 + .. c:function:: void ieee802154_xmit_complete(struct ieee802154_hw *hw, struct sk_buff *skb, bool ifs_handling) 142 140 143 141 Telling 802.15.4 module the frame in the skb is or going to be 144 142 transmitted through the hardware device ··· 157 155 ... 158 156 }; 159 157 160 - .. c:function:: int start(struct ieee802154_hw *hw): 158 + .. c:function:: int start(struct ieee802154_hw *hw) 161 159 162 160 Handler that 802.15.4 module calls for the hardware device initialization. 163 161 164 - .. c:function:: void stop(struct ieee802154_hw *hw): 162 + .. c:function:: void stop(struct ieee802154_hw *hw) 165 163 166 164 Handler that 802.15.4 module calls for the hardware device cleanup. 167 165 168 - .. c:function:: int xmit_async(struct ieee802154_hw *hw, struct sk_buff *skb): 166 + .. c:function:: int xmit_async(struct ieee802154_hw *hw, struct sk_buff *skb) 169 167 170 168 Handler that 802.15.4 module calls for each frame in the skb going to be 171 169 transmitted through the hardware device. 172 170 173 - .. c:function:: int ed(struct ieee802154_hw *hw, u8 *level): 171 + .. c:function:: int ed(struct ieee802154_hw *hw, u8 *level) 174 172 175 173 Handler that 802.15.4 module calls for Energy Detection from the hardware 176 174 device. 177 175 178 - .. c:function:: int set_channel(struct ieee802154_hw *hw, u8 page, u8 channel): 176 + .. c:function:: int set_channel(struct ieee802154_hw *hw, u8 page, u8 channel) 179 177 180 178 Set radio for listening on specific channel of the hardware device. 181 179
+16 -16
Documentation/powerpc/syscall64-abi.rst
··· 49 49 Register preservation rules match the ELF ABI calling sequence with the 50 50 following differences: 51 51 52 - --- For the sc instruction, differences with the ELF ABI --- 53 - =========== ============= ======================================== 54 - r0 Volatile (System call number.) 55 - r3 Volatile (Parameter 1, and return value.) 56 - r4-r8 Volatile (Parameters 2-6.) 57 - cr0 Volatile (cr0.SO is the return error condition.) 58 - cr1, cr5-7 Nonvolatile 59 - lr Nonvolatile 60 - =========== ============= ======================================== 61 - 62 - --- For the scv 0 instruction, differences with the ELF ABI --- 63 - =========== ============= ======================================== 64 - r0 Volatile (System call number.) 65 - r3 Volatile (Parameter 1, and return value.) 66 - r4-r8 Volatile (Parameters 2-6.) 67 - =========== ============= ======================================== 52 + +------------------------------------------------------------------------+ 53 + | For the sc instruction, differences with the ELF ABI | 54 + +--------------+--------------+------------------------------------------+ 55 + | r0 | Volatile | (System call number.) | 56 + | rr3 | Volatile | (Parameter 1, and return value.) | 57 + | rr4-r8 | Volatile | (Parameters 2-6.) | 58 + | rcr0 | Volatile | (cr0.SO is the return error condition.) | 59 + | rcr1, cr5-7 | Nonvolatile | | 60 + | rlr | Nonvolatile | | 61 + +--------------+--------------+------------------------------------------+ 62 + | For the scv 0 instruction, differences with the ELF ABI | 63 + +--------------+--------------+------------------------------------------+ 64 + | r0 | Volatile | (System call number.) | 65 + | r3 | Volatile | (Parameter 1, and return value.) | 66 + | r4-r8 | Volatile | (Parameters 2-6.) | 67 + +--------------+--------------+------------------------------------------+ 68 68 69 69 All floating point and vector data registers as well as control and status 70 70 registers are nonvolatile.
+11 -11
Documentation/sound/designs/tracepoints.rst
··· 34 34 interaction between applications and ALSA PCM core. Once decided, runtime of 35 35 the PCM substream keeps the parameters. 36 36 37 - The parameters are described in :c:type:`struct snd_pcm_hw_params`. This 37 + The parameters are described in struct snd_pcm_hw_params. This 38 38 structure includes several types of parameters. Applications set preferable 39 39 value to these parameters, then execute ioctl(2) with SNDRV_PCM_IOCTL_HW_REFINE 40 40 or SNDRV_PCM_IOCTL_HW_PARAMS. The former is used just for refining available 41 41 set of parameters. The latter is used for an actual decision of the parameters. 42 42 43 - The :c:type:`struct snd_pcm_hw_params` structure has below members: 43 + The struct snd_pcm_hw_params structure has below members: 44 44 45 45 ``flags`` 46 46 Configurable. ALSA PCM core and some drivers handle this flag to select 47 47 convenient parameters or change their behaviour. 48 48 ``masks`` 49 49 Configurable. This type of parameter is described in 50 - :c:type:`struct snd_mask` and represent mask values. As of PCM protocol 50 + struct snd_mask and represent mask values. As of PCM protocol 51 51 v2.0.13, three types are defined. 52 52 53 53 - SNDRV_PCM_HW_PARAM_ACCESS ··· 55 55 - SNDRV_PCM_HW_PARAM_SUBFORMAT 56 56 ``intervals`` 57 57 Configurable. This type of parameter is described in 58 - :c:type:`struct snd_interval` and represent values with a range. As of 58 + struct snd_interval and represent values with a range. As of 59 59 PCM protocol v2.0.13, twelve types are defined. 60 60 61 61 - SNDRV_PCM_HW_PARAM_SAMPLE_BITS ··· 78 78 are going to be changed. 79 79 ``cmask`` 80 80 Read-only. After returning from ioctl(2), buffer in user space for 81 - :c:type:`struct snd_pcm_hw_params` includes result of each operation. 81 + struct snd_pcm_hw_params includes result of each operation. 82 82 This mask represents which mask/interval parameter is actually changed. 83 83 ``info`` 84 84 Read-only. This represents hardware/driver capabilities as bit flags ··· 110 110 value to this parameter but some drivers intentionally set zero with 111 111 a care of hardware design or data transmission protocol. 112 112 113 - ALSA PCM core handles buffer of :c:type:`struct snd_pcm_hw_params` when 113 + ALSA PCM core handles buffer of struct snd_pcm_hw_params when 114 114 applications execute ioctl(2) with SNDRV_PCM_HW_REFINE or SNDRV_PCM_HW_PARAMS. 115 115 Parameters in the buffer are changed according to 116 - :c:type:`struct snd_pcm_hardware` and rules of constraints in the runtime. The 116 + struct snd_pcm_hardware and rules of constraints in the runtime. The 117 117 structure describes capabilities of handled hardware. The rules describes 118 118 dependencies on which a parameter is decided according to several parameters. 119 119 A rule has a callback function, and drivers can register arbitrary functions ··· 121 121 runtime as a default. 122 122 123 123 Each driver can join in the interaction as long as it prepared for two stuffs 124 - in a callback of :c:type:`struct snd_pcm_ops.open`. 124 + in a callback of struct snd_pcm_ops.open. 125 125 126 126 1. In the callback, drivers are expected to change a member of 127 - :c:type:`struct snd_pcm_hardware` type in the runtime, according to 127 + struct snd_pcm_hardware type in the runtime, according to 128 128 capacities of corresponding hardware. 129 129 2. In the same callback, drivers are also expected to register additional rules 130 130 of constraints into the runtime when several parameters have dependencies 131 131 due to hardware design. 132 132 133 133 The driver can refers to result of the interaction in a callback of 134 - :c:type:`struct snd_pcm_ops.hw_params`, however it should not change the 134 + struct snd_pcm_ops.hw_params, however it should not change the 135 135 content. 136 136 137 137 Tracepoints in this category are designed to trace changes of the ··· 163 163 type, the fields represent hexadecimal dump of content of the parameter. For 164 164 parameters of interval type, the fields represent values of each member of 165 165 ``empty``, ``integer``, ``openmin``, ``min``, ``max``, ``openmax`` in 166 - :c:type:`struct snd_interval` in this order. 166 + struct snd_interval in this order. 167 167 168 168 Tracepoints in drivers 169 169 ======================
+1
Documentation/sound/kernel-api/alsa-driver-api.rst
··· 132 132 Other Helper Macros 133 133 ------------------- 134 134 .. kernel-doc:: include/sound/core.h 135 + .. kernel-doc:: sound/sound_core.c
+49 -61
Documentation/sound/kernel-api/writing-an-alsa-driver.rst
··· 194 194 195 195 - create ``remove`` callback. 196 196 197 - - create a :c:type:`struct pci_driver <pci_driver>` structure 197 + - create a struct pci_driver structure 198 198 containing the three pointers above. 199 199 200 200 - create an ``init`` function just calling the ··· 487 487 the ALSA middle layer will release all the attached components 488 488 automatically. 489 489 490 - It would be typically just :c:func:`calling snd_card_free()`: 490 + It would be typically just calling :c:func:`snd_card_free()`: 491 491 492 492 :: 493 493 ··· 560 560 card->private_data for the chip-specific data. Note that these data are 561 561 allocated by :c:func:`snd_card_new()`. 562 562 563 - The first argument, the pointer of struct :c:type:`struct device 564 - <device>`, specifies the parent device. For PCI devices, typically 565 - ``&pci->`` is passed there. 563 + The first argument, the pointer of struct device, specifies the parent 564 + device. For PCI devices, typically ``&pci->`` is passed there. 566 565 567 566 Components 568 567 ---------- 569 568 570 569 After the card is created, you can attach the components (devices) to 571 570 the card instance. In an ALSA driver, a component is represented as a 572 - :c:type:`struct snd_device <snd_device>` object. A component 571 + struct snd_device object. A component 573 572 can be a PCM instance, a control interface, a raw MIDI interface, etc. 574 573 Each such instance has one component entry. 575 574 ··· 627 628 err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, 628 629 sizeof(struct mychip), &card); 629 630 630 - :c:type:`struct mychip <mychip>` is the type of the chip record. 631 + struct mychip is the type of the chip record. 631 632 632 633 In return, the allocated record can be accessed as 633 634 ··· 889 890 function (see below). 890 891 891 892 Now assume that the PCI device has an I/O port with 8 bytes and an 892 - interrupt. Then :c:type:`struct mychip <mychip>` will have the 893 + interrupt. Then struct mychip will have the 893 894 following fields: 894 895 895 896 :: ··· 1093 1094 ----------- 1094 1095 1095 1096 So far, so good. Let's finish the missing PCI stuff. At first, we need a 1096 - :c:type:`struct pci_device_id <pci_device_id>` table for 1097 + struct pci_device_id table for 1097 1098 this chipset. It's a table of PCI vendor/device ID number, and some 1098 1099 masks. 1099 1100 ··· 1109 1110 }; 1110 1111 MODULE_DEVICE_TABLE(pci, snd_mychip_ids); 1111 1112 1112 - The first and second fields of the :c:type:`struct pci_device_id 1113 - <pci_device_id>` structure are the vendor and device IDs. If you 1114 - have no reason to filter the matching devices, you can leave the 1115 - remaining fields as above. The last field of the :c:type:`struct 1116 - pci_device_id <pci_device_id>` struct contains private data 1117 - for this entry. You can specify any value here, for example, to define 1118 - specific operations for supported device IDs. Such an example is found 1119 - in the intel8x0 driver. 1113 + The first and second fields of the struct pci_device_id are the vendor 1114 + and device IDs. If you have no reason to filter the matching devices, you can 1115 + leave the remaining fields as above. The last field of the 1116 + struct pci_device_id contains private data for this entry. You can specify 1117 + any value here, for example, to define specific operations for supported 1118 + device IDs. Such an example is found in the intel8x0 driver. 1120 1119 1121 1120 The last entry of this list is the terminator. You must specify this 1122 1121 all-zero entry. 1123 1122 1124 - Then, prepare the :c:type:`struct pci_driver <pci_driver>` 1123 + Then, prepare the struct pci_driver 1125 1124 record: 1126 1125 1127 1126 :: ··· 1436 1439 If a chip supports multiple playbacks or captures, you can specify more 1437 1440 numbers, but they must be handled properly in open/close, etc. 1438 1441 callbacks. When you need to know which substream you are referring to, 1439 - then it can be obtained from :c:type:`struct snd_pcm_substream 1440 - <snd_pcm_substream>` data passed to each callback as follows: 1442 + then it can be obtained from struct snd_pcm_substream data passed to each 1443 + callback as follows: 1441 1444 1442 1445 :: 1443 1446 ··· 1636 1639 Hardware Description 1637 1640 ~~~~~~~~~~~~~~~~~~~~ 1638 1641 1639 - The hardware descriptor (:c:type:`struct snd_pcm_hardware 1640 - <snd_pcm_hardware>`) contains the definitions of the fundamental 1641 - hardware configuration. Above all, you'll need to define this in the 1642 - `PCM open callback`_. Note that the runtime instance holds the copy of 1642 + The hardware descriptor (struct snd_pcm_hardware) contains the definitions of 1643 + the fundamental hardware configuration. Above all, you'll need to define this 1644 + in the `PCM open callback`_. Note that the runtime instance holds the copy of 1643 1645 the descriptor, not the pointer to the existing descriptor. That is, 1644 1646 in the open callback, you can modify the copied descriptor 1645 1647 (``runtime->hw``) as you need. For example, if the maximum number of ··· 1796 1800 ~~~~~~~~~~~~~~ 1797 1801 1798 1802 The running status can be referred via ``runtime->status``. This is 1799 - the pointer to the :c:type:`struct snd_pcm_mmap_status 1800 - <snd_pcm_mmap_status>` record. For example, you can get the current 1803 + the pointer to the struct snd_pcm_mmap_status record. 1804 + For example, you can get the current 1801 1805 DMA hardware pointer via ``runtime->status->hw_ptr``. 1802 1806 1803 1807 The DMA application pointer can be referred via ``runtime->control``, 1804 - which points to the :c:type:`struct snd_pcm_mmap_control 1805 - <snd_pcm_mmap_control>` record. However, accessing directly to 1806 - this value is not recommended. 1808 + which points to the struct snd_pcm_mmap_control record. 1809 + However, accessing directly to this value is not recommended. 1807 1810 1808 1811 Private Data 1809 1812 ~~~~~~~~~~~~ ··· 1838 1843 number, it is advised to check what value other parts of the kernel 1839 1844 return when the same kind of request fails. 1840 1845 1841 - The callback function takes at least the argument with :c:type:`struct 1842 - snd_pcm_substream <snd_pcm_substream>` pointer. To retrieve the chip 1846 + The callback function takes at least the argument with 1847 + struct snd_pcm_substream pointer. To retrieve the chip 1843 1848 record from the given substream instance, you can use the following 1844 1849 macro. 1845 1850 ··· 2308 2313 :c:func:`snd_pcm_period_elapsed()` is called typically from the 2309 2314 interrupt handler. But, if you set up the driver to use a threaded 2310 2315 interrupt handler, this call can be in non-atomic context, too. In such 2311 - a case, you can set ``nonatomic`` filed of :c:type:`struct snd_pcm 2312 - <snd_pcm>` object after creating it. When this flag is set, mutex 2313 - and rwsem are used internally in the PCM core instead of spin and 2314 - rwlocks, so that you can call all PCM functions safely in a non-atomic 2316 + a case, you can set ``nonatomic`` filed of struct snd_pcm object 2317 + after creating it. When this flag is set, mutex and rwsem are used internally 2318 + in the PCM core instead of spin and rwlocks, so that you can call all PCM 2319 + functions safely in a non-atomic 2315 2320 context. 2316 2321 2317 2322 Constraints ··· 2352 2357 complete list. You can even define your own constraint rules. For 2353 2358 example, let's suppose my_chip can manage a substream of 1 channel if 2354 2359 and only if the format is ``S16_LE``, otherwise it supports any format 2355 - specified in the :c:type:`struct snd_pcm_hardware 2356 - <snd_pcm_hardware>` structure (or in any other 2360 + specified in struct snd_pcm_hardware> (or in any other 2357 2361 constraint_list). You can build a rule like this: 2358 2362 2359 2363 :: ··· 2461 2467 2462 2468 To create a new control, you need to define the following three 2463 2469 callbacks: ``info``, ``get`` and ``put``. Then, define a 2464 - :c:type:`struct snd_kcontrol_new <snd_kcontrol_new>` record, such as: 2470 + struct snd_kcontrol_new record, such as: 2465 2471 2466 2472 :: 2467 2473 ··· 2596 2602 ~~~~~~~~~~~~~ 2597 2603 2598 2604 The ``info`` callback is used to get detailed information on this 2599 - control. This must store the values of the given :c:type:`struct 2600 - snd_ctl_elem_info <snd_ctl_elem_info>` object. For example, 2605 + control. This must store the values of the given 2606 + struct snd_ctl_elem_info object. For example, 2601 2607 for a boolean control with a single element: 2602 2608 2603 2609 :: ··· 2768 2774 if (err < 0) 2769 2775 return err; 2770 2776 2771 - where ``my_control`` is the :c:type:`struct snd_kcontrol_new 2772 - <snd_kcontrol_new>` object defined above, and chip is the object 2773 - pointer to be passed to kcontrol->private_data which can be referred 2774 - to in callbacks. 2777 + where ``my_control`` is the struct snd_kcontrol_new object defined above, 2778 + and chip is the object pointer to be passed to kcontrol->private_data which 2779 + can be referred to in callbacks. 2775 2780 2776 - :c:func:`snd_ctl_new1()` allocates a new :c:type:`struct 2777 - snd_kcontrol <snd_kcontrol>` instance, and 2781 + :c:func:`snd_ctl_new1()` allocates a new struct snd_kcontrol instance, and 2778 2782 :c:func:`snd_ctl_add()` assigns the given control component to the 2779 2783 card. 2780 2784 ··· 2789 2797 This function takes the card pointer, the event-mask, and the control id 2790 2798 pointer for the notification. The event-mask specifies the types of 2791 2799 notification, for example, in the above example, the change of control 2792 - values is notified. The id pointer is the pointer of :c:type:`struct 2793 - snd_ctl_elem_id <snd_ctl_elem_id>` to be notified. You can 2794 - find some examples in ``es1938.c`` or ``es1968.c`` for hardware volume 2795 - interrupts. 2800 + values is notified. The id pointer is the pointer of struct snd_ctl_elem_id 2801 + to be notified. You can find some examples in ``es1938.c`` or ``es1968.c`` 2802 + for hardware volume interrupts. 2796 2803 2797 2804 Metadata 2798 2805 -------- ··· 2906 2915 2907 2916 The bus record is shared among all belonging ac97 instances. 2908 2917 2909 - And then call :c:func:`snd_ac97_mixer()` with an :c:type:`struct 2910 - snd_ac97_template <snd_ac97_template>` record together with 2911 - the bus pointer created above. 2918 + And then call :c:func:`snd_ac97_mixer()` with an struct snd_ac97_template 2919 + record together with the bus pointer created above. 2912 2920 2913 2921 :: 2914 2922 ··· 3108 3118 3109 3119 Usually, the port address corresponds to the command port and port + 1 3110 3120 corresponds to the data port. If not, you may change the ``cport`` 3111 - field of :c:type:`struct snd_mpu401 <snd_mpu401>` manually afterward. 3112 - However, :c:type:`struct snd_mpu401 <snd_mpu401>` pointer is 3121 + field of struct snd_mpu401 manually afterward. 3122 + However, struct snd_mpu401 pointer is 3113 3123 not returned explicitly by :c:func:`snd_mpu401_uart_new()`. You 3114 - need to cast ``rmidi->private_data`` to :c:type:`struct snd_mpu401 3115 - <snd_mpu401>` explicitly, 3124 + need to cast ``rmidi->private_data`` to struct snd_mpu401 explicitly, 3116 3125 3117 3126 :: 3118 3127 ··· 3315 3326 } 3316 3327 3317 3328 If you know beforehand how many bytes you can accept, you can use a 3318 - buffer size greater than one with the 3319 - :c:func:`snd_rawmidi_transmit\*()` functions. 3329 + buffer size greater than one with the ``snd_rawmidi_transmit*()`` functions. 3320 3330 3321 3331 The ``trigger`` callback must not sleep. If the hardware FIFO is full 3322 3332 before the substream buffer has been emptied, you have to continue ··· 3760 3772 :c:func:`snd_pcm_set_managed_buffer_all()` with 3761 3773 ``SNDRV_DMA_TYPE_DEV_SG`` in the PCM constructor like other PCI 3762 3774 pre-allocator. You need to pass ``&pci->dev``, where pci is 3763 - the :c:type:`struct pci_dev <pci_dev>` pointer of the chip as 3775 + the struct pci_dev pointer of the chip as 3764 3776 well. 3765 3777 3766 3778 :: ··· 3915 3927 3916 3928 The read/write callbacks of raw mode are more direct than the text mode. 3917 3929 You need to use a low-level I/O functions such as 3918 - :c:func:`copy_from/to_user()` to transfer the data. 3930 + :c:func:`copy_from_user()` and :c:func:`copy_to_user()` to transfer the data. 3919 3931 3920 3932 :: 3921 3933
+98 -12
Documentation/sphinx/automarkup.py
··· 22 22 # :c:func: block (i.e. ":c:func:`mmap()`s" flakes out), so the last 23 23 # bit tries to restrict matches to things that won't create trouble. 24 24 # 25 - RE_function = re.compile(r'(([\w_][\w\d_]+)\(\))') 26 - RE_type = re.compile(r'(struct|union|enum|typedef)\s+([\w_][\w\d_]+)') 25 + RE_function = re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=re.ASCII) 26 + 27 + # 28 + # Sphinx 2 uses the same :c:type role for struct, union, enum and typedef 29 + # 30 + RE_generic_type = re.compile(r'\b(struct|union|enum|typedef)\s+([a-zA-Z_]\w+)', 31 + flags=re.ASCII) 32 + 33 + # 34 + # Sphinx 3 uses a different C role for each one of struct, union, enum and 35 + # typedef 36 + # 37 + RE_struct = re.compile(r'\b(struct)\s+([a-zA-Z_]\w+)', flags=re.ASCII) 38 + RE_union = re.compile(r'\b(union)\s+([a-zA-Z_]\w+)', flags=re.ASCII) 39 + RE_enum = re.compile(r'\b(enum)\s+([a-zA-Z_]\w+)', flags=re.ASCII) 40 + RE_typedef = re.compile(r'\b(typedef)\s+([a-zA-Z_]\w+)', flags=re.ASCII) 41 + 27 42 # 28 43 # Detects a reference to a documentation page of the form Documentation/... with 29 44 # an optional extension 30 45 # 31 - RE_doc = re.compile(r'Documentation(/[\w\-_/]+)(\.\w+)*') 46 + RE_doc = re.compile(r'\bDocumentation(/[\w\-_/]+)(\.\w+)*') 47 + 48 + # 49 + # Reserved C words that we should skip when cross-referencing 50 + # 51 + Skipnames = [ 'for', 'if', 'register', 'sizeof', 'struct', 'unsigned' ] 52 + 32 53 33 54 # 34 55 # Many places in the docs refer to common system calls. It is ··· 69 48 # 70 49 # Associate each regex with the function that will markup its matches 71 50 # 72 - markup_func = {RE_type: markup_c_ref, 73 - RE_function: markup_c_ref, 74 - RE_doc: markup_doc_ref} 51 + markup_func_sphinx2 = {RE_doc: markup_doc_ref, 52 + RE_function: markup_c_ref, 53 + RE_generic_type: markup_c_ref} 54 + 55 + markup_func_sphinx3 = {RE_doc: markup_doc_ref, 56 + RE_function: markup_func_ref_sphinx3, 57 + RE_struct: markup_c_ref, 58 + RE_union: markup_c_ref, 59 + RE_enum: markup_c_ref, 60 + RE_typedef: markup_c_ref} 61 + 62 + if sphinx.version_info[0] >= 3: 63 + markup_func = markup_func_sphinx3 64 + else: 65 + markup_func = markup_func_sphinx2 66 + 75 67 match_iterators = [regex.finditer(t) for regex in markup_func] 76 68 # 77 69 # Sort all references by the starting position in text ··· 109 75 return repl 110 76 111 77 # 112 - # Try to replace a C reference (function() or struct/union/enum/typedef 113 - # type_name) with an appropriate cross reference. 78 + # In sphinx3 we can cross-reference to C macro and function, each one with its 79 + # own C role, but both match the same regex, so we try both. 114 80 # 115 - def markup_c_ref(docname, app, match): 116 - class_str = {RE_function: 'c-func', RE_type: 'c-type'} 117 - reftype_str = {RE_function: 'function', RE_type: 'type'} 81 + def markup_func_ref_sphinx3(docname, app, match): 82 + class_str = ['c-func', 'c-macro'] 83 + reftype_str = ['function', 'macro'] 118 84 119 85 cdom = app.env.domains['c'] 120 86 # ··· 123 89 target = match.group(2) 124 90 target_text = nodes.Text(match.group(0)) 125 91 xref = None 126 - if not (match.re == RE_function and target in Skipfuncs): 92 + if not (target in Skipfuncs or target in Skipnames): 93 + for class_s, reftype_s in zip(class_str, reftype_str): 94 + lit_text = nodes.literal(classes=['xref', 'c', class_s]) 95 + lit_text += target_text 96 + pxref = addnodes.pending_xref('', refdomain = 'c', 97 + reftype = reftype_s, 98 + reftarget = target, modname = None, 99 + classname = None) 100 + # 101 + # XXX The Latex builder will throw NoUri exceptions here, 102 + # work around that by ignoring them. 103 + # 104 + try: 105 + xref = cdom.resolve_xref(app.env, docname, app.builder, 106 + reftype_s, target, pxref, 107 + lit_text) 108 + except NoUri: 109 + xref = None 110 + 111 + if xref: 112 + return xref 113 + 114 + return target_text 115 + 116 + def markup_c_ref(docname, app, match): 117 + class_str = {# Sphinx 2 only 118 + RE_function: 'c-func', 119 + RE_generic_type: 'c-type', 120 + # Sphinx 3+ only 121 + RE_struct: 'c-struct', 122 + RE_union: 'c-union', 123 + RE_enum: 'c-enum', 124 + RE_typedef: 'c-type', 125 + } 126 + reftype_str = {# Sphinx 2 only 127 + RE_function: 'function', 128 + RE_generic_type: 'type', 129 + # Sphinx 3+ only 130 + RE_struct: 'struct', 131 + RE_union: 'union', 132 + RE_enum: 'enum', 133 + RE_typedef: 'type', 134 + } 135 + 136 + cdom = app.env.domains['c'] 137 + # 138 + # Go through the dance of getting an xref out of the C domain 139 + # 140 + target = match.group(2) 141 + target_text = nodes.Text(match.group(0)) 142 + xref = None 143 + if not ((match.re == RE_function and target in Skipfuncs) 144 + or (target in Skipnames)): 127 145 lit_text = nodes.literal(classes=['xref', 'c', class_str[match.re]]) 128 146 lit_text += target_text 129 147 pxref = addnodes.pending_xref('', refdomain = 'c',
+92 -1
Documentation/sphinx/cdomain.py
··· 40 40 from sphinx.domains.c import c_funcptr_sig_re, c_sig_re 41 41 from sphinx.domains.c import CObject as Base_CObject 42 42 from sphinx.domains.c import CDomain as Base_CDomain 43 + from itertools import chain 44 + import re 43 45 44 - __version__ = '1.0' 46 + __version__ = '1.1' 45 47 46 48 # Get Sphinx version 47 49 major, minor, patch = sphinx.version_info[:3] 48 50 51 + # Namespace to be prepended to the full name 52 + namespace = None 53 + 54 + # 55 + # Handle trivial newer c domain tags that are part of Sphinx 3.1 c domain tags 56 + # - Store the namespace if ".. c:namespace::" tag is found 57 + # 58 + RE_namespace = re.compile(r'^\s*..\s*c:namespace::\s*(\S+)\s*$') 59 + 60 + def markup_namespace(match): 61 + global namespace 62 + 63 + namespace = match.group(1) 64 + 65 + return "" 66 + 67 + # 68 + # Handle c:macro for function-style declaration 69 + # 70 + RE_macro = re.compile(r'^\s*..\s*c:macro::\s*(\S+)\s+(\S.*)\s*$') 71 + def markup_macro(match): 72 + return ".. c:function:: " + match.group(1) + ' ' + match.group(2) 73 + 74 + # 75 + # Handle newer c domain tags that are evaluated as .. c:type: for 76 + # backward-compatibility with Sphinx < 3.0 77 + # 78 + RE_ctype = re.compile(r'^\s*..\s*c:(struct|union|enum|enumerator|alias)::\s*(.*)$') 79 + 80 + def markup_ctype(match): 81 + return ".. c:type:: " + match.group(2) 82 + 83 + # 84 + # Handle newer c domain tags that are evaluated as :c:type: for 85 + # backward-compatibility with Sphinx < 3.0 86 + # 87 + RE_ctype_refs = re.compile(r':c:(var|struct|union|enum|enumerator)::`([^\`]+)`') 88 + def markup_ctype_refs(match): 89 + return ":c:type:`" + match.group(2) + '`' 90 + 91 + # 92 + # Simply convert :c:expr: and :c:texpr: into a literal block. 93 + # 94 + RE_expr = re.compile(r':c:(expr|texpr):`([^\`]+)`') 95 + def markup_c_expr(match): 96 + return '\ ``' + match.group(2) + '``\ ' 97 + 98 + # 99 + # Parse Sphinx 3.x C markups, replacing them by backward-compatible ones 100 + # 101 + def c_markups(app, docname, source): 102 + result = "" 103 + markup_func = { 104 + RE_namespace: markup_namespace, 105 + RE_expr: markup_c_expr, 106 + RE_macro: markup_macro, 107 + RE_ctype: markup_ctype, 108 + RE_ctype_refs: markup_ctype_refs, 109 + } 110 + 111 + lines = iter(source[0].splitlines(True)) 112 + for n in lines: 113 + match_iterators = [regex.finditer(n) for regex in markup_func] 114 + matches = sorted(chain(*match_iterators), key=lambda m: m.start()) 115 + for m in matches: 116 + n = n[:m.start()] + markup_func[m.re](m) + n[m.end():] 117 + 118 + result = result + n 119 + 120 + source[0] = result 121 + 122 + # 123 + # Now implements support for the cdomain namespacing logic 124 + # 125 + 49 126 def setup(app): 127 + 128 + # Handle easy Sphinx 3.1+ simple new tags: :c:expr and .. c:namespace:: 129 + app.connect('source-read', c_markups) 50 130 51 131 if (major == 1 and minor < 8): 52 132 app.override_domain(CDomain) ··· 154 74 If the objtype is 'function' and the the signature ``sig`` is a 155 75 function-like macro, the name of the macro is returned. Otherwise 156 76 ``False`` is returned. """ 77 + 78 + global namespace 157 79 158 80 if not self.objtype == 'function': 159 81 return False ··· 189 107 param += nodes.emphasis(argname, argname) 190 108 paramlist += param 191 109 110 + if namespace: 111 + fullname = namespace + "." + fullname 112 + 192 113 return fullname 193 114 194 115 def handle_signature(self, sig, signode): 195 116 """Transform a C signature into RST nodes.""" 117 + 118 + global namespace 196 119 197 120 fullname = self.handle_func_like_macro(sig, signode) 198 121 if not fullname: ··· 209 122 else: 210 123 # FIXME: handle :name: value of other declaration types? 211 124 pass 125 + else: 126 + if namespace: 127 + fullname = namespace + "." + fullname 128 + 212 129 return fullname 213 130 214 131 def add_target_and_index(self, name, sig, signode):
+14 -1
Documentation/sphinx/kerneldoc.py
··· 62 62 'export': directives.unchanged, 63 63 'internal': directives.unchanged, 64 64 'identifiers': directives.unchanged, 65 + 'no-identifiers': directives.unchanged, 65 66 'functions': directives.unchanged, 66 67 } 67 68 has_content = False ··· 70 69 def run(self): 71 70 env = self.state.document.settings.env 72 71 cmd = [env.config.kerneldoc_bin, '-rst', '-enable-lineno'] 72 + 73 + # Pass the version string to kernel-doc, as it needs to use a different 74 + # dialect, depending what the C domain supports for each specific 75 + # Sphinx versions 76 + cmd += ['-sphinx-version', sphinx.__version__] 73 77 74 78 filename = env.config.kerneldoc_srctree + '/' + self.arguments[0] 75 79 export_file_patterns = [] ··· 104 98 cmd += ['-function', i] 105 99 else: 106 100 cmd += ['-no-doc-sections'] 101 + 102 + if 'no-identifiers' in self.options: 103 + no_identifiers = self.options.get('no-identifiers').split() 104 + if no_identifiers: 105 + for i in no_identifiers: 106 + cmd += ['-nosymbol', i] 107 107 108 108 for pattern in export_file_patterns: 109 109 for f in glob.glob(env.config.kerneldoc_srctree + '/' + pattern): ··· 148 136 lineoffset = int(match.group(1)) - 1 149 137 # we must eat our comments since the upset the markup 150 138 else: 151 - result.append(line, filename, lineoffset) 139 + doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno) 140 + result.append(line, doc + ": " + filename, lineoffset) 152 141 lineoffset += 1 153 142 154 143 node = nodes.section()
+1 -1
Documentation/sphinx/parse-headers.pl
··· 110 110 ) { 111 111 my $s = $1; 112 112 113 - $structs{$s} = "struct :c:type:`$s`\\ "; 113 + $structs{$s} = "struct $s\\ "; 114 114 next; 115 115 } 116 116 }
+6 -6
Documentation/trace/ftrace-uses.rst
··· 55 55 56 56 Both .flags and .private are optional. Only .func is required. 57 57 58 - To enable tracing call: 58 + To enable tracing call:: 59 59 60 - .. c:function:: register_ftrace_function(&ops); 60 + register_ftrace_function(&ops); 61 61 62 - To disable tracing call: 62 + To disable tracing call:: 63 63 64 - .. c:function:: unregister_ftrace_function(&ops); 64 + unregister_ftrace_function(&ops); 65 65 66 - The above is defined by including the header: 66 + The above is defined by including the header:: 67 67 68 - .. c:function:: #include <linux/ftrace.h> 68 + #include <linux/ftrace.h> 69 69 70 70 The registered callback will start being called some time after the 71 71 register_ftrace_function() is called and before it returns. The exact time
+1 -1
Documentation/translations/it_IT/kernel-hacking/hacking.rst
··· 402 402 :c:func:`be32_to_cpu()`, eccetera. 403 403 404 404 Queste funzioni hanno principalmente due varianti: la variante per 405 - puntatori, come :c:func:`cpu_to_be32p(), che prende un puntatore 405 + puntatori, come :c:func:`cpu_to_be32p()`, che prende un puntatore 406 406 ad un tipo, e ritorna il valore convertito. L'altra variante per 407 407 la famiglia di conversioni "in-situ", come :c:func:`cpu_to_be32s()`, 408 408 che convertono il valore puntato da un puntatore, e ritornano void.
+2
Documentation/translations/it_IT/kernel-hacking/locking.rst
··· 1 1 .. include:: ../disclaimer-ita.rst 2 2 3 + .. c:namespace:: it_IT 4 + 3 5 :Original: :ref:`Documentation/kernel-hacking/locking.rst <kernel_hacking_lock>` 4 6 :Translator: Federico Vaga <federico.vaga@vaga.pv.it> 5 7
+2 -2
Documentation/translations/zh_CN/arm64/amu.rst
··· 4 4 5 5 Translator: Bailu Lin <bailu.lin@vivo.com> 6 6 7 - ================================= 7 + ================================== 8 8 AArch64 Linux 中扩展的活动监控单元 9 - ================================= 9 + ================================== 10 10 11 11 作者: Ionela Voinescu <ionela.voinescu@arm.com> 12 12
+3 -7
Documentation/userspace-api/media/cec/cec-func-close.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _cec-func-close: 4 5 ··· 12 11 13 12 cec-close - Close a cec device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: int close( int fd ) 24 - :name: cec-close 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :c:func:`open() <cec-open>`. 31 - 28 + File descriptor returned by :c:func:`open()`. 32 29 33 30 Description 34 31 =========== ··· 33 36 Closes the cec device. Resources associated with the file descriptor are 34 37 freed. The device configuration remain unchanged. 35 38 36 - 37 39 Return Value 38 40 ============ 39 41 40 - :c:func:`close() <cec-close>` returns 0 on success. On error, -1 is returned, and 42 + :c:func:`close()` returns 0 on success. On error, -1 is returned, and 41 43 ``errno`` is set appropriately. Possible error codes are: 42 44 43 45 ``EBADF``
+4 -7
Documentation/userspace-api/media/cec/cec-func-ioctl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _cec-func-ioctl: 4 5 ··· 19 18 20 19 #include <sys/ioctl.h> 21 20 22 - 23 - .. c:function:: int ioctl( int fd, int request, void *argp ) 24 - :name: cec-ioctl 21 + ``int ioctl(int fd, int request, void *argp)`` 25 22 26 23 Arguments 27 24 ========= 28 25 29 26 ``fd`` 30 - File descriptor returned by :c:func:`open() <cec-open>`. 27 + File descriptor returned by :c:func:`open()`. 31 28 32 29 ``request`` 33 30 CEC ioctl request code as defined in the cec.h header file, for ··· 34 35 ``argp`` 35 36 Pointer to a request-specific structure. 36 37 37 - 38 38 Description 39 39 =========== 40 40 41 - The :c:func:`ioctl() <cec-ioctl>` function manipulates cec device parameters. The 41 + The :c:func:`ioctl()` function manipulates cec device parameters. The 42 42 argument ``fd`` must be an open file descriptor. 43 43 44 44 The ioctl ``request`` code specifies the cec function to be called. It ··· 48 50 their parameters are located in the cec.h header file. All cec ioctl 49 51 requests, their respective function and parameters are specified in 50 52 :ref:`cec-user-func`. 51 - 52 53 53 54 Return Value 54 55 ============
+3 -7
Documentation/userspace-api/media/cec/cec-func-open.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _cec-func-open: 4 5 ··· 19 18 20 19 #include <fcntl.h> 21 20 22 - 23 21 .. c:function:: int open( const char *device_name, int flags ) 24 - :name: cec-open 25 - 26 22 27 23 Arguments 28 24 ========= ··· 40 42 41 43 Other flags have no effect. 42 44 43 - 44 45 Description 45 46 =========== 46 47 47 - To open a cec device applications call :c:func:`open() <cec-open>` with the 48 + To open a cec device applications call :c:func:`open()` with the 48 49 desired device name. The function has no side effects; the device 49 50 configuration remain unchanged. 50 51 ··· 51 54 configuration will result in an error, and ``errno`` will be set to 52 55 EBADF. 53 56 54 - 55 57 Return Value 56 58 ============ 57 59 58 - :c:func:`open() <cec-open>` returns the new file descriptor on success. On error, 60 + :c:func:`open()` returns the new file descriptor on success. On error, 59 61 -1 is returned, and ``errno`` is set appropriately. Possible error codes 60 62 include: 61 63
+5 -9
Documentation/userspace-api/media/cec/cec-func-poll.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _cec-func-poll: 4 5 ··· 12 11 13 12 cec-poll - Wait for some event on a file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/poll.h> 21 21 22 - 23 22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) 24 - :name: cec-poll 25 23 26 24 Arguments 27 25 ========= ··· 33 35 ``timeout`` 34 36 Timeout to wait for events 35 37 36 - 37 38 Description 38 39 =========== 39 40 40 - With the :c:func:`poll() <cec-poll>` function applications can wait for CEC 41 + With the :c:func:`poll()` function applications can wait for CEC 41 42 events. 42 43 43 - On success :c:func:`poll() <cec-poll>` returns the number of file descriptors 44 + On success :c:func:`poll()` returns the number of file descriptors 44 45 that have been selected (that is, file descriptors for which the 45 46 ``revents`` field of the respective struct :c:type:`pollfd` 46 47 is non-zero). CEC devices set the ``POLLIN`` and ``POLLRDNORM`` flags in ··· 50 53 a value of zero, on failure it returns -1 and the ``errno`` variable is 51 54 set appropriately. 52 55 53 - For more details see the :c:func:`poll() <cec-poll>` manual page. 54 - 56 + For more details see the :c:func:`poll()` manual page. 55 57 56 58 Return Value 57 59 ============ 58 60 59 - On success, :c:func:`poll() <cec-poll>` returns the number structures which have 61 + On success, :c:func:`poll()` returns the number structures which have 60 62 non-zero ``revents`` fields, or zero if the call timed out. On error -1 61 63 is returned, and the ``errno`` variable is set appropriately: 62 64
+5 -5
Documentation/userspace-api/media/cec/cec-ioc-adap-g-caps.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_ADAP_G_CAPS: 4 5 ··· 15 14 Synopsis 16 15 ======== 17 16 18 - .. c:function:: int ioctl( int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp ) 19 - :name: CEC_ADAP_G_CAPS 17 + .. c:macro:: CEC_ADAP_G_CAPS 18 + 19 + ``int ioctl(int fd, CEC_ADAP_G_CAPS, struct cec_caps *argp)`` 20 20 21 21 Arguments 22 22 ========= 23 23 24 24 ``fd`` 25 - File descriptor returned by :c:func:`open() <cec-open>`. 25 + File descriptor returned by :c:func:`open()`. 26 26 27 27 ``argp`` 28 - 29 28 30 29 Description 31 30 =========== ··· 62 61 - ``version`` 63 62 - CEC Framework API version, formatted with the ``KERNEL_VERSION()`` 64 63 macro. 65 - 66 64 67 65 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| 68 66
+6 -5
Documentation/userspace-api/media/cec/cec-ioc-adap-g-conn-info.rst
··· 2 2 .. 3 3 .. Copyright 2019 Google LLC 4 4 .. 5 + .. c:namespace:: CEC 6 + 5 7 .. _CEC_ADAP_G_CONNECTOR_INFO: 6 8 7 9 ******************************* ··· 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, CEC_ADAP_G_CONNECTOR_INFO, struct cec_connector_info *argp ) 22 - :name: CEC_ADAP_G_CONNECTOR_INFO 19 + .. c:macro:: CEC_ADAP_G_CONNECTOR_INFO 20 + 21 + ``int ioctl(int fd, CEC_ADAP_G_CONNECTOR_INFO, struct cec_connector_info *argp)`` 23 22 24 23 Arguments 25 24 ========= 26 25 27 26 ``fd`` 28 - File descriptor returned by :c:func:`open() <cec-open>`. 27 + File descriptor returned by :c:func:`open()`. 29 28 30 29 ``argp`` 31 - 32 30 33 31 Description 34 32 =========== ··· 58 56 - :ref:`cec-drm-connector-info` 59 57 * - } 60 58 - 61 - 62 59 63 60 .. tabularcolumns:: |p{4.4cm}|p{2.5cm}|p{10.6cm}| 64 61
+8 -12
Documentation/userspace-api/media/cec/cec-ioc-adap-g-log-addrs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_ADAP_LOG_ADDRS: 4 5 .. _CEC_ADAP_G_LOG_ADDRS: ··· 14 13 15 14 CEC_ADAP_G_LOG_ADDRS, CEC_ADAP_S_LOG_ADDRS - Get or set the logical addresses 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, CEC_ADAP_G_LOG_ADDRS, struct cec_log_addrs *argp ) 22 - :name: CEC_ADAP_G_LOG_ADDRS 19 + .. c:macro:: CEC_ADAP_G_LOG_ADDRS 23 20 24 - .. c:function:: int ioctl( int fd, CEC_ADAP_S_LOG_ADDRS, struct cec_log_addrs *argp ) 25 - :name: CEC_ADAP_S_LOG_ADDRS 21 + ``int ioctl(int fd, CEC_ADAP_G_LOG_ADDRS, struct cec_log_addrs *argp)`` 22 + 23 + .. c:macro:: CEC_ADAP_S_LOG_ADDRS 24 + 25 + ``int ioctl(int fd, CEC_ADAP_S_LOG_ADDRS, struct cec_log_addrs *argp)`` 26 26 27 27 Arguments 28 28 ========= 29 29 30 30 ``fd`` 31 - File descriptor returned by :c:func:`open() <cec-open>`. 31 + File descriptor returned by :c:func:`open()`. 32 32 33 33 ``argp`` 34 34 Pointer to struct :c:type:`cec_log_addrs`. ··· 150 148 give the CEC framework more information about the device type, even 151 149 though the framework won't use it directly in the CEC message. 152 150 153 - 154 151 .. tabularcolumns:: |p{7.8cm}|p{1.0cm}|p{8.7cm}| 155 152 156 153 .. _cec-log-addrs-flags: ··· 186 185 187 186 All other messages are ignored. 188 187 189 - 190 188 .. tabularcolumns:: |p{7.8cm}|p{1.0cm}|p{8.7cm}| 191 189 192 190 .. _cec-versions: ··· 210 210 - ``CEC_OP_CEC_VERSION_2_0`` 211 211 - 6 212 212 - CEC version according to the HDMI 2.0 standard. 213 - 214 213 215 214 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 216 215 ··· 255 256 - ``CEC_OP_PRIM_DEVTYPE_VIDEOPROC`` 256 257 - 7 257 258 - Use for a video processor device. 258 - 259 259 260 260 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 261 261 ··· 304 306 Control). 305 307 306 308 307 - 308 309 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 309 310 310 311 .. _cec-all-dev-types-flags: ··· 343 346 - ``CEC_OP_ALL_DEVTYPE_SWITCH`` 344 347 - 0x04 345 348 - This supports the CEC Switch or Video Processing type. 346 - 347 349 348 350 349 351 Return Value
+8 -7
Documentation/userspace-api/media/cec/cec-ioc-adap-g-phys-addr.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_ADAP_PHYS_ADDR: 4 5 .. _CEC_ADAP_G_PHYS_ADDR: ··· 14 13 15 14 CEC_ADAP_G_PHYS_ADDR, CEC_ADAP_S_PHYS_ADDR - Get or set the physical address 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, CEC_ADAP_G_PHYS_ADDR, __u16 *argp ) 22 - :name: CEC_ADAP_G_PHYS_ADDR 19 + .. c:macro:: CEC_ADAP_G_PHYS_ADDR 23 20 24 - .. c:function:: int ioctl( int fd, CEC_ADAP_S_PHYS_ADDR, __u16 *argp ) 25 - :name: CEC_ADAP_S_PHYS_ADDR 21 + ``int ioctl(int fd, CEC_ADAP_G_PHYS_ADDR, __u16 *argp)`` 22 + 23 + .. c:macro:: CEC_ADAP_S_PHYS_ADDR 24 + 25 + ``int ioctl(int fd, CEC_ADAP_S_PHYS_ADDR, __u16 *argp)`` 26 26 27 27 Arguments 28 28 ========= 29 29 30 30 ``fd`` 31 - File descriptor returned by :c:func:`open() <cec-open>`. 31 + File descriptor returned by :c:func:`open()`. 32 32 33 33 ``argp`` 34 34 Pointer to the CEC address. ··· 72 70 For example, the EDID for each HDMI input of the TV will have a 73 71 different physical address of the form a.0.0.0 that the sources will 74 72 read out and use as their physical address. 75 - 76 73 77 74 Return Value 78 75 ============
+5 -10
Documentation/userspace-api/media/cec/cec-ioc-dqevent.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_DQEVENT: 4 5 ··· 12 11 13 12 CEC_DQEVENT - Dequeue a CEC event 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, CEC_DQEVENT, struct cec_event *argp ) 20 - :name: CEC_DQEVENT 17 + .. c:macro:: CEC_DQEVENT 18 + 19 + ``int ioctl(int fd, CEC_DQEVENT, struct cec_event *argp)`` 21 20 22 21 Arguments 23 22 ========= 24 23 25 24 ``fd`` 26 - File descriptor returned by :c:func:`open() <cec-open>`. 25 + File descriptor returned by :c:func:`open()`. 27 26 28 27 ``argp`` 29 - 30 28 31 29 Description 32 30 =========== ··· 72 72 the HDMI driver is still configuring the device or because the HDMI 73 73 device was unbound. 74 74 75 - 76 75 .. c:type:: cec_event_lost_msgs 77 76 78 77 .. tabularcolumns:: |p{1.0cm}|p{2.0cm}|p{14.5cm}| ··· 92 93 the last two seconds will be stored. Since messages should be 93 94 replied to within a second according to the CEC specification, 94 95 this is more than enough. 95 - 96 96 97 97 .. tabularcolumns:: |p{1.0cm}|p{4.4cm}|p{2.5cm}|p{9.6cm}| 98 98 ··· 127 129 event. 128 130 * - } 129 131 - 130 - 131 132 132 133 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| 133 134 ··· 201 204 if the 5V is high, then an initial event will be generated for that 202 205 filehandle. 203 206 204 - 205 207 .. tabularcolumns:: |p{6.0cm}|p{0.6cm}|p{10.9cm}| 206 208 207 209 .. _cec-event-flags: ··· 224 228 - 2 225 229 - Set if one or more events of the given event type have been dropped. 226 230 This is an indication that the application cannot keep up. 227 - 228 231 229 232 230 233 Return Value
+8 -8
Documentation/userspace-api/media/cec/cec-ioc-g-mode.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_MODE: 4 5 .. _CEC_G_MODE: ··· 14 13 Synopsis 15 14 ======== 16 15 17 - .. c:function:: int ioctl( int fd, CEC_G_MODE, __u32 *argp ) 18 - :name: CEC_G_MODE 16 + .. c:macro:: CEC_G_MODE 19 17 20 - .. c:function:: int ioctl( int fd, CEC_S_MODE, __u32 *argp ) 21 - :name: CEC_S_MODE 18 + ``int ioctl(int fd, CEC_G_MODE, __u32 *argp)`` 19 + 20 + .. c:macro:: CEC_S_MODE 21 + 22 + ``int ioctl(int fd, CEC_S_MODE, __u32 *argp)`` 22 23 23 24 Arguments 24 25 ========= 25 26 26 27 ``fd`` 27 - File descriptor returned by :c:func:`open() <cec-open>`. 28 + File descriptor returned by :c:func:`open()`. 28 29 29 30 ``argp`` 30 31 Pointer to CEC mode. ··· 103 100 CEC adapter. If someone else is already the exclusive initiator 104 101 then an attempt to become one will return the ``EBUSY`` error code 105 102 error. 106 - 107 103 108 104 Available follower modes are: 109 105 ··· 195 193 the process has the ``CAP_NET_ADMIN`` capability. If that is not 196 194 set, then the ``EPERM`` error code is returned. 197 195 198 - 199 196 Core message processing details: 200 197 201 198 .. tabularcolumns:: |p{6.6cm}|p{10.9cm}| ··· 271 270 - ``CEC_MSG_REPORT_PHYSICAL_ADDR`` 272 271 - The CEC framework will make note of the reported physical address 273 272 and then just pass the message on to the follower(s). 274 - 275 273 276 274 277 275 Return Value
+8 -10
Documentation/userspace-api/media/cec/cec-ioc-receive.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: CEC 2 3 3 4 .. _CEC_TRANSMIT: 4 5 .. _CEC_RECEIVE: ··· 13 12 14 13 CEC_RECEIVE, CEC_TRANSMIT - Receive or transmit a CEC message 15 14 16 - 17 15 Synopsis 18 16 ======== 19 17 20 - .. c:function:: int ioctl( int fd, CEC_RECEIVE, struct cec_msg \*argp ) 21 - :name: CEC_RECEIVE 18 + .. c:macro:: CEC_RECEIVE 22 19 23 - .. c:function:: int ioctl( int fd, CEC_TRANSMIT, struct cec_msg \*argp ) 24 - :name: CEC_TRANSMIT 20 + ``int ioctl(int fd, CEC_RECEIVE, struct cec_msg *argp)`` 21 + 22 + .. c:macro:: CEC_TRANSMIT 23 + 24 + ``int ioctl(int fd, CEC_TRANSMIT, struct cec_msg *argp)`` 25 25 26 26 Arguments 27 27 ========= 28 28 29 29 ``fd`` 30 - File descriptor returned by :c:func:`open() <cec-open>`. 30 + File descriptor returned by :c:func:`open()`. 31 31 32 32 ``argp`` 33 33 Pointer to struct cec_msg. ··· 196 194 supports this, otherwise it is always 0. This counter is only 197 195 valid if the :ref:`CEC_TX_STATUS_ERROR <CEC-TX-STATUS-ERROR>` status bit is set. 198 196 199 - 200 197 .. tabularcolumns:: |p{6.2cm}|p{1.0cm}|p{10.3cm}| 201 198 202 199 .. _cec-msg-flags: ··· 228 227 This flag is only allowed if the process has the ``CAP_SYS_RAWIO`` 229 228 capability. If that is not set, then the ``EPERM`` error code is 230 229 returned. 231 - 232 230 233 231 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| 234 232 ··· 298 298 - The transmit timed out. This should not normally happen and this 299 299 indicates a driver problem. 300 300 301 - 302 301 .. tabularcolumns:: |p{5.6cm}|p{0.9cm}|p{11.0cm}| 303 302 304 303 .. _cec-rx-status: ··· 332 333 because the HDMI cable was disconnected, the adapter was unconfigured 333 334 or the :ref:`CEC_TRANSMIT <CEC_RECEIVE>` that waited for a 334 335 reply was interrupted. 335 - 336 336 337 337 338 338 Return Value
+3 -4
Documentation/userspace-api/media/dvb/audio-bilingual-channel-select.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_BILINGUAL_CHANNEL_SELECT: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_BILINGUAL_CHANNEL_SELECT, struct *audio_channel_select) 21 - :name: AUDIO_BILINGUAL_CHANNEL_SELECT 19 + .. c:macro:: AUDIO_BILINGUAL_CHANNEL_SELECT 22 20 21 + ``int ioctl(int fd, AUDIO_BILINGUAL_CHANNEL_SELECT, struct audio_channel_select *select)`` 23 22 24 23 Arguments 25 24 --------- ··· 40 39 41 40 - Select the output format of the audio (mono left/right, stereo). 42 41 43 - 44 42 Description 45 43 ----------- 46 44 ··· 49 49 50 50 This ioctl call asks the Audio Device to select the requested channel 51 51 for bilingual streams if possible. 52 - 53 52 54 53 Return Value 55 54 ------------
+3 -5
Documentation/userspace-api/media/dvb/audio-channel-select.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_CHANNEL_SELECT: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_CHANNEL_SELECT, struct *audio_channel_select) 21 - :name: AUDIO_CHANNEL_SELECT 19 + .. c:macro:: AUDIO_CHANNEL_SELECT 22 20 21 + ``int ioctl(int fd, AUDIO_CHANNEL_SELECT, struct audio_channel_select *select)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - 33 31 ··· 40 40 41 41 - Select the output format of the audio (mono left/right, stereo). 42 42 43 - 44 43 Description 45 44 ----------- 46 45 ··· 48 49 49 50 This ioctl call asks the Audio Device to select the requested channel if 50 51 possible. 51 - 52 52 53 53 Return Value 54 54 ------------
+4 -4
Documentation/userspace-api/media/dvb/audio-clear-buffer.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_CLEAR_BUFFER: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_CLEAR_BUFFER) 21 - :name: AUDIO_CLEAR_BUFFER 19 + .. c:macro:: AUDIO_CLEAR_BUFFER 20 + 21 + ``int ioctl(int fd, AUDIO_CLEAR_BUFFER)`` 22 22 23 23 Arguments 24 24 --------- ··· 27 25 .. flat-table:: 28 26 :header-rows: 0 29 27 :stub-columns: 0 30 - 31 28 32 29 - .. row 1 33 30 ··· 39 38 40 39 This ioctl call asks the Audio Device to clear all software and hardware 41 40 buffers of the audio decoder device. 42 - 43 41 44 42 Return Value 45 43 ------------
+3 -4
Documentation/userspace-api/media/dvb/audio-continue.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_CONTINUE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_CONTINUE) 21 - :name: AUDIO_CONTINUE 19 + .. c:macro:: AUDIO_CONTINUE 22 20 21 + ``int ioctl(int fd, AUDIO_CONTINUE)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 39 39 40 40 This ioctl restarts the decoding and playing process previously paused 41 41 with AUDIO_PAUSE command. 42 - 43 42 44 43 Return Value 45 44 ------------
+1 -6
Documentation/userspace-api/media/dvb/audio-fclose.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _audio_fclose: 4 5 ··· 18 17 -------- 19 18 20 19 .. c:function:: int close(int fd) 21 - :name: dvb-audio-close 22 - 23 20 24 21 Arguments 25 22 --------- ··· 26 27 :header-rows: 0 27 28 :stub-columns: 0 28 29 29 - 30 30 - .. row 1 31 31 32 32 - int fd 33 33 34 34 - File descriptor returned by a previous call to open(). 35 35 36 - 37 36 Description 38 37 ----------- 39 38 40 39 This system call closes a previously opened audio device. 41 - 42 40 43 41 Return Value 44 42 ------------ ··· 43 47 .. flat-table:: 44 48 :header-rows: 0 45 49 :stub-columns: 0 46 - 47 50 48 51 - .. row 1 49 52
+1 -6
Documentation/userspace-api/media/dvb/audio-fopen.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _audio_fopen: 4 5 ··· 18 17 -------- 19 18 20 19 .. c:function:: int open(const char *deviceName, int flags) 21 - :name: dvb-audio-open 22 - 23 20 24 21 Arguments 25 22 --------- ··· 25 26 .. flat-table:: 26 27 :header-rows: 0 27 28 :stub-columns: 0 28 - 29 29 30 30 - .. row 1 31 31 ··· 58 60 - 59 61 - (blocking mode is the default) 60 62 61 - 62 63 Description 63 64 ----------- 64 65 ··· 75 78 in O_RDONLY mode, the only ioctl call that can be used is 76 79 AUDIO_GET_STATUS. All other call will return with an error code. 77 80 78 - 79 81 Return Value 80 82 ------------ 81 83 ··· 83 87 .. flat-table:: 84 88 :header-rows: 0 85 89 :stub-columns: 0 86 - 87 90 88 91 - .. row 1 89 92
+1 -6
Documentation/userspace-api/media/dvb/audio-fwrite.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _audio_fwrite: 4 5 ··· 18 17 -------- 19 18 20 19 .. c:function:: size_t write(int fd, const void *buf, size_t count) 21 - :name: dvb-audio-write 22 - 23 20 24 21 Arguments 25 22 --------- ··· 25 26 .. flat-table:: 26 27 :header-rows: 0 27 28 :stub-columns: 0 28 - 29 29 30 30 - .. row 1 31 31 ··· 44 46 45 47 - Size of buf. 46 48 47 - 48 49 Description 49 50 ----------- 50 51 ··· 53 56 until buffer space is available. The amount of data to be transferred is 54 57 implied by count. 55 58 56 - 57 59 Return Value 58 60 ------------ 59 61 60 62 .. flat-table:: 61 63 :header-rows: 0 62 64 :stub-columns: 0 63 - 64 65 65 66 - .. row 1 66 67
+3 -5
Documentation/userspace-api/media/dvb/audio-get-capabilities.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_GET_CAPABILITIES: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_GET_CAPABILITIES, unsigned int *cap) 21 - :name: AUDIO_GET_CAPABILITIES 19 + .. c:macro:: AUDIO_GET_CAPABILITIES 22 20 21 + ``int ioctl(int fd, AUDIO_GET_CAPABILITIES, unsigned int *cap)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - 33 31 ··· 40 40 41 41 - Returns a bit array of supported sound formats. 42 42 43 - 44 43 Description 45 44 ----------- 46 45 47 46 This ioctl call asks the Audio Device to tell us about the decoding 48 47 capabilities of the audio hardware. 49 - 50 48 51 49 Return Value 52 50 ------------
+3 -5
Documentation/userspace-api/media/dvb/audio-get-status.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_GET_STATUS: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_GET_STATUS, struct audio_status *status) 21 - :name: AUDIO_GET_STATUS 19 + .. c:macro:: AUDIO_GET_STATUS 22 20 21 + ``int ioctl(int fd, AUDIO_GET_STATUS, struct audio_status *status)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - 33 31 ··· 40 40 41 41 - Returns the current state of Audio Device. 42 42 43 - 44 43 Description 45 44 ----------- 46 45 47 46 This ioctl call asks the Audio Device to return the current state of the 48 47 Audio Device. 49 - 50 48 51 49 Return Value 52 50 ------------
+4 -5
Documentation/userspace-api/media/dvb/audio-pause.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_PAUSE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_PAUSE) 21 - :name: AUDIO_PAUSE 19 + .. c:macro:: AUDIO_PAUSE 20 + 21 + ``int ioctl(int fd, AUDIO_PAUSE)`` 22 22 23 23 Arguments 24 24 --------- ··· 28 26 :header-rows: 0 29 27 :stub-columns: 0 30 28 31 - 32 29 - .. row 1 33 30 34 31 - int fd 35 32 36 33 - File descriptor returned by a previous call to open(). 37 - 38 34 39 35 Description 40 36 ----------- ··· 40 40 This ioctl call suspends the audio stream being played. Decoding and 41 41 playing are paused. It is then possible to restart again decoding and 42 42 playing process of the audio stream using AUDIO_CONTINUE command. 43 - 44 43 45 44 Return Value 46 45 ------------
+3 -4
Documentation/userspace-api/media/dvb/audio-play.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_PLAY: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_PLAY) 21 - :name: AUDIO_PLAY 19 + .. c:macro:: AUDIO_PLAY 22 20 21 + ``int ioctl(int fd, AUDIO_PLAY)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 39 39 40 40 This ioctl call asks the Audio Device to start playing an audio stream 41 41 from the selected source. 42 - 43 42 44 43 Return Value 45 44 ------------
+3 -5
Documentation/userspace-api/media/dvb/audio-select-source.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_SELECT_SOURCE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_SELECT_SOURCE, struct audio_stream_source *source) 21 - :name: AUDIO_SELECT_SOURCE 19 + .. c:macro:: AUDIO_SELECT_SOURCE 22 20 21 + ``int ioctl(int fd, AUDIO_SELECT_SOURCE, struct audio_stream_source *source)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - 33 31 ··· 40 40 41 41 - Indicates the source that shall be used for the Audio stream. 42 42 43 - 44 43 Description 45 44 ----------- 46 45 ··· 47 48 the input data. The possible sources are demux or memory. If 48 49 AUDIO_SOURCE_MEMORY is selected, the data is fed to the Audio Device 49 50 through the write command. 50 - 51 51 52 52 Return Value 53 53 ------------
+3 -5
Documentation/userspace-api/media/dvb/audio-set-av-sync.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_SET_AV_SYNC: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_SET_AV_SYNC, boolean state) 21 - :name: AUDIO_SET_AV_SYNC 19 + .. c:macro:: AUDIO_SET_AV_SYNC 22 20 21 + ``int ioctl(int fd, AUDIO_SET_AV_SYNC, boolean state)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - 33 31 ··· 44 44 45 45 FALSE: AV-sync OFF 46 46 47 - 48 47 Description 49 48 ----------- 50 49 51 50 This ioctl call asks the Audio Device to turn ON or OFF A/V 52 51 synchronization. 53 - 54 52 55 53 Return Value 56 54 ------------
+4 -5
Documentation/userspace-api/media/dvb/audio-set-bypass-mode.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_SET_BYPASS_MODE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_SET_BYPASS_MODE, boolean mode) 21 - :name: AUDIO_SET_BYPASS_MODE 19 + .. c:macro:: AUDIO_SET_BYPASS_MODE 20 + 21 + ``int ioctl(int fd, AUDIO_SET_BYPASS_MODE, boolean mode)`` 22 22 23 23 Arguments 24 24 --------- ··· 27 25 .. flat-table:: 28 26 :header-rows: 0 29 27 :stub-columns: 0 30 - 31 28 32 29 - 33 30 ··· 45 44 46 45 FALSE: Bypass is enabled 47 46 48 - 49 47 Description 50 48 ----------- 51 49 ··· 53 53 that can’t be handled by the Digital TV system shall be decoded. Dolby 54 54 DigitalTM streams are automatically forwarded by the Digital TV subsystem if 55 55 the hardware can handle it. 56 - 57 56 58 57 Return Value 59 58 ------------
+4 -5
Documentation/userspace-api/media/dvb/audio-set-id.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_SET_ID: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_SET_ID, int id) 21 - :name: AUDIO_SET_ID 19 + .. c:macro:: AUDIO_SET_ID 20 + 21 + ``int ioctl(int fd, AUDIO_SET_ID, int id)`` 22 22 23 23 Arguments 24 24 --------- ··· 27 25 .. flat-table:: 28 26 :header-rows: 0 29 27 :stub-columns: 0 30 - 31 28 32 29 - 33 30 ··· 40 39 41 40 - audio sub-stream id 42 41 43 - 44 42 Description 45 43 ----------- 46 44 ··· 50 50 other stream types. If the stream type is set the id just specifies the 51 51 substream id of the audio stream and only the first 5 bits are 52 52 recognized. 53 - 54 53 55 54 Return Value 56 55 ------------
+4 -5
Documentation/userspace-api/media/dvb/audio-set-mixer.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_SET_MIXER: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_SET_MIXER, struct audio_mixer *mix) 21 - :name: AUDIO_SET_MIXER 19 + .. c:macro:: AUDIO_SET_MIXER 20 + 21 + ``int ioctl(int fd, AUDIO_SET_MIXER, struct audio_mixer *mix)`` 22 22 23 23 Arguments 24 24 --------- ··· 27 25 .. flat-table:: 28 26 :header-rows: 0 29 27 :stub-columns: 0 30 - 31 28 32 29 - 33 30 ··· 40 39 41 40 - mixer settings. 42 41 43 - 44 42 Description 45 43 ----------- 46 44 47 45 This ioctl lets you adjust the mixer settings of the audio decoder. 48 - 49 46 50 47 Return Value 51 48 ------------
+3 -5
Documentation/userspace-api/media/dvb/audio-set-mute.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_SET_MUTE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_SET_MUTE, boolean state) 21 - :name: AUDIO_SET_MUTE 19 + .. c:macro:: AUDIO_SET_MUTE 22 20 21 + ``int ioctl(int fd, AUDIO_SET_MUTE, boolean state)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - 33 31 ··· 44 44 45 45 FALSE: Audio Un-mute 46 46 47 - 48 47 Description 49 48 ----------- 50 49 ··· 53 54 54 55 This ioctl call asks the audio device to mute the stream that is 55 56 currently being played. 56 - 57 57 58 58 Return Value 59 59 ------------
+3 -7
Documentation/userspace-api/media/dvb/audio-set-streamtype.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_SET_STREAMTYPE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, AUDIO_SET_STREAMTYPE, int type) 21 - :name: AUDIO_SET_STREAMTYPE 19 + .. c:macro:: AUDIO_SET_STREAMTYPE 22 20 21 + ``int ioctl(fd, AUDIO_SET_STREAMTYPE, int type)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - 33 31 ··· 40 40 41 41 - stream type 42 42 43 - 44 43 Description 45 44 ----------- 46 45 47 46 This ioctl tells the driver which kind of audio stream to expect. This 48 47 is useful if the stream offers several audio sub-streams like LPCM and 49 48 AC3. 50 - 51 49 52 50 Return Value 53 51 ------------ ··· 55 57 :ref:`Generic Error Codes <gen-errors>` chapter. 56 58 57 59 58 - 59 60 .. flat-table:: 60 61 :header-rows: 0 61 62 :stub-columns: 0 62 - 63 63 64 64 - .. row 1 65 65
+4 -5
Documentation/userspace-api/media/dvb/audio-stop.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.audio 2 3 3 4 .. _AUDIO_STOP: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, AUDIO_STOP) 21 - :name: AUDIO_STOP 19 + .. c:macro:: AUDIO_STOP 20 + 21 + ``int ioctl(int fd, AUDIO_STOP)`` 22 22 23 23 Arguments 24 24 --------- ··· 28 26 :header-rows: 0 29 27 :stub-columns: 0 30 28 31 - 32 29 - .. row 1 33 30 34 31 - int fd 35 32 36 33 - File descriptor returned by a previous call to open(). 37 34 38 - 39 35 Description 40 36 ----------- 41 37 42 38 This ioctl call asks the Audio Device to stop playing the current 43 39 stream. 44 - 45 40 46 41 Return Value 47 42 ------------
+2 -5
Documentation/userspace-api/media/dvb/ca-fclose.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _ca_fclose: 4 5 ··· 12 11 13 12 Digital TV CA close() 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 17 .. c:function:: int close(int fd) 20 - :name: dvb-ca-close 21 - 22 18 23 19 Arguments 24 20 --------- 25 21 26 22 ``fd`` 27 - File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. 23 + File descriptor returned by a previous call to :c:func:`open()`. 28 24 29 25 Description 30 26 ----------- 31 27 32 28 This system call closes a previously opened CA device. 33 - 34 29 35 30 Return Value 36 31 ------------
+1 -6
Documentation/userspace-api/media/dvb/ca-fopen.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _ca_fopen: 4 5 ··· 12 11 13 12 Digital TV CA open() 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 17 .. c:function:: int open(const char *name, int flags) 20 - :name: dvb-ca-open 21 - 22 18 23 19 Arguments 24 20 --------- ··· 43 45 - open in non-blocking mode 44 46 (blocking mode is the default) 45 47 46 - 47 48 Description 48 49 ----------- 49 50 ··· 60 63 attempts to open the device in this mode will fail, and an error code 61 64 will be returned. 62 65 63 - 64 66 Return Value 65 67 ------------ 66 - 67 68 68 69 On success 0 is returned. 69 70
+4 -4
Documentation/userspace-api/media/dvb/ca-get-cap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _CA_GET_CAP: 4 5 ··· 12 11 13 12 CA_GET_CAP 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, CA_GET_CAP, struct ca_caps *caps) 20 - :name: CA_GET_CAP 17 + .. c:macro:: CA_GET_CAP 21 18 19 + ``int ioctl(fd, CA_GET_CAP, struct ca_caps *caps)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. 25 + File descriptor returned by a previous call to :c:func:`open()`. 28 26 29 27 ``caps`` 30 28 Pointer to struct :c:type:`ca_caps`.
+5 -4
Documentation/userspace-api/media/dvb/ca-get-descr-info.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _CA_GET_DESCR_INFO: 4 5 ··· 12 11 13 12 CA_GET_DESCR_INFO 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, CA_GET_DESCR_INFO, struct ca_descr_info *desc) 20 - :name: CA_GET_DESCR_INFO 17 + .. c:macro:: CA_GET_DESCR_INFO 18 + 19 + ``int ioctl(fd, CA_GET_DESCR_INFO, struct ca_descr_info *desc)`` 21 20 22 21 Arguments 23 22 --------- 24 23 25 24 ``fd`` 26 - File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. 25 + File descriptor returned by a previous call to :c:func:`open()`. 27 26 28 27 ``desc`` 29 28 Pointer to struct :c:type:`ca_descr_info`.
+4 -6
Documentation/userspace-api/media/dvb/ca-get-msg.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _CA_GET_MSG: 4 5 ··· 12 11 13 12 CA_GET_MSG 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, CA_GET_MSG, struct ca_msg *msg) 20 - :name: CA_GET_MSG 17 + .. c:macro:: CA_GET_MSG 21 18 19 + ``int ioctl(fd, CA_GET_MSG, struct ca_msg *msg)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. 25 + File descriptor returned by a previous call to :c:func:`open()`. 28 26 29 27 ``msg`` 30 28 Pointer to struct :c:type:`ca_msg`. ··· 38 38 Please notice that, on most drivers, this is done by reading from 39 39 the /dev/adapter?/ca? device node. 40 40 41 - 42 41 Return Value 43 42 ------------ 44 - 45 43 46 44 On success 0 is returned. 47 45
+4 -5
Documentation/userspace-api/media/dvb/ca-get-slot-info.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _CA_GET_SLOT_INFO: 4 5 ··· 12 11 13 12 CA_GET_SLOT_INFO 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, CA_GET_SLOT_INFO, struct ca_slot_info *info) 20 - :name: CA_GET_SLOT_INFO 17 + .. c:macro:: CA_GET_SLOT_INFO 21 18 19 + ``int ioctl(fd, CA_GET_SLOT_INFO, struct ca_slot_info *info)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by a previous call to :c:func:`open() <cec-open>`. 25 + File descriptor returned by a previous call to :c:func:`open()`. 28 26 29 27 ``info`` 30 28 Pointer to struct :c:type:`ca_slot_info`. ··· 33 33 34 34 Returns information about a CA slot identified by 35 35 :c:type:`ca_slot_info`.slot_num. 36 - 37 36 38 37 Return Value 39 38 ------------
+4 -5
Documentation/userspace-api/media/dvb/ca-reset.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _CA_RESET: 4 5 ··· 12 11 13 12 CA_RESET 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, CA_RESET) 20 - :name: CA_RESET 17 + .. c:macro:: CA_RESET 21 18 19 + ``int ioctl(fd, CA_RESET)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by a previous call to :c:func:`open() <cec-open>`. 25 + File descriptor returned by a previous call to :c:func:`open()`. 28 26 29 27 Description 30 28 ----------- 31 29 32 30 Puts the Conditional Access hardware on its initial state. It should 33 31 be called before start using the CA hardware. 34 - 35 32 36 33 Return Value 37 34 ------------
+4 -5
Documentation/userspace-api/media/dvb/ca-send-msg.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _CA_SEND_MSG: 4 5 ··· 12 11 13 12 CA_SEND_MSG 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, CA_SEND_MSG, struct ca_msg *msg) 20 - :name: CA_SEND_MSG 17 + .. c:macro:: CA_SEND_MSG 21 18 19 + ``int ioctl(fd, CA_SEND_MSG, struct ca_msg *msg)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by a previous call to :c:func:`open() <cec-open>`. 25 + File descriptor returned by a previous call to :c:func:`open()`. 28 26 29 27 ``msg`` 30 28 Pointer to struct :c:type:`ca_msg`. 31 - 32 29 33 30 Description 34 31 -----------
+4 -4
Documentation/userspace-api/media/dvb/ca-set-descr.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.ca 2 3 3 4 .. _CA_SET_DESCR: 4 5 ··· 12 11 13 12 CA_SET_DESCR 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, CA_SET_DESCR, struct ca_descr *desc) 20 - :name: CA_SET_DESCR 17 + .. c:macro:: CA_SET_DESCR 21 18 19 + ``int ioctl(fd, CA_SET_DESCR, struct ca_descr *desc)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by a previous call to :c:func:`open() <cec-open>`. 25 + File descriptor returned by a previous call to :c:func:`open()`. 28 26 29 27 ``msg`` 30 28 Pointer to struct :c:type:`ca_descr`.
+4 -6
Documentation/userspace-api/media/dvb/dmx-add-pid.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_ADD_PID: 4 5 ··· 12 11 13 12 DMX_ADD_PID 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, DMX_ADD_PID, __u16 *pid) 20 - :name: DMX_ADD_PID 17 + .. c:macro:: DMX_ADD_PID 21 18 19 + ``int ioctl(fd, DMX_ADD_PID, __u16 *pid)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``pid`` 30 28 PID number to be filtered. 31 - 32 29 33 30 Description 34 31 ----------- ··· 34 35 This ioctl call allows to add multiple PIDs to a transport stream filter 35 36 previously set up with :ref:`DMX_SET_PES_FILTER` and output equal to 36 37 :c:type:`DMX_OUT_TSDEMUX_TAP <dmx_output>`. 37 - 38 38 39 39 Return Value 40 40 ------------
+4 -7
Documentation/userspace-api/media/dvb/dmx-expbuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_EXPBUF: 4 5 ··· 14 13 15 14 .. warning:: this API is still experimental 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, DMX_EXPBUF, struct dmx_exportbuffer *argp ) 22 - :name: DMX_EXPBUF 19 + .. c:macro:: DMX_EXPBUF 23 20 21 + ``int ioctl(int fd, DMX_EXPBUF, struct dmx_exportbuffer *argp)`` 24 22 25 23 Arguments 26 24 ========= 27 25 28 26 ``fd`` 29 - File descriptor returned by :ref:`open() <dmx_fopen>`. 27 + File descriptor returned by :c:func:`open()`. 30 28 31 29 ``argp`` 32 30 Pointer to struct :c:type:`dmx_exportbuffer`. 33 - 34 31 35 32 Description 36 33 =========== ··· 53 54 pass it to other DMABUF-aware devices. It is recommended to close a DMABUF 54 55 file when it is no longer used to allow the associated memory to be reclaimed. 55 56 56 - 57 57 Examples 58 58 ======== 59 - 60 59 61 60 .. code-block:: c 62 61
+3 -6
Documentation/userspace-api/media/dvb/dmx-fclose.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _dmx_fclose: 4 5 ··· 12 11 13 12 Digital TV demux close() 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 17 .. c:function:: int close(int fd) 20 - :name: dvb-dmx-close 21 - 22 18 23 19 Arguments 24 20 --------- 25 21 26 22 ``fd`` 27 23 File descriptor returned by a previous call to 28 - :c:func:`open() <dvb-dmx-open>`. 24 + :c:func:`open()`. 29 25 30 26 Description 31 27 ----------- 32 28 33 29 This system call deactivates and deallocates a filter that was 34 - previously allocated via the :c:func:`open() <dvb-dmx-open>` call. 35 - 30 + previously allocated via the :c:func:`open()` call. 36 31 37 32 Return Value 38 33 ------------
+1 -4
Documentation/userspace-api/media/dvb/dmx-fopen.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _dmx_fopen: 4 5 ··· 12 11 13 12 Digital TV demux open() 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 17 .. c:function:: int open(const char *deviceName, int flags) 20 - :name: dvb-dmx-open 21 18 22 19 Arguments 23 20 --------- ··· 46 47 - open in non-blocking mode 47 48 (blocking mode is the default) 48 49 49 - 50 50 Description 51 51 ----------- 52 52 ··· 65 67 affect the semantics of the ``open()`` call itself. A device opened 66 68 in blocking mode can later be put into non-blocking mode (and vice versa) 67 69 using the ``F_SETFL`` command of the fcntl system call. 68 - 69 70 70 71 Return Value 71 72 ------------
+2 -5
Documentation/userspace-api/media/dvb/dmx-fread.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _dmx_fread: 4 5 ··· 12 11 13 12 Digital TV demux read() 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 17 .. c:function:: size_t read(int fd, void *buf, size_t count) 20 - :name: dvb-dmx-read 21 18 22 19 Arguments 23 20 --------- 24 21 25 22 ``fd`` 26 - File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. 23 + File descriptor returned by a previous call to :c:func:`open()`. 27 24 28 25 ``buf`` 29 26 Buffer to be filled ··· 42 43 if a section filter created with 43 44 :c:type:`DMX_CHECK_CRC <dmx_sct_filter_params>` flag set, 44 45 data that fails on CRC check will be silently ignored. 45 - 46 46 47 47 Return Value 48 48 ------------ ··· 72 74 - - ``EFAULT`` 73 75 - The driver failed to write to the callers buffer due to an 74 76 invalid \*buf pointer. 75 - 76 77 77 78 The generic error codes are described at the 78 79 :ref:`Generic Error Codes <gen-errors>` chapter.
+2 -4
Documentation/userspace-api/media/dvb/dmx-fwrite.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _dmx_fwrite: 4 5 ··· 12 11 13 12 Digital TV demux write() 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 17 .. c:function:: ssize_t write(int fd, const void *buf, size_t count) 20 - :name: dvb-dmx-write 21 18 22 19 Arguments 23 20 --------- 24 21 25 22 ``fd`` 26 - File descriptor returned by a previous call to :c:func:`open() <dvb-ca-open>`. 23 + File descriptor returned by a previous call to :c:func:`open()`. 27 24 28 25 ``buf`` 29 26 Buffer with data to be written ··· 38 39 digitally recorded Transport Stream. Matching filters have to be defined 39 40 in the corresponding physical demux device, ``/dev/dvb/adapter?/demux?``. 40 41 The amount of data to be transferred is implied by count. 41 - 42 42 43 43 Return Value 44 44 ------------
+5 -7
Documentation/userspace-api/media/dvb/dmx-get-pes-pids.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_GET_PES_PIDS: 4 5 ··· 12 11 13 12 DMX_GET_PES_PIDS 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, DMX_GET_PES_PIDS, __u16 pids[5]) 20 - :name: DMX_GET_PES_PIDS 17 + .. c:macro:: DMX_GET_PES_PIDS 18 + 19 + ``int ioctl(fd, DMX_GET_PES_PIDS, __u16 pids[5])`` 21 20 22 21 Arguments 23 22 --------- 24 23 25 24 ``fd`` 26 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 27 26 28 27 ``pids`` 29 28 Array used to store 5 Program IDs. 30 - 31 29 32 30 Description 33 31 ----------- ··· 45 45 pids[DMX_PES_PCR] 4 first Program Clock Reference PID 46 46 ======================= ======== ======================================= 47 47 48 - 49 48 .. note:: 50 49 51 50 A value equal to 0xffff means that the PID was not filled by the 52 51 Kernel. 53 - 54 52 55 53 Return Value 56 54 ------------
+5 -7
Documentation/userspace-api/media/dvb/dmx-get-stc.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_GET_STC: 4 5 ··· 12 11 13 12 DMX_GET_STC 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl( int fd, DMX_GET_STC, struct dmx_stc *stc) 20 - :name: DMX_GET_STC 17 + .. c:macro:: DMX_GET_STC 18 + 19 + ``int ioctl(int fd, DMX_GET_STC, struct dmx_stc *stc)`` 21 20 22 21 Arguments 23 22 --------- 24 23 25 24 ``fd`` 26 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 27 26 28 27 ``stc`` 29 28 Pointer to :c:type:`dmx_stc` where the stc data is to be stored. 30 - 31 29 32 30 Description 33 31 ----------- ··· 38 38 The result is returned in form of a ratio with a 64 bit numerator 39 39 and a 32 bit denominator, so the real 90kHz STC value is 40 40 ``stc->stc / stc->base``. 41 - 42 41 43 42 Return Value 44 43 ------------ ··· 59 60 - ``EINVAL`` 60 61 61 62 - Invalid stc number. 62 - 63 63 64 64 The generic error codes are described at the 65 65 :ref:`Generic Error Codes <gen-errors>` chapter.
+6 -9
Documentation/userspace-api/media/dvb/dmx-mmap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _dmx-mmap: 4 5 ··· 22 21 #include <unistd.h> 23 22 #include <sys/mman.h> 24 23 25 - 26 24 .. c:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset ) 27 - :name: dmx-mmap 28 25 29 26 Arguments 30 27 ========= ··· 53 54 54 55 ``MAP_FIXED`` requests that the driver selects no other address than 55 56 the one specified. If the specified address cannot be used, 56 - :ref:`mmap() <dmx-mmap>` will fail. If ``MAP_FIXED`` is specified, 57 + :c:func:`mmap()` will fail. If ``MAP_FIXED`` is specified, 57 58 ``start`` must be a multiple of the pagesize. Use of this option is 58 59 discouraged. 59 60 ··· 68 69 flags. 69 70 70 71 ``fd`` 71 - File descriptor returned by :ref:`open() <dmx_fopen>`. 72 + File descriptor returned by :c:func:`open()`. 72 73 73 74 ``offset`` 74 75 Offset of the buffer in device memory, as returned by 75 76 :ref:`DMX_QUERYBUF` ioctl. 76 77 77 - 78 78 Description 79 79 =========== 80 80 81 - The :ref:`mmap() <dmx-mmap>` function asks to map ``length`` bytes starting at 81 + The :c:func:`mmap()` function asks to map ``length`` bytes starting at 82 82 ``offset`` in the memory of the device specified by ``fd`` into the 83 83 application address space, preferably at address ``start``. This latter 84 84 address is a hint only, and is usually specified as 0. ··· 86 88 :ref:`DMX_QUERYBUF` ioctl. Buffers must be allocated with the 87 89 :ref:`DMX_REQBUFS` ioctl before they can be queried. 88 90 89 - To unmap buffers the :ref:`munmap() <dmx-munmap>` function is used. 90 - 91 + To unmap buffers the :c:func:`munmap()` function is used. 91 92 92 93 Return Value 93 94 ============ 94 95 95 - On success :ref:`mmap() <dmx-mmap>` returns a pointer to the mapped buffer. On 96 + On success :c:func:`mmap()` returns a pointer to the mapped buffer. On 96 97 error ``MAP_FAILED`` (-1) is returned, and the ``errno`` variable is set 97 98 appropriately. Possible error codes are: 98 99
+5 -9
Documentation/userspace-api/media/dvb/dmx-munmap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _dmx-munmap: 4 5 ··· 14 13 15 14 .. warning:: This API is still experimental. 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 ··· 22 22 #include <unistd.h> 23 23 #include <sys/mman.h> 24 24 25 - 26 25 .. c:function:: int munmap( void *start, size_t length ) 27 - :name: dmx-munmap 28 26 29 27 Arguments 30 28 ========= 31 29 32 30 ``start`` 33 31 Address of the mapped buffer as returned by the 34 - :ref:`mmap() <dmx-mmap>` function. 32 + :c:func:`mmap()` function. 35 33 36 34 ``length`` 37 35 Length of the mapped buffer. This must be the same value as given to 38 - :ref:`mmap() <dmx-mmap>`. 39 - 36 + :c:func:`mmap()`. 40 37 41 38 Description 42 39 =========== 43 40 44 - Unmaps a previously with the :ref:`mmap() <dmx-mmap>` function mapped 41 + Unmaps a previously with the :c:func:`mmap()` function mapped 45 42 buffer and frees it, if possible. 46 - 47 43 48 44 Return Value 49 45 ============ 50 46 51 - On success :ref:`munmap() <dmx-munmap>` returns 0, on failure -1 and the 47 + On success :c:func:`munmap()` returns 0, on failure -1 and the 52 48 ``errno`` variable is set appropriately: 53 49 54 50 EINVAL
+8 -9
Documentation/userspace-api/media/dvb/dmx-qbuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_QBUF: 4 5 ··· 14 13 15 14 .. warning:: this API is still experimental 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, DMX_QBUF, struct dmx_buffer *argp ) 22 - :name: DMX_QBUF 19 + .. c:macro:: DMX_QBUF 23 20 24 - .. c:function:: int ioctl( int fd, DMX_DQBUF, struct dmx_buffer *argp ) 25 - :name: DMX_DQBUF 21 + ``int ioctl(int fd, DMX_QBUF, struct dmx_buffer *argp)`` 26 22 23 + .. c:macro:: DMX_DQBUF 24 + 25 + ``int ioctl(int fd, DMX_DQBUF, struct dmx_buffer *argp)`` 27 26 28 27 Arguments 29 28 ========= 30 29 31 30 ``fd`` 32 - File descriptor returned by :ref:`open() <dmx_fopen>`. 31 + File descriptor returned by :c:func:`open()`. 33 32 34 33 ``argp`` 35 34 Pointer to struct :c:type:`dmx_buffer`. 36 - 37 35 38 36 Description 39 37 =========== ··· 60 60 61 61 By default ``DMX_DQBUF`` blocks when no buffer is in the outgoing 62 62 queue. When the ``O_NONBLOCK`` flag was given to the 63 - :ref:`open() <dmx_fopen>` function, ``DMX_DQBUF`` returns 63 + :c:func:`open()` function, ``DMX_DQBUF`` returns 64 64 immediately with an ``EAGAIN`` error code when no buffer is available. 65 65 66 66 The struct :c:type:`dmx_buffer` structure is specified in 67 67 :ref:`buffer`. 68 - 69 68 70 69 Return Value 71 70 ============
+4 -5
Documentation/userspace-api/media/dvb/dmx-querybuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_QUERYBUF: 4 5 ··· 14 13 15 14 .. warning:: this API is still experimental 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, DMX_QUERYBUF, struct dvb_buffer *argp ) 22 - :name: DMX_QUERYBUF 19 + .. c:macro:: DMX_QUERYBUF 23 20 21 + ``int ioctl(int fd, DMX_QUERYBUF, struct dvb_buffer *argp)`` 24 22 25 23 Arguments 26 24 ========= 27 25 28 26 ``fd`` 29 - File descriptor returned by :ref:`open() <dmx_fopen>`. 27 + File descriptor returned by :c:func:`open()`. 30 28 31 29 ``argp`` 32 30 Pointer to struct :c:type:`dvb_buffer`. 33 - 34 31 35 32 Description 36 33 ===========
+4 -6
Documentation/userspace-api/media/dvb/dmx-remove-pid.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_REMOVE_PID: 4 5 ··· 12 11 13 12 DMX_REMOVE_PID 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl(fd, DMX_REMOVE_PID, __u16 *pid) 20 - :name: DMX_REMOVE_PID 17 + .. c:macro:: DMX_REMOVE_PID 21 18 19 + ``int ioctl(fd, DMX_REMOVE_PID, __u16 *pid)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``pid`` 30 28 PID of the PES filter to be removed. 31 - 32 29 33 30 Description 34 31 ----------- ··· 35 36 transport stream filter, e. g. a filter previously set up with output 36 37 equal to :c:type:`DMX_OUT_TSDEMUX_TAP <dmx_output>`, created via either 37 38 :ref:`DMX_SET_PES_FILTER` or :ref:`DMX_ADD_PID`. 38 - 39 39 40 40 Return Value 41 41 ------------
+4 -5
Documentation/userspace-api/media/dvb/dmx-reqbufs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_REQBUFS: 4 5 ··· 14 13 15 14 .. warning:: this API is still experimental 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl( int fd, DMX_REQBUFS, struct dmx_requestbuffers *argp ) 22 - :name: DMX_REQBUFS 19 + .. c:macro:: DMX_REQBUFS 23 20 21 + ``int ioctl(int fd, DMX_REQBUFS, struct dmx_requestbuffers *argp)`` 24 22 25 23 Arguments 26 24 ========= 27 25 28 26 ``fd`` 29 - File descriptor returned by :ref:`open() <dmx_fopen>`. 27 + File descriptor returned by :c:func:`open()`. 30 28 31 29 ``argp`` 32 30 Pointer to struct :c:type:`dmx_requestbuffers`. ··· 63 63 buffers, however this cannot succeed when any buffers are still mapped. 64 64 A ``count`` value of zero frees all buffers, after aborting or finishing 65 65 any DMA in progress. 66 - 67 66 68 67 Return Value 69 68 ============
+4 -6
Documentation/userspace-api/media/dvb/dmx-set-buffer-size.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_SET_BUFFER_SIZE: 4 5 ··· 12 11 13 12 DMX_SET_BUFFER_SIZE 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl( int fd, DMX_SET_BUFFER_SIZE, unsigned long size) 20 - :name: DMX_SET_BUFFER_SIZE 17 + .. c:macro:: DMX_SET_BUFFER_SIZE 21 18 19 + ``int ioctl(int fd, DMX_SET_BUFFER_SIZE, unsigned long size)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``size`` 30 28 Unsigned long size ··· 36 36 this function is not called a buffer size of ``2 * 4096`` bytes will be 37 37 used. 38 38 39 - 40 39 Return Value 41 40 ------------ 42 - 43 41 44 42 On success 0 is returned. 45 43
+5 -7
Documentation/userspace-api/media/dvb/dmx-set-filter.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_SET_FILTER: 4 5 ··· 12 11 13 12 DMX_SET_FILTER 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl( int fd, DMX_SET_FILTER, struct dmx_sct_filter_params *params) 20 - :name: DMX_SET_FILTER 17 + .. c:macro:: DMX_SET_FILTER 18 + 19 + ``int ioctl(int fd, DMX_SET_FILTER, struct dmx_sct_filter_params *params)`` 21 20 22 21 Arguments 23 22 --------- 24 23 25 24 ``fd`` 26 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 27 26 28 27 ``params`` 29 28 30 29 Pointer to structure containing filter parameters. 31 - 32 30 33 31 Description 34 32 ----------- ··· 43 43 :ref:`DMX_START` ioctl call). If a filter was previously set-up, this 44 44 filter will be canceled, and the receive buffer will be flushed. 45 45 46 - 47 46 Return Value 48 47 ------------ 49 - 50 48 51 49 On success 0 is returned. 52 50
+4 -9
Documentation/userspace-api/media/dvb/dmx-set-pes-filter.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_SET_PES_FILTER: 4 5 ··· 12 11 13 12 DMX_SET_PES_FILTER 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl( int fd, DMX_SET_PES_FILTER, struct dmx_pes_filter_params *params) 20 - :name: DMX_SET_PES_FILTER 17 + .. c:macro:: DMX_SET_PES_FILTER 21 18 19 + ``int ioctl(int fd, DMX_SET_PES_FILTER, struct dmx_pes_filter_params *params)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 - 27 24 ``fd`` 28 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 29 26 30 27 ``params`` 31 28 Pointer to structure containing filter parameters. 32 - 33 29 34 30 Description 35 31 ----------- ··· 35 37 provided. By a PES filter is meant a filter that is based just on the 36 38 packet identifier (PID), i.e. no PES header or payload filtering 37 39 capability is supported. 38 - 39 40 40 41 Return Value 41 42 ------------ ··· 51 54 :stub-columns: 0 52 55 :widths: 1 16 53 56 54 - 55 57 - .. row 1 56 58 57 59 - ``EBUSY`` ··· 59 63 There are active filters filtering data from another input source. 60 64 Make sure that these filters are stopped before starting this 61 65 filter. 62 - 63 66 64 67 The generic error codes are described at the 65 68 :ref:`Generic Error Codes <gen-errors>` chapter.
+4 -7
Documentation/userspace-api/media/dvb/dmx-start.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_START: 4 5 ··· 12 11 13 12 DMX_START 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl( int fd, DMX_START) 20 - :name: DMX_START 17 + .. c:macro:: DMX_START 21 18 19 + ``int ioctl(int fd, DMX_START)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 Description 30 28 ----------- 31 29 32 30 This ioctl call is used to start the actual filtering operation defined 33 31 via the ioctl calls :ref:`DMX_SET_FILTER` or :ref:`DMX_SET_PES_FILTER`. 34 - 35 32 36 33 Return Value 37 34 ------------ ··· 44 45 .. flat-table:: 45 46 :header-rows: 0 46 47 :stub-columns: 0 47 - 48 48 49 49 - .. row 1 50 50 ··· 60 62 There are active filters filtering data from another input source. 61 63 Make sure that these filters are stopped before starting this 62 64 filter. 63 - 64 65 65 66 The generic error codes are described at the 66 67 :ref:`Generic Error Codes <gen-errors>` chapter.
+4 -5
Documentation/userspace-api/media/dvb/dmx-stop.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.dmx 2 3 3 4 .. _DMX_STOP: 4 5 ··· 12 11 13 12 DMX_STOP 14 13 15 - 16 14 Synopsis 17 15 -------- 18 16 19 - .. c:function:: int ioctl( int fd, DMX_STOP) 20 - :name: DMX_STOP 17 + .. c:macro:: DMX_STOP 21 18 19 + ``int ioctl(int fd, DMX_STOP)`` 22 20 23 21 Arguments 24 22 --------- 25 23 26 24 ``fd`` 27 - File descriptor returned by :c:func:`open() <dvb-dmx-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 Description 30 28 ----------- ··· 31 31 This ioctl call is used to stop the actual filtering operation defined 32 32 via the ioctl calls :ref:`DMX_SET_FILTER` or :ref:`DMX_SET_PES_FILTER` and 33 33 started via the :ref:`DMX_START` command. 34 - 35 34 36 35 Return Value 37 36 ------------
+4 -5
Documentation/userspace-api/media/dvb/fe-diseqc-recv-slave-reply.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_DISEQC_RECV_SLAVE_REPLY: 4 5 ··· 12 11 13 12 FE_DISEQC_RECV_SLAVE_REPLY - Receives reply from a DiSEqC 2.0 command 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_DISEQC_RECV_SLAVE_REPLY, struct dvb_diseqc_slave_reply *argp ) 20 - :name: FE_DISEQC_RECV_SLAVE_REPLY 17 + .. c:macro:: FE_DISEQC_RECV_SLAVE_REPLY 21 18 19 + ``int ioctl(int fd, FE_DISEQC_RECV_SLAVE_REPLY, struct dvb_diseqc_slave_reply *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 pointer to struct :c:type:`dvb_diseqc_slave_reply`. 31 - 32 29 33 30 Description 34 31 ===========
+4 -5
Documentation/userspace-api/media/dvb/fe-diseqc-reset-overload.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_DISEQC_RESET_OVERLOAD: 4 5 ··· 12 11 13 12 FE_DISEQC_RESET_OVERLOAD - Restores the power to the antenna subsystem, if it was powered off due - to power overload. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_DISEQC_RESET_OVERLOAD, NULL ) 20 - :name: FE_DISEQC_RESET_OVERLOAD 17 + .. c:macro:: FE_DISEQC_RESET_OVERLOAD 21 18 19 + ``int ioctl(int fd, FE_DISEQC_RESET_OVERLOAD, NULL)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 Description 30 28 =========== ··· 32 32 this ioctl call restores the power to the bus. The call requires 33 33 read/write access to the device. This call has no effect if the device 34 34 is manually powered off. Not all Digital TV adapters support this ioctl. 35 - 36 35 37 36 Return Value 38 37 ============
+4 -6
Documentation/userspace-api/media/dvb/fe-diseqc-send-burst.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_DISEQC_SEND_BURST: 4 5 ··· 12 11 13 12 FE_DISEQC_SEND_BURST - Sends a 22KHz tone burst for 2x1 mini DiSEqC satellite selection. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_DISEQC_SEND_BURST, enum fe_sec_mini_cmd tone ) 20 - :name: FE_DISEQC_SEND_BURST 17 + .. c:macro:: FE_DISEQC_SEND_BURST 21 18 19 + ``int ioctl(int fd, FE_DISEQC_SEND_BURST, enum fe_sec_mini_cmd tone)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``tone`` 30 28 An integer enumered value described at :c:type:`fe_sec_mini_cmd`. 31 - 32 29 33 30 Description 34 31 =========== ··· 37 38 38 39 It provides support for what's specified at 39 40 `Digital Satellite Equipment Control (DiSEqC) - Simple "ToneBurst" Detection Circuit specification. <http://www.eutelsat.com/files/contributed/satellites/pdf/Diseqc/associated%20docs/simple_tone_burst_detec.pdf>`__ 40 - 41 41 42 42 Return Value 43 43 ============
+4 -5
Documentation/userspace-api/media/dvb/fe-diseqc-send-master-cmd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_DISEQC_SEND_MASTER_CMD: 4 5 ··· 12 11 13 12 FE_DISEQC_SEND_MASTER_CMD - Sends a DiSEqC command 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_DISEQC_SEND_MASTER_CMD, struct dvb_diseqc_master_cmd *argp ) 20 - :name: FE_DISEQC_SEND_MASTER_CMD 17 + .. c:macro:: FE_DISEQC_SEND_MASTER_CMD 21 18 19 + ``int ioctl(int fd, FE_DISEQC_SEND_MASTER_CMD, struct dvb_diseqc_master_cmd *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 pointer to struct 31 29 :c:type:`dvb_diseqc_master_cmd` 32 - 33 30 34 31 Description 35 32 ===========
+4 -6
Documentation/userspace-api/media/dvb/fe-dishnetwork-send-legacy-cmd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_DISHNETWORK_SEND_LEGACY_CMD: 4 5 ··· 12 11 13 12 FE_DISHNETWORK_SEND_LEGACY_CMD 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl(int fd, FE_DISHNETWORK_SEND_LEGACY_CMD, unsigned long cmd) 20 - :name: FE_DISHNETWORK_SEND_LEGACY_CMD 17 + .. c:macro:: FE_DISHNETWORK_SEND_LEGACY_CMD 21 18 19 + ``int ioctl(int fd, FE_DISHNETWORK_SEND_LEGACY_CMD, unsigned long cmd)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``cmd`` 30 28 Sends the specified raw cmd to the dish via DISEqC. 31 - 32 29 33 30 Description 34 31 =========== ··· 40 41 41 42 As support for this ioctl were added in 2004, this means that such 42 43 dishes were already legacy in 2004. 43 - 44 44 45 45 Return Value 46 46 ============
+4 -6
Documentation/userspace-api/media/dvb/fe-enable-high-lnb-voltage.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_ENABLE_HIGH_LNB_VOLTAGE: 4 5 ··· 12 11 13 12 FE_ENABLE_HIGH_LNB_VOLTAGE - Select output DC level between normal LNBf voltages or higher LNBf - voltages. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_ENABLE_HIGH_LNB_VOLTAGE, unsigned int high ) 20 - :name: FE_ENABLE_HIGH_LNB_VOLTAGE 17 + .. c:macro:: FE_ENABLE_HIGH_LNB_VOLTAGE 21 18 19 + ``int ioctl(int fd, FE_ENABLE_HIGH_LNB_VOLTAGE, unsigned int high)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``high`` 30 28 Valid flags: ··· 33 33 - >0 - enables slightly higher voltages instead of 13/18V, in order 34 34 to compensate for long antenna cables. 35 35 36 - 37 36 Description 38 37 =========== 39 38 40 39 Select output DC level between normal LNBf voltages or higher LNBf 41 40 voltages between 0 (normal) or a value grater than 0 for higher 42 41 voltages. 43 - 44 42 45 43 Return Value 46 44 ============
+4 -8
Documentation/userspace-api/media/dvb/fe-get-event.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_GET_EVENT: 4 5 ··· 14 13 15 14 .. attention:: This ioctl is deprecated. 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev) 22 - :name: FE_GET_EVENT 19 + .. c:macro:: FE_GET_EVENT 23 20 21 + ``int ioctl(int fd, FE_GET_EVENT, struct dvb_frontend_event *ev)`` 24 22 25 23 Arguments 26 24 ========= 27 25 28 26 ``fd`` 29 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 27 + File descriptor returned by :c:func:`open()`. 30 28 31 29 ``ev`` 32 30 Points to the location where the event, if any, is to be stored. 33 - 34 31 35 32 Description 36 33 =========== ··· 39 40 with errno set to ``EWOULDBLOCK``. In the former case, the call blocks until 40 41 an event becomes available. 41 42 42 - 43 43 Return Value 44 44 ============ 45 45 ··· 47 49 On error -1 is returned, and the ``errno`` variable is set 48 50 appropriately. 49 51 50 - 51 52 .. flat-table:: 52 53 :header-rows: 0 53 54 :stub-columns: 0 54 - 55 55 56 56 - .. row 1 57 57
+4 -8
Documentation/userspace-api/media/dvb/fe-get-frontend.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_GET_FRONTEND: 4 5 ··· 14 13 15 14 .. attention:: This ioctl is deprecated. 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl(int fd, FE_GET_FRONTEND, struct dvb_frontend_parameters *p) 22 - :name: FE_GET_FRONTEND 19 + .. c:macro:: FE_GET_FRONTEND 23 20 21 + ``int ioctl(int fd, FE_GET_FRONTEND, struct dvb_frontend_parameters *p)`` 24 22 25 23 Arguments 26 24 ========= 27 25 28 26 ``fd`` 29 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 30 - 27 + File descriptor returned by :c:func:`open()`. 31 28 32 29 ``p`` 33 30 Points to parameters for tuning operation. 34 - 35 31 36 32 Description 37 33 =========== 38 34 39 35 This ioctl call queries the currently effective frontend parameters. For 40 36 this command, read-only access to the device is sufficient. 41 - 42 37 43 38 Return Value 44 39 ============ ··· 47 50 .. flat-table:: 48 51 :header-rows: 0 49 52 :stub-columns: 0 50 - 51 53 52 54 - .. row 1 53 55
+4 -7
Documentation/userspace-api/media/dvb/fe-get-info.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_GET_INFO: 4 5 ··· 13 12 FE_GET_INFO - Query Digital TV frontend capabilities and returns information 14 13 about the - front-end. This call only requires read-only access to the device. 15 14 16 - 17 15 Synopsis 18 16 ======== 19 17 20 - .. c:function:: int ioctl( int fd, FE_GET_INFO, struct dvb_frontend_info *argp ) 21 - :name: FE_GET_INFO 18 + .. c:macro:: FE_GET_INFO 22 19 20 + ``int ioctl(int fd, FE_GET_INFO, struct dvb_frontend_info *argp)`` 23 21 24 22 Arguments 25 23 ========= 26 24 27 25 ``fd`` 28 - File descriptor returned by :ref:`open() <frontend_f_open>`. 26 + File descriptor returned by :c:func:`open()`. 29 27 30 28 ``argp`` 31 29 pointer to struct :c:type:`dvb_frontend_info` 32 - 33 30 34 31 Description 35 32 =========== ··· 39 40 When the driver is not compatible with this specification the ioctl 40 41 returns an error. 41 42 42 - 43 43 frontend capabilities 44 44 ===================== 45 45 ··· 46 48 supported only on some specific frontend types. 47 49 48 50 The frontend capabilities are described at :c:type:`fe_caps`. 49 - 50 51 51 52 Return Value 52 53 ============
+7 -8
Documentation/userspace-api/media/dvb/fe-get-property.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_GET_PROPERTY: 4 5 ··· 12 11 13 12 FE_SET_PROPERTY - FE_GET_PROPERTY - FE_SET_PROPERTY sets one or more frontend properties. - FE_GET_PROPERTY returns one or more frontend properties. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_GET_PROPERTY, struct dtv_properties *argp ) 20 - :name: FE_GET_PROPERTY 17 + .. c:macro:: FE_GET_PROPERTY 21 18 22 - .. c:function:: int ioctl( int fd, FE_SET_PROPERTY, struct dtv_properties *argp ) 23 - :name: FE_SET_PROPERTY 19 + ``int ioctl(int fd, FE_GET_PROPERTY, struct dtv_properties *argp)`` 24 20 21 + .. c:macro:: FE_SET_PROPERTY 22 + 23 + ``int ioctl(int fd, FE_SET_PROPERTY, struct dtv_properties *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <frontend_f_open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`dtv_properties`. 34 - 35 33 36 34 Description 37 35 =========== ··· 62 62 - No properties are changed, and statistics aren't reset. 63 63 64 64 - This call only requires read-only access to the device. 65 - 66 65 67 66 Return Value 68 67 ============
+4 -5
Documentation/userspace-api/media/dvb/fe-read-ber.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_READ_BER: 4 5 ··· 17 16 Synopsis 18 17 ======== 19 18 20 - .. c:function:: int ioctl(int fd, FE_READ_BER, uint32_t *ber) 21 - :name: FE_READ_BER 19 + .. c:macro:: FE_READ_BER 22 20 21 + ``int ioctl(int fd, FE_READ_BER, uint32_t *ber)`` 23 22 24 23 Arguments 25 24 ========= 26 25 27 26 ``fd`` 28 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 27 + File descriptor returned by :c:func:`open()`. 29 28 30 29 ``ber`` 31 30 The bit error rate is stored into \*ber. 32 - 33 31 34 32 Description 35 33 =========== ··· 36 36 This ioctl call returns the bit error rate for the signal currently 37 37 received/demodulated by the front-end. For this command, read-only 38 38 access to the device is sufficient. 39 - 40 39 41 40 Return Value 42 41 ============
+4 -5
Documentation/userspace-api/media/dvb/fe-read-signal-strength.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_READ_SIGNAL_STRENGTH: 4 5 ··· 17 16 Synopsis 18 17 ======== 19 18 20 - .. c:function:: int ioctl( int fd, FE_READ_SIGNAL_STRENGTH, uint16_t *strength) 21 - :name: FE_READ_SIGNAL_STRENGTH 19 + .. c:macro:: FE_READ_SIGNAL_STRENGTH 22 20 21 + ``int ioctl(int fd, FE_READ_SIGNAL_STRENGTH, uint16_t *strength)`` 23 22 24 23 Arguments 25 24 ========= 26 25 27 26 ``fd`` 28 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 27 + File descriptor returned by :c:func:`open()`. 29 28 30 29 ``strength`` 31 30 The signal strength value is stored into \*strength. 32 - 33 31 34 32 Description 35 33 =========== ··· 36 36 This ioctl call returns the signal strength value for the signal 37 37 currently received by the front-end. For this command, read-only access 38 38 to the device is sufficient. 39 - 40 39 41 40 Return Value 42 41 ============
+4 -5
Documentation/userspace-api/media/dvb/fe-read-snr.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_READ_SNR: 4 5 ··· 17 16 Synopsis 18 17 ======== 19 18 20 - .. c:function:: int ioctl(int fd, FE_READ_SNR, int16_t *snr) 21 - :name: FE_READ_SNR 19 + .. c:macro:: FE_READ_SNR 22 20 21 + ``int ioctl(int fd, FE_READ_SNR, int16_t *snr)`` 23 22 24 23 Arguments 25 24 ========= 26 25 27 26 ``fd`` 28 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 27 + File descriptor returned by :c:func:`open()`. 29 28 30 29 ``snr`` 31 30 The signal-to-noise ratio is stored into \*snr. 32 - 33 31 34 32 Description 35 33 =========== ··· 36 36 This ioctl call returns the signal-to-noise ratio for the signal 37 37 currently received by the front-end. For this command, read-only access 38 38 to the device is sufficient. 39 - 40 39 41 40 Return Value 42 41 ============
+4 -7
Documentation/userspace-api/media/dvb/fe-read-status.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_READ_STATUS: 4 5 ··· 12 11 13 12 FE_READ_STATUS - Returns status information about the front-end. This call only requires - read-only access to the device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_READ_STATUS, unsigned int *status ) 20 - :name: FE_READ_STATUS 17 + .. c:macro:: FE_READ_STATUS 21 18 19 + ``int ioctl(int fd, FE_READ_STATUS, unsigned int *status)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``status`` 30 28 pointer to a bitmask integer filled with the values defined by enum 31 29 :c:type:`fe_status`. 32 - 33 30 34 31 Description 35 32 =========== ··· 43 44 varies according with the architecture. This needs to be fixed in the 44 45 future. 45 46 46 - 47 47 int fe_status 48 48 ============= 49 49 50 50 The fe_status parameter is used to indicate the current state and/or 51 51 state changes of the frontend hardware. It is produced using the enum 52 52 :c:type:`fe_status` values on a bitmask 53 - 54 53 55 54 Return Value 56 55 ============
+4 -5
Documentation/userspace-api/media/dvb/fe-read-uncorrected-blocks.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_READ_UNCORRECTED_BLOCKS: 4 5 ··· 17 16 Synopsis 18 17 ======== 19 18 20 - .. c:function:: int ioctl( int fd, FE_READ_UNCORRECTED_BLOCKS, uint32_t *ublocks) 21 - :name: FE_READ_UNCORRECTED_BLOCKS 19 + .. c:macro:: FE_READ_UNCORRECTED_BLOCKS 22 20 21 + ``int ioctl(int fd, FE_READ_UNCORRECTED_BLOCKS, uint32_t *ublocks)`` 23 22 24 23 Arguments 25 24 ========= 26 25 27 26 ``fd`` 28 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 27 + File descriptor returned by :c:func:`open()`. 29 28 30 29 ``ublocks`` 31 30 The total number of uncorrected blocks seen by the driver so far. 32 - 33 31 34 32 Description 35 33 =========== ··· 38 38 increment in block count during a specific time interval should be 39 39 calculated. For this command, read-only access to the device is 40 40 sufficient. 41 - 42 41 43 42 Return Value 44 43 ============
+4 -6
Documentation/userspace-api/media/dvb/fe-set-frontend-tune-mode.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_SET_FRONTEND_TUNE_MODE: 4 5 ··· 12 11 13 12 FE_SET_FRONTEND_TUNE_MODE - Allow setting tuner mode flags to the frontend. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_SET_FRONTEND_TUNE_MODE, unsigned int flags ) 20 - :name: FE_SET_FRONTEND_TUNE_MODE 17 + .. c:macro:: FE_SET_FRONTEND_TUNE_MODE 21 18 19 + ``int ioctl(int fd, FE_SET_FRONTEND_TUNE_MODE, unsigned int flags)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``flags`` 30 28 Valid flags: ··· 37 37 is closed, this flag will be automatically turned off when the 38 38 device is reopened read-write. 39 39 40 - 41 40 Description 42 41 =========== 43 42 44 43 Allow setting tuner mode flags to the frontend, between 0 (normal) or 45 44 ``FE_TUNE_MODE_ONESHOT`` mode 46 - 47 45 48 46 Return Value 49 47 ============
+4 -7
Documentation/userspace-api/media/dvb/fe-set-frontend.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_SET_FRONTEND: 4 5 ··· 14 13 15 14 FE_SET_FRONTEND 16 15 17 - 18 16 Synopsis 19 17 ======== 20 18 21 - .. c:function:: int ioctl(int fd, FE_SET_FRONTEND, struct dvb_frontend_parameters *p) 22 - :name: FE_SET_FRONTEND 19 + .. c:macro:: FE_SET_FRONTEND 23 20 21 + ``int ioctl(int fd, FE_SET_FRONTEND, struct dvb_frontend_parameters *p)`` 24 22 25 23 Arguments 26 24 ========= 27 25 28 26 ``fd`` 29 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 27 + File descriptor returned by :c:func:`open()`. 30 28 31 29 ``p`` 32 30 Points to parameters for tuning operation. 33 - 34 31 35 32 Description 36 33 =========== ··· 42 43 operation is initiated before the previous one was completed, the 43 44 previous operation will be aborted in favor of the new one. This command 44 45 requires read/write access to the device. 45 - 46 46 47 47 Return Value 48 48 ============ ··· 63 65 - ``EINVAL`` 64 66 65 67 - Maximum supported symbol rate reached. 66 - 67 68 68 69 Generic error codes are described at the 69 70 :ref:`Generic Error Codes <gen-errors>` chapter.
+4 -6
Documentation/userspace-api/media/dvb/fe-set-tone.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_SET_TONE: 4 5 ··· 12 11 13 12 FE_SET_TONE - Sets/resets the generation of the continuous 22kHz tone. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_SET_TONE, enum fe_sec_tone_mode tone ) 20 - :name: FE_SET_TONE 17 + .. c:macro:: FE_SET_TONE 21 18 19 + ``int ioctl(int fd, FE_SET_TONE, enum fe_sec_tone_mode tone)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``tone`` 30 28 an integer enumered value described at :c:type:`fe_sec_tone_mode` 31 - 32 29 33 30 Description 34 31 =========== ··· 43 44 setting a tone may interfere on other devices, as they may lose the 44 45 capability of selecting the band. So, it is recommended that applications 45 46 would change to SEC_TONE_OFF when the device is not used. 46 - 47 47 48 48 Return Value 49 49 ============
+4 -6
Documentation/userspace-api/media/dvb/fe-set-voltage.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _FE_SET_VOLTAGE: 4 5 ··· 12 11 13 12 FE_SET_VOLTAGE - Allow setting the DC level sent to the antenna subsystem. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, FE_SET_VOLTAGE, enum fe_sec_voltage voltage ) 20 - :name: FE_SET_VOLTAGE 17 + .. c:macro:: FE_SET_VOLTAGE 21 18 19 + ``int ioctl(int fd, FE_SET_VOLTAGE, enum fe_sec_voltage voltage)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``voltage`` 30 28 an integer enumered value described at :c:type:`fe_sec_voltage` 31 - 32 29 33 30 Description 34 31 =========== ··· 47 48 the capability of setting polarization or IF. So, on those cases, setting 48 49 the voltage to SEC_VOLTAGE_OFF while the device is not is used is 49 50 recommended. 50 - 51 51 52 52 Return Value 53 53 ============
+2 -6
Documentation/userspace-api/media/dvb/frontend_f_close.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _frontend_f_close: 4 5 ··· 12 11 13 12 fe-close - Close a frontend device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: int close( int fd ) 24 - :name: dvb-fe-close 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :c:func:`open() <dvb-fe-open>`. 31 - 28 + File descriptor returned by :c:func:`open()`. 32 29 33 30 Description 34 31 =========== ··· 33 36 This system call closes a previously opened front-end device. After 34 37 closing a front-end device, its corresponding hardware might be powered 35 38 down automatically. 36 - 37 39 38 40 Return Value 39 41 ============
+2 -8
Documentation/userspace-api/media/dvb/frontend_f_open.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.fe 2 3 3 4 .. _frontend_f_open: 4 5 ··· 12 11 13 12 fe-open - Open a frontend device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <fcntl.h> 21 21 22 - 23 22 .. c:function:: int open( const char *device_name, int flags ) 24 - :name: dvb-fe-open 25 23 26 24 Arguments 27 25 ========= ··· 41 43 driver is temporarily busy. 42 44 43 45 Other flags have no effect. 44 - 45 46 46 47 Description 47 48 =========== ··· 67 70 powered up, and that other front-ends may have been powered down to make 68 71 that possible. 69 72 70 - 71 73 Return Value 72 74 ============ 73 75 74 - On success :ref:`open() <frontend_f_open>` returns the new file descriptor. 76 + On success :c:func:`open()` returns the new file descriptor. 75 77 On error, -1 is returned, and the ``errno`` variable is set appropriately. 76 78 77 79 Possible error codes are: 78 - 79 80 80 81 On success 0 is returned, and :c:type:`ca_slot_info` is filled. 81 82 ··· 99 104 - - ``ENFILE`` 100 105 - The limit on the total number of files open on the system has been 101 106 reached. 102 - 103 107 104 108 The generic error codes are described at the 105 109 :ref:`Generic Error Codes <gen-errors>` chapter.
+4 -5
Documentation/userspace-api/media/dvb/net-add-if.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.net 2 3 3 4 .. _NET_ADD_IF: 4 5 ··· 12 11 13 12 NET_ADD_IF - Creates a new network interface for a given Packet ID. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, NET_ADD_IF, struct dvb_net_if *net_if ) 20 - :name: NET_ADD_IF 17 + .. c:macro:: NET_ADD_IF 21 18 19 + ``int ioctl(int fd, NET_ADD_IF, struct dvb_net_if *net_if)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``net_if`` 30 28 pointer to struct :c:type:`dvb_net_if` 31 - 32 29 33 30 Description 34 31 ===========
+4 -6
Documentation/userspace-api/media/dvb/net-get-if.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.net 2 3 3 4 .. _NET_GET_IF: 4 5 ··· 12 11 13 12 NET_GET_IF - Read the configuration data of an interface created via - :ref:`NET_ADD_IF <net>`. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, NET_GET_IF, struct dvb_net_if *net_if ) 20 - :name: NET_GET_IF 17 + .. c:macro:: NET_GET_IF 21 18 19 + ``int ioctl(int fd, NET_GET_IF, struct dvb_net_if *net_if)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``net_if`` 30 28 pointer to struct :c:type:`dvb_net_if` 31 - 32 29 33 30 Description 34 31 =========== ··· 37 38 encapsulation type used on such interface. If the interface was not 38 39 created yet with :ref:`NET_ADD_IF <net>`, it will return -1 and fill 39 40 the ``errno`` with ``EINVAL`` error code. 40 - 41 41 42 42 Return Value 43 43 ============
+4 -6
Documentation/userspace-api/media/dvb/net-remove-if.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.net 2 3 3 4 .. _NET_REMOVE_IF: 4 5 ··· 12 11 13 12 NET_REMOVE_IF - Removes a network interface. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, NET_REMOVE_IF, int ifnum ) 20 - :name: NET_REMOVE_IF 17 + .. c:macro:: NET_REMOVE_IF 21 18 19 + ``int ioctl(int fd, NET_REMOVE_IF, int ifnum)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <frontend_f_open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``net_if`` 30 28 number of the interface to be removed 31 - 32 29 33 30 Description 34 31 =========== 35 32 36 33 The NET_REMOVE_IF ioctl deletes an interface previously created via 37 34 :ref:`NET_ADD_IF <net>`. 38 - 39 35 40 36 Return Value 41 37 ============
+3 -5
Documentation/userspace-api/media/dvb/video-clear-buffer.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_CLEAR_BUFFER: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_CLEAR_BUFFER) 21 - :name: VIDEO_CLEAR_BUFFER 19 + .. c:macro:: VIDEO_CLEAR_BUFFER 22 20 21 + ``int ioctl(fd, VIDEO_CLEAR_BUFFER)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 40 40 41 41 - Equals VIDEO_CLEAR_BUFFER for this command. 42 42 43 - 44 43 Description 45 44 ----------- 46 45 47 46 This ioctl call clears all video buffers in the driver and in the 48 47 decoder hardware. 49 - 50 48 51 49 Return Value 52 50 ------------
+4 -6
Documentation/userspace-api/media/dvb/video-command.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_COMMAND: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, VIDEO_COMMAND, struct video_command *cmd) 21 - :name: VIDEO_COMMAND 19 + .. c:macro:: VIDEO_COMMAND 22 20 21 + ``int ioctl(int fd, VIDEO_COMMAND, struct video_command *cmd)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - Commands the decoder. 48 48 49 - 50 49 Description 51 50 ----------- 52 51 ··· 58 59 :ref:`VIDIOC_DECODER_CMD` documentation for 59 60 more information. 60 61 61 - .. c:type:: struct video_command 62 + .. c:type:: video_command 62 63 63 64 .. code-block:: c 64 65 ··· 87 88 } raw; 88 89 }; 89 90 }; 90 - 91 91 92 92 Return Value 93 93 ------------
+3 -5
Documentation/userspace-api/media/dvb/video-continue.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_CONTINUE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_CONTINUE) 21 - :name: VIDEO_CONTINUE 19 + .. c:macro:: VIDEO_CONTINUE 22 20 21 + ``int ioctl(fd, VIDEO_CONTINUE)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 40 40 41 41 - Equals VIDEO_CONTINUE for this command. 42 42 43 - 44 43 Description 45 44 ----------- 46 45 ··· 48 49 49 50 This ioctl call restarts decoding and playing processes of the video 50 51 stream which was played before a call to VIDEO_FREEZE was made. 51 - 52 52 53 53 Return Value 54 54 ------------
+3 -7
Documentation/userspace-api/media/dvb/video-fast-forward.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_FAST_FORWARD: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_FAST_FORWARD, int nFrames) 21 - :name: VIDEO_FAST_FORWARD 19 + .. c:macro:: VIDEO_FAST_FORWARD 22 20 21 + ``int ioctl(fd, VIDEO_FAST_FORWARD, int nFrames)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - The number of frames to skip. 48 48 49 - 50 49 Description 51 50 ----------- 52 51 53 52 This ioctl call asks the Video Device to skip decoding of N number of 54 53 I-frames. This call can only be used if VIDEO_SOURCE_MEMORY is 55 54 selected. 56 - 57 55 58 56 Return Value 59 57 ------------ ··· 61 63 :ref:`Generic Error Codes <gen-errors>` chapter. 62 64 63 65 64 - 65 66 .. flat-table:: 66 67 :header-rows: 0 67 68 :stub-columns: 0 68 - 69 69 70 70 - .. row 1 71 71
+1 -5
Documentation/userspace-api/media/dvb/video-fclose.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _video_fclose: 4 5 ··· 19 18 20 19 .. c:function:: int close(int fd) 21 20 22 - 23 21 Arguments 24 22 --------- 25 23 ··· 26 26 :header-rows: 0 27 27 :stub-columns: 0 28 28 29 - 30 29 - .. row 1 31 30 32 31 - int fd 33 32 34 33 - File descriptor returned by a previous call to open(). 35 34 36 - 37 35 Description 38 36 ----------- 39 37 40 38 This system call closes a previously opened video device. 41 - 42 39 43 40 Return Value 44 41 ------------ ··· 43 46 .. flat-table:: 44 47 :header-rows: 0 45 48 :stub-columns: 0 46 - 47 49 48 50 - .. row 1 49 51
+1 -5
Documentation/userspace-api/media/dvb/video-fopen.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _video_fopen: 4 5 ··· 19 18 20 19 .. c:function:: int open(const char *deviceName, int flags) 21 20 22 - 23 21 Arguments 24 22 --------- 25 23 26 24 .. flat-table:: 27 25 :header-rows: 0 28 26 :stub-columns: 0 29 - 30 27 31 28 - .. row 1 32 29 ··· 58 59 - 59 60 - (blocking mode is the default) 60 61 61 - 62 62 Description 63 63 ----------- 64 64 ··· 77 79 ioctl call that can be used is VIDEO_GET_STATUS. All other call will 78 80 return an error code. 79 81 80 - 81 82 Return Value 82 83 ------------ 83 84 ··· 85 88 .. flat-table:: 86 89 :header-rows: 0 87 90 :stub-columns: 0 88 - 89 91 90 92 - .. row 1 91 93
+3 -5
Documentation/userspace-api/media/dvb/video-freeze.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_FREEZE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_FREEZE) 21 - :name: VIDEO_FREEZE 19 + .. c:macro:: VIDEO_FREEZE 22 20 21 + ``int ioctl(fd, VIDEO_FREEZE)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 40 40 41 41 - Equals VIDEO_FREEZE for this command. 42 42 43 - 44 43 Description 45 44 ----------- 46 45 ··· 52 53 If VIDEO_SOURCE_MEMORY is selected in the ioctl call 53 54 VIDEO_SELECT_SOURCE, the Digital TV subsystem will not decode any more data 54 55 until the ioctl call VIDEO_CONTINUE or VIDEO_PLAY is performed. 55 - 56 56 57 57 Return Value 58 58 ------------
+1 -5
Documentation/userspace-api/media/dvb/video-fwrite.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _video_fwrite: 4 5 ··· 19 18 20 19 .. c:function:: size_t write(int fd, const void *buf, size_t count) 21 20 22 - 23 21 Arguments 24 22 --------- 25 23 26 24 .. flat-table:: 27 25 :header-rows: 0 28 26 :stub-columns: 0 29 - 30 27 31 28 - .. row 1 32 29 ··· 44 45 45 46 - Size of buf. 46 47 47 - 48 48 Description 49 49 ----------- 50 50 ··· 53 55 is not specified the function will block until buffer space is 54 56 available. The amount of data to be transferred is implied by count. 55 57 56 - 57 58 Return Value 58 59 ------------ 59 60 60 61 .. flat-table:: 61 62 :header-rows: 0 62 63 :stub-columns: 0 63 - 64 64 65 65 - .. row 1 66 66
+3 -5
Documentation/userspace-api/media/dvb/video-get-capabilities.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_GET_CAPABILITIES: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_GET_CAPABILITIES, unsigned int *cap) 21 - :name: VIDEO_GET_CAPABILITIES 19 + .. c:macro:: VIDEO_GET_CAPABILITIES 22 20 21 + ``int ioctl(fd, VIDEO_GET_CAPABILITIES, unsigned int *cap)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - Pointer to a location where to store the capability information. 48 48 49 - 50 49 Description 51 50 ----------- 52 51 53 52 This ioctl call asks the video device about its decoding capabilities. 54 53 On success it returns and integer which has bits set according to the 55 54 defines in section ??. 56 - 57 55 58 56 Return Value 59 57 ------------
+3 -5
Documentation/userspace-api/media/dvb/video-get-event.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_GET_EVENT: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_GET_EVENT, struct video_event *ev) 21 - :name: VIDEO_GET_EVENT 19 + .. c:macro:: VIDEO_GET_EVENT 22 20 21 + ``int ioctl(fd, VIDEO_GET_EVENT, struct video_event *ev)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 45 45 - struct video_event \*ev 46 46 47 47 - Points to the location where the event, if any, is to be stored. 48 - 49 48 50 49 Description 51 50 ----------- ··· 91 92 .. flat-table:: 92 93 :header-rows: 0 93 94 :stub-columns: 0 94 - 95 95 96 96 - .. row 1 97 97
+3 -5
Documentation/userspace-api/media/dvb/video-get-frame-count.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_GET_FRAME_COUNT: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, VIDEO_GET_FRAME_COUNT, __u64 *pts) 21 - :name: VIDEO_GET_FRAME_COUNT 19 + .. c:macro:: VIDEO_GET_FRAME_COUNT 22 20 21 + ``int ioctl(int fd, VIDEO_GET_FRAME_COUNT, __u64 *pts)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 47 47 - Returns the number of frames displayed since the decoder was 48 48 started. 49 49 50 - 51 50 Description 52 51 ----------- 53 52 ··· 56 57 57 58 This ioctl call asks the Video Device to return the number of displayed 58 59 frames since the decoder was started. 59 - 60 60 61 61 Return Value 62 62 ------------
+3 -5
Documentation/userspace-api/media/dvb/video-get-pts.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_GET_PTS: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, VIDEO_GET_PTS, __u64 *pts) 21 - :name: VIDEO_GET_PTS 19 + .. c:macro:: VIDEO_GET_PTS 22 20 21 + ``int ioctl(int fd, VIDEO_GET_PTS, __u64 *pts)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 51 51 but may also be a value close to it like the PTS of the last 52 52 decoded frame or the last PTS extracted by the PES parser. 53 53 54 - 55 54 Description 56 55 ----------- 57 56 ··· 60 61 61 62 This ioctl call asks the Video Device to return the current PTS 62 63 timestamp. 63 - 64 64 65 65 Return Value 66 66 ------------
+3 -5
Documentation/userspace-api/media/dvb/video-get-size.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_GET_SIZE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, VIDEO_GET_SIZE, video_size_t *size) 21 - :name: VIDEO_GET_SIZE 19 + .. c:macro:: VIDEO_GET_SIZE 22 20 21 + ``int ioctl(int fd, VIDEO_GET_SIZE, video_size_t *size)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - Returns the size and aspect ratio. 48 48 49 - 50 49 Description 51 50 ----------- 52 51 ··· 60 61 int h; 61 62 video_format_t aspect_ratio; 62 63 } video_size_t; 63 - 64 64 65 65 Return Value 66 66 ------------
+3 -4
Documentation/userspace-api/media/dvb/video-get-status.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_GET_STATUS: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_GET_STATUS, struct video_status *status) 21 - :name: VIDEO_GET_STATUS 19 + .. c:macro:: VIDEO_GET_STATUS 22 20 21 + ``int ioctl(fd, VIDEO_GET_STATUS, struct video_status *status)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 45 45 - struct video_status \*status 46 46 47 47 - Returns the current status of the Video Device. 48 - 49 48 50 49 Description 51 50 -----------
+3 -5
Documentation/userspace-api/media/dvb/video-play.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_PLAY: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_PLAY) 21 - :name: VIDEO_PLAY 19 + .. c:macro:: VIDEO_PLAY 22 20 21 + ``int ioctl(fd, VIDEO_PLAY)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 40 40 41 41 - Equals VIDEO_PLAY for this command. 42 42 43 - 44 43 Description 45 44 ----------- 46 45 ··· 48 49 49 50 This ioctl call asks the Video Device to start playing a video stream 50 51 from the selected source. 51 - 52 52 53 53 Return Value 54 54 ------------
+3 -4
Documentation/userspace-api/media/dvb/video-select-source.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_SELECT_SOURCE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_SELECT_SOURCE, video_stream_source_t source) 21 - :name: VIDEO_SELECT_SOURCE 19 + .. c:macro:: VIDEO_SELECT_SOURCE 22 20 21 + ``int ioctl(fd, VIDEO_SELECT_SOURCE, video_stream_source_t source)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 45 45 - video_stream_source_t source 46 46 47 47 - Indicates which source shall be used for the Video stream. 48 - 49 48 50 49 Description 51 50 -----------
+3 -5
Documentation/userspace-api/media/dvb/video-set-blank.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_SET_BLANK: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_SET_BLANK, boolean mode) 21 - :name: VIDEO_SET_BLANK 19 + .. c:macro:: VIDEO_SET_BLANK 22 20 21 + ``int ioctl(fd, VIDEO_SET_BLANK, boolean mode)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 51 51 - 52 52 - FALSE: Show last decoded frame. 53 53 54 - 55 54 Description 56 55 ----------- 57 56 58 57 This ioctl call asks the Video Device to blank out the picture. 59 - 60 58 61 59 Return Value 62 60 ------------
+3 -5
Documentation/userspace-api/media/dvb/video-set-display-format.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_SET_DISPLAY_FORMAT: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_SET_DISPLAY_FORMAT) 21 - :name: VIDEO_SET_DISPLAY_FORMAT 19 + .. c:macro:: VIDEO_SET_DISPLAY_FORMAT 22 20 21 + ``int ioctl(fd, VIDEO_SET_DISPLAY_FORMAT)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - Selects the video format to be used. 48 48 49 - 50 49 Description 51 50 ----------- 52 51 53 52 This ioctl call asks the Video Device to select the video format to be 54 53 applied by the MPEG chip on the video. 55 - 56 54 57 55 Return Value 58 56 ------------
+3 -6
Documentation/userspace-api/media/dvb/video-set-format.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_SET_FORMAT: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_SET_FORMAT, video_format_t format) 21 - :name: VIDEO_SET_FORMAT 19 + .. c:macro:: VIDEO_SET_FORMAT 22 20 21 + ``int ioctl(fd, VIDEO_SET_FORMAT, video_format_t format)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 45 45 - video_format_t format 46 46 47 47 - video format of TV as defined in section ??. 48 - 49 48 50 49 Description 51 50 ----------- ··· 71 72 :ref:`Generic Error Codes <gen-errors>` chapter. 72 73 73 74 74 - 75 75 .. flat-table:: 76 76 :header-rows: 0 77 77 :stub-columns: 0 78 - 79 78 80 79 - .. row 1 81 80
+3 -5
Documentation/userspace-api/media/dvb/video-set-streamtype.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_SET_STREAMTYPE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_SET_STREAMTYPE, int type) 21 - :name: VIDEO_SET_STREAMTYPE 19 + .. c:macro:: VIDEO_SET_STREAMTYPE 22 20 21 + ``int ioctl(fd, VIDEO_SET_STREAMTYPE, int type)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - stream type 48 48 49 - 50 49 Description 51 50 ----------- 52 51 53 52 This ioctl tells the driver which kind of stream to expect being written 54 53 to it. If this call is not used the default of video PES is used. Some 55 54 drivers might not support this call and always expect PES. 56 - 57 55 58 56 Return Value 59 57 ------------
+3 -7
Documentation/userspace-api/media/dvb/video-slowmotion.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_SLOWMOTION: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_SLOWMOTION, int nFrames) 21 - :name: VIDEO_SLOWMOTION 19 + .. c:macro:: VIDEO_SLOWMOTION 22 20 21 + ``int ioctl(fd, VIDEO_SLOWMOTION, int nFrames)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - The number of times to repeat each frame. 48 48 49 - 50 49 Description 51 50 ----------- 52 51 53 52 This ioctl call asks the video device to repeat decoding frames N number 54 53 of times. This call can only be used if VIDEO_SOURCE_MEMORY is 55 54 selected. 56 - 57 55 58 56 Return Value 59 57 ------------ ··· 61 63 :ref:`Generic Error Codes <gen-errors>` chapter. 62 64 63 65 64 - 65 66 .. flat-table:: 66 67 :header-rows: 0 67 68 :stub-columns: 0 68 - 69 69 70 70 - .. row 1 71 71
+3 -5
Documentation/userspace-api/media/dvb/video-stillpicture.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_STILLPICTURE: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_STILLPICTURE, struct video_still_picture *sp) 21 - :name: VIDEO_STILLPICTURE 19 + .. c:macro:: VIDEO_STILLPICTURE 22 20 21 + ``int ioctl(fd, VIDEO_STILLPICTURE, struct video_still_picture *sp)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - Pointer to a location where an I-frame and size is stored. 48 48 49 - 50 49 Description 51 50 ----------- 52 51 53 52 This ioctl call asks the Video Device to display a still picture 54 53 (I-frame). The input data shall contain an I-frame. If the pointer is 55 54 NULL, then the current displayed still picture is blanked. 56 - 57 55 58 56 Return Value 59 57 ------------
+3 -5
Documentation/userspace-api/media/dvb/video-stop.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_STOP: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(fd, VIDEO_STOP, boolean mode) 21 - :name: VIDEO_STOP 19 + .. c:macro:: VIDEO_STOP 22 20 21 + ``int ioctl(fd, VIDEO_STOP, boolean mode)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 56 56 - 57 57 - FALSE: Show last decoded frame. 58 58 59 - 60 59 Description 61 60 ----------- 62 61 ··· 65 66 This ioctl call asks the Video Device to stop playing the current 66 67 stream. Depending on the input parameter, the screen can be blanked out 67 68 or displaying the last decoded frame. 68 - 69 69 70 70 Return Value 71 71 ------------
+3 -5
Documentation/userspace-api/media/dvb/video-try-command.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: DTV.video 2 3 3 4 .. _VIDEO_TRY_COMMAND: 4 5 ··· 17 16 Synopsis 18 17 -------- 19 18 20 - .. c:function:: int ioctl(int fd, VIDEO_TRY_COMMAND, struct video_command *cmd) 21 - :name: VIDEO_TRY_COMMAND 19 + .. c:macro:: VIDEO_TRY_COMMAND 22 20 21 + ``int ioctl(int fd, VIDEO_TRY_COMMAND, struct video_command *cmd)`` 23 22 24 23 Arguments 25 24 --------- ··· 27 26 .. flat-table:: 28 27 :header-rows: 0 29 28 :stub-columns: 0 30 - 31 29 32 30 - .. row 1 33 31 ··· 46 46 47 47 - Try a decoder command. 48 48 49 - 50 49 Description 51 50 ----------- 52 51 ··· 57 58 subset of the ``v4l2_decoder_cmd`` struct, so refer to the 58 59 :ref:`VIDIOC_TRY_DECODER_CMD <VIDIOC_DECODER_CMD>` documentation 59 60 for more information. 60 - 61 61 62 62 Return Value 63 63 ------------
+3 -7
Documentation/userspace-api/media/mediactl/media-func-close.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media-func-close: 4 5 ··· 12 11 13 12 media-close - Close a media device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: int close( int fd ) 24 - :name: mc-close 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :c:func:`open() <mc-open>`. 31 - 28 + File descriptor returned by :c:func:`open()`. 32 29 33 30 Description 34 31 =========== ··· 33 36 Closes the media device. Resources associated with the file descriptor 34 37 are freed. The device configuration remain unchanged. 35 38 36 - 37 39 Return Value 38 40 ============ 39 41 40 - :ref:`close() <media-func-close>` returns 0 on success. On error, -1 is returned, and 42 + :c:func:`close()` returns 0 on success. On error, -1 is returned, and 41 43 ``errno`` is set appropriately. Possible error codes are: 42 44 43 45 EBADF
+3 -7
Documentation/userspace-api/media/mediactl/media-func-ioctl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media-func-ioctl: 4 5 ··· 12 11 13 12 media-ioctl - Control a media device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/ioctl.h> 21 21 22 - 23 - .. c:function:: int ioctl( int fd, int request, void *argp ) 24 - :name: mc-ioctl 22 + ``int ioctl(int fd, int request, void *argp)`` 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :c:func:`open() <mc-open>`. 28 + File descriptor returned by :c:func:`open()`. 31 29 32 30 ``request`` 33 31 Media ioctl request code as defined in the media.h header file, for ··· 33 35 34 36 ``argp`` 35 37 Pointer to a request-specific structure. 36 - 37 38 38 39 Description 39 40 =========== ··· 48 51 their parameters are located in the media.h header file. All media ioctl 49 52 requests, their respective function and parameters are specified in 50 53 :ref:`media-user-func`. 51 - 52 54 53 55 Return Value 54 56 ============
+3 -7
Documentation/userspace-api/media/mediactl/media-func-open.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media-func-open: 4 5 ··· 12 11 13 12 media-open - Open a media device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <fcntl.h> 21 21 22 - 23 22 .. c:function:: int open( const char *device_name, int flags ) 24 - :name: mc-open 25 23 26 24 Arguments 27 25 ========= ··· 31 33 Open flags. Access mode must be either ``O_RDONLY`` or ``O_RDWR``. 32 34 Other flags have no effect. 33 35 34 - 35 36 Description 36 37 =========== 37 38 38 - To open a media device applications call :ref:`open() <media-func-open>` with the 39 + To open a media device applications call :c:func:`open()` with the 39 40 desired device name. The function has no side effects; the device 40 41 configuration remain unchanged. 41 42 ··· 42 45 configuration will result in an error, and ``errno`` will be set to 43 46 EBADF. 44 47 45 - 46 48 Return Value 47 49 ============ 48 50 49 - :ref:`open() <func-open>` returns the new file descriptor on success. On error, 51 + :c:func:`open()` returns the new file descriptor on success. On error, 50 52 -1 is returned, and ``errno`` is set appropriately. Possible error codes 51 53 are: 52 54
+4 -9
Documentation/userspace-api/media/mediactl/media-ioc-device-info.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media_ioc_device_info: 4 5 ··· 12 11 13 12 MEDIA_IOC_DEVICE_INFO - Query device information 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, MEDIA_IOC_DEVICE_INFO, struct media_device_info *argp ) 20 - :name: MEDIA_IOC_DEVICE_INFO 17 + .. c:macro:: MEDIA_IOC_DEVICE_INFO 21 18 19 + ``int ioctl(int fd, MEDIA_IOC_DEVICE_INFO, struct media_device_info *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <media-func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`media_device_info`. 31 - 32 29 33 30 Description 34 31 =========== ··· 37 38 fills the structure and returns the information to the application. The 38 39 ioctl never fails. 39 40 40 - 41 41 .. c:type:: media_device_info 42 42 43 43 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 45 47 :header-rows: 0 46 48 :stub-columns: 0 47 49 :widths: 1 1 2 48 - 49 50 50 51 * - char 51 52 - ``driver``\ [16] ··· 91 94 - Reserved for future extensions. Drivers and applications must set 92 95 this array to zero. 93 96 94 - 95 97 The ``serial`` and ``bus_info`` fields can be used to distinguish 96 98 between multiple instances of otherwise identical hardware. The serial 97 99 number takes precedence when provided and can be assumed to be unique. 98 100 If the serial number is an empty string, the ``bus_info`` field can be 99 101 used instead. The ``bus_info`` field is guaranteed to be unique, but can 100 102 vary across reboots or device unplug/replug. 101 - 102 103 103 104 Return Value 104 105 ============
+4 -7
Documentation/userspace-api/media/mediactl/media-ioc-enum-entities.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media_ioc_enum_entities: 4 5 ··· 12 11 13 12 MEDIA_IOC_ENUM_ENTITIES - Enumerate entities and their properties 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, MEDIA_IOC_ENUM_ENTITIES, struct media_entity_desc *argp ) 20 - :name: MEDIA_IOC_ENUM_ENTITIES 17 + .. c:macro:: MEDIA_IOC_ENUM_ENTITIES 21 18 19 + ``int ioctl(int fd, MEDIA_IOC_ENUM_ENTITIES, struct media_entity_desc *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <media-func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`media_entity_desc`. 31 - 32 29 33 30 Description 34 31 =========== ··· 47 48 Entity IDs can be non-contiguous. Applications must *not* try to 48 49 enumerate entities by calling MEDIA_IOC_ENUM_ENTITIES with increasing 49 50 id's until they get an error. 50 - 51 51 52 52 .. c:type:: media_entity_desc 53 53 ··· 133 135 - 134 136 * - } 135 137 - 136 - 137 138 138 139 Return Value 139 140 ============
+4 -9
Documentation/userspace-api/media/mediactl/media-ioc-enum-links.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media_ioc_enum_links: 4 5 ··· 12 11 13 12 MEDIA_IOC_ENUM_LINKS - Enumerate all pads and links for a given entity 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, MEDIA_IOC_ENUM_LINKS, struct media_links_enum *argp ) 20 - :name: MEDIA_IOC_ENUM_LINKS 17 + .. c:macro:: MEDIA_IOC_ENUM_LINKS 21 18 19 + ``int ioctl(int fd, MEDIA_IOC_ENUM_LINKS, struct media_links_enum *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <media-func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`media_links_enum`. 31 - 32 29 33 30 Description 34 31 =========== ··· 51 52 52 53 Only forward links that originate at one of the entity's source pads are 53 54 returned during the enumeration process. 54 - 55 55 56 56 .. c:type:: media_links_enum 57 57 ··· 80 82 - Reserved for future extensions. Drivers and applications must set 81 83 the array to zero. 82 84 83 - 84 85 .. c:type:: media_pad_desc 85 86 86 87 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 107 110 the array to zero. 108 111 109 112 110 - 111 113 .. c:type:: media_link_desc 112 114 113 115 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 132 136 - ``reserved[2]`` 133 137 - Reserved for future extensions. Drivers and applications must set 134 138 the array to zero. 135 - 136 139 137 140 Return Value 138 141 ============
+4 -10
Documentation/userspace-api/media/mediactl/media-ioc-g-topology.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media_ioc_g_topology: 4 5 ··· 12 11 13 12 MEDIA_IOC_G_TOPOLOGY - Enumerate the graph topology and graph element properties 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, MEDIA_IOC_G_TOPOLOGY, struct media_v2_topology *argp ) 20 - :name: MEDIA_IOC_G_TOPOLOGY 17 + .. c:macro:: MEDIA_IOC_G_TOPOLOGY 21 18 19 + ``int ioctl(int fd, MEDIA_IOC_G_TOPOLOGY, struct media_v2_topology *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <media-func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`media_v2_topology`. 31 - 32 29 33 30 Description 34 31 =========== ··· 119 120 converted to a 64-bits integer. It can be zero. if zero, the ioctl 120 121 won't store the links. It will just update ``num_links`` 121 122 122 - 123 123 .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| 124 124 125 125 .. c:type:: media_v2_entity ··· 156 158 - Reserved for future extensions. Drivers and applications must set 157 159 this array to zero. 158 160 159 - 160 161 .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| 161 162 162 163 .. c:type:: media_v2_interface ··· 188 191 - ``devnode`` 189 192 - Used only for device node interfaces. See 190 193 :c:type:`media_v2_intf_devnode` for details. 191 - 192 194 193 195 .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| 194 196 ··· 241 245 - Reserved for future extensions. Drivers and applications must set 242 246 this array to zero. 243 247 244 - 245 248 .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| 246 249 247 250 .. c:type:: media_v2_link ··· 276 281 - ``reserved``\ [6] 277 282 - Reserved for future extensions. Drivers and applications must set 278 283 this array to zero. 279 - 280 284 281 285 Return Value 282 286 ============
+5 -6
Documentation/userspace-api/media/mediactl/media-ioc-request-alloc.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media_ioc_request_alloc: 4 5 ··· 12 11 13 12 MEDIA_IOC_REQUEST_ALLOC - Allocate a request 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, MEDIA_IOC_REQUEST_ALLOC, int *argp ) 20 - :name: MEDIA_IOC_REQUEST_ALLOC 17 + .. c:macro:: MEDIA_IOC_REQUEST_ALLOC 21 18 19 + ``int ioctl(int fd, MEDIA_IOC_REQUEST_ALLOC, int *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <media-func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to an integer. 31 - 32 29 33 30 Description 34 31 =========== ··· 50 51 for the request to complete. 51 52 52 53 The request will remain allocated until all the file descriptors associated 53 - with it are closed by :ref:`close() <request-func-close>` and the driver no 54 + with it are closed by :c:func:`close()` and the driver no 54 55 longer uses the request internally. See also 55 56 :ref:`here <media-request-life-time>` for more information. 56 57
+4 -6
Documentation/userspace-api/media/mediactl/media-ioc-setup-link.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media_ioc_setup_link: 4 5 ··· 12 11 13 12 MEDIA_IOC_SETUP_LINK - Modify the properties of a link 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, MEDIA_IOC_SETUP_LINK, struct media_link_desc *argp ) 20 - :name: MEDIA_IOC_SETUP_LINK 17 + .. c:macro:: MEDIA_IOC_SETUP_LINK 21 18 19 + ``int ioctl(int fd, MEDIA_IOC_SETUP_LINK, struct media_link_desc *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <media-func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`media_link_desc`. 31 - 32 29 33 30 Description 34 31 =========== ··· 51 52 52 53 If the specified link can't be found the driver returns with an ``EINVAL`` 53 54 error code. 54 - 55 55 56 56 Return Value 57 57 ============
+3 -4
Documentation/userspace-api/media/mediactl/media-request-ioc-queue.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media_request_ioc_queue: 4 5 ··· 12 11 13 12 MEDIA_REQUEST_IOC_QUEUE - Queue a request 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int request_fd, MEDIA_REQUEST_IOC_QUEUE ) 20 - :name: MEDIA_REQUEST_IOC_QUEUE 17 + .. c:macro:: MEDIA_REQUEST_IOC_QUEUE 21 18 19 + ``int ioctl(int request_fd, MEDIA_REQUEST_IOC_QUEUE)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``request_fd`` 27 25 File descriptor returned by :ref:`MEDIA_IOC_REQUEST_ALLOC`. 28 - 29 26 30 27 Description 31 28 ===========
+4 -4
Documentation/userspace-api/media/mediactl/media-request-ioc-reinit.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media_request_ioc_reinit: 4 5 ··· 12 11 13 12 MEDIA_REQUEST_IOC_REINIT - Re-initialize a request 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int request_fd, MEDIA_REQUEST_IOC_REINIT ) 20 - :name: MEDIA_REQUEST_IOC_REINIT 17 + .. c:macro:: MEDIA_REQUEST_IOC_REINIT 21 18 19 + ``int ioctl(int request_fd, MEDIA_REQUEST_IOC_REINIT)`` 22 20 23 21 Arguments 24 22 ========= ··· 33 33 request. 34 34 35 35 Re-initializing a request will clear any existing data from the request. 36 - This avoids having to :ref:`close() <request-func-close>` a completed 36 + This avoids having to :c:func:`close()` a completed 37 37 request and allocate a new request. Instead the completed request can just 38 38 be re-initialized and it is ready to be used again. 39 39
+3 -2
Documentation/userspace-api/media/mediactl/request-api.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _media-request-api: 4 5 ··· 94 93 Setting the same control through a request and also directly can lead to 95 94 undefined behavior! 96 95 97 - User-space can :ref:`poll() <request-func-poll>` a request file descriptor in 96 + User-space can :c:func:`poll()` a request file descriptor in 98 97 order to wait until the request completes. A request is considered complete 99 98 once all its associated buffers are available for dequeuing and all the 100 99 associated controls have been updated with the values at the time of completion. ··· 116 115 ------------------------- 117 116 118 117 Finally, a completed request can either be discarded or be reused. Calling 119 - :ref:`close() <request-func-close>` on a request file descriptor will make 118 + :c:func:`close()` on a request file descriptor will make 120 119 that file descriptor unusable and the request will be freed once it is no 121 120 longer in use by the kernel. That is, if the request is queued and then the 122 121 file descriptor is closed, then it won't be freed until the driver completed
+2 -6
Documentation/userspace-api/media/mediactl/request-func-close.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC.request 2 3 3 4 .. _request-func-close: 4 5 ··· 12 11 13 12 request-close - Close a request file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: int close( int fd ) 24 - :name: req-close 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 28 File descriptor returned by :ref:`MEDIA_IOC_REQUEST_ALLOC`. 31 - 32 29 33 30 Description 34 31 =========== ··· 35 38 and the driver has completed the request. 36 39 See :ref:`here <media-request-life-time>` for more information. 37 40 38 - 39 41 Return Value 40 42 ============ 41 43 42 - :ref:`close() <request-func-close>` returns 0 on success. On error, -1 is 44 + :c:func:`close()` returns 0 on success. On error, -1 is 43 45 returned, and ``errno`` is set appropriately. Possible error codes are: 44 46 45 47 EBADF
+2 -6
Documentation/userspace-api/media/mediactl/request-func-ioctl.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _request-func-ioctl: 4 5 ··· 12 11 13 12 request-ioctl - Control a request file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/ioctl.h> 21 21 22 - 23 - .. c:function:: int ioctl( int fd, int cmd, void *argp ) 24 - :name: req-ioctl 22 + ``int ioctl(int fd, int cmd, void *argp)`` 25 23 26 24 Arguments 27 25 ========= ··· 33 35 34 36 ``argp`` 35 37 Pointer to a request-specific structure. 36 - 37 38 38 39 Description 39 40 =========== ··· 48 51 their parameters are located in the media.h header file. All request ioctl 49 52 commands, their respective function and parameters are specified in 50 53 :ref:`media-user-func`. 51 - 52 54 53 55 Return Value 54 56 ============
+4 -8
Documentation/userspace-api/media/mediactl/request-func-poll.rst
··· 1 1 .. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: MC 2 3 3 4 .. _request-func-poll: 4 5 ··· 12 11 13 12 request-poll - Wait for some event on a file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/poll.h> 21 21 22 - 23 22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) 24 - :name: request-poll 25 23 26 24 Arguments 27 25 ========= ··· 33 35 ``timeout`` 34 36 Timeout to wait for events 35 37 36 - 37 38 Description 38 39 =========== 39 40 40 - With the :c:func:`poll() <request-func-poll>` function applications can wait 41 + With the :c:func:`poll()` function applications can wait 41 42 for a request to complete. 42 43 43 - On success :c:func:`poll() <request-func-poll>` returns the number of file 44 + On success :c:func:`poll()` returns the number of file 44 45 descriptors that have been selected (that is, file descriptors for which the 45 46 ``revents`` field of the respective struct :c:type:`pollfd` 46 47 is non-zero). Request file descriptor set the ``POLLPRI`` flag in ``revents`` ··· 50 53 Attempting to poll for a request that is not yet queued will 51 54 set the ``POLLERR`` flag in ``revents``. 52 55 53 - 54 56 Return Value 55 57 ============ 56 58 57 - On success, :c:func:`poll() <request-func-poll>` returns the number of 59 + On success, :c:func:`poll()` returns the number of 58 60 structures which have non-zero ``revents`` fields, or zero if the call 59 61 timed out. On error -1 is returned, and the ``errno`` variable is set 60 62 appropriately:
+4 -5
Documentation/userspace-api/media/rc/lirc-get-features.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_get_features: 4 5 ··· 15 14 Synopsis 16 15 ======== 17 16 18 - .. c:function:: int ioctl( int fd, LIRC_GET_FEATURES, __u32 *features) 19 - :name: LIRC_GET_FEATURES 17 + .. c:macro:: LIRC_GET_FEATURES 18 + 19 + ``int ioctl(int fd, LIRC_GET_FEATURES, __u32 *features)`` 20 20 21 21 Arguments 22 22 ========= ··· 28 26 ``features`` 29 27 Bitmask with the LIRC features. 30 28 31 - 32 29 Description 33 30 =========== 34 - 35 31 36 32 Get the underlying hardware device's features. If a driver does not 37 33 announce support of certain features, calling of the corresponding ioctls ··· 183 183 ``LIRC_CAN_SEND_LIRCCODE`` 184 184 185 185 Unused. Kept just to avoid breaking uAPI. 186 - 187 186 188 187 Return Value 189 188 ============
+7 -5
Documentation/userspace-api/media/rc/lirc-get-rec-mode.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_get_rec_mode: 4 5 .. _lirc_set_rec_mode: ··· 16 15 Synopsis 17 16 ======== 18 17 19 - .. c:function:: int ioctl( int fd, LIRC_GET_REC_MODE, __u32 *mode) 20 - :name: LIRC_GET_REC_MODE 18 + .. c:macro:: LIRC_GET_REC_MODE 21 19 22 - .. c:function:: int ioctl( int fd, LIRC_SET_REC_MODE, __u32 *mode) 23 - :name: LIRC_SET_REC_MODE 20 + ``int ioctl(int fd, LIRC_GET_REC_MODE, __u32 *mode)`` 21 + 22 + .. c:macro:: LIRC_SET_REC_MODE 23 + 24 + ``int ioctl(int fd, LIRC_SET_REC_MODE, __u32 *mode)`` 24 25 25 26 Arguments 26 27 ========= ··· 49 46 .. flat-table:: 50 47 :header-rows: 0 51 48 :stub-columns: 0 52 - 53 49 54 50 - .. row 1 55 51
+4 -4
Documentation/userspace-api/media/rc/lirc-get-rec-resolution.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_get_rec_resolution: 4 5 ··· 15 14 Synopsis 16 15 ======== 17 16 18 - .. c:function:: int ioctl( int fd, LIRC_GET_REC_RESOLUTION, __u32 *microseconds) 19 - :name: LIRC_GET_REC_RESOLUTION 17 + .. c:macro:: LIRC_GET_REC_RESOLUTION 18 + 19 + ``int ioctl(int fd, LIRC_GET_REC_RESOLUTION, __u32 *microseconds)`` 20 20 21 21 Arguments 22 22 ========= ··· 27 25 28 26 ``microseconds`` 29 27 Resolution, in microseconds. 30 - 31 28 32 29 Description 33 30 =========== ··· 38 37 This ioctl returns the integer value with such resolution, with can be 39 38 used by userspace applications like lircd to automatically adjust the 40 39 tolerance value. 41 - 42 40 43 41 Return Value 44 42 ============
+7 -7
Documentation/userspace-api/media/rc/lirc-get-send-mode.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_get_send_mode: 4 5 .. _lirc_set_send_mode: ··· 16 15 Synopsis 17 16 ======== 18 17 19 - .. c:function:: int ioctl( int fd, LIRC_GET_SEND_MODE, __u32 *mode ) 20 - :name: LIRC_GET_SEND_MODE 18 + .. c:macro:: LIRC_GET_SEND_MODE 21 19 22 - .. c:function:: int ioctl( int fd, LIRC_SET_SEND_MODE, __u32 *mode ) 23 - :name: LIRC_SET_SEND_MODE 20 + ``int ioctl(int fd, LIRC_GET_SEND_MODE, __u32 *mode)`` 21 + 22 + .. c:macro:: LIRC_SET_SEND_MODE 23 + 24 + ``int ioctl(int fd, LIRC_SET_SEND_MODE, __u32 *mode)`` 24 25 25 26 Arguments 26 27 ========= ··· 32 29 33 30 ``mode`` 34 31 The mode used for transmitting. 35 - 36 32 37 33 Description 38 34 =========== ··· 46 44 Return Value 47 45 ============ 48 46 49 - 50 47 .. tabularcolumns:: |p{2.5cm}|p{15.0cm}| 51 48 52 49 .. flat-table:: 53 50 :header-rows: 0 54 51 :stub-columns: 0 55 - 56 52 57 53 - .. row 1 58 54
+7 -6
Documentation/userspace-api/media/rc/lirc-get-timeout.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_get_min_timeout: 4 5 .. _lirc_get_max_timeout: ··· 17 16 Synopsis 18 17 ======== 19 18 20 - .. c:function:: int ioctl( int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout) 21 - :name: LIRC_GET_MIN_TIMEOUT 19 + .. c:macro:: LIRC_GET_MIN_TIMEOUT 22 20 23 - .. c:function:: int ioctl( int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout) 24 - :name: LIRC_GET_MAX_TIMEOUT 21 + ``int ioctl(int fd, LIRC_GET_MIN_TIMEOUT, __u32 *timeout)`` 22 + 23 + .. c:macro:: LIRC_GET_MAX_TIMEOUT 24 + 25 + ``int ioctl(int fd, LIRC_GET_MAX_TIMEOUT, __u32 *timeout)`` 25 26 26 27 Arguments 27 28 ========= ··· 33 30 34 31 ``timeout`` 35 32 Timeout, in microseconds. 36 - 37 33 38 34 Description 39 35 =========== ··· 48 46 Some devices have a fixed timeout, in that case 49 47 both ioctls will return the same value even though the timeout 50 48 cannot be changed via :ref:`LIRC_SET_REC_TIMEOUT`. 51 - 52 49 53 50 Return Value 54 51 ============
+3 -7
Documentation/userspace-api/media/rc/lirc-read.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc-read: 4 5 ··· 12 11 13 12 lirc-read - Read from a LIRC device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: ssize_t read( int fd, void *buf, size_t count ) 24 - :name: lirc-read 25 - 26 23 27 24 Arguments 28 25 ========= ··· 36 39 Description 37 40 =========== 38 41 39 - :ref:`read() <lirc-read>` attempts to read up to ``count`` bytes from file 42 + :c:func:`read()` attempts to read up to ``count`` bytes from file 40 43 descriptor ``fd`` into the buffer starting at ``buf``. If ``count`` is zero, 41 - :ref:`read() <lirc-read>` returns zero and has no other results. If ``count`` 44 + :c:func:`read()` returns zero and has no other results. If ``count`` 42 45 is greater than ``SSIZE_MAX``, the result is unspecified. 43 46 44 47 The exact format of the data depends on what :ref:`lirc_modes` a driver ··· 55 58 :ref:`IR protocol <Remote_controllers_Protocols>` 56 59 used for transmission, and ``scancode`` to the decoded scancode, 57 60 and the ``keycode`` set to the keycode or ``KEY_RESERVED``. 58 - 59 61 60 62 Return Value 61 63 ============
+4 -4
Documentation/userspace-api/media/rc/lirc-set-measure-carrier-mode.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_measure_carrier_mode: 4 5 ··· 15 14 Synopsis 16 15 ======== 17 16 18 - .. c:function:: int ioctl( int fd, LIRC_SET_MEASURE_CARRIER_MODE, __u32 *enable ) 19 - :name: LIRC_SET_MEASURE_CARRIER_MODE 17 + .. c:macro:: LIRC_SET_MEASURE_CARRIER_MODE 18 + 19 + ``int ioctl(int fd, LIRC_SET_MEASURE_CARRIER_MODE, __u32 *enable)`` 20 20 21 21 Arguments 22 22 ========= ··· 29 27 enable = 1 means enable measure mode, enable = 0 means disable measure 30 28 mode. 31 29 32 - 33 30 Description 34 31 =========== 35 32 ··· 37 36 Enable or disable measure mode. If enabled, from the next key 38 37 press on, the driver will send ``LIRC_MODE2_FREQUENCY`` packets. By 39 38 default this should be turned off. 40 - 41 39 42 40 Return Value 43 41 ============
+4 -2
Documentation/userspace-api/media/rc/lirc-set-rec-carrier-range.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_rec_carrier_range: 4 5 ··· 16 15 Synopsis 17 16 ======== 18 17 19 - .. c:function:: int ioctl( int fd, LIRC_SET_REC_CARRIER_RANGE, __u32 *frequency ) 20 - :name: LIRC_SET_REC_CARRIER_RANGE 18 + .. c:macro:: LIRC_SET_REC_CARRIER_RANGE 19 + 20 + ``int ioctl(int fd, LIRC_SET_REC_CARRIER_RANGE, __u32 *frequency)`` 21 21 22 22 Arguments 23 23 =========
+4 -4
Documentation/userspace-api/media/rc/lirc-set-rec-carrier.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_rec_carrier: 4 5 ··· 12 11 13 12 LIRC_SET_REC_CARRIER - Set carrier used to modulate IR receive. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, LIRC_SET_REC_CARRIER, __u32 *frequency ) 20 - :name: LIRC_SET_REC_CARRIER 17 + .. c:macro:: LIRC_SET_REC_CARRIER 18 + 19 + ``int ioctl(int fd, LIRC_SET_REC_CARRIER, __u32 *frequency)`` 21 20 22 21 Arguments 23 22 ========= ··· 37 36 38 37 If called together with :ref:`LIRC_SET_REC_CARRIER_RANGE`, this ioctl 39 38 sets the upper bound frequency that will be recognized by the device. 40 - 41 39 42 40 Return Value 43 41 ============
+4 -4
Documentation/userspace-api/media/rc/lirc-set-rec-timeout-reports.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_rec_timeout_reports: 4 5 ··· 15 14 Synopsis 16 15 ======== 17 16 18 - .. c:function:: int ioctl( int fd, LIRC_SET_REC_TIMEOUT_REPORTS, __u32 *enable ) 19 - :name: LIRC_SET_REC_TIMEOUT_REPORTS 17 + .. c:macro:: LIRC_SET_REC_TIMEOUT_REPORTS 18 + 19 + ``int ioctl(int fd, LIRC_SET_REC_TIMEOUT_REPORTS, __u32 *enable)`` 20 20 21 21 Arguments 22 22 ========= ··· 28 26 ``enable`` 29 27 enable = 1 means enable timeout report, enable = 0 means disable timeout 30 28 reports. 31 - 32 29 33 30 Description 34 31 =========== ··· 40 39 .. note:: 41 40 42 41 This ioctl is only valid for :ref:`LIRC_MODE_MODE2 <lirc-mode-mode2>`. 43 - 44 42 45 43 Return Value 46 44 ============
+7 -6
Documentation/userspace-api/media/rc/lirc-set-rec-timeout.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_rec_timeout: 4 5 .. _lirc_get_rec_timeout: ··· 16 15 Synopsis 17 16 ======== 18 17 19 - .. c:function:: int ioctl( int fd, LIRC_GET_REC_TIMEOUT, __u32 *timeout ) 20 - :name: LIRC_GET_REC_TIMEOUT 18 + .. c:macro:: LIRC_GET_REC_TIMEOUT 21 19 22 - .. c:function:: int ioctl( int fd, LIRC_SET_REC_TIMEOUT, __u32 *timeout ) 23 - :name: LIRC_SET_REC_TIMEOUT 20 + ``int ioctl(int fd, LIRC_GET_REC_TIMEOUT, __u32 *timeout)`` 21 + 22 + .. c:macro:: LIRC_SET_REC_TIMEOUT 23 + 24 + ``int ioctl(int fd, LIRC_SET_REC_TIMEOUT, __u32 *timeout)`` 24 25 25 26 Arguments 26 27 ========= ··· 32 29 33 30 ``timeout`` 34 31 Timeout, in microseconds. 35 - 36 32 37 33 Description 38 34 =========== ··· 46 44 .. note:: 47 45 48 46 The range of supported timeout is given by :ref:`LIRC_GET_MIN_TIMEOUT`. 49 - 50 47 51 48 Return Value 52 49 ============
+4 -4
Documentation/userspace-api/media/rc/lirc-set-send-carrier.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_send_carrier: 4 5 ··· 12 11 13 12 LIRC_SET_SEND_CARRIER - Set send carrier used to modulate IR TX. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, LIRC_SET_SEND_CARRIER, __u32 *frequency ) 20 - :name: LIRC_SET_SEND_CARRIER 17 + .. c:macro:: LIRC_SET_SEND_CARRIER 18 + 19 + ``int ioctl(int fd, LIRC_SET_SEND_CARRIER, __u32 *frequency)`` 21 20 22 21 Arguments 23 22 ========= ··· 32 31 =========== 33 32 34 33 Set send carrier used to modulate IR PWM pulses and spaces. 35 - 36 34 37 35 Return Value 38 36 ============
+4 -4
Documentation/userspace-api/media/rc/lirc-set-send-duty-cycle.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_send_duty_cycle: 4 5 ··· 16 15 Synopsis 17 16 ======== 18 17 19 - .. c:function:: int ioctl( int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle) 20 - :name: LIRC_SET_SEND_DUTY_CYCLE 18 + .. c:macro:: LIRC_SET_SEND_DUTY_CYCLE 19 + 20 + ``int ioctl(int fd, LIRC_SET_SEND_DUTY_CYCLE, __u32 *duty_cycle)`` 21 21 22 22 Arguments 23 23 ========= ··· 30 28 Duty cicle, describing the pulse width in percent (from 1 to 99) of 31 29 the total cycle. Values 0 and 100 are reserved. 32 30 33 - 34 31 Description 35 32 =========== 36 33 ··· 38 37 Currently, no special meaning is defined for 0 or 100, but this 39 38 could be used to switch off carrier generation in the future, so 40 39 these values should be reserved. 41 - 42 40 43 41 Return Value 44 42 ============
+4 -4
Documentation/userspace-api/media/rc/lirc-set-transmitter-mask.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_transmitter_mask: 4 5 ··· 15 14 Synopsis 16 15 ======== 17 16 18 - .. c:function:: int ioctl( int fd, LIRC_SET_TRANSMITTER_MASK, __u32 *mask ) 19 - :name: LIRC_SET_TRANSMITTER_MASK 17 + .. c:macro:: LIRC_SET_TRANSMITTER_MASK 18 + 19 + ``int ioctl(int fd, LIRC_SET_TRANSMITTER_MASK, __u32 *mask)`` 20 20 21 21 Arguments 22 22 ========= ··· 27 25 28 26 ``mask`` 29 27 Mask with channels to enable tx. Channel 0 is the least significant bit. 30 - 31 28 32 29 Description 33 30 =========== ··· 42 41 When an invalid bit mask is given, i.e. a bit is set, even though the device 43 42 does not have so many transitters, then this ioctl returns the number of 44 43 available transitters and does nothing otherwise. 45 - 46 44 47 45 Return Value 48 46 ============
+4 -4
Documentation/userspace-api/media/rc/lirc-set-wideband-receiver.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc_set_wideband_receiver: 4 5 ··· 15 14 Synopsis 16 15 ======== 17 16 18 - .. c:function:: int ioctl( int fd, LIRC_SET_WIDEBAND_RECEIVER, __u32 *enable ) 19 - :name: LIRC_SET_WIDEBAND_RECEIVER 17 + .. c:macro:: LIRC_SET_WIDEBAND_RECEIVER 18 + 19 + ``int ioctl(int fd, LIRC_SET_WIDEBAND_RECEIVER, __u32 *enable)`` 20 20 21 21 Arguments 22 22 ========= ··· 28 26 ``enable`` 29 27 enable = 1 means enable wideband receiver, enable = 0 means disable 30 28 wideband receiver. 31 - 32 29 33 30 Description 34 31 =========== ··· 47 46 carrier reports. In that case it will be disabled as soon as you disable 48 47 carrier reports. Trying to disable wide band receiver while carrier 49 48 reports are active will do nothing. 50 - 51 49 52 50 Return Value 53 51 ============
+2 -5
Documentation/userspace-api/media/rc/lirc-write.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: RC 2 3 3 4 .. _lirc-write: 4 5 ··· 12 11 13 12 lirc-write - Write to a LIRC device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: ssize_t write( int fd, void *buf, size_t count ) 24 - :name: lirc-write 25 23 26 24 Arguments 27 25 ========= ··· 36 38 Description 37 39 =========== 38 40 39 - :ref:`write() <lirc-write>` writes up to ``count`` bytes to the device 41 + :c:func:`write()` writes up to ``count`` bytes to the device 40 42 referenced by the file descriptor ``fd`` from the buffer starting at 41 43 ``buf``. 42 44 ··· 61 63 for the protocol or the scancode is not valid for the specified protocol, 62 64 ``EINVAL`` is returned. The write function blocks until the scancode 63 65 is transmitted by the hardware. 64 - 65 66 66 67 Return Value 67 68 ============
+3 -25
Documentation/userspace-api/media/v4l/buffer.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _buffer: 4 5 ··· 33 32 mem-to-mem devices is an exception to the rule: the timestamp source 34 33 flags are copied from the OUTPUT video buffer to the CAPTURE video 35 34 buffer. 36 - 37 35 38 36 Interactions between formats, controls and buffers 39 37 ================================================== ··· 152 152 enough for all the desired formats and controls, or by allocating separate set 153 153 of appropriately sized buffers for each use case). 154 154 155 - 156 155 .. c:type:: v4l2_buffer 157 156 158 157 struct v4l2_buffer ··· 256 257 ``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the 257 258 start of the device memory. The value is returned by the driver 258 259 and apart of serving as parameter to the 259 - :ref:`mmap() <func-mmap>` function not useful for applications. 260 + :c:func:`mmap()` function not useful for applications. 260 261 See :ref:`mmap` for details 261 262 * - unsigned long 262 263 - ``userptr`` ··· 309 310 given, then ``EINVAL`` will be returned. 310 311 311 312 312 - 313 313 .. c:type:: v4l2_plane 314 314 315 315 struct v4l2_plane ··· 348 350 - ``mem_offset`` 349 351 - When the memory type in the containing struct 350 352 :c:type:`v4l2_buffer` is ``V4L2_MEMORY_MMAP``, this 351 - is the value that should be passed to :ref:`mmap() <func-mmap>`, 353 + is the value that should be passed to :c:func:`mmap()`, 352 354 similar to the ``offset`` field in struct 353 355 :c:type:`v4l2_buffer`. 354 356 * - unsigned long ··· 380 382 - ``reserved[11]`` 381 383 - Reserved for future use. Should be zeroed by drivers and 382 384 applications. 383 - 384 385 385 386 386 387 .. c:type:: v4l2_buf_type ··· 443 446 * - ``V4L2_BUF_TYPE_META_OUTPUT`` 444 447 - 14 445 448 - Buffer for metadata output, see :ref:`metadata`. 446 - 447 449 448 450 449 451 .. _buffer-flags: ··· 678 682 679 683 .. _memory-flags: 680 684 681 - Memory Consistency Flags 682 - ======================== 683 - 684 - .. tabularcolumns:: |p{7.0cm}|p{2.2cm}|p{8.3cm}| 685 - 686 - .. cssclass:: longtable 687 - 688 - .. flat-table:: 689 - :header-rows: 0 690 - :stub-columns: 0 691 - :widths: 3 1 4 692 - 693 - .. c:type:: v4l2_memory 694 - 695 685 enum v4l2_memory 696 686 ================ 697 687 ··· 702 720 - The buffer is used for :ref:`DMA shared buffer <dmabuf>` I/O. 703 721 704 722 705 - 706 723 Timecodes 707 724 ========= 708 725 ··· 709 728 :ref:`smpte12m` or similar timecode. 710 729 (struct :c:type:`timeval` timestamps are stored in the struct 711 730 :c:type:`v4l2_buffer` ``timestamp`` field.) 712 - 713 731 714 732 .. c:type:: v4l2_timecode 715 733 ··· 746 766 - The "user group" bits from the timecode. 747 767 748 768 749 - 750 769 .. _timecode-type: 751 770 752 771 Timecode Types ··· 773 794 * - ``V4L2_TC_TYPE_60FPS`` 774 795 - 5 775 796 - 776 - 777 797 778 798 779 799 .. _timecode-flags:
+2 -5
Documentation/userspace-api/media/v4l/dev-capture.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _capture: 4 5 ··· 20 19 21 20 .. note:: The same device file names are used for video output devices. 22 21 23 - 24 22 Querying Capabilities 25 23 ===================== 26 24 ··· 34 34 streaming I/O methods must be supported. Tuners and audio inputs are 35 35 optional. 36 36 37 - 38 37 Supplemental Functions 39 38 ====================== 40 39 ··· 44 45 :ref:`video input <video>` ioctls must be supported by all video 45 46 capture devices. 46 47 47 - 48 48 Image Format Negotiation 49 49 ======================== 50 50 ··· 53 55 format, the number of bits per pixel or width and height. Together they 54 56 also define how images are scaled in the process. 55 57 56 - As usual these parameters are *not* reset at :ref:`open() <func-open>` 58 + As usual these parameters are *not* reset at :c:func:`open()` 57 59 time to permit Unix tool chains, programming a device and then reading 58 60 from it as if it was a plain file. Well written V4L2 applications ensure 59 61 they really get what they want, including cropping and scaling. ··· 92 94 and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all 93 95 requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. 94 96 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional. 95 - 96 97 97 98 Reading Images 98 99 ==============
+2 -5
Documentation/userspace-api/media/v4l/dev-output.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _output: 4 5 ··· 19 18 20 19 .. note:: The same device file names are used also for video capture devices. 21 20 22 - 23 21 Querying Capabilities 24 22 ===================== 25 23 ··· 32 32 streaming I/O methods must be supported. Modulators and audio outputs 33 33 are optional. 34 34 35 - 36 35 Supplemental Functions 37 36 ====================== 38 37 ··· 42 43 :ref:`video output <video>` ioctls must be supported by all video 43 44 output devices. 44 45 45 - 46 46 Image Format Negotiation 47 47 ======================== 48 48 ··· 51 53 the number of bits per pixel or width and height. Together they also 52 54 define how images are scaled in the process. 53 55 54 - As usual these parameters are *not* reset at :ref:`open() <func-open>` 56 + As usual these parameters are *not* reset at :c:func:`open()` 55 57 time to permit Unix tool chains, programming a device and then writing 56 58 to it as if it was a plain file. Well written V4L2 applications ensure 57 59 they really get what they want, including cropping and scaling. ··· 89 91 and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all 90 92 requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. 91 93 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional. 92 - 93 94 94 95 Writing Images 95 96 ==============
+6 -13
Documentation/userspace-api/media/v4l/dev-raw-vbi.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _raw-vbi: 4 5 ··· 33 32 Accessed as ``/dev/vbi``, raw VBI capturing or output is the default 34 33 device function. 35 34 36 - 37 35 Querying Capabilities 38 36 ===================== 39 37 ··· 44 44 read/write, streaming or asynchronous I/O methods must be supported. VBI 45 45 devices may or may not have a tuner or modulator. 46 46 47 - 48 47 Supplemental Functions 49 48 ====================== 50 49 ··· 51 52 :ref:`tuner or modulator <tuner>`, and :ref:`controls <control>` 52 53 ioctls as needed. The :ref:`video standard <standard>` ioctls provide 53 54 information vital to program a VBI device, therefore must be supported. 54 - 55 55 56 56 Raw VBI Format Negotiation 57 57 ========================== ··· 60 62 query the sampling parameters. Moreover, to allow for some flexibility 61 63 applications can also suggest different parameters. 62 64 63 - As usual these parameters are *not* reset at :ref:`open() <func-open>` 65 + As usual these parameters are *not* reset at :c:func:`open()` 64 66 time to permit Unix tool chains, programming a device and then reading 65 67 from it as if it was a plain file. Well written V4L2 applications should 66 68 always ensure they really get what they want, requesting reasonable ··· 89 91 overlap, or when the driver supports multiple opens and another process 90 92 already requested VBI capturing or output. Anyway, applications must 91 93 expect other resource allocation points which may return ``EBUSY``, at the 92 - :ref:`VIDIOC_STREAMON` ioctl and the first :ref:`read() <func-read>` 93 - , :ref:`write() <func-write>` and :ref:`select() <func-select>` calls. 94 + :ref:`VIDIOC_STREAMON` ioctl and the first :c:func:`read()` 95 + , :c:func:`write()` and :c:func:`select()` calls. 94 96 95 97 VBI devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and 96 98 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all requests ··· 180 182 - This array is reserved for future extensions. Drivers and 181 183 applications must set it to zero. 182 184 183 - 184 185 .. tabularcolumns:: |p{4.4cm}|p{1.5cm}|p{11.6cm}| 185 186 186 187 .. _vbifmt-flags: ··· 215 218 non-zero. 216 219 217 220 218 - 219 221 .. _vbi-hsync: 220 222 221 223 .. kernel-figure:: vbi_hsync.svg ··· 222 226 :align: center 223 227 224 228 **Figure 4.1. Line synchronization** 225 - 226 229 227 230 .. _vbi-525: 228 231 ··· 246 251 the negotiated VBI parameters, should be refused by the driver. A format 247 252 change during active I/O is not permitted. 248 253 249 - 250 254 Reading and writing VBI images 251 255 ============================== 252 256 ··· 254 260 consisting of two fields of VBI images immediately following in memory. 255 261 256 262 The total size of a frame computes as follows: 257 - 258 263 259 264 .. code-block:: c 260 265 ··· 269 276 using buffer timestamps. 270 277 271 278 Remember the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the 272 - first :ref:`read() <func-read>`, :ref:`write() <func-write>` and 273 - :ref:`select() <func-select>` call can be resource allocation 279 + first :c:func:`read()`, :c:func:`write()` and 280 + :c:func:`select()` call can be resource allocation 274 281 points returning an ``EBUSY`` error code if the required hardware resources 275 282 are temporarily unavailable, for example the device is already in use by 276 283 another process.
+3 -9
Documentation/userspace-api/media/v4l/dev-rds.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _rds: 4 5 ··· 28 27 (or the so-called 'E blocks' in general) be needed, then please contact 29 28 the linux-media mailing list: 30 29 `https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__. 31 - 32 30 33 31 Querying Capabilities 34 32 ===================== ··· 68 68 :ref:`Writing RDS data <writing-rds-data>` and 69 69 :ref:`FM Transmitter Control Reference <fm-tx-controls>`. 70 70 71 - 72 71 .. _reading-rds-data: 73 72 74 73 Reading RDS data 75 74 ================ 76 75 77 76 RDS data can be read from the radio device with the 78 - :ref:`read() <func-read>` function. The data is packed in groups of 77 + :c:func:`read()` function. The data is packed in groups of 79 78 three bytes. 80 - 81 79 82 80 .. _writing-rds-data: 83 81 ··· 83 85 ================ 84 86 85 87 RDS data can be written to the radio device with the 86 - :ref:`write() <func-write>` function. The data is packed in groups of 88 + :c:func:`write()` function. The data is packed in groups of 87 89 three bytes, as follows: 88 - 89 90 90 91 RDS datastructures 91 92 ================== 92 - 93 93 94 94 .. c:type:: v4l2_rds_data 95 95 ··· 107 111 * - __u8 108 112 - ``block`` 109 113 - Block description 110 - 111 114 112 115 113 116 .. _v4l2-rds-block: ··· 129 134 * - Bit 7 130 135 - Error bit. Indicates that an uncorrectable error occurred during 131 136 reception of this block. 132 - 133 137 134 138 135 139 .. _v4l2-rds-block-codes:
+7 -24
Documentation/userspace-api/media/v4l/dev-sliced-vbi.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _sliced: 4 5 ··· 28 27 Different file descriptors must be used to pass raw and sliced VBI data 29 28 simultaneously, if this is supported by the driver. 30 29 31 - 32 30 Querying Capabilities 33 31 ===================== 34 32 ··· 39 39 read/write, streaming or asynchronous :ref:`I/O methods <io>` must be 40 40 supported. Sliced VBI devices may have a tuner or modulator. 41 41 42 - 43 42 Supplemental Functions 44 43 ====================== 45 44 ··· 47 48 capabilities, and they may support :ref:`control` ioctls. 48 49 The :ref:`video standard <standard>` ioctls provide information vital 49 50 to program a sliced VBI device, therefore must be supported. 50 - 51 51 52 52 .. _sliced-vbi-format-negotitation: 53 53 ··· 94 96 resources are temporarily unavailable. Other resource allocation points 95 97 which may return ``EBUSY`` can be the 96 98 :ref:`VIDIOC_STREAMON` ioctl and the first 97 - :ref:`read() <func-read>`, :ref:`write() <func-write>` and 98 - :ref:`select() <func-select>` call. 99 - 99 + :c:func:`read()`, :c:func:`write()` and 100 + :c:func:`select()` call. 100 101 101 102 .. c:type:: v4l2_sliced_vbi_format 102 103 ··· 188 191 * - __u32 189 192 - ``io_size`` 190 193 - :cspan:`2` Maximum number of bytes passed by one 191 - :ref:`read() <func-read>` or :ref:`write() <func-write>` call, 194 + :c:func:`read()` or :c:func:`write()` call, 192 195 and the buffer size in bytes for the 193 196 :ref:`VIDIOC_QBUF` and 194 197 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field ··· 271 274 272 275 \normalsize 273 276 274 - 275 277 Drivers may return an ``EINVAL`` error code when applications attempt to 276 278 read or write data without prior format negotiation, after switching the 277 279 video standard (which may invalidate the negotiated VBI parameters) and ··· 280 284 format while i/o is in progress (between a 281 285 :ref:`VIDIOC_STREAMON` and 282 286 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` call, and after the first 283 - :ref:`read() <func-read>` or :ref:`write() <func-write>` call). 284 - 287 + :c:func:`read()` or :c:func:`write()` call). 285 288 286 289 Reading and writing sliced VBI data 287 290 =================================== 288 291 289 - A single :ref:`read() <func-read>` or :ref:`write() <func-write>` 292 + A single :c:func:`read()` or :c:func:`write()` 290 293 call must pass all data belonging to one video frame. That is an array 291 294 of struct :c:type:`v4l2_sliced_vbi_data` structures with one or 292 295 more elements and a total size not exceeding ``io_size`` bytes. Likewise 293 296 in streaming I/O mode one buffer of ``io_size`` bytes must contain data 294 297 of one video frame. The ``id`` of unused 295 298 struct :c:type:`v4l2_sliced_vbi_data` elements must be zero. 296 - 297 299 298 300 .. c:type:: v4l2_sliced_vbi_data 299 301 ··· 338 344 bytes at the end of this array are undefined, drivers and 339 345 applications shall ignore them. 340 346 341 - 342 347 Packets are always passed in ascending line number order, without 343 - duplicate line numbers. The :ref:`write() <func-write>` function and 348 + duplicate line numbers. The :c:func:`write()` function and 344 349 the :ref:`VIDIOC_QBUF` ioctl must return an ``EINVAL`` 345 350 error code when applications violate this rule. They must also return an 346 351 EINVAL error code when applications pass an incorrect field or line ··· 362 369 streaming (:ref:`memory mapping <mmap>` and/or 363 370 :ref:`user pointer <userp>`) I/O. The latter bears the possibility of 364 371 synchronizing video and VBI data by using buffer timestamps. 365 - 366 372 367 373 Sliced VBI Data in MPEG Streams 368 374 =============================== ··· 397 405 The following subsections specify the format of the embedded sliced VBI 398 406 data. 399 407 400 - 401 408 MPEG Stream Embedded, Sliced VBI Data Format: NONE 402 409 -------------------------------------------------- 403 410 ··· 407 416 nor driver shall insert "empty" embedded sliced VBI data packets in the 408 417 MPEG stream when this format is set. No MPEG stream data structures are 409 418 specified for this format. 410 - 411 419 412 420 MPEG Stream Embedded, Sliced VBI Data Format: IVTV 413 421 -------------------------------------------------- ··· 449 459 4-byte boundary. The payload shall never exceed 1552 bytes (2 fields 450 460 with 18 lines/field with 43 bytes of data/line and a 4 byte magic 451 461 number). 452 - 453 462 454 463 .. c:type:: v4l2_mpeg_vbi_fmt_ivtv 455 464 ··· 512 523 valid and that 36 lines of sliced VBI data are present. 513 524 514 525 515 - 516 526 .. c:type:: v4l2_mpeg_vbi_itv0 517 527 518 528 .. c:type:: v4l2_mpeg_vbi_ITV0 ··· 534 546 corresponding VBI line number and video field are given below. 535 547 b\ :sub:`0` indicates the least significant bit of a ``linemask`` 536 548 value: 537 - 538 549 539 550 540 551 :: ··· 561 574 applications. 562 575 563 576 564 - 565 577 .. _v4l2-mpeg-vbi-itv0-1: 566 578 567 579 struct v4l2_mpeg_vbi_ITV0 ··· 580 594 through ``line``\ [17] correspond to lines 6 through 23 of the 581 595 first field. ``line``\ [18] through ``line``\ [35] corresponds to 582 596 lines 6 through 23 of the second field. 583 - 584 597 585 598 586 599 .. c:type:: v4l2_mpeg_vbi_itv0_line ··· 602 617 * - __u8 603 618 - ``data``\ [42] 604 619 - The sliced VBI data for the line. 605 - 606 620 607 621 608 622 .. _ITV0-Line-Identifier-Constants: ··· 635 651 - 7 636 652 - Refer to :ref:`Sliced VBI services <vbi-services2>` for a 637 653 description of the line payload. 638 - 639 654 640 655 641 656 .. [#f1]
+6 -33
Documentation/userspace-api/media/v4l/diff-v4l.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _diff-v4l: 4 5 ··· 13 12 the much improved V4L2 API replaces the V4L API. The support for the old 14 13 V4L calls were removed from Kernel, but the library :ref:`libv4l` 15 14 supports the conversion of a V4L API system call into a V4L2 one. 16 - 17 15 18 16 Opening and Closing Devices 19 17 =========================== ··· 31 31 recommend that V4L2 drivers by default register devices with the same 32 32 numbers, but the system administrator can assign arbitrary minor numbers 33 33 using driver module options. The major device number remains 81. 34 - 35 34 36 35 .. _v4l-dev: 37 36 ··· 52 53 - ``/dev/vbi``, ``/dev/vbi0`` to ``/dev/vbi31`` 53 54 - 224-255 54 55 55 - 56 56 V4L prohibits (or used to prohibit) multiple opens of a device file. 57 57 V4L2 drivers *may* support multiple opens, see :ref:`open` for details 58 58 and consequences. 59 59 60 60 V4L drivers respond to V4L2 ioctls with an ``EINVAL`` error code. 61 - 62 61 63 62 Querying Capabilities 64 63 ===================== ··· 148 151 - ``-`` 149 152 - See above. 150 153 151 - 152 154 The ``audios`` field was replaced by ``capabilities`` flag 153 155 ``V4L2_CAP_AUDIO``, indicating *if* the device has any audio inputs or 154 156 outputs. To determine their number applications can enumerate audio ··· 159 163 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl with the desired 160 164 dimensions returns the closest size possible, taking into account the 161 165 current video standard, cropping and scaling limitations. 162 - 163 166 164 167 Video Sources 165 168 ============= ··· 175 180 video input types were renamed as follows: 176 181 177 182 178 - 179 183 .. flat-table:: 180 184 :header-rows: 1 181 185 :stub-columns: 0 ··· 185 191 - ``V4L2_INPUT_TYPE_TUNER`` 186 192 * - ``VIDEO_TYPE_CAMERA`` 187 193 - ``V4L2_INPUT_TYPE_CAMERA`` 188 - 189 194 190 195 Unlike the ``tuners`` field expressing the number of tuners of this 191 196 input, V4L2 assumes each video input is connected to at most one tuner. ··· 208 215 addition together with the ``norm`` field and has been removed in the 209 216 meantime. V4L2 has a similar, albeit more comprehensive approach to 210 217 video standards, see :ref:`standard` for more information. 211 - 212 218 213 219 Tuning 214 220 ====== ··· 252 260 to a struct :c:type:`v4l2_frequency` instead of an 253 261 unsigned long integer. 254 262 255 - 256 263 .. _v4l-image-properties: 257 264 258 265 Image Properties ··· 263 272 :ref:`VIDIOC_QUERYCTRL`, 264 273 :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and 265 274 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls: 266 - 267 275 268 276 269 277 .. flat-table:: ··· 282 292 * - ``whiteness`` 283 293 - ``V4L2_CID_WHITENESS`` 284 294 285 - 286 295 The V4L picture controls are assumed to range from 0 to 65535 with no 287 296 particular reset value. The V4L2 API permits arbitrary limits and 288 297 defaults which can be queried with the ··· 293 304 such information assuming applications recognizing the format are aware 294 305 of the image depth and others need not know. The ``palette`` field moved 295 306 into the struct :c:type:`v4l2_pix_format`: 296 - 297 307 298 308 299 309 .. flat-table:: ··· 334 346 * - ``VIDEO_PALETTE_YUV410P`` 335 347 - :ref:`V4L2_PIX_FMT_YVU410 <V4L2-PIX-FMT-YVU410>` 336 348 337 - 338 349 V4L2 image formats are defined in :ref:`pixfmt`. The image format can 339 350 be selected with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. 340 - 341 351 342 352 Audio 343 353 ===== ··· 370 384 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls: 371 385 372 386 373 - 374 387 .. flat-table:: 375 388 :header-rows: 1 376 389 :stub-columns: 0 ··· 385 400 * - ``balance`` 386 401 - ``V4L2_CID_AUDIO_BALANCE`` 387 402 388 - 389 403 To determine which of these controls are supported by a driver V4L 390 404 provides the ``flags`` ``VIDEO_AUDIO_VOLUME``, ``VIDEO_AUDIO_BASS``, 391 405 ``VIDEO_AUDIO_TREBLE`` and ``VIDEO_AUDIO_BALANCE``. In the V4L2 API the ··· 399 415 V4L2 API permits arbitrary limits and defaults which can be queried with 400 416 the :ref:`VIDIOC_QUERYCTRL` ioctl. For general 401 417 information about controls see :ref:`control`. 402 - 403 418 404 419 Frame Buffer Overlay 405 420 ==================== ··· 446 463 The ``VIDIOCCAPTURE`` ioctl to enable or disable overlay was renamed to 447 464 :ref:`VIDIOC_OVERLAY`. 448 465 449 - 450 466 Cropping 451 467 ======== 452 468 ··· 472 490 select a capture or overlay format with the 473 491 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. 474 492 475 - 476 493 Reading Images, Memory Mapping 477 494 ============================== 478 - 479 495 480 496 Capturing using the read method 481 497 ------------------------------- 482 498 483 499 There is no essential difference between reading images from a V4L or 484 - V4L2 device using the :ref:`read() <func-read>` function, however V4L2 500 + V4L2 device using the :c:func:`read()` function, however V4L2 485 501 drivers are not required to support this I/O method. Applications can 486 502 determine if the function is available with the 487 503 :ref:`VIDIOC_QUERYCAP` ioctl. All V4L2 devices 488 504 exchanging data with applications must support the 489 - :ref:`select() <func-select>` and :ref:`poll() <func-poll>` 505 + :c:func:`select()` and :c:func:`poll()` 490 506 functions. 491 507 492 508 To select an image format and size, V4L provides the ``VIDIOCSPICT`` and ··· 497 517 498 518 For more information about the V4L2 read interface see :ref:`rw`. 499 519 500 - 501 520 Capturing using memory mapping 502 521 ------------------------------ 503 522 ··· 505 526 into their address space. This avoids the data copying overhead of the 506 527 read method. V4L2 supports memory mapping as well, with a few 507 528 differences. 508 - 509 529 510 530 511 531 .. flat-table:: ··· 528 550 ``VIDIOCGMBUF`` ioctl is available to query the number of buffers, 529 551 the offset of each buffer from the start of the virtual file, and 530 552 the overall amount of memory used, which can be used as arguments 531 - for the :ref:`mmap() <func-mmap>` function. 553 + for the :c:func:`mmap()` function. 532 554 - Buffers are individually mapped. The offset and size of each 533 555 buffer can be determined with the 534 556 :ref:`VIDIOC_QUERYBUF` ioctl. ··· 546 568 the incoming queue. Filled buffers are dequeued from the outgoing 547 569 queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait 548 570 until filled buffers become available this function, 549 - :ref:`select() <func-select>` or :ref:`poll() <func-poll>` can 571 + :c:func:`select()` or :c:func:`poll()` can 550 572 be used. The :ref:`VIDIOC_STREAMON` ioctl 551 573 must be called once after enqueuing one or more buffers to start 552 574 capturing. Its counterpart ··· 555 577 signal status, if known, with the 556 578 :ref:`VIDIOC_ENUMINPUT` ioctl. 557 579 558 - 559 580 For a more in-depth discussion of memory mapping and examples, see 560 581 :ref:`mmap`. 561 - 562 582 563 583 Reading Raw VBI Data 564 584 ==================== ··· 566 590 driver supporting this interface was the BTTV driver, de-facto defining 567 591 the V4L VBI interface. Reading from the device yields a raw VBI image 568 592 with the following parameters: 569 - 570 593 571 594 572 595 .. flat-table:: ··· 591 616 * - flags 592 617 - 0 593 618 594 - 595 619 Undocumented in the V4L specification, in Linux 2.3 the 596 620 ``VIDIOCGVBIFMT`` and ``VIDIOCSVBIFMT`` ioctls using struct 597 621 ``vbi_format`` were added to determine the VBI image ··· 604 630 605 631 Apparently only the Zoran (ZR 36120) driver implements these ioctls. The 606 632 semantics differ from those specified for V4L2 in two ways. The 607 - parameters are reset on :ref:`open() <func-open>` and 633 + parameters are reset on :c:func:`open()` and 608 634 ``VIDIOCSVBIFMT`` always returns an ``EINVAL`` error code if the parameters 609 635 are invalid. 610 - 611 636 612 637 Miscellaneous 613 638 =============
+4 -4
Documentation/userspace-api/media/v4l/dmabuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _dmabuf: 4 5 ··· 36 35 :c:type:`v4l2_plane` in the multi-planar API case). The 37 36 driver must be switched into DMABUF I/O mode by calling the 38 37 :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type. 39 - 40 38 41 39 Example: Initiating streaming I/O with DMABUF file descriptors 42 40 ============================================================== ··· 135 135 Two methods exist to suspend execution of the application until one or 136 136 more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF 137 137 <VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the 138 - ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function, 138 + ``O_NONBLOCK`` flag was given to the :c:func:`open()` function, 139 139 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` 140 140 error code when no buffer is available. The 141 - :ref:`select() <func-select>` and :ref:`poll() <func-poll>` 141 + :c:func:`select()` and :c:func:`poll()` 142 142 functions are always available. 143 143 144 144 To start and stop capturing or displaying applications call the ··· 158 158 :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, 159 159 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON 160 160 <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, 161 - and the :ref:`select() <func-select>` and :ref:`poll() <func-poll>` 161 + and the :c:func:`select()` and :c:func:`poll()` 162 162 functions.
+3 -4
Documentation/userspace-api/media/v4l/format.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _format: 4 5 5 6 ************ 6 7 Data Formats 7 8 ************ 8 - 9 9 10 10 Data Format Negotiation 11 11 ======================= ··· 53 53 When applications omit the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl its locking side 54 54 effects are implied by the next step, the selection of an I/O method 55 55 with the :ref:`VIDIOC_REQBUFS` ioctl or implicit 56 - with the first :ref:`read() <func-read>` or 57 - :ref:`write() <func-write>` call. 56 + with the first :c:func:`read()` or 57 + :c:func:`write()` call. 58 58 59 59 Generally only one logical stream can be assigned to a file descriptor, 60 60 the exception being drivers permitting simultaneous video capturing and ··· 66 66 All drivers exchanging data with applications must support the 67 67 :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. Implementation of the 68 68 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is highly recommended but optional. 69 - 70 69 71 70 Image Format Enumeration 72 71 ========================
+2 -6
Documentation/userspace-api/media/v4l/func-close.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-close: 4 5 ··· 12 11 13 12 v4l2-close - Close a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: int close( int fd ) 24 - :name: v4l2-close 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 31 - 28 + File descriptor returned by :c:func:`open()`. 32 29 33 30 Description 34 31 =========== ··· 34 37 associated with the file descriptor are freed. However data format 35 38 parameters, current input or output, control values or other properties 36 39 remain unchanged. 37 - 38 40 39 41 Return Value 40 42 ============
+3 -7
Documentation/userspace-api/media/v4l/func-ioctl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-ioctl: 4 5 ··· 12 11 13 12 v4l2-ioctl - Program a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/ioctl.h> 21 21 22 - 23 - .. c:function:: int ioctl( int fd, int request, void *argp ) 24 - :name: v4l2-ioctl 22 + ``int ioctl(int fd, int request, void *argp)`` 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 28 + File descriptor returned by :c:func:`open()`. 31 29 32 30 ``request`` 33 31 V4L2 ioctl request code as defined in the ``videodev2.h`` header ··· 33 35 34 36 ``argp`` 35 37 Pointer to a function parameter, usually a structure. 36 - 37 38 38 39 Description 39 40 =========== ··· 46 49 include the version in the kernel sources on the system they compile on. 47 50 All V4L2 ioctl requests, their respective function and parameters are 48 51 specified in :ref:`user-func`. 49 - 50 52 51 53 Return Value 52 54 ============
+7 -11
Documentation/userspace-api/media/v4l/func-mmap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-mmap: 4 5 ··· 12 11 13 12 v4l2-mmap - Map device memory into application address space 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 20 20 #include <unistd.h> 21 21 #include <sys/mman.h> 22 22 23 - 24 23 .. c:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset ) 25 - :name: v4l2-mmap 26 24 27 25 Arguments 28 26 ========= ··· 52 54 #. The Linux ``videobuf`` kernel module, which is used by some 53 55 drivers supports only ``PROT_READ`` | ``PROT_WRITE``. When the 54 56 driver does not support the desired protection, the 55 - :ref:`mmap() <func-mmap>` function fails. 57 + :c:func:`mmap()` function fails. 56 58 57 59 #. Device memory accesses (e. g. the memory on a graphics card 58 60 with video capturing hardware) may incur a performance penalty ··· 68 70 69 71 ``MAP_FIXED`` requests that the driver selects no other address than 70 72 the one specified. If the specified address cannot be used, 71 - :ref:`mmap() <func-mmap>` will fail. If ``MAP_FIXED`` is specified, 73 + :c:func:`mmap()` will fail. If ``MAP_FIXED`` is specified, 72 74 ``start`` must be a multiple of the pagesize. Use of this option is 73 75 discouraged. 74 76 ··· 85 87 flags. 86 88 87 89 ``fd`` 88 - File descriptor returned by :ref:`open() <func-open>`. 90 + File descriptor returned by :c:func:`open()`. 89 91 90 92 ``offset`` 91 93 Offset of the buffer in device memory. This must be the same value ··· 95 97 in the struct :c:type:`v4l2_plane` ``m`` union 96 98 ``mem_offset`` field for the multi-planar API. 97 99 98 - 99 100 Description 100 101 =========== 101 102 102 - The :ref:`mmap() <func-mmap>` function asks to map ``length`` bytes starting at 103 + The :c:func:`mmap()` function asks to map ``length`` bytes starting at 103 104 ``offset`` in the memory of the device specified by ``fd`` into the 104 105 application address space, preferably at address ``start``. This latter 105 106 address is a hint only, and is usually specified as 0. ··· 108 111 allocated with the :ref:`VIDIOC_REQBUFS` ioctl 109 112 before they can be queried. 110 113 111 - To unmap buffers the :ref:`munmap() <func-munmap>` function is used. 112 - 114 + To unmap buffers the :c:func:`munmap()` function is used. 113 115 114 116 Return Value 115 117 ============ 116 118 117 - On success :ref:`mmap() <func-mmap>` returns a pointer to the mapped buffer. On 119 + On success :c:func:`mmap()` returns a pointer to the mapped buffer. On 118 120 error ``MAP_FAILED`` (-1) is returned, and the ``errno`` variable is set 119 121 appropriately. Possible error codes are: 120 122
+5 -9
Documentation/userspace-api/media/v4l/func-munmap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-munmap: 4 5 ··· 12 11 13 12 v4l2-munmap - Unmap device memory 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 20 20 #include <unistd.h> 21 21 #include <sys/mman.h> 22 22 23 - 24 23 .. c:function:: int munmap( void *start, size_t length ) 25 - :name: v4l2-munmap 26 24 27 25 Arguments 28 26 ========= 29 27 30 28 ``start`` 31 29 Address of the mapped buffer as returned by the 32 - :ref:`mmap() <func-mmap>` function. 30 + :c:func:`mmap()` function. 33 31 34 32 ``length`` 35 33 Length of the mapped buffer. This must be the same value as given to 36 - :ref:`mmap() <func-mmap>` and returned by the driver in the struct 34 + :c:func:`mmap()` and returned by the driver in the struct 37 35 :c:type:`v4l2_buffer` ``length`` field for the 38 36 single-planar API and in the struct 39 37 :c:type:`v4l2_plane` ``length`` field for the 40 38 multi-planar API. 41 39 42 - 43 40 Description 44 41 =========== 45 42 46 - Unmaps a previously with the :ref:`mmap() <func-mmap>` function mapped 43 + Unmaps a previously with the :c:func:`mmap()` function mapped 47 44 buffer and frees it, if possible. 48 - 49 45 50 46 Return Value 51 47 ============ 52 48 53 - On success :ref:`munmap() <func-munmap>` returns 0, on failure -1 and the 49 + On success :c:func:`munmap()` returns 0, on failure -1 and the 54 50 ``errno`` variable is set appropriately: 55 51 56 52 EINVAL
+5 -9
Documentation/userspace-api/media/v4l/func-open.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-open: 4 5 ··· 12 11 13 12 v4l2-open - Open a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <fcntl.h> 21 21 22 - 23 22 .. c:function:: int open( const char *device_name, int flags ) 24 - :name: v4l2-open 25 23 26 24 Arguments 27 25 ========= ··· 32 34 technicality, input devices still support only reading and output 33 35 devices only writing. 34 36 35 - When the ``O_NONBLOCK`` flag is given, the :ref:`read() <func-read>` 37 + When the ``O_NONBLOCK`` flag is given, the :c:func:`read()` 36 38 function and the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will 37 39 return the ``EAGAIN`` error code when no data is available or no 38 40 buffer is in the driver outgoing queue, otherwise these functions ··· 41 43 42 44 Other flags have no effect. 43 45 44 - 45 46 Description 46 47 =========== 47 48 48 - To open a V4L2 device applications call :ref:`open() <func-open>` with the 49 + To open a V4L2 device applications call :c:func:`open()` with the 49 50 desired device name. This function has no side effects; all data format 50 51 parameters, current input or output, control values or other properties 51 - remain unchanged. At the first :ref:`open() <func-open>` call after loading the 52 + remain unchanged. At the first :c:func:`open()` call after loading the 52 53 driver they will be reset to default values, drivers are never in an 53 54 undefined state. 54 - 55 55 56 56 Return Value 57 57 ============ 58 58 59 - On success :ref:`open() <func-open>` returns the new file descriptor. On error 59 + On success :c:func:`open()` returns the new file descriptor. On error 60 60 -1 is returned, and the ``errno`` variable is set appropriately. 61 61 Possible error codes are: 62 62
+18 -22
Documentation/userspace-api/media/v4l/func-poll.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-poll: 4 5 ··· 12 11 13 12 v4l2-poll - Wait for some event on a file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <sys/poll.h> 21 21 22 - 23 22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) 24 - :name: v4l2-poll 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 30 - 31 28 Description 32 29 =========== 33 30 34 - With the :ref:`poll() <func-poll>` function applications can suspend execution 31 + With the :c:func:`poll()` function applications can suspend execution 35 32 until the driver has captured data or is ready to accept data for 36 33 output. 37 34 ··· 41 44 (capture) or the incoming queue isn't full (display) the function 42 45 returns immediately. 43 46 44 - On success :ref:`poll() <func-poll>` returns the number of file descriptors 47 + On success :c:func:`poll()` returns the number of file descriptors 45 48 that have been selected (that is, file descriptors for which the 46 - ``revents`` field of the respective :c:func:`struct pollfd` structure 49 + ``revents`` field of the respective ``struct pollfd`` structure 47 50 is non-zero). Capture devices set the ``POLLIN`` and ``POLLRDNORM`` 48 51 flags in the ``revents`` field, output devices the ``POLLOUT`` and 49 52 ``POLLWRNORM`` flags. When the function timed out it returns a value of 50 53 zero, on failure it returns -1 and the ``errno`` variable is set 51 54 appropriately. When the application did not call 52 - :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :ref:`poll() <func-poll>` 55 + :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :c:func:`poll()` 53 56 function succeeds, but sets the ``POLLERR`` flag in the ``revents`` 54 57 field. When the application has called 55 58 :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` for a capture device but 56 59 hasn't yet called :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, the 57 - :ref:`poll() <func-poll>` function succeeds and sets the ``POLLERR`` flag in 60 + :c:func:`poll()` function succeeds and sets the ``POLLERR`` flag in 58 61 the ``revents`` field. For output devices this same situation will cause 59 - :ref:`poll() <func-poll>` to succeed as well, but it sets the ``POLLOUT`` and 62 + :c:func:`poll()` to succeed as well, but it sets the ``POLLOUT`` and 60 63 ``POLLWRNORM`` flags in the ``revents`` field. 61 64 62 65 If an event occurred (see :ref:`VIDIOC_DQEVENT`) 63 66 then ``POLLPRI`` will be set in the ``revents`` field and 64 - :ref:`poll() <func-poll>` will return. 67 + :c:func:`poll()` will return. 65 68 66 - When use of the :ref:`read() <func-read>` function has been negotiated and the 67 - driver does not capture yet, the :ref:`poll() <func-poll>` function starts 69 + When use of the :c:func:`read()` function has been negotiated and the 70 + driver does not capture yet, the :c:func:`poll()` function starts 68 71 capturing. When that fails it returns a ``POLLERR`` as above. Otherwise 69 72 it waits until data has been captured and can be read. When the driver 70 73 captures continuously (as opposed to, for example, still images) the 71 74 function may return immediately. 72 75 73 - When use of the :ref:`write() <func-write>` function has been negotiated and the 74 - driver does not stream yet, the :ref:`poll() <func-poll>` function starts 76 + When use of the :c:func:`write()` function has been negotiated and the 77 + driver does not stream yet, the :c:func:`poll()` function starts 75 78 streaming. When that fails it returns a ``POLLERR`` as above. Otherwise 76 79 it waits until the driver is ready for a non-blocking 77 - :ref:`write() <func-write>` call. 80 + :c:func:`write()` call. 78 81 79 82 If the caller is only interested in events (just ``POLLPRI`` is set in 80 - the ``events`` field), then :ref:`poll() <func-poll>` will *not* start 83 + the ``events`` field), then :c:func:`poll()` will *not* start 81 84 streaming if the driver does not stream yet. This makes it possible to 82 85 just poll for events and not for buffers. 83 86 84 - All drivers implementing the :ref:`read() <func-read>` or :ref:`write() <func-write>` 85 - function or streaming I/O must also support the :ref:`poll() <func-poll>` 87 + All drivers implementing the :c:func:`read()` or :c:func:`write()` 88 + function or streaming I/O must also support the :c:func:`poll()` 86 89 function. 87 90 88 - For more details see the :ref:`poll() <func-poll>` manual page. 89 - 91 + For more details see the :c:func:`poll()` manual page. 90 92 91 93 Return Value 92 94 ============ 93 95 94 - On success, :ref:`poll() <func-poll>` returns the number structures which have 96 + On success, :c:func:`poll()` returns the number structures which have 95 97 non-zero ``revents`` fields, or zero if the call timed out. On error -1 96 98 is returned, and the ``errno`` variable is set appropriately: 97 99
+18 -21
Documentation/userspace-api/media/v4l/func-read.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-read: 4 5 ··· 12 11 13 12 v4l2-read - Read from a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: ssize_t read( int fd, void *buf, size_t count ) 24 - :name: v4l2-read 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 28 + File descriptor returned by :c:func:`open()`. 31 29 32 30 ``buf`` 33 31 Buffer to be filled ··· 36 38 Description 37 39 =========== 38 40 39 - :ref:`read() <func-read>` attempts to read up to ``count`` bytes from file 41 + :c:func:`read()` attempts to read up to ``count`` bytes from file 40 42 descriptor ``fd`` into the buffer starting at ``buf``. The layout of the 41 43 data in the buffer is discussed in the respective device interface 42 - section, see ##. If ``count`` is zero, :ref:`read() <func-read>` returns zero 44 + section, see ##. If ``count`` is zero, :c:func:`read()` returns zero 43 45 and has no other results. If ``count`` is greater than ``SSIZE_MAX``, 44 46 the result is unspecified. Regardless of the ``count`` value each 45 - :ref:`read() <func-read>` call will provide at most one frame (two fields) 47 + :c:func:`read()` call will provide at most one frame (two fields) 46 48 worth of data. 47 49 48 - By default :ref:`read() <func-read>` blocks until data becomes available. When 49 - the ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` 50 + By default :c:func:`read()` blocks until data becomes available. When 51 + the ``O_NONBLOCK`` flag was given to the :c:func:`open()` 50 52 function it returns immediately with an ``EAGAIN`` error code when no data 51 - is available. The :ref:`select() <func-select>` or 52 - :ref:`poll() <func-poll>` functions can always be used to suspend 53 + is available. The :c:func:`select()` or 54 + :c:func:`poll()` functions can always be used to suspend 53 55 execution until data becomes available. All drivers supporting the 54 - :ref:`read() <func-read>` function must also support :ref:`select() <func-select>` and 55 - :ref:`poll() <func-poll>`. 56 + :c:func:`read()` function must also support :c:func:`select()` and 57 + :c:func:`poll()`. 56 58 57 59 Drivers can implement read functionality in different ways, using a 58 60 single or multiple buffers and discarding the oldest or newest frames 59 61 once the internal buffers are filled. 60 62 61 - :ref:`read() <func-read>` never returns a "snapshot" of a buffer being filled. 63 + :c:func:`read()` never returns a "snapshot" of a buffer being filled. 62 64 Using a single buffer the driver will stop capturing when the 63 65 application starts reading the buffer until the read is finished. Thus 64 66 only the period of the vertical blanking interval is available for 65 67 reading, or the capture rate must fall below the nominal frame rate of 66 68 the video standard. 67 69 68 - The behavior of :ref:`read() <func-read>` when called during the active picture 70 + The behavior of :c:func:`read()` when called during the active picture 69 71 period or the vertical blanking separating the top and bottom field 70 72 depends on the discarding policy. A driver discarding the oldest frames 71 73 keeps capturing into an internal buffer, continuously overwriting the 72 74 previously, not read frame, and returns the frame being received at the 73 - time of the :ref:`read() <func-read>` call as soon as it is complete. 75 + time of the :c:func:`read()` call as soon as it is complete. 74 76 75 77 A driver discarding the newest frames stops capturing until the next 76 - :ref:`read() <func-read>` call. The frame being received at :ref:`read() <func-read>` 78 + :c:func:`read()` call. The frame being received at :c:func:`read()` 77 79 time is discarded, returning the following frame instead. Again this 78 80 implies a reduction of the capture rate to one half or less of the 79 81 nominal frame rate. An example of this model is the video read mode of 80 - the bttv driver, initiating a DMA to user memory when :ref:`read() <func-read>` 82 + the bttv driver, initiating a DMA to user memory when :c:func:`read()` 81 83 is called and returning when the DMA finished. 82 84 83 85 In the multiple buffer model drivers maintain a ring of internal ··· 92 94 however. The discarding policy is not reported and cannot be changed. 93 95 For minimum requirements see :ref:`devices`. 94 96 95 - 96 97 Return Value 97 98 ============ 98 99 99 100 On success, the number of bytes read is returned. It is not an error if 100 101 this number is smaller than the number of bytes requested, or the amount 101 102 of data required for one frame. This may happen for example because 102 - :ref:`read() <func-read>` was interrupted by a signal. On error, -1 is 103 + :c:func:`read()` was interrupted by a signal. On error, -1 is 103 104 returned, and the ``errno`` variable is set appropriately. In this case 104 105 the next read will start at the beginning of a new frame. Possible error 105 106 codes are: ··· 126 129 communicate with a remote device (USB camera etc.). 127 130 128 131 EINVAL 129 - The :ref:`read() <func-read>` function is not supported by this driver, not 132 + The :c:func:`read()` function is not supported by this driver, not 130 133 on this device, or generally not on this type of device.
+19 -23
Documentation/userspace-api/media/v4l/func-select.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-select: 4 5 ··· 12 11 13 12 v4l2-select - Synchronous I/O multiplexing 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 21 21 #include <sys/types.h> 22 22 #include <unistd.h> 23 23 24 - 25 24 .. c:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout ) 26 - :name: v4l2-select 27 25 28 26 Arguments 29 27 ========= ··· 41 43 ``timeout`` 42 44 Maximum time to wait. 43 45 44 - 45 46 Description 46 47 =========== 47 48 48 - With the :ref:`select() <func-select>` function applications can suspend 49 + With the :c:func:`select()` function applications can suspend 49 50 execution until the driver has captured data or is ready to accept data 50 51 for output. 51 52 ··· 53 56 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. When buffers are already in 54 57 the outgoing queue of the driver the function returns immediately. 55 58 56 - On success :ref:`select() <func-select>` returns the total number of bits set in 57 - :c:func:`struct fd_set`. When the function timed out it returns 59 + On success :c:func:`select()` returns the total number of bits set in 60 + ``fd_set``. When the function timed out it returns 58 61 a value of zero. On failure it returns -1 and the ``errno`` variable is 59 62 set appropriately. When the application did not call 60 63 :ref:`VIDIOC_QBUF` or 61 - :ref:`VIDIOC_STREAMON` yet the :ref:`select() <func-select>` 64 + :ref:`VIDIOC_STREAMON` yet the :c:func:`select()` 62 65 function succeeds, setting the bit of the file descriptor in ``readfds`` 63 66 or ``writefds``, but subsequent :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` 64 67 calls will fail. [#f1]_ 65 68 66 - When use of the :ref:`read() <func-read>` function has been negotiated and the 67 - driver does not capture yet, the :ref:`select() <func-select>` function starts 68 - capturing. When that fails, :ref:`select() <func-select>` returns successful and 69 - a subsequent :ref:`read() <func-read>` call, which also attempts to start 69 + When use of the :c:func:`read()` function has been negotiated and the 70 + driver does not capture yet, the :c:func:`select()` function starts 71 + capturing. When that fails, :c:func:`select()` returns successful and 72 + a subsequent :c:func:`read()` call, which also attempts to start 70 73 capturing, will return an appropriate error code. When the driver 71 74 captures continuously (as opposed to, for example, still images) and 72 - data is already available the :ref:`select() <func-select>` function returns 75 + data is already available the :c:func:`select()` function returns 73 76 immediately. 74 77 75 - When use of the :ref:`write() <func-write>` function has been negotiated the 76 - :ref:`select() <func-select>` function just waits until the driver is ready for a 77 - non-blocking :ref:`write() <func-write>` call. 78 + When use of the :c:func:`write()` function has been negotiated the 79 + :c:func:`select()` function just waits until the driver is ready for a 80 + non-blocking :c:func:`write()` call. 78 81 79 - All drivers implementing the :ref:`read() <func-read>` or :ref:`write() <func-write>` 80 - function or streaming I/O must also support the :ref:`select() <func-select>` 82 + All drivers implementing the :c:func:`read()` or :c:func:`write()` 83 + function or streaming I/O must also support the :c:func:`select()` 81 84 function. 82 85 83 - For more details see the :ref:`select() <func-select>` manual page. 84 - 86 + For more details see the :c:func:`select()` manual page. 85 87 86 88 Return Value 87 89 ============ 88 90 89 - On success, :ref:`select() <func-select>` returns the number of descriptors 91 + On success, :c:func:`select()` returns the number of descriptors 90 92 contained in the three returned descriptor sets, which will be zero if 91 93 the timeout expired. On error -1 is returned, and the ``errno`` variable 92 94 is set appropriately; the sets and ``timeout`` are undefined. Possible ··· 111 115 ``FD_SETSIZE``. 112 116 113 117 .. [#f1] 114 - The Linux kernel implements :ref:`select() <func-select>` like the 115 - :ref:`poll() <func-poll>` function, but :ref:`select() <func-select>` cannot 118 + The Linux kernel implements :c:func:`select()` like the 119 + :c:func:`poll()` function, but :c:func:`select()` cannot 116 120 return a ``POLLERR``.
+5 -8
Documentation/userspace-api/media/v4l/func-write.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _func-write: 4 5 ··· 12 11 13 12 v4l2-write - Write to a V4L2 device 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 ··· 19 19 20 20 #include <unistd.h> 21 21 22 - 23 22 .. c:function:: ssize_t write( int fd, void *buf, size_t count ) 24 - :name: v4l2-write 25 23 26 24 Arguments 27 25 ========= 28 26 29 27 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 28 + File descriptor returned by :c:func:`open()`. 31 29 32 30 ``buf`` 33 31 Buffer with data to be written ··· 36 38 Description 37 39 =========== 38 40 39 - :ref:`write() <func-write>` writes up to ``count`` bytes to the device 41 + :c:func:`write()` writes up to ``count`` bytes to the device 40 42 referenced by the file descriptor ``fd`` from the buffer starting at 41 43 ``buf``. When the hardware outputs are not active yet, this function 42 - enables them. When ``count`` is zero, :ref:`write() <func-write>` returns 0 44 + enables them. When ``count`` is zero, :c:func:`write()` returns 0 43 45 without any other effect. 44 46 45 47 When the application does not provide more data in time, the previous 46 48 video frame, raw VBI image, sliced VPS or WSS data is displayed again. 47 49 Sliced Teletext or Closed Caption data is not repeated, the driver 48 50 inserts a blank line instead. 49 - 50 51 51 52 Return Value 52 53 ============ ··· 77 80 I/O error. This indicates some hardware problem. 78 81 79 82 EINVAL 80 - The :ref:`write() <func-write>` function is not supported by this driver, 83 + The :c:func:`write()` function is not supported by this driver, 81 84 not on this device, or generally not on this type of device.
+4 -66
Documentation/userspace-api/media/v4l/hist-v4l2.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _hist-v4l2: 4 5 ··· 15 14 another four years and two stable kernel releases until the new API was 16 15 finally accepted for inclusion into the kernel in its present form. 17 16 18 - 19 17 Early Versions 20 18 ============== 21 19 22 20 1998-08-20: First version. 23 21 24 - 1998-08-27: The :ref:`select() <func-select>` function was introduced. 22 + 1998-08-27: The :c:func:`select()` function was introduced. 25 23 26 24 1998-09-10: New video standard interface. 27 25 28 26 1998-09-18: The ``VIDIOC_NONCAP`` ioctl was replaced by the otherwise 29 - meaningless ``O_TRUNC`` :ref:`open() <func-open>` flag, and the 27 + meaningless ``O_TRUNC`` :c:func:`open()` flag, and the 30 28 aliases ``O_NONCAP`` and ``O_NOIO`` were defined. Applications can set 31 29 this flag if they intend to access controls only, as opposed to capture 32 30 applications which need exclusive access. The ``VIDEO_STD_XXX`` ··· 65 65 66 66 1999-01-19: The ``VIDIOC_NEXTBUF`` ioctl was removed. 67 67 68 - 69 68 V4L2 Version 0.16 1999-01-31 70 69 ============================ 71 70 ··· 72 73 are gone. VIDIOC_QBUF takes a v4l2_buffer as a parameter. Added 73 74 digital zoom (cropping) controls. 74 75 75 - 76 76 V4L2 Version 0.18 1999-03-16 77 77 ============================ 78 78 79 79 Added a v4l to V4L2 ioctl compatibility layer to videodev.c. Driver 80 80 writers, this changes how you implement your ioctl handler. See the 81 81 Driver Writer's Guide. Added some more control id codes. 82 - 83 82 84 83 V4L2 Version 0.19 1999-06-05 85 84 ============================ ··· 104 107 105 108 1999-06-05: Changed the value of V4L2_CID_WHITENESS. 106 109 107 - 108 110 V4L2 Version 0.20 (1999-09-10) 109 111 ============================== 110 112 ··· 124 128 VIDIOC_STREAMON, VIDIOC_STREAMOFF, VIDIOC_S_FREQ, 125 129 VIDIOC_S_INPUT, VIDIOC_S_OUTPUT, VIDIOC_S_EFFECT. For example 126 130 127 - 128 131 .. code-block:: c 129 132 130 133 err = ioctl (fd, VIDIOC_XXX, V4L2_XXX); 131 134 132 135 becomes 133 - 134 136 135 137 .. code-block:: c 136 138 ··· 195 201 8. A ``sequence`` field was added to struct v4l2_buffer. The ``sequence`` 196 202 field counts captured frames, it is ignored by output devices. When a 197 203 capture driver drops a frame, the sequence number of that frame is skipped. 198 - 199 204 200 205 V4L2 Version 0.20 incremental changes 201 206 ===================================== ··· 283 290 were added. The former is an alias for the old ``V4L2_TYPE_VBI``, the 284 291 latter was missing in the ``videodev.h`` file. 285 292 286 - 287 293 V4L2 Version 0.20 2002-07-25 288 294 ============================ 289 295 290 296 Added sliced VBI interface proposal. 291 - 292 297 293 298 V4L2 in Linux 2.5.46, 2002-10 294 299 ============================= ··· 298 307 1. As specified in :ref:`related`, drivers must make related device 299 308 functions available under all minor device numbers. 300 309 301 - 2. The :ref:`open() <func-open>` function requires access mode 310 + 2. The :c:func:`open()` function requires access mode 302 311 ``O_RDWR`` regardless of the device type. All V4L2 drivers 303 312 exchanging data with applications must support the ``O_NONBLOCK`` 304 313 flag. The ``O_NOIO`` flag, a V4L2 symbol which aliased the ··· 424 433 and ``VIDIOC_S_WIN`` ioctls to prepare for a video overlay were 425 434 removed. The ``type`` field changed to type enum v4l2_buf_type and 426 435 the buffer type names changed as follows. 427 - 428 436 429 437 430 438 .. flat-table:: ··· 587 597 V4L2 documentation was inaccurate, this has been corrected in 588 598 :ref:`pixfmt`. 589 599 590 - 591 600 V4L2 2003-06-19 592 601 =============== 593 602 ··· 637 648 Kernel 2.6.39. Drivers and applications assuming a constant parameter 638 649 need an update. 639 650 640 - 641 651 V4L2 2003-11-05 642 652 =============== 643 653 644 654 1. In :ref:`pixfmt-rgb` the following pixel formats were incorrectly 645 655 transferred from Bill Dirks' V4L2 specification. Descriptions below 646 656 refer to bytes in memory, in ascending address order. 647 - 648 657 649 658 650 659 .. flat-table:: ··· 665 678 - R, G, B, X 666 679 - B, G, R, X 667 680 668 - 669 681 The ``V4L2_PIX_FMT_BGR24`` example was always correct. 670 682 671 683 In :ref:`v4l-image-properties` the mapping of the V4L ··· 675 689 RGB pixel formats differently. These issues have yet to be addressed, 676 690 for details see :ref:`pixfmt-rgb`. 677 691 678 - 679 692 V4L2 in Linux 2.6.6, 2004-05-09 680 693 =============================== 681 694 ··· 682 697 defined with read-only parameter. It is now defined as write-read 683 698 ioctl, while the read-only version was renamed to 684 699 ``VIDIOC_CROPCAP_OLD``. The old ioctl was removed on Kernel 2.6.39. 685 - 686 700 687 701 V4L2 in Linux 2.6.8 688 702 =================== ··· 692 708 with the video capturing process. This function must be enabled with 693 709 the new ``V4L2_BUF_FLAG_INPUT`` flag. The ``flags`` field is no 694 710 longer read-only. 695 - 696 711 697 712 V4L2 spec erratum 2004-08-01 698 713 ============================ ··· 710 727 also missing from examples. Also on the ``VIDIOC_DQBUF`` page the ``EIO`` 711 728 error code was not documented. 712 729 713 - 714 730 V4L2 in Linux 2.6.14 715 731 ==================== 716 732 717 733 1. A new sliced VBI interface was added. It is documented in 718 734 :ref:`sliced` and replaces the interface first proposed in V4L2 719 735 specification 0.8. 720 - 721 736 722 737 V4L2 in Linux 2.6.15 723 738 ==================== ··· 736 755 ``VIDIOC_G_MPEGCOMP`` and ``VIDIOC_S_MPEGCOMP`` ioctls where removed 737 756 in Linux 2.6.25.) 738 757 739 - 740 758 V4L2 spec erratum 2005-11-27 741 759 ============================ 742 760 ··· 744 764 cropping is supported. In the video standard selection example in 745 765 :ref:`standard` the :ref:`VIDIOC_S_STD <VIDIOC_G_STD>` call used 746 766 the wrong argument type. 747 - 748 767 749 768 V4L2 spec erratum 2006-01-10 750 769 ============================ ··· 757 778 write-only as stated on its reference page. The ioctl changed in 2003 758 779 as noted above. 759 780 760 - 761 781 V4L2 spec erratum 2006-02-03 762 782 ============================ 763 783 764 784 1. In struct v4l2_captureparm and struct v4l2_outputparm the ``timeperframe`` 765 785 field gives the time in seconds, not microseconds. 766 - 767 786 768 787 V4L2 spec erratum 2006-02-04 769 788 ============================ ··· 784 807 languages of a bilingual program. The use of 785 808 ``V4L2_TUNER_MODE_STEREO`` for this purpose is deprecated now. See 786 809 the :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` section for details. 787 - 788 810 789 811 V4L2 spec erratum 2006-09-23 (Draft 0.15) 790 812 ========================================= ··· 813 837 extended from 224-239 to 224-255. Accordingly device file names 814 838 ``/dev/vbi0`` to ``/dev/vbi31`` are possible now. 815 839 816 - 817 840 V4L2 in Linux 2.6.18 818 841 ==================== 819 842 ··· 826 851 ``V4L2_CTRL_FLAG_READ_ONLY``, ``V4L2_CTRL_FLAG_UPDATE``, 827 852 ``V4L2_CTRL_FLAG_INACTIVE`` and ``V4L2_CTRL_FLAG_SLIDER`` 828 853 (:ref:`control-flags`). See :ref:`extended-controls` for details. 829 - 830 854 831 855 V4L2 in Linux 2.6.19 832 856 ==================== ··· 848 874 3. A new pixel format ``V4L2_PIX_FMT_RGB444`` (:ref:`pixfmt-rgb`) was 849 875 added. 850 876 851 - 852 877 V4L2 spec erratum 2006-10-12 (Draft 0.17) 853 878 ========================================= 854 879 855 880 1. ``V4L2_PIX_FMT_HM12`` (:ref:`reserved-formats`) is a YUV 4:2:0, not 856 881 4:2:2 format. 857 - 858 882 859 883 V4L2 in Linux 2.6.21 860 884 ==================== ··· 860 888 1. The ``videodev2.h`` header file is now dual licensed under GNU 861 889 General Public License version two or later, and under a 3-clause 862 890 BSD-style license. 863 - 864 891 865 892 V4L2 in Linux 2.6.22 866 893 ==================== ··· 885 914 This may **break compatibility** with existing applications. Drivers 886 915 supporting the "host order RGB32" format are not known. 887 916 888 - 889 917 V4L2 in Linux 2.6.24 890 918 ==================== 891 919 892 920 1. The pixel formats ``V4L2_PIX_FMT_PAL8``, ``V4L2_PIX_FMT_YUV444``, 893 921 ``V4L2_PIX_FMT_YUV555``, ``V4L2_PIX_FMT_YUV565`` and 894 922 ``V4L2_PIX_FMT_YUV32`` were added. 895 - 896 923 897 924 V4L2 in Linux 2.6.25 898 925 ==================== ··· 918 949 interface in Linux 2.6.18, where finally removed from the 919 950 ``videodev2.h`` header file. 920 951 921 - 922 952 V4L2 in Linux 2.6.26 923 953 ==================== 924 954 ··· 926 958 927 959 2. Added user controls ``V4L2_CID_CHROMA_AGC`` and 928 960 ``V4L2_CID_COLOR_KILLER``. 929 - 930 961 931 962 V4L2 in Linux 2.6.27 932 963 ==================== ··· 938 971 ``V4L2_PIX_FMT_PCA561``, ``V4L2_PIX_FMT_SGBRG8``, 939 972 ``V4L2_PIX_FMT_PAC207`` and ``V4L2_PIX_FMT_PJPG`` were added. 940 973 941 - 942 974 V4L2 in Linux 2.6.28 943 975 ==================== 944 976 ··· 948 982 949 983 3. The pixel formats ``V4L2_PIX_FMT_SGRBG10`` and 950 984 ``V4L2_PIX_FMT_SGRBG10DPCM8`` were added. 951 - 952 985 953 986 V4L2 in Linux 2.6.29 954 987 ==================== ··· 964 999 ``V4L2_CID_ZOOM_RELATIVE``, ``V4L2_CID_ZOOM_CONTINUOUS`` and 965 1000 ``V4L2_CID_PRIVACY``. 966 1001 967 - 968 1002 V4L2 in Linux 2.6.30 969 1003 ==================== 970 1004 971 1005 1. New control flag ``V4L2_CTRL_FLAG_WRITE_ONLY`` was added. 972 1006 973 1007 2. New control ``V4L2_CID_COLORFX`` was added. 974 - 975 1008 976 1009 V4L2 in Linux 2.6.32 977 1010 ==================== ··· 997 1034 9. Added Remote Controller chapter, describing the default Remote 998 1035 Controller mapping for media devices. 999 1036 1000 - 1001 1037 V4L2 in Linux 2.6.33 1002 1038 ==================== 1003 1039 1004 1040 1. Added support for Digital Video timings in order to support HDTV 1005 1041 receivers and transmitters. 1006 1042 1007 - 1008 1043 V4L2 in Linux 2.6.34 1009 1044 ==================== 1010 1045 1011 1046 1. Added ``V4L2_CID_IRIS_ABSOLUTE`` and ``V4L2_CID_IRIS_RELATIVE`` 1012 1047 controls to the :ref:`Camera controls class <camera-controls>`. 1013 - 1014 1048 1015 1049 V4L2 in Linux 2.6.37 1016 1050 ==================== ··· 1017 1057 applications found that used it. It was originally scheduled for 1018 1058 removal in 2.6.35. 1019 1059 1020 - 1021 1060 V4L2 in Linux 2.6.39 1022 1061 ==================== 1023 1062 ··· 1025 1066 2. Multi-planar API added. Does not affect the compatibility of current 1026 1067 drivers and applications. See :ref:`multi-planar API <planar-apis>` 1027 1068 for details. 1028 - 1029 1069 1030 1070 V4L2 in Linux 3.1 1031 1071 ================= ··· 1036 1078 1037 1079 Added V4L2_CTRL_TYPE_BITMASK. 1038 1080 1039 - 1040 1081 V4L2 in Linux 3.2 1041 1082 ================= 1042 1083 ··· 1046 1089 Does not affect the compatibility of current drivers and 1047 1090 applications. See :ref:`selection API <selection-api>` for details. 1048 1091 1049 - 1050 1092 V4L2 in Linux 3.3 1051 1093 ================= 1052 1094 ··· 1054 1098 1055 1099 2. Added the device_caps field to struct v4l2_capabilities and added 1056 1100 the new V4L2_CAP_DEVICE_CAPS capability. 1057 - 1058 1101 1059 1102 V4L2 in Linux 3.4 1060 1103 ================= ··· 1064 1109 :ref:`VIDIOC_ENUM_DV_TIMINGS`, 1065 1110 :ref:`VIDIOC_QUERY_DV_TIMINGS` and 1066 1111 :ref:`VIDIOC_DV_TIMINGS_CAP`. 1067 - 1068 1112 1069 1113 V4L2 in Linux 3.5 1070 1114 ================= ··· 1091 1137 ``V4L2_CID_AUTO_FOCUS_START``, ``V4L2_CID_AUTO_FOCUS_STOP``, 1092 1138 ``V4L2_CID_AUTO_FOCUS_STATUS`` and ``V4L2_CID_AUTO_FOCUS_RANGE``. 1093 1139 1094 - 1095 1140 V4L2 in Linux 3.6 1096 1141 ================= 1097 1142 ··· 1103 1150 3. Added support for frequency band enumerations: 1104 1151 :ref:`VIDIOC_ENUM_FREQ_BANDS`. 1105 1152 1106 - 1107 1153 V4L2 in Linux 3.9 1108 1154 ================= 1109 1155 ··· 1111 1159 1112 1160 2. Added ``V4L2_EVENT_CTRL_CH_RANGE`` control event changes flag. See 1113 1161 :ref:`ctrl-changes-flags`. 1114 - 1115 1162 1116 1163 V4L2 in Linux 3.10 1117 1164 ================== ··· 1123 1172 2. Added new debugging ioctl 1124 1173 :ref:`VIDIOC_DBG_G_CHIP_INFO`. 1125 1174 1126 - 1127 1175 V4L2 in Linux 3.11 1128 1176 ================== 1129 1177 1130 1178 1. Remove obsolete ``VIDIOC_DBG_G_CHIP_IDENT`` ioctl. 1131 - 1132 1179 1133 1180 V4L2 in Linux 3.14 1134 1181 ================== ··· 1134 1185 1. In struct v4l2_rect, the type of ``width`` and 1135 1186 ``height`` fields changed from _s32 to _u32. 1136 1187 1137 - 1138 1188 V4L2 in Linux 3.15 1139 1189 ================== 1140 1190 1141 1191 1. Added Software Defined Radio (SDR) Interface. 1142 1192 1143 - 1144 1193 V4L2 in Linux 3.16 1145 1194 ================== 1146 1195 1147 1196 1. Added event V4L2_EVENT_SOURCE_CHANGE. 1148 - 1149 1197 1150 1198 V4L2 in Linux 3.17 1151 1199 ================== ··· 1153 1207 2. Added compound control types and 1154 1208 :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`. 1155 1209 1156 - 1157 1210 V4L2 in Linux 3.18 1158 1211 ================== 1159 1212 1160 1213 1. Added ``V4L2_CID_PAN_SPEED`` and ``V4L2_CID_TILT_SPEED`` camera 1161 1214 controls. 1162 - 1163 1215 1164 1216 V4L2 in Linux 3.19 1165 1217 ================== ··· 1176 1232 1177 1233 3. Added transmitter support for Software Defined Radio (SDR) Interface. 1178 1234 1179 - 1180 1235 .. _other: 1181 1236 1182 1237 Relation of V4L2 to other Linux multimedia APIs 1183 1238 =============================================== 1184 - 1185 1239 1186 1240 .. _xvideo: 1187 1241 ··· 1226 1284 an interface to MPEG-2 decoding hardware. This API is useful to display 1227 1285 images captured with V4L2 devices. 1228 1286 1229 - 1230 1287 Digital Video 1231 1288 ------------- 1232 1289 ··· 1235 1294 DVB API has no connection to the V4L2 API except that drivers for hybrid 1236 1295 hardware may support both. 1237 1296 1238 - 1239 1297 Audio Interfaces 1240 1298 ---------------- 1241 1299 1242 1300 [to do - OSS/ALSA] 1243 - 1244 1301 1245 1302 .. _experimental: 1246 1303 ··· 1252 1313 :ref:`VIDIOC_DBG_S_REGISTER <VIDIOC_DBG_G_REGISTER>` ioctls. 1253 1314 1254 1315 - :ref:`VIDIOC_DBG_G_CHIP_INFO` ioctl. 1255 - 1256 1316 1257 1317 .. _obsolete: 1258 1318
+3 -3
Documentation/userspace-api/media/v4l/io.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _io: 4 5 ··· 10 9 a device. All drivers exchanging data with applications must support at 11 10 least one of them. 12 11 13 - The classic I/O method using the :ref:`read() <func-read>` and 14 - :ref:`write() <func-write>` function is automatically selected after opening a 12 + The classic I/O method using the :c:func:`read()` and 13 + :c:func:`write()` function is automatically selected after opening a 15 14 V4L2 device. When the driver does not support this method attempts to 16 15 read or write will fail at any time. 17 16 ··· 38 37 closing and reopening the device. 39 38 40 39 The following sections describe the various I/O methods in more detail. 41 - 42 40 43 41 .. toctree:: 44 42 :maxdepth: 1
+13 -17
Documentation/userspace-api/media/v4l/libv4l-introduction.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _libv4l-introduction: 4 5 ··· 17 16 :ref:`v4l2grab <v4l2grab-example>`. 18 17 19 18 libv4l consists of 3 different libraries: 20 - 21 19 22 20 libv4lconvert 23 21 ============= ··· 65 65 libv4lconvert/processing offers the actual video processing 66 66 functionality. 67 67 68 - 69 68 libv4l1 70 69 ======= 71 70 ··· 76 77 77 78 Since those functions are emulations of the old V4L1 API, it shouldn't 78 79 be used for new applications. 79 - 80 80 81 81 libv4l2 82 82 ======= ··· 103 105 keeps enumerating the hardware supported formats, plus the emulated 104 106 formats offered by libv4l at the end. 105 107 106 - 107 108 .. _libv4l-ops: 108 109 109 110 Libv4l device control functions ··· 112 115 113 116 Those functions operate just like the gcc function ``dup()`` and 114 117 V4L2 functions 115 - :c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, 116 - :c:func:`ioctl() <v4l2-ioctl>`, :c:func:`read() <v4l2-read>`, 117 - :c:func:`mmap() <v4l2-mmap>` and :c:func:`munmap() <v4l2-munmap>`: 118 + :c:func:`open()`, :c:func:`close()`, 119 + :c:func:`ioctl()`, :c:func:`read()`, 120 + :c:func:`mmap()` and :c:func:`munmap()`: 118 121 119 122 .. c:function:: int v4l2_open(const char *file, int oflag, ...) 120 123 121 - operates like the :c:func:`open() <v4l2-open>` function. 124 + operates like the :c:func:`open()` function. 122 125 123 126 .. c:function:: int v4l2_close(int fd) 124 127 125 - operates like the :c:func:`close() <v4l2-close>` function. 128 + operates like the :c:func:`close()` function. 126 129 127 130 .. c:function:: int v4l2_dup(int fd) 128 131 ··· 130 133 131 134 .. c:function:: int v4l2_ioctl (int fd, unsigned long int request, ...) 132 135 133 - operates like the :c:func:`ioctl() <v4l2-ioctl>` function. 136 + operates like the :c:func:`ioctl()` function. 134 137 135 138 .. c:function:: int v4l2_read (int fd, void* buffer, size_t n) 136 139 137 - operates like the :c:func:`read() <v4l2-read>` function. 140 + operates like the :c:func:`read()` function. 138 141 139 142 .. c:function:: void v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); 140 143 141 - operates like the :c:func:`munmap() <v4l2-munmap>` function. 144 + operates like the :c:func:`munmap()` function. 142 145 143 146 .. c:function:: int v4l2_munmap(void *_start, size_t length); 144 147 145 - operates like the :c:func:`munmap() <v4l2-munmap>` function. 148 + operates like the :c:func:`munmap()` function. 146 149 147 150 Those functions provide additional control: 148 151 ··· 165 168 of the given v4l control id. when the cid does not exist, could not be 166 169 accessed for some reason, or some error occurred 0 is returned. 167 170 168 - 169 171 v4l1compat.so wrapper library 170 172 ============================= 171 173 172 174 This library intercepts calls to 173 - :c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, 174 - :c:func:`ioctl() <v4l2-ioctl>`, :c:func:`mmap() <v4l2-mmap>` and 175 - :c:func:`munmap() <v4l2-munmap>` 175 + :c:func:`open()`, :c:func:`close()`, 176 + :c:func:`ioctl()`, :c:func:`mmap()` and 177 + :c:func:`munmap()` 176 178 operations and redirects them to the libv4l counterparts, by using 177 179 ``LD_PRELOAD=/usr/lib/v4l1compat.so``. It also emulates V4L1 calls via V4L2 178 180 API.
+13 -13
Documentation/userspace-api/media/v4l/mmap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _mmap: 4 5 ··· 36 35 the allocated memory, provided none of the buffers are still mapped. 37 36 38 37 Before applications can access the buffers they must map them into their 39 - address space with the :ref:`mmap() <func-mmap>` function. The 38 + address space with the :c:func:`mmap()` function. The 40 39 location of the buffers in device memory can be determined with the 41 40 :ref:`VIDIOC_QUERYBUF` ioctl. In the single-planar 42 41 API case, the ``m.offset`` and ``length`` returned in a struct 43 42 :c:type:`v4l2_buffer` are passed as sixth and second 44 - parameter to the :ref:`mmap() <func-mmap>` function. When using the 43 + parameter to the :c:func:`mmap()` function. When using the 45 44 multi-planar API, struct :c:type:`v4l2_buffer` contains an 46 45 array of struct :c:type:`v4l2_plane` structures, each 47 46 containing its own ``m.offset`` and ``length``. When using the 48 47 multi-planar API, every plane of every buffer has to be mapped 49 - separately, so the number of calls to :ref:`mmap() <func-mmap>` should 48 + separately, so the number of calls to :c:func:`mmap()` should 50 49 be equal to number of buffers times number of planes in each buffer. The 51 50 offset and length values must not be modified. Remember, the buffers are 52 51 allocated in physical memory, as opposed to virtual memory, which can be 53 52 swapped out to disk. Applications should free the buffers as soon as 54 - possible with the :ref:`munmap() <func-munmap>` function. 53 + possible with the :c:func:`munmap()` function. 55 54 56 55 Example: Mapping buffers in the single-planar API 57 56 ================================================= ··· 122 121 123 122 for (i = 0; i < reqbuf.count; i++) 124 123 munmap(buffers[i].start, buffers[i].length); 125 - 126 124 127 125 Example: Mapping buffers in the multi-planar API 128 126 ================================================ ··· 238 238 methods exist to suspend execution of the application until one or more 239 239 buffers can be dequeued. By default :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` 240 240 blocks when no buffer is in the outgoing queue. When the ``O_NONBLOCK`` 241 - flag was given to the :ref:`open() <func-open>` function, 241 + flag was given to the :c:func:`open()` function, 242 242 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` 243 - error code when no buffer is available. The :ref:`select() <func-select>` 244 - or :ref:`poll() <func-poll>` functions are always available. 243 + error code when no buffer is available. The :c:func:`select()` 244 + or :c:func:`poll()` functions are always available. 245 245 246 246 To start and stop capturing or output applications call the 247 247 :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF ··· 259 259 <VIDIOC_QUERYBUF>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_DQBUF 260 260 <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` 261 261 and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the :ref:`mmap() 262 - <func-mmap>`, :ref:`munmap() <func-munmap>`, :ref:`select() 263 - <func-select>` and :ref:`poll() <func-poll>` function. [#f3]_ 262 + <func-mmap>`, :c:func:`munmap()`, :ref:`select() 263 + <func-select>` and :c:func:`poll()` function. [#f3]_ 264 264 265 265 [capture example] 266 266 267 267 .. [#f1] 268 268 One could use one file descriptor and set the buffer type field 269 269 accordingly when calling :ref:`VIDIOC_QBUF` etc., 270 - but it makes the :ref:`select() <func-select>` function ambiguous. We also 270 + but it makes the :c:func:`select()` function ambiguous. We also 271 271 like the clean approach of one file descriptor per logical stream. 272 272 Video overlay for example is also a logical stream, although the CPU 273 273 is not needed for continuous operation. ··· 280 280 scatter-gather lists and the like. 281 281 282 282 .. [#f3] 283 - At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are 284 - the same, and :ref:`select() <func-select>` is too important to be optional. 283 + At the driver level :c:func:`select()` and :c:func:`poll()` are 284 + the same, and :c:func:`select()` is too important to be optional. 285 285 The rest should be evident.
+6 -9
Documentation/userspace-api/media/v4l/open.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _open: 4 5 ··· 141 140 drivers. The user must enter a device name, or the application can try 142 141 the conventional device names. 143 142 144 - 145 143 .. _related: 146 144 147 145 Related Devices ··· 157 157 support it and if they did it was certainly never tested. In addition, 158 158 switching a device node between different functions only works when 159 159 using the streaming I/O API, not with the 160 - :ref:`read() <func-read>`/\ :ref:`write() <func-write>` API. 160 + :c:func:`read()`/\ :c:func:`write()` API. 161 161 162 162 Today each V4L2 device node supports just one function. 163 163 ··· 178 178 linux-media mailing list: 179 179 `https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__. 180 180 181 - 182 181 Multiple Opens 183 182 ============== 184 183 ··· 191 192 Once an application has allocated the memory buffers needed for 192 193 streaming data (by calling the :ref:`VIDIOC_REQBUFS` 193 194 or :ref:`VIDIOC_CREATE_BUFS` ioctls, or 194 - implicitly by calling the :ref:`read() <func-read>` or 195 - :ref:`write() <func-write>` functions) that application (filehandle) 195 + implicitly by calling the :c:func:`read()` or 196 + :c:func:`write()` functions) that application (filehandle) 196 197 becomes the owner of the device. It is no longer allowed to make changes 197 198 that would affect the buffer sizes (e.g. by calling the 198 199 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl) and other applications are ··· 205 206 descriptor. Applications can request additional access privileges using 206 207 the priority mechanism described in :ref:`app-pri`. 207 208 208 - 209 209 Shared Data Streams 210 210 =================== 211 211 ··· 213 215 or similar means. This is better handled by a proxy application in user 214 216 space. 215 217 216 - 217 218 Functions 218 219 ========= 219 220 220 221 To open and close V4L2 devices applications use the 221 - :ref:`open() <func-open>` and :ref:`close() <func-close>` function, 222 + :c:func:`open()` and :c:func:`close()` function, 222 223 respectively. Devices are programmed using the 223 224 :ref:`ioctl() <func-ioctl>` function as explained in the following 224 225 sections. ··· 225 228 .. [#f1] 226 229 There are still some old and obscure drivers that have not been 227 230 updated to allow for multiple opens. This implies that for such 228 - drivers :ref:`open() <func-open>` can return an ``EBUSY`` error code 231 + drivers :c:func:`open()` can return an ``EBUSY`` error code 229 232 when the device is already in use. 230 233 231 234 .. [#f2]
+9 -9
Documentation/userspace-api/media/v4l/rw.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _rw: 4 5 ··· 7 6 Read/Write 8 7 ********** 9 8 10 - Input and output devices support the :ref:`read() <func-read>` and 11 - :ref:`write() <func-write>` function, respectively, when the 9 + Input and output devices support the :c:func:`read()` and 10 + :c:func:`write()` function, respectively, when the 12 11 ``V4L2_CAP_READWRITE`` flag in the ``capabilities`` field of struct 13 12 :c:type:`v4l2_capability` returned by the 14 13 :ref:`VIDIOC_QUERYCAP` ioctl is set. ··· 23 22 setup to exchange data. It permits command line stunts like this (the 24 23 vidctrl tool is fictitious): 25 24 26 - 27 25 .. code-block:: none 28 26 29 27 $ vidctrl /dev/video --input=0 --format=YUYV --size=352x288 30 28 $ dd if=/dev/video of=myimage.422 bs=202752 count=1 31 29 32 - To read from the device applications use the :ref:`read() <func-read>` 33 - function, to write the :ref:`write() <func-write>` function. Drivers 30 + To read from the device applications use the :c:func:`read()` 31 + function, to write the :c:func:`write()` function. Drivers 34 32 must implement one I/O method if they exchange data with applications, 35 33 but it need not be this. [#f1]_ When reading or writing is supported, the 36 - driver must also support the :ref:`select() <func-select>` and 37 - :ref:`poll() <func-poll>` function. [#f2]_ 34 + driver must also support the :c:func:`select()` and 35 + :c:func:`poll()` function. [#f2]_ 38 36 39 37 .. [#f1] 40 38 It would be desirable if applications could depend on drivers ··· 43 43 capturing still images. 44 44 45 45 .. [#f2] 46 - At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are 47 - the same, and :ref:`select() <func-select>` is too important to be optional. 46 + At the driver level :c:func:`select()` and :c:func:`poll()` are 47 + the same, and :c:func:`select()` is too important to be optional.
+3 -2
Documentation/userspace-api/media/v4l/streaming-par.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _streaming-par: 4 5 ··· 15 14 second. If less than this number of frames is to be captured or output, 16 15 applications can request frame skipping or duplicating on the driver 17 16 side. This is especially useful when using the 18 - :ref:`read() <func-read>` or :ref:`write() <func-write>`, which are 17 + :c:func:`read()` or :c:func:`write()`, which are 19 18 not augmented by timestamps or sequence counters, and to avoid 20 19 unnecessary data copying. 21 20 22 21 Finally these ioctls can be used to determine the number of buffers used 23 22 internally by a driver in read/write mode. For implications see the 24 - section discussing the :ref:`read() <func-read>` function. 23 + section discussing the :c:func:`read()` function. 25 24 26 25 To get and set the streaming parameters applications call the 27 26 :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
+6 -5
Documentation/userspace-api/media/v4l/userp.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _userp: 4 5 ··· 79 78 Two methods exist to suspend execution of the application until one or 80 79 more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF 81 80 <VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the 82 - ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function, 81 + ``O_NONBLOCK`` flag was given to the :c:func:`open()` function, 83 82 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` 84 83 error code when no buffer is available. The :ref:`select() 85 - <func-select>` or :ref:`poll() <func-poll>` function are always 84 + <func-select>` or :c:func:`poll()` function are always 86 85 available. 87 86 88 87 To start and stop capturing or output applications call the ··· 102 101 :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, 103 102 :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` 104 103 and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the 105 - :ref:`select() <func-select>` and :ref:`poll() <func-poll>` function. [#f2]_ 104 + :c:func:`select()` and :c:func:`poll()` function. [#f2]_ 106 105 107 106 .. [#f1] 108 107 We expect that frequently used buffers are typically not swapped out. ··· 117 116 because an application may share them with other processes. 118 117 119 118 .. [#f2] 120 - At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are 121 - the same, and :ref:`select() <func-select>` is too important to be optional. 119 + At the driver level :c:func:`select()` and :c:func:`poll()` are 120 + the same, and :c:func:`select()` is too important to be optional. 122 121 The rest should be evident.
+4 -7
Documentation/userspace-api/media/v4l/vidioc-create-bufs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_CREATE_BUFS: 4 5 ··· 12 11 13 12 VIDIOC_CREATE_BUFS - Create buffers for Memory Mapped or User Pointer or DMA Buffer I/O 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *argp ) 20 - :name: VIDIOC_CREATE_BUFS 17 + .. c:macro:: VIDIOC_CREATE_BUFS 21 18 19 + ``int ioctl(int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_create_buffers`. 31 - 32 29 33 30 Description 34 31 =========== ··· 69 70 the actual number allocated and the starting index in the ``count`` and 70 71 the ``index`` fields respectively. On return ``count`` can be smaller 71 72 than the number requested. 72 - 73 73 74 74 .. c:type:: v4l2_create_buffers 75 75 ··· 116 118 - ``reserved``\ [7] 117 119 - A place holder for future extensions. Drivers and applications 118 120 must set the array to zero. 119 - 120 121 121 122 Return Value 122 123 ============
+4 -7
Documentation/userspace-api/media/v4l/vidioc-cropcap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_CROPCAP: 4 5 ··· 12 11 13 12 VIDIOC_CROPCAP - Information about the video cropping and scaling abilities 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_CROPCAP, struct v4l2_cropcap *argp ) 20 - :name: VIDIOC_CROPCAP 17 + .. c:macro:: VIDIOC_CROPCAP 21 18 19 + ``int ioctl(int fd, VIDIOC_CROPCAP, struct v4l2_cropcap *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_cropcap`. 31 - 32 29 33 30 Description 34 31 =========== ··· 94 95 Starting with kernel 4.13 both variations are allowed. 95 96 96 97 97 - 98 98 .. _v4l2-rect-crop: 99 99 100 100 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 117 119 * - __u32 118 120 - ``height`` 119 121 - Height of the rectangle, in pixels. 120 - 121 122 122 123 Return Value 123 124 ============
+4 -9
Documentation/userspace-api/media/v4l/vidioc-dbg-g-chip-info.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DBG_G_CHIP_INFO: 4 5 ··· 12 11 13 12 VIDIOC_DBG_G_CHIP_INFO - Identify the chips on a TV card 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DBG_G_CHIP_INFO, struct v4l2_dbg_chip_info *argp ) 20 - :name: VIDIOC_DBG_G_CHIP_INFO 17 + .. c:macro:: VIDIOC_DBG_G_CHIP_INFO 21 18 19 + ``int ioctl(int fd, VIDIOC_DBG_G_CHIP_INFO, struct v4l2_dbg_chip_info *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_dbg_chip_info`. 31 - 32 29 33 30 Description 34 31 =========== ··· 75 76 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access 76 77 instructions. 77 78 78 - 79 79 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| 80 80 81 81 .. _name-v4l2-dbg-match: ··· 99 101 field. Currently unused. 100 102 * - } 101 103 - 102 - 103 104 104 105 105 106 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 127 130 - Reserved fields, both application and driver must set these to 0. 128 131 129 132 130 - 131 133 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 132 134 133 135 .. _name-chip-match-types: ··· 143 147 * - ``V4L2_CHIP_MATCH_SUBDEV`` 144 148 - 4 145 149 - Match the nth sub-device. 146 - 147 150 148 151 Return Value 149 152 ============
+7 -11
Documentation/userspace-api/media/v4l/vidioc-dbg-g-register.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DBG_G_REGISTER: 4 5 ··· 12 11 13 12 VIDIOC_DBG_G_REGISTER - VIDIOC_DBG_S_REGISTER - Read or write hardware registers 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DBG_G_REGISTER, struct v4l2_dbg_register *argp ) 20 - :name: VIDIOC_DBG_G_REGISTER 17 + .. c:macro:: VIDIOC_DBG_G_REGISTER 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_DBG_S_REGISTER, const struct v4l2_dbg_register *argp ) 23 - :name: VIDIOC_DBG_S_REGISTER 19 + ``int ioctl(int fd, VIDIOC_DBG_G_REGISTER, struct v4l2_dbg_register *argp)`` 24 20 21 + .. c:macro:: VIDIOC_DBG_S_REGISTER 22 + 23 + ``int ioctl(int fd, VIDIOC_DBG_S_REGISTER, const struct v4l2_dbg_register *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_dbg_register`. 34 - 35 33 36 34 Description 37 35 =========== ··· 85 85 `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access 86 86 instructions. 87 87 88 - 89 88 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| 90 89 91 90 .. c:type:: v4l2_dbg_match ··· 111 112 - 112 113 113 114 114 - 115 115 .. c:type:: v4l2_dbg_register 116 116 117 117 .. flat-table:: struct v4l2_dbg_register ··· 131 133 - The value read from, or to be written into the register. 132 134 133 135 134 - 135 136 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 136 137 137 138 .. _chip-match-types: ··· 147 150 * - ``V4L2_CHIP_MATCH_SUBDEV`` 148 151 - 4 149 152 - Match the nth sub-device. 150 - 151 153 152 154 Return Value 153 155 ============
+8 -11
Documentation/userspace-api/media/v4l/vidioc-decoder-cmd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DECODER_CMD: 4 5 ··· 12 11 13 12 VIDIOC_DECODER_CMD - VIDIOC_TRY_DECODER_CMD - Execute an decoder command 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DECODER_CMD, struct v4l2_decoder_cmd *argp ) 20 - :name: VIDIOC_DECODER_CMD 17 + .. c:macro:: VIDIOC_DECODER_CMD 21 18 19 + ``int ioctl(int fd, VIDIOC_DECODER_CMD, struct v4l2_decoder_cmd *argp)`` 22 20 23 - .. c:function:: int ioctl( int fd, VIDIOC_TRY_DECODER_CMD, struct v4l2_decoder_cmd *argp ) 24 - :name: VIDIOC_TRY_DECODER_CMD 21 + .. c:macro:: VIDIOC_TRY_DECODER_CMD 25 22 23 + ``int ioctl(int fd, VIDIOC_TRY_DECODER_CMD, struct v4l2_decoder_cmd *argp)`` 26 24 27 25 Arguments 28 26 ========= 29 27 30 28 ``fd`` 31 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 32 30 33 31 ``argp`` 34 32 pointer to struct :c:type:`v4l2_decoder_cmd`. 35 - 36 33 37 34 Description 38 35 =========== ··· 46 47 The ``cmd`` field must contain the command code. Some commands use the 47 48 ``flags`` field for additional information. 48 49 49 - A :ref:`write() <func-write>` or :ref:`VIDIOC_STREAMON` 50 + A :c:func:`write()` or :ref:`VIDIOC_STREAMON` 50 51 call sends an implicit START command to the decoder if it has not been 51 52 started yet. Applies to both queues of mem2mem decoders. 52 53 53 - A :ref:`close() <func-close>` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 54 + A :c:func:`close()` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 54 55 call of a streaming file descriptor sends an implicit immediate STOP 55 56 command to the decoder, and all buffered data is discarded. Applies to both 56 57 queues of mem2mem decoders. ··· 58 59 In principle, these ioctls are optional, not all drivers may support them. They were 59 60 introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decoders 60 61 (as further documented in :ref:`decoder`). 61 - 62 62 63 63 .. tabularcolumns:: |p{1.1cm}|p{2.4cm}|p{1.2cm}|p{1.6cm}|p{10.6cm}| 64 64 ··· 127 129 the array to zero. 128 130 * - } 129 131 - 130 - 131 132 132 133 133 134 .. tabularcolumns:: |p{5.6cm}|p{0.6cm}|p{11.3cm}|
+4 -15
Documentation/userspace-api/media/v4l/vidioc-dqevent.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DQEVENT: 4 5 ··· 12 11 13 12 VIDIOC_DQEVENT - Dequeue event 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DQEVENT, struct v4l2_event *argp ) 20 - :name: VIDIOC_DQEVENT 17 + .. c:macro:: VIDIOC_DQEVENT 21 18 19 + ``int ioctl(int fd, VIDIOC_DQEVENT, struct v4l2_event *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_event`. 31 - 32 29 33 30 Description 34 31 =========== ··· 36 37 structure are filled by the driver. The file handle will also receive 37 38 exceptions which the application may get by e.g. using the select system 38 39 call. 39 - 40 40 41 41 .. tabularcolumns:: |p{3.0cm}|p{4.4cm}|p{2.4cm}|p{7.7cm}| 42 42 ··· 96 98 - ``reserved``\ [8] 97 99 - Reserved for future extensions. Drivers must set the array to 98 100 zero. 99 - 100 101 101 102 102 103 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 188 191 - Base event number for driver-private events. 189 192 190 193 191 - 192 194 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 193 195 194 196 .. c:type:: v4l2_event_vsync ··· 200 204 * - __u8 201 205 - ``field`` 202 206 - The upcoming field. See enum :c:type:`v4l2_field`. 203 - 204 207 205 208 206 209 .. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{1.8cm}|p{8.5cm}| ··· 252 257 :ref:`v4l2_queryctrl <v4l2-queryctrl>`. 253 258 254 259 255 - 256 260 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 257 261 258 262 .. c:type:: v4l2_event_frame_sync ··· 264 270 * - __u32 265 271 - ``frame_sequence`` 266 272 - The sequence number of the frame being received. 267 - 268 273 269 274 270 275 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 279 286 - ``changes`` 280 287 - A bitmask that tells what has changed. See 281 288 :ref:`src-changes-flags`. 282 - 283 289 284 290 285 291 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 310 318 automatically assigned to the default region 0. 311 319 312 320 313 - 314 321 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 315 322 316 323 .. _ctrl-changes-flags: ··· 333 342 - 0x0004 334 343 - This control event was triggered because the minimum, maximum, 335 344 step or the default value of the control changed. 336 - 337 345 338 346 339 347 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 364 374 that many Video Capture devices are not able to recover from a temporary 365 375 loss of signal and so restarting streaming I/O is required in order for 366 376 the hardware to synchronize to the video signal. 367 - 368 377 369 378 Return Value 370 379 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-dv-timings-cap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_DV_TIMINGS_CAP: 4 5 ··· 12 11 13 12 VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp ) 20 - :name: VIDIOC_DV_TIMINGS_CAP 17 + .. c:macro:: VIDIOC_DV_TIMINGS_CAP 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp ) 23 - :name: VIDIOC_SUBDEV_DV_TIMINGS_CAP 19 + ``int ioctl(int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_DV_TIMINGS_CAP 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_dv_timings_cap`. 34 - 35 33 36 34 Description 37 35 =========== ··· 54 54 :c:type:`v4l2_dv_timings_cap` ``pad`` field and 55 55 zero the ``reserved`` array. Attempts to query capabilities on a pad 56 56 that doesn't support them will return an ``EINVAL`` error code. 57 - 58 57 59 58 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| 60 59 ··· 94 95 - ``reserved``\ [16] 95 96 - Reserved for future extensions. 96 97 Drivers must set the array to zero. 97 - 98 98 99 99 100 100 .. tabularcolumns:: |p{1.0cm}|p{4.0cm}|p{3.5cm}|p{9.2cm}| ··· 150 152 * - ``V4L2_DV_BT_CAP_CUSTOM`` 151 153 - Can support non-standard timings, i.e. timings not belonging to 152 154 the standards set in the ``standards`` field. 153 - 154 155 155 156 Return Value 156 157 ============
+11 -14
Documentation/userspace-api/media/v4l/vidioc-encoder-cmd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENCODER_CMD: 4 5 ··· 12 11 13 12 VIDIOC_ENCODER_CMD - VIDIOC_TRY_ENCODER_CMD - Execute an encoder command 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp ) 20 - :name: VIDIOC_ENCODER_CMD 17 + .. c:macro:: VIDIOC_ENCODER_CMD 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp ) 23 - :name: VIDIOC_TRY_ENCODER_CMD 19 + ``int ioctl(int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp)`` 24 20 21 + .. c:macro:: VIDIOC_TRY_ENCODER_CMD 22 + 23 + ``int ioctl(int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_encoder_cmd`. ··· 48 47 The ``cmd`` field must contain the command code. Some commands use the 49 48 ``flags`` field for additional information. 50 49 51 - After a STOP command, :ref:`read() <func-read>` calls will read 50 + After a STOP command, :c:func:`read()` calls will read 52 51 the remaining data buffered by the driver. When the buffer is empty, 53 - :ref:`read() <func-read>` will return zero and the next :ref:`read() <func-read>` 52 + :c:func:`read()` will return zero and the next :c:func:`read()` 54 53 call will restart the encoder. 55 54 56 - A :ref:`read() <func-read>` or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` 55 + A :c:func:`read()` or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` 57 56 call sends an implicit START command to the encoder if it has not been 58 57 started yet. Applies to both queues of mem2mem encoders. 59 58 60 - A :ref:`close() <func-close>` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 59 + A :c:func:`close()` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` 61 60 call of a streaming file descriptor sends an implicit immediate STOP to 62 61 the encoder, and all buffered data is discarded. Applies to both queues of 63 62 mem2mem encoders. ··· 65 64 These ioctls are optional, not all drivers may support them. They were 66 65 introduced in Linux 2.6.21. They are, however, mandatory for stateful mem2mem 67 66 encoders (as further documented in :ref:`encoder`). 68 - 69 67 70 68 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 71 69 ··· 87 87 - ``data``\ [8] 88 88 - Reserved for future extensions. Drivers and applications must set 89 89 the array to zero. 90 - 91 90 92 91 93 92 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 133 134 the encoder is already running, this command does nothing. No 134 135 flags are defined for this command. 135 136 136 - 137 137 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 138 138 139 139 .. _encoder-flags: ··· 148 150 rather than immediately. 149 151 150 152 Does not apply to :ref:`encoder`. 151 - 152 153 153 154 Return Value 154 155 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-enum-dv-timings.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_DV_TIMINGS: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) 20 - :name: VIDIOC_ENUM_DV_TIMINGS 17 + .. c:macro:: VIDIOC_ENUM_DV_TIMINGS 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) 23 - :name: VIDIOC_SUBDEV_ENUM_DV_TIMINGS 19 + ``int ioctl(int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_ENUM_DV_TIMINGS 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_enum_dv_timings`. 34 - 35 33 36 34 Description 37 35 =========== ··· 65 65 Attempts to enumerate timings on a pad that doesn't support them will 66 66 return an ``EINVAL`` error code. 67 67 68 - 69 68 .. c:type:: v4l2_enum_dv_timings 70 69 71 70 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 89 90 * - struct :c:type:`v4l2_dv_timings` 90 91 - ``timings`` 91 92 - The timings. 92 - 93 93 94 94 Return Value 95 95 ============
+4 -8
Documentation/userspace-api/media/v4l/vidioc-enum-fmt.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_FMT: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_FMT - Enumerate image formats 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FMT, struct v4l2_fmtdesc *argp ) 20 - :name: VIDIOC_ENUM_FMT 17 + .. c:macro:: VIDIOC_ENUM_FMT 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUM_FMT, struct v4l2_fmtdesc *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_fmtdesc`. 31 - 32 29 33 30 Description 34 31 =========== ··· 70 71 Regardless of the value of the ``mbus_code`` field, the enumerated image 71 72 formats shall not depend on the active configuration of the video device 72 73 or device pipeline. 73 - 74 74 75 75 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 76 76 ··· 133 135 - ``reserved``\ [3] 134 136 - Reserved for future extensions. Drivers must set the array to 135 137 zero. 136 - 137 138 138 139 139 140 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 223 226 The application can ask to configure the quantization of the capture 224 227 device when calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with 225 228 :ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set. 226 - 227 229 228 230 Return Value 229 231 ============
+4 -11
Documentation/userspace-api/media/v4l/vidioc-enum-frameintervals.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_FRAMEINTERVALS: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_FRAMEINTERVALS - Enumerate frame intervals 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FRAMEINTERVALS, struct v4l2_frmivalenum *argp ) 20 - :name: VIDIOC_ENUM_FRAMEINTERVALS 17 + .. c:macro:: VIDIOC_ENUM_FRAMEINTERVALS 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUM_FRAMEINTERVALS, struct v4l2_frmivalenum *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_frmivalenum` 31 29 that contains a pixel format and size and receives a frame interval. 32 - 33 30 34 31 Description 35 32 =========== ··· 90 91 91 92 frame_rate = 1 / frame_interval 92 93 93 - 94 94 Structs 95 95 ======= 96 96 97 97 In the structs below, *IN* denotes a value that has to be filled in by 98 98 the application, *OUT* denotes values that the driver fills in. The 99 99 application should zero out all members except for the *IN* fields. 100 - 101 100 102 101 .. c:type:: v4l2_frmival_stepwise 103 102 ··· 115 118 * - struct :c:type:`v4l2_fract` 116 119 - ``step`` 117 120 - Frame interval step size [s]. 118 - 119 121 120 122 121 123 .. c:type:: v4l2_frmivalenum ··· 159 163 applications. 160 164 161 165 162 - 163 166 Enums 164 167 ===== 165 - 166 168 167 169 .. c:type:: v4l2_frmivaltypes 168 170 ··· 180 186 * - ``V4L2_FRMIVAL_TYPE_STEPWISE`` 181 187 - 3 182 188 - Step-wise defined frame interval. 183 - 184 189 185 190 Return Value 186 191 ============
+4 -12
Documentation/userspace-api/media/v4l/vidioc-enum-framesizes.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_FRAMESIZES: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FRAMESIZES, struct v4l2_frmsizeenum *argp ) 20 - :name: VIDIOC_ENUM_FRAMESIZES 17 + .. c:macro:: VIDIOC_ENUM_FRAMESIZES 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUM_FRAMESIZES, struct v4l2_frmsizeenum *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_frmsizeenum` 31 29 that contains an index and pixel format and receives a frame width 32 30 and height. 33 - 34 31 35 32 Description 36 33 =========== ··· 80 81 enumeration data is consistent if the application does not perform any 81 82 other ioctl calls while it runs the frame size enumeration. 82 83 83 - 84 84 Structs 85 85 ======= 86 86 87 87 In the structs below, *IN* denotes a value that has to be filled in by 88 88 the application, *OUT* denotes values that the driver fills in. The 89 89 application should zero out all members except for the *IN* fields. 90 - 91 90 92 91 .. c:type:: v4l2_frmsize_discrete 93 92 ··· 102 105 * - __u32 103 106 - ``height`` 104 107 - Height of the frame [pixel]. 105 - 106 108 107 109 108 110 .. c:type:: v4l2_frmsize_stepwise ··· 131 135 * - __u32 132 136 - ``step_height`` 133 137 - Frame height step size [pixel]. 134 - 135 138 136 139 137 140 .. c:type:: v4l2_frmsizeenum ··· 168 173 applications. 169 174 170 175 171 - 172 176 Enums 173 177 ===== 174 - 175 178 176 179 .. c:type:: v4l2_frmsizetypes 177 180 ··· 189 196 * - ``V4L2_FRMSIZE_TYPE_STEPWISE`` 190 197 - 3 191 198 - Step-wise defined frame size. 192 - 193 199 194 200 Return Value 195 201 ============
+4 -8
Documentation/userspace-api/media/v4l/vidioc-enum-freq-bands.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUM_FREQ_BANDS: 4 5 ··· 12 11 13 12 VIDIOC_ENUM_FREQ_BANDS - Enumerate supported frequency bands 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp ) 20 - :name: VIDIOC_ENUM_FREQ_BANDS 17 + .. c:macro:: VIDIOC_ENUM_FREQ_BANDS 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_frequency_band`. 31 - 32 29 33 30 Description 34 31 =========== ··· 39 40 40 41 This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability 41 42 of the corresponding tuner/modulator is set. 42 - 43 43 44 44 .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| 45 45 ··· 108 110 Applications and drivers must set the array to zero. 109 111 110 112 111 - 112 113 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 113 114 114 115 .. _band-modulation: ··· 126 129 * - ``V4L2_BAND_MODULATION_AM`` 127 130 - 0x08 128 131 - Amplitude Modulation, commonly used for analog radio. 129 - 130 132 131 133 Return Value 132 134 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-enumaudio.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMAUDIO: 4 5 ··· 12 11 13 12 VIDIOC_ENUMAUDIO - Enumerate audio inputs 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp ) 20 - :name: VIDIOC_ENUMAUDIO 17 + .. c:macro:: VIDIOC_ENUMAUDIO 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_audio`. 31 - 32 29 33 30 Description 34 31 =========== ··· 41 42 42 43 See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct 43 44 :c:type:`v4l2_audio`. 44 - 45 45 46 46 Return Value 47 47 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-enumaudioout.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMAUDOUT: 4 5 ··· 12 11 13 12 VIDIOC_ENUMAUDOUT - Enumerate audio outputs 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp ) 20 - :name: VIDIOC_ENUMAUDOUT 17 + .. c:macro:: VIDIOC_ENUMAUDOUT 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_audioout`. 31 - 32 29 33 30 Description 34 31 =========== ··· 46 47 47 48 See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct 48 49 :c:type:`v4l2_audioout`. 49 - 50 50 51 51 Return Value 52 52 ============
+4 -10
Documentation/userspace-api/media/v4l/vidioc-enuminput.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMINPUT: 4 5 ··· 12 11 13 12 VIDIOC_ENUMINPUT - Enumerate video inputs 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMINPUT, struct v4l2_input *argp ) 20 - :name: VIDIOC_ENUMINPUT 17 + .. c:macro:: VIDIOC_ENUMINPUT 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUMINPUT, struct v4l2_input *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_input`. 31 - 32 29 33 30 Description 34 31 =========== ··· 37 38 fill the rest of the structure or return an ``EINVAL`` error code when the 38 39 index is out of bounds. To enumerate all inputs applications shall begin 39 40 at index zero, incrementing by one until the driver returns ``EINVAL``. 40 - 41 41 42 42 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 43 43 ··· 101 103 zero. 102 104 103 105 104 - 105 106 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 106 107 107 108 .. _input-type: ··· 121 124 * - ``V4L2_INPUT_TYPE_TOUCH`` 122 125 - 3 123 126 - This input is a touch device for capturing raw touch data. 124 - 125 127 126 128 127 129 .. tabularcolumns:: |p{4.8cm}|p{2.6cm}|p{10.1cm}| ··· 194 198 - VTR time constant. [?] 195 199 196 200 197 - 198 201 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 199 202 200 203 .. _input-capabilities: ··· 216 221 - This input supports setting the native size using the 217 222 ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see 218 223 :ref:`v4l2-selections-common`. 219 - 220 224 221 225 Return Value 222 226 ============
+4 -9
Documentation/userspace-api/media/v4l/vidioc-enumoutput.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMOUTPUT: 4 5 ··· 12 11 13 12 VIDIOC_ENUMOUTPUT - Enumerate video outputs 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp ) 20 - :name: VIDIOC_ENUMOUTPUT 17 + .. c:macro:: VIDIOC_ENUMOUTPUT 21 18 19 + ``int ioctl(int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_output`. 31 - 32 29 33 30 Description 34 31 =========== ··· 38 39 when the index is out of bounds. To enumerate all outputs applications 39 40 shall begin at index zero, incrementing by one until the driver returns 40 41 ``EINVAL``. 41 - 42 42 43 43 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 44 44 ··· 96 98 zero. 97 99 98 100 99 - 100 101 .. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}| 101 102 102 103 .. _output-type: ··· 116 119 * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY`` 117 120 - 3 118 121 - The video output will be copied to a :ref:`video overlay <overlay>`. 119 - 120 122 121 123 122 124 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 140 144 - This output supports setting the native size using the 141 145 ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see 142 146 :ref:`v4l2-selections-common`. 143 - 144 147 145 148 Return Value 146 149 ============
+7 -16
Documentation/userspace-api/media/v4l/vidioc-enumstd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_ENUMSTD: 4 5 ··· 12 11 13 12 VIDIOC_ENUMSTD - VIDIOC_SUBDEV_ENUMSTD - Enumerate supported video standards 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_ENUMSTD, struct v4l2_standard *argp ) 20 - :name: VIDIOC_ENUMSTD 17 + .. c:macro:: VIDIOC_ENUMSTD 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUMSTD, struct v4l2_standard *argp ) 23 - :name: VIDIOC_SUBDEV_ENUMSTD 19 + ``int ioctl(int fd, VIDIOC_ENUMSTD, struct v4l2_standard *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_ENUMSTD 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUMSTD, struct v4l2_standard *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_standard`. 34 - 35 33 36 34 Description 37 35 =========== ··· 44 44 zero, incrementing by one until the driver returns ``EINVAL``. Drivers may 45 45 enumerate a different set of standards after switching the video input 46 46 or output. [#f1]_ 47 - 48 47 49 48 .. c:type:: v4l2_standard 50 49 ··· 84 85 zero. 85 86 86 87 87 - 88 88 .. c:type:: v4l2_fract 89 89 90 90 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 100 102 - ``denominator`` 101 103 - 102 104 103 - 104 105 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 105 106 106 107 .. _v4l2-std-id: ··· 115 118 as listed below and in :ref:`video-standards`. The 32 most 116 119 significant bits are reserved for custom (driver defined) video 117 120 standards. 118 - 119 121 120 122 121 123 .. code-block:: c ··· 138 142 PAL video recorders can play back NTSC tapes in this mode for display on 139 143 a 50/60 Hz agnostic PAL TV. 140 144 141 - 142 145 .. code-block:: c 143 146 144 147 #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) ··· 146 151 147 152 ``V4L2_STD_NTSC_443`` is a hybrid standard with 525 lines, 60 Hz refresh 148 153 rate, and NTSC color modulation with a 4.43 MHz color subcarrier. 149 - 150 154 151 155 .. code-block:: c 152 156 ··· 168 174 terrestrial digital TV standards. Presently the V4L2 API does not 169 175 support digital TV. See also the Linux DVB API at 170 176 `https://linuxtv.org <https://linuxtv.org>`__. 171 - 172 177 173 178 .. code-block:: c 174 179 ··· 220 227 #define V4L2_STD_UNKNOWN 0 221 228 #define V4L2_STD_ALL (V4L2_STD_525_60 | 222 229 V4L2_STD_625_50) 223 - 224 230 225 231 .. raw:: latex 226 232 ··· 293 301 .. raw:: latex 294 302 295 303 \endgroup 296 - 297 304 298 305 299 306 Return Value
+4 -10
Documentation/userspace-api/media/v4l/vidioc-expbuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_EXPBUF: 4 5 ··· 12 11 13 12 VIDIOC_EXPBUF - Export a buffer as a DMABUF file descriptor. 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_EXPBUF, struct v4l2_exportbuffer *argp ) 20 - :name: VIDIOC_EXPBUF 17 + .. c:macro:: VIDIOC_EXPBUF 21 18 19 + ``int ioctl(int fd, VIDIOC_EXPBUF, struct v4l2_exportbuffer *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_exportbuffer`. 31 - 32 29 33 30 Description 34 31 =========== ··· 62 63 recommended to close a DMABUF file when it is no longer used to allow 63 64 the associated memory to be reclaimed. 64 65 65 - 66 66 Examples 67 67 ======== 68 - 69 68 70 69 .. code-block:: c 71 70 ··· 83 86 84 87 return 0; 85 88 } 86 - 87 89 88 90 .. code-block:: c 89 91 ··· 109 113 110 114 return 0; 111 115 } 112 - 113 116 114 117 .. c:type:: v4l2_exportbuffer 115 118 ··· 149 154 - ``reserved[11]`` 150 155 - Reserved field for future use. Drivers and applications must set 151 156 the array to zero. 152 - 153 157 154 158 Return Value 155 159 ============
+7 -11
Documentation/userspace-api/media/v4l/vidioc-g-audio.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_AUDIO: 4 5 ··· 12 11 13 12 VIDIOC_G_AUDIO - VIDIOC_S_AUDIO - Query or select the current audio input and its attributes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_AUDIO, struct v4l2_audio *argp ) 20 - :name: VIDIOC_G_AUDIO 17 + .. c:macro:: VIDIOC_G_AUDIO 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_AUDIO, const struct v4l2_audio *argp ) 23 - :name: VIDIOC_S_AUDIO 19 + ``int ioctl(int fd, VIDIOC_G_AUDIO, struct v4l2_audio *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_AUDIO 22 + 23 + ``int ioctl(int fd, VIDIOC_S_AUDIO, const struct v4l2_audio *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_audio`. 34 - 35 33 36 34 Description 37 35 =========== ··· 48 48 ioctl. Drivers may switch to a different audio mode if the request 49 49 cannot be satisfied. However, this is a write-only ioctl, it does not 50 50 return the actual new audio mode. 51 - 52 51 53 52 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 54 53 ··· 79 80 the array to zero. 80 81 81 82 82 - 83 83 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 84 84 85 85 .. _audio-capability: ··· 99 101 - Automatic Volume Level mode is supported. 100 102 101 103 102 - 103 104 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 104 105 105 106 .. _audio-mode: ··· 111 114 * - ``V4L2_AUDMODE_AVL`` 112 115 - 0x00001 113 116 - AVL mode is on. 114 - 115 117 116 118 Return Value 117 119 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-audioout.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_AUDOUT: 4 5 ··· 12 11 13 12 VIDIOC_G_AUDOUT - VIDIOC_S_AUDOUT - Query or select the current audio output 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_AUDOUT, struct v4l2_audioout *argp ) 20 - :name: VIDIOC_G_AUDOUT 17 + .. c:macro:: VIDIOC_G_AUDOUT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_AUDOUT, const struct v4l2_audioout *argp ) 23 - :name: VIDIOC_S_AUDOUT 19 + ``int ioctl(int fd, VIDIOC_G_AUDOUT, struct v4l2_audioout *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_AUDOUT 22 + 23 + ``int ioctl(int fd, VIDIOC_S_AUDOUT, const struct v4l2_audioout *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_audioout`. 34 - 35 33 36 34 Description 37 35 =========== ··· 55 55 56 56 Connectors on a TV card to loop back the received audio signal 57 57 to a sound card are not audio outputs in this sense. 58 - 59 58 60 59 .. c:type:: v4l2_audioout 61 60 ··· 85 86 - ``reserved``\ [2] 86 87 - Reserved for future extensions. Drivers and applications must set 87 88 the array to zero. 88 - 89 89 90 90 Return Value 91 91 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-crop.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_CROP: 4 5 ··· 12 11 13 12 VIDIOC_G_CROP - VIDIOC_S_CROP - Get or set the current cropping rectangle 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_CROP, struct v4l2_crop *argp ) 20 - :name: VIDIOC_G_CROP 17 + .. c:macro:: VIDIOC_G_CROP 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp ) 23 - :name: VIDIOC_S_CROP 19 + ``int ioctl(int fd, VIDIOC_G_CROP, struct v4l2_crop *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_CROP 22 + 23 + ``int ioctl(int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_crop`. 34 - 35 33 36 34 Description 37 35 =========== ··· 69 69 When cropping is not supported then no parameters are changed and 70 70 :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` returns the ``EINVAL`` error code. 71 71 72 - 73 72 .. c:type:: v4l2_crop 74 73 75 74 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 98 99 ``_MPLANE`` at the end). 99 100 100 101 Starting with kernel 4.13 both variations are allowed. 101 - 102 102 103 103 Return Value 104 104 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_CTRL: 4 5 ··· 12 11 13 12 VIDIOC_G_CTRL - VIDIOC_S_CTRL - Get or set the value of a control 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_CTRL, struct v4l2_control *argp ) 20 - :name: VIDIOC_G_CTRL 17 + .. c:macro:: VIDIOC_G_CTRL 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_CTRL, struct v4l2_control *argp ) 23 - :name: VIDIOC_S_CTRL 19 + ``int ioctl(int fd, VIDIOC_G_CTRL, struct v4l2_control *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_CTRL 22 + 23 + ``int ioctl(int fd, VIDIOC_S_CTRL, struct v4l2_control *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_control`. 34 - 35 33 36 34 Description 37 35 =========== ··· 55 55 :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` or 56 56 :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used. 57 57 58 - 59 58 .. c:type:: v4l2_control 60 59 61 60 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 70 71 * - __s32 71 72 - ``value`` 72 73 - New value or current value. 73 - 74 74 75 75 Return Value 76 76 ============
+13 -13
Documentation/userspace-api/media/v4l/vidioc-g-dv-timings.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_DV_TIMINGS: 4 5 ··· 12 11 13 12 VIDIOC_G_DV_TIMINGS - VIDIOC_S_DV_TIMINGS - VIDIOC_SUBDEV_G_DV_TIMINGS - VIDIOC_SUBDEV_S_DV_TIMINGS - Get or set DV timings for input or output 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_DV_TIMINGS, struct v4l2_dv_timings *argp ) 20 - :name: VIDIOC_G_DV_TIMINGS 17 + .. c:macro:: VIDIOC_G_DV_TIMINGS 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_DV_TIMINGS, struct v4l2_dv_timings *argp ) 23 - :name: VIDIOC_S_DV_TIMINGS 19 + ``int ioctl(int fd, VIDIOC_G_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 24 20 25 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_DV_TIMINGS, struct v4l2_dv_timings *argp ) 26 - :name: VIDIOC_SUBDEV_G_DV_TIMINGS 21 + .. c:macro:: VIDIOC_S_DV_TIMINGS 27 22 28 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_DV_TIMINGS, struct v4l2_dv_timings *argp ) 29 - :name: VIDIOC_SUBDEV_S_DV_TIMINGS 23 + ``int ioctl(int fd, VIDIOC_S_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 30 24 25 + .. c:macro:: VIDIOC_SUBDEV_G_DV_TIMINGS 26 + 27 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 28 + 29 + .. c:macro:: VIDIOC_SUBDEV_S_DV_TIMINGS 30 + 31 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 31 32 32 33 Arguments 33 34 ========= 34 35 35 36 ``fd`` 36 - File descriptor returned by :ref:`open() <func-open>`. 37 + File descriptor returned by :c:func:`open()`. 37 38 38 39 ``argp`` 39 40 Pointer to struct :c:type:`v4l2_dv_timings`. 40 - 41 41 42 42 Description 43 43 =========== ··· 61 59 the current input or output does not support DV timings (e.g. if 62 60 :ref:`VIDIOC_ENUMINPUT` does not set the 63 61 ``V4L2_IN_CAP_DV_TIMINGS`` flag), then ``ENODATA`` error code is returned. 64 - 65 62 66 63 Return Value 67 64 ============ ··· 170 169 - ``reserved[46]`` 171 170 - Reserved for future extensions. Drivers and applications must set 172 171 the array to zero. 173 - 174 172 175 173 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{7.0cm}|p{3.5cm}| 176 174
+12 -13
Documentation/userspace-api/media/v4l/vidioc-g-edid.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_EDID: 4 5 ··· 12 11 13 12 VIDIOC_G_EDID - VIDIOC_S_EDID - VIDIOC_SUBDEV_G_EDID - VIDIOC_SUBDEV_S_EDID - Get or set the EDID of a video receiver/transmitter 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_EDID, struct v4l2_edid *argp ) 20 - :name: VIDIOC_G_EDID 17 + .. c:macro:: VIDIOC_G_EDID 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_EDID, struct v4l2_edid *argp ) 23 - :name: VIDIOC_S_EDID 19 + ``int ioctl(int fd, VIDIOC_G_EDID, struct v4l2_edid *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_EDID 25 22 26 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_EDID, struct v4l2_edid *argp ) 27 - :name: VIDIOC_SUBDEV_G_EDID 23 + ``int ioctl(int fd, VIDIOC_S_EDID, struct v4l2_edid *argp)`` 28 24 29 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_EDID, struct v4l2_edid *argp ) 30 - :name: VIDIOC_SUBDEV_S_EDID 25 + .. c:macro:: VIDIOC_SUBDEV_G_EDID 31 26 27 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_EDID, struct v4l2_edid *argp)`` 28 + 29 + .. c:macro:: VIDIOC_SUBDEV_S_EDID 30 + 31 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_EDID, struct v4l2_edid *argp)`` 32 32 33 33 Arguments 34 34 ========= 35 35 36 36 ``fd`` 37 - File descriptor returned by :ref:`open() <func-open>`. 37 + File descriptor returned by :c:func:`open()`. 38 38 39 39 ``argp`` 40 40 Pointer to struct :c:type:`v4l2_edid`. 41 - 42 41 43 42 Description 44 43 =========== ··· 98 97 the EDID data in some way. In any case, the end result is the same: the 99 98 EDID is no longer available. 100 99 101 - 102 100 .. c:type:: v4l2_edid 103 101 104 102 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 131 131 - ``edid`` 132 132 - Pointer to memory that contains the EDID. The minimum size is 133 133 ``blocks`` * 128. 134 - 135 134 136 135 Return Value 137 136 ============
+4 -9
Documentation/userspace-api/media/v4l/vidioc-g-enc-index.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_ENC_INDEX: 4 5 ··· 12 11 13 12 VIDIOC_G_ENC_INDEX - Get meta data about a compressed video stream 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_ENC_INDEX, struct v4l2_enc_idx *argp ) 20 - :name: VIDIOC_G_ENC_INDEX 17 + .. c:macro:: VIDIOC_G_ENC_INDEX 21 18 19 + ``int ioctl(int fd, VIDIOC_G_ENC_INDEX, struct v4l2_enc_idx *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_enc_idx`. 31 - 32 29 33 30 Description 34 31 =========== ··· 54 55 Currently this ioctl is only defined for MPEG-2 program streams and 55 56 video elementary streams. 56 57 57 - 58 58 .. tabularcolumns:: |p{3.8cm}|p{5.6cm}|p{8.1cm}| 59 59 60 60 .. c:type:: v4l2_enc_idx ··· 79 81 - Meta data about a compressed video stream. Each element of the 80 82 array corresponds to one picture, sorted in ascending order by 81 83 their ``offset``. 82 - 83 84 84 85 85 86 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 113 116 - Reserved for future extensions. Drivers must set the array to 114 117 zero. 115 118 116 - 117 119 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 118 120 119 121 .. _enc-idx-flags: ··· 135 139 - 0x0F 136 140 - *AND* the flags field with this mask to obtain the picture coding 137 141 type. 138 - 139 142 140 143 Return Value 141 144 ============
+8 -13
Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_EXT_CTRLS: 4 5 ··· 12 11 13 12 VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the value of several controls, try control values 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_EXT_CTRLS, struct v4l2_ext_controls *argp ) 20 - :name: VIDIOC_G_EXT_CTRLS 17 + .. c:macro:: VIDIOC_G_EXT_CTRLS 21 18 19 + ``int ioctl(int fd, VIDIOC_G_EXT_CTRLS, struct v4l2_ext_controls *argp)`` 22 20 23 - .. c:function:: int ioctl( int fd, VIDIOC_S_EXT_CTRLS, struct v4l2_ext_controls *argp ) 24 - :name: VIDIOC_S_EXT_CTRLS 21 + .. c:macro:: VIDIOC_S_EXT_CTRLS 25 22 23 + ``int ioctl(int fd, VIDIOC_S_EXT_CTRLS, struct v4l2_ext_controls *argp)`` 26 24 27 - .. c:function:: int ioctl( int fd, VIDIOC_TRY_EXT_CTRLS, struct v4l2_ext_controls *argp ) 28 - :name: VIDIOC_TRY_EXT_CTRLS 25 + .. c:macro:: VIDIOC_TRY_EXT_CTRLS 29 26 27 + ``int ioctl(int fd, VIDIOC_TRY_EXT_CTRLS, struct v4l2_ext_controls *argp)`` 30 28 31 29 Arguments 32 30 ========= 33 31 34 32 ``fd`` 35 - File descriptor returned by :ref:`open() <func-open>`. 33 + File descriptor returned by :c:func:`open()`. 36 34 37 35 ``argp`` 38 36 Pointer to struct :c:type:`v4l2_ext_controls`. 39 - 40 37 41 38 Description 42 39 =========== ··· 118 119 were set/get. Only low-level errors (e. g. a failed i2c command) can 119 120 still cause this situation. 120 121 121 - 122 122 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{1.5cm}|p{11.8cm}| 123 123 124 124 .. c:type:: v4l2_ext_control ··· 192 194 ``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set for this control. 193 195 * - } 194 196 - 195 - 196 197 197 198 .. tabularcolumns:: |p{4.0cm}|p{2.2cm}|p{2.1cm}|p{8.2cm}| 198 199 ··· 306 309 307 310 Ignored if ``count`` equals zero. 308 311 309 - 310 312 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 311 313 312 314 .. _ctrl-class: ··· 358 362 - 0xa20000 359 363 - The class containing RF tuner controls. These controls are 360 364 described in :ref:`rf-tuner-controls`. 361 - 362 365 363 366 Return Value 364 367 ============
+7 -11
Documentation/userspace-api/media/v4l/vidioc-g-fbuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_FBUF: 4 5 ··· 12 11 13 12 VIDIOC_G_FBUF - VIDIOC_S_FBUF - Get or set frame buffer overlay parameters 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_FBUF, struct v4l2_framebuffer *argp ) 20 - :name: VIDIOC_G_FBUF 17 + .. c:macro:: VIDIOC_G_FBUF 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_FBUF, const struct v4l2_framebuffer *argp ) 23 - :name: VIDIOC_S_FBUF 19 + ``int ioctl(int fd, VIDIOC_G_FBUF, struct v4l2_framebuffer *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_FBUF 22 + 23 + ``int ioctl(int fd, VIDIOC_S_FBUF, const struct v4l2_framebuffer *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_framebuffer`. 34 - 35 33 36 34 Description 37 35 =========== ··· 74 74 jeopardize the system security, its stability or even damage the 75 75 hardware, therefore only the superuser can set the parameters for a 76 76 destructive video overlay. 77 - 78 77 79 78 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| 80 79 ··· 207 208 - ``priv`` 208 209 - Reserved. Drivers and applications must set this field to zero. 209 210 210 - 211 211 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 212 212 213 213 .. _framebuffer-cap: ··· 254 256 - The device supports Source Chroma-keying. Video pixels with the 255 257 chroma-key colors are replaced by framebuffer pixels, which is 256 258 exactly opposite of ``V4L2_FBUF_CAP_CHROMAKEY`` 257 - 258 259 259 260 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 260 261 ··· 328 331 and :ref:`osd`. Both chroma-keying are mutual exclusive to each 329 332 other, so same ``chromakey`` field of struct 330 333 :c:type:`v4l2_window` is being used. 331 - 332 334 333 335 Return Value 334 336 ============
+11 -11
Documentation/userspace-api/media/v4l/vidioc-g-fmt.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_FMT: 4 5 ··· 12 11 13 12 VIDIOC_G_FMT - VIDIOC_S_FMT - VIDIOC_TRY_FMT - Get or set the data format, try a format 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_FMT, struct v4l2_format *argp ) 20 - :name: VIDIOC_G_FMT 17 + .. c:macro:: VIDIOC_G_FMT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_FMT, struct v4l2_format *argp ) 23 - :name: VIDIOC_S_FMT 19 + ``int ioctl(int fd, VIDIOC_G_FMT, struct v4l2_format *argp)`` 24 20 25 - .. c:function:: int ioctl( int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp ) 26 - :name: VIDIOC_TRY_FMT 21 + .. c:macro:: VIDIOC_S_FMT 22 + 23 + ``int ioctl(int fd, VIDIOC_S_FMT, struct v4l2_format *argp)`` 24 + 25 + .. c:macro:: VIDIOC_TRY_FMT 26 + 27 + ``int ioctl(int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp)`` 27 28 28 29 Arguments 29 30 ========= 30 31 31 32 ``fd`` 32 - File descriptor returned by :ref:`open() <func-open>`. 33 + File descriptor returned by :c:func:`open()`. 33 34 34 35 ``argp`` 35 36 Pointer to struct :c:type:`v4l2_format`. 36 - 37 37 38 38 Description 39 39 =========== ··· 87 85 The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical to what 88 86 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` returns for the same input or output. 89 87 90 - 91 88 .. c:type:: v4l2_format 92 89 93 90 .. tabularcolumns:: |p{1.2cm}|p{4.6cm}|p{3.0cm}|p{8.6cm}| ··· 135 134 - Place holder for future extensions. 136 135 * - } 137 136 - 138 - 139 137 140 138 Return Value 141 139 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-frequency.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_FREQUENCY: 4 5 ··· 12 11 13 12 VIDIOC_G_FREQUENCY - VIDIOC_S_FREQUENCY - Get or set tuner or modulator radio frequency 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_FREQUENCY, struct v4l2_frequency *argp ) 20 - :name: VIDIOC_G_FREQUENCY 17 + .. c:macro:: VIDIOC_G_FREQUENCY 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_FREQUENCY, const struct v4l2_frequency *argp ) 23 - :name: VIDIOC_S_FREQUENCY 19 + ``int ioctl(int fd, VIDIOC_G_FREQUENCY, struct v4l2_frequency *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_FREQUENCY 22 + 23 + ``int ioctl(int fd, VIDIOC_S_FREQUENCY, const struct v4l2_frequency *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_frequency`. 34 - 35 33 36 34 Description 37 35 =========== ··· 50 50 structure. When the requested frequency is not possible the driver 51 51 assumes the closest possible value. However :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` is a 52 52 write-only ioctl, it does not return the actual new frequency. 53 - 54 53 55 54 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 56 55 ··· 87 88 - ``reserved``\ [8] 88 89 - Reserved for future extensions. Drivers and applications must set 89 90 the array to zero. 90 - 91 91 92 92 Return Value 93 93 ============
+7 -8
Documentation/userspace-api/media/v4l/vidioc-g-input.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_INPUT: 4 5 ··· 12 11 13 12 VIDIOC_G_INPUT - VIDIOC_S_INPUT - Query or select the current video input 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_INPUT, int *argp ) 20 - :name: VIDIOC_G_INPUT 17 + .. c:macro:: VIDIOC_G_INPUT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_INPUT, int *argp ) 23 - :name: VIDIOC_S_INPUT 19 + ``int ioctl(int fd, VIDIOC_G_INPUT, int *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_INPUT 22 + 23 + ``int ioctl(int fd, VIDIOC_S_INPUT, int *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer an integer with input index. 34 - 35 33 36 34 Description 37 35 =========== ··· 51 51 52 52 Information about video inputs is available using the 53 53 :ref:`VIDIOC_ENUMINPUT` ioctl. 54 - 55 54 56 55 Return Value 57 56 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-g-jpegcomp.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_JPEGCOMP: 4 5 ··· 12 11 13 12 VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp ) 20 - :name: VIDIOC_G_JPEGCOMP 17 + .. c:macro:: VIDIOC_G_JPEGCOMP 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp ) 23 - :name: VIDIOC_S_JPEGCOMP 19 + ``int ioctl(int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_JPEGCOMP 22 + 23 + ``int ioctl(int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_jpegcompression`. 34 - 35 33 36 34 Description 37 35 =========== ··· 53 53 stored in the JPEG-encoded fields. These define how the JPEG field is 54 54 encoded. If you omit them, applications assume you've used standard 55 55 encoding. You usually do want to add them. 56 - 57 56 58 57 .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| 59 58 ··· 91 92 control is exposed by a driver applications should use it instead 92 93 and ignore this field. 93 94 94 - 95 95 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 96 96 97 97 .. _jpeg-markers: ··· 115 117 * - ``V4L2_JPEG_MARKER_APP`` 116 118 - (1<<7) 117 119 - App segment, driver will always use APP0 118 - 119 120 120 121 Return Value 121 122 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-g-modulator.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_MODULATOR: 4 5 ··· 12 11 13 12 VIDIOC_G_MODULATOR - VIDIOC_S_MODULATOR - Get or set modulator attributes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_MODULATOR, struct v4l2_modulator *argp ) 20 - :name: VIDIOC_G_MODULATOR 17 + .. c:macro:: VIDIOC_G_MODULATOR 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_MODULATOR, const struct v4l2_modulator *argp ) 23 - :name: VIDIOC_S_MODULATOR 19 + ``int ioctl(int fd, VIDIOC_G_MODULATOR, struct v4l2_modulator *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_MODULATOR 22 + 23 + ``int ioctl(int fd, VIDIOC_S_MODULATOR, const struct v4l2_modulator *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_modulator`. 34 - 35 33 36 34 Description 37 35 =========== ··· 59 59 60 60 To change the radio frequency the 61 61 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. 62 - 63 62 64 63 .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| 65 64 ··· 120 121 Drivers and applications must set the array to zero. 121 122 122 123 123 - 124 124 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 125 125 126 126 .. _modulator-txsubchans: ··· 179 181 * - ``V4L2_TUNER_SUB_RDS`` 180 182 - 0x0010 181 183 - Enable the RDS encoder for a radio FM transmitter. 182 - 183 184 184 185 Return Value 185 186 ============
+7 -8
Documentation/userspace-api/media/v4l/vidioc-g-output.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_OUTPUT: 4 5 ··· 12 11 13 12 VIDIOC_G_OUTPUT - VIDIOC_S_OUTPUT - Query or select the current video output 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_OUTPUT, int *argp ) 20 - :name: VIDIOC_G_OUTPUT 17 + .. c:macro:: VIDIOC_G_OUTPUT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_OUTPUT, int *argp ) 23 - :name: VIDIOC_S_OUTPUT 19 + ``int ioctl(int fd, VIDIOC_G_OUTPUT, int *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_OUTPUT 22 + 23 + ``int ioctl(int fd, VIDIOC_S_OUTPUT, int *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to an integer with output index. 34 - 35 33 36 34 Description 37 35 =========== ··· 52 52 53 53 Information about video outputs is available using the 54 54 :ref:`VIDIOC_ENUMOUTPUT` ioctl. 55 - 56 55 57 56 Return Value 58 57 ============
+12 -18
Documentation/userspace-api/media/v4l/vidioc-g-parm.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_PARM: 4 5 ··· 12 11 13 12 VIDIOC_G_PARM - VIDIOC_S_PARM - Get or set streaming parameters 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_PARM, v4l2_streamparm *argp ) 20 - :name: VIDIOC_G_PARM 17 + .. c:macro:: VIDIOC_G_PARM 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_PARM, v4l2_streamparm *argp ) 23 - :name: VIDIOC_S_PARM 19 + ``int ioctl(int fd, VIDIOC_G_PARM, v4l2_streamparm *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_PARM 22 + 23 + ``int ioctl(int fd, VIDIOC_S_PARM, v4l2_streamparm *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_streamparm`. 34 - 35 33 36 34 Description 37 35 =========== ··· 48 48 49 49 Further these ioctls can be used to determine the number of buffers used 50 50 internally by a driver in read/write mode. For implications see the 51 - section discussing the :ref:`read() <func-read>` function. 51 + section discussing the :c:func:`read()` function. 52 52 53 53 To get and set the streaming parameters applications call the 54 54 :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and 55 55 :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take a 56 56 pointer to a struct :c:type:`v4l2_streamparm` which contains a 57 57 union holding separate parameters for input and output devices. 58 - 59 58 60 59 .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| 61 60 ··· 86 87 - A place holder for future extensions. 87 88 * - } 88 89 - 89 - 90 90 91 91 92 92 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 136 138 * - __u32 137 139 - ``readbuffers`` 138 140 - Applications set this field to the desired number of buffers used 139 - internally by the driver in :ref:`read() <func-read>` mode. 141 + internally by the driver in :c:func:`read()` mode. 140 142 Drivers return the actual number of buffers. When an application 141 143 requests zero buffers, drivers should just return the current 142 144 setting rather than the minimum or an error code. For details see ··· 145 147 - ``reserved``\ [4] 146 148 - Reserved for future extensions. Drivers and applications must set 147 149 the array to zero. 148 - 149 150 150 151 151 152 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 169 172 * - :cspan:`2` 170 173 171 174 The field is intended to repeat frames on the driver side in 172 - :ref:`write() <func-write>` mode (in streaming mode timestamps 175 + :c:func:`write()` mode (in streaming mode timestamps 173 176 can be used to throttle the output), saving I/O bandwidth. 174 177 175 178 For stateful encoders (see :ref:`encoder`) this represents the ··· 196 199 * - __u32 197 200 - ``writebuffers`` 198 201 - Applications set this field to the desired number of buffers used 199 - internally by the driver in :ref:`write() <func-write>` mode. Drivers 202 + internally by the driver in :c:func:`write()` mode. Drivers 200 203 return the actual number of buffers. When an application requests 201 204 zero buffers, drivers should just return the current setting 202 205 rather than the minimum or an error code. For details see ··· 205 208 - ``reserved``\ [4] 206 209 - Reserved for future extensions. Drivers and applications must set 207 210 the array to zero. 208 - 209 211 210 212 211 213 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 220 224 - 0x1000 221 225 - The frame period can be modified by setting the ``timeperframe`` 222 226 field. 223 - 224 227 225 228 226 229 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| ··· 260 265 261 266 - Moving objects in the image might have excessive motion blur. 262 267 263 - - Capture might only work through the :ref:`read() <func-read>` call. 264 - 268 + - Capture might only work through the :c:func:`read()` call. 265 269 266 270 Return Value 267 271 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-g-priority.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_PRIORITY: 4 5 ··· 12 11 13 12 VIDIOC_G_PRIORITY - VIDIOC_S_PRIORITY - Query or request the access priority associated with a file descriptor 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_PRIORITY, enum v4l2_priority *argp ) 20 - :name: VIDIOC_G_PRIORITY 17 + .. c:macro:: VIDIOC_G_PRIORITY 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_PRIORITY, const enum v4l2_priority *argp ) 23 - :name: VIDIOC_S_PRIORITY 19 + ``int ioctl(int fd, VIDIOC_G_PRIORITY, enum v4l2_priority *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_PRIORITY 22 + 23 + ``int ioctl(int fd, VIDIOC_S_PRIORITY, const enum v4l2_priority *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to an enum :c:type:`v4l2_priority` type. 34 - 35 33 36 34 Description 37 35 =========== ··· 42 42 To request an access priority applications store the desired priority in 43 43 an enum v4l2_priority variable and call :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctl 44 44 with a pointer to this variable. 45 - 46 45 47 46 .. c:type:: v4l2_priority 48 47 ··· 76 77 - Highest priority. Only one file descriptor can have this priority, 77 78 it blocks any other fd from changing device properties. Usually 78 79 applications which must not be interrupted, like video recording. 79 - 80 80 81 81 Return Value 82 82 ============
+6 -9
Documentation/userspace-api/media/v4l/vidioc-g-selection.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_SELECTION: 4 5 ··· 12 11 13 12 VIDIOC_G_SELECTION - VIDIOC_S_SELECTION - Get or set one of the selection rectangles 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_SELECTION, struct v4l2_selection *argp ) 20 - :name: VIDIOC_G_SELECTION 17 + .. c:macro:: VIDIOC_G_SELECTION 21 18 19 + ``int ioctl(int fd, VIDIOC_G_SELECTION, struct v4l2_selection *argp)`` 22 20 23 - .. c:function:: int ioctl( int fd, VIDIOC_S_SELECTION, struct v4l2_selection *argp ) 24 - :name: VIDIOC_S_SELECTION 21 + .. c:macro:: VIDIOC_S_SELECTION 25 22 23 + ``int ioctl(int fd, VIDIOC_S_SELECTION, struct v4l2_selection *argp)`` 26 24 27 25 Arguments 28 26 ========= 29 27 30 28 ``fd`` 31 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 32 30 33 31 ``argp`` 34 32 Pointer to struct :c:type:`v4l2_selection`. ··· 115 115 Selection targets and flags are documented in 116 116 :ref:`v4l2-selections-common`. 117 117 118 - 119 118 .. _sel-const-adjust: 120 119 121 120 .. kernel-figure:: constraints.svg ··· 124 125 Size adjustments with constraint flags. 125 126 126 127 Behaviour of rectangle adjustment for different constraint flags. 127 - 128 128 129 129 130 130 ··· 165 167 ``_MPLANE`` at the end). 166 168 167 169 Starting with kernel 4.13 both variations are allowed. 168 - 169 170 170 171 Return Value 171 172 ============
+4 -8
Documentation/userspace-api/media/v4l/vidioc-g-sliced-vbi-cap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_SLICED_VBI_CAP: 4 5 ··· 12 11 13 12 VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp ) 20 - :name: VIDIOC_G_SLICED_VBI_CAP 17 + .. c:macro:: VIDIOC_G_SLICED_VBI_CAP 21 18 19 + ``int ioctl(int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_sliced_vbi_cap`. 31 - 32 29 33 30 Description 34 31 =========== ··· 42 43 43 44 The ``type`` field was added, and the ioctl changed from read-only 44 45 to write-read, in Linux 2.6.19. 45 - 46 46 47 47 .. c:type:: v4l2_sliced_vbi_cap 48 48 ··· 118 120 119 121 See also :ref:`vbi-525` and :ref:`vbi-625`. 120 122 121 - 122 123 .. raw:: latex 123 124 124 125 \scriptsize ··· 179 182 .. raw:: latex 180 183 181 184 \normalsize 182 - 183 185 184 186 Return Value 185 187 ============
+13 -11
Documentation/userspace-api/media/v4l/vidioc-g-std.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_STD: 4 5 ··· 12 11 13 12 VIDIOC_G_STD - VIDIOC_S_STD - VIDIOC_SUBDEV_G_STD - VIDIOC_SUBDEV_S_STD - Query or select the video standard of the current input 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_STD, v4l2_std_id *argp ) 20 - :name: VIDIOC_G_STD 17 + .. c:macro:: VIDIOC_G_STD 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_STD, const v4l2_std_id *argp ) 23 - :name: VIDIOC_S_STD 19 + ``int ioctl(int fd, VIDIOC_G_STD, v4l2_std_id *argp)`` 24 20 25 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_STD, v4l2_std_id *argp ) 26 - :name: VIDIOC_SUBDEV_G_STD 21 + .. c:macro:: VIDIOC_S_STD 27 22 28 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_STD, const v4l2_std_id *argp ) 29 - :name: VIDIOC_SUBDEV_S_STD 23 + ``int ioctl(int fd, VIDIOC_S_STD, const v4l2_std_id *argp)`` 30 24 25 + .. c:macro:: VIDIOC_SUBDEV_G_STD 26 + 27 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_STD, v4l2_std_id *argp)`` 28 + 29 + .. c:macro:: VIDIOC_SUBDEV_S_STD 30 + 31 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_STD, const v4l2_std_id *argp)`` 31 32 32 33 Arguments 33 34 ========= 34 35 35 36 ``fd`` 36 - File descriptor returned by :ref:`open() <func-open>`. 37 + File descriptor returned by :c:func:`open()`. 37 38 38 39 ``argp`` 39 40 Pointer to :c:type:`v4l2_std_id`. 40 - 41 41 42 42 Description 43 43 ===========
+7 -12
Documentation/userspace-api/media/v4l/vidioc-g-tuner.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_G_TUNER: 4 5 ··· 12 11 13 12 VIDIOC_G_TUNER - VIDIOC_S_TUNER - Get or set tuner attributes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp ) 20 - :name: VIDIOC_G_TUNER 17 + .. c:macro:: VIDIOC_G_TUNER 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp ) 23 - :name: VIDIOC_S_TUNER 19 + ``int ioctl(int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp)`` 24 20 21 + .. c:macro:: VIDIOC_S_TUNER 22 + 23 + ``int ioctl(int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_tuner`. 34 - 35 33 36 34 Description 37 35 =========== ··· 58 58 59 59 To change the radio frequency the 60 60 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. 61 - 62 61 63 62 .. tabularcolumns:: |p{1.3cm}|p{3.0cm}|p{6.6cm}|p{6.6cm}| 64 63 ··· 182 183 Drivers and applications must set the array to zero. 183 184 184 185 185 - 186 186 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 187 187 188 188 .. c:type:: v4l2_tuner_type ··· 204 206 * - ``V4L2_TUNER_RF`` 205 207 - 5 206 208 - Tuner controls the RF part of a Software Digital Radio (SDR) 207 - 208 209 209 210 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 210 211 ··· 296 299 instead of 62.5 kHz. 297 300 298 301 299 - 300 302 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 301 303 302 304 .. _tuner-rxsubchans: ··· 332 336 * - ``V4L2_TUNER_SUB_RDS`` 333 337 - 0x0010 334 338 - The tuner receives an RDS channel. 335 - 336 339 337 340 338 341 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
+4 -6
Documentation/userspace-api/media/v4l/vidioc-log-status.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_LOG_STATUS: 4 5 ··· 12 11 13 12 VIDIOC_LOG_STATUS - Log driver status information 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_LOG_STATUS) 20 - :name: VIDIOC_LOG_STATUS 17 + .. c:macro:: VIDIOC_LOG_STATUS 21 18 19 + ``int ioctl(int fd, VIDIOC_LOG_STATUS)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 28 - 25 + File descriptor returned by :c:func:`open()`. 29 26 30 27 Description 31 28 =========== ··· 38 39 39 40 This ioctl is optional and not all drivers support it. It was introduced 40 41 in Linux 2.6.15. 41 - 42 42 43 43 Return Value 44 44 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-overlay.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_OVERLAY: 4 5 ··· 12 11 13 12 VIDIOC_OVERLAY - Start or stop video overlay 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_OVERLAY, const int *argp ) 20 - :name: VIDIOC_OVERLAY 17 + .. c:macro:: VIDIOC_OVERLAY 21 18 19 + ``int ioctl(int fd, VIDIOC_OVERLAY, const int *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to an integer. 31 - 32 29 33 30 Description 34 31 =========== ··· 39 40 Drivers do not support :ref:`VIDIOC_STREAMON` or 40 41 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` with 41 42 ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. 42 - 43 43 44 44 Return Value 45 45 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-prepare-buf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_PREPARE_BUF: 4 5 ··· 12 11 13 12 VIDIOC_PREPARE_BUF - Prepare a buffer for I/O 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_PREPARE_BUF, struct v4l2_buffer *argp ) 20 - :name: VIDIOC_PREPARE_BUF 17 + .. c:macro:: VIDIOC_PREPARE_BUF 21 18 19 + ``int ioctl(int fd, VIDIOC_PREPARE_BUF, struct v4l2_buffer *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_buffer`. 31 - 32 29 33 30 Description 34 31 =========== ··· 39 40 40 41 The struct :c:type:`v4l2_buffer` structure is specified in 41 42 :ref:`buffer`. 42 - 43 43 44 44 Return Value 45 45 ============
+8 -9
Documentation/userspace-api/media/v4l/vidioc-qbuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QBUF: 4 5 ··· 12 11 13 12 VIDIOC_QBUF - VIDIOC_DQBUF - Exchange a buffer with the driver 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QBUF, struct v4l2_buffer *argp ) 20 - :name: VIDIOC_QBUF 17 + .. c:macro:: VIDIOC_QBUF 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_DQBUF, struct v4l2_buffer *argp ) 23 - :name: VIDIOC_DQBUF 19 + ``int ioctl(int fd, VIDIOC_QBUF, struct v4l2_buffer *argp)`` 24 20 21 + .. c:macro:: VIDIOC_DQBUF 22 + 23 + ``int ioctl(int fd, VIDIOC_DQBUF, struct v4l2_buffer *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_buffer`. 34 - 35 33 36 34 Description 37 35 =========== ··· 142 142 143 143 By default ``VIDIOC_DQBUF`` blocks when no buffer is in the outgoing 144 144 queue. When the ``O_NONBLOCK`` flag was given to the 145 - :ref:`open() <func-open>` function, ``VIDIOC_DQBUF`` returns 145 + :c:func:`open()` function, ``VIDIOC_DQBUF`` returns 146 146 immediately with an ``EAGAIN`` error code when no buffer is available. 147 147 148 148 The struct :c:type:`v4l2_buffer` structure is specified in 149 149 :ref:`buffer`. 150 - 151 150 152 151 Return Value 153 152 ============
+7 -8
Documentation/userspace-api/media/v4l/vidioc-query-dv-timings.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERY_DV_TIMINGS: 4 5 ··· 12 11 13 12 VIDIOC_QUERY_DV_TIMINGS - VIDIOC_SUBDEV_QUERY_DV_TIMINGS - Sense the DV preset received by the current input 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp ) 20 - :name: VIDIOC_QUERY_DV_TIMINGS 17 + .. c:macro:: VIDIOC_QUERY_DV_TIMINGS 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp ) 23 - :name: VIDIOC_SUBDEV_QUERY_DV_TIMINGS 19 + ``int ioctl(int fd, VIDIOC_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_QUERY_DV_TIMINGS 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_dv_timings`. 34 - 35 33 36 34 Description 37 35 =========== ··· 64 64 :ref:`VIDIOC_DV_TIMINGS_CAP` to compare the 65 65 found timings with the hardware's capabilities in order to give more 66 66 precise feedback to the user. 67 - 68 67 69 68 Return Value 70 69 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-querybuf.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERYBUF: 4 5 ··· 12 11 13 12 VIDIOC_QUERYBUF - Query the status of a buffer 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QUERYBUF, struct v4l2_buffer *argp ) 20 - :name: VIDIOC_QUERYBUF 17 + .. c:macro:: VIDIOC_QUERYBUF 21 18 19 + ``int ioctl(int fd, VIDIOC_QUERYBUF, struct v4l2_buffer *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_buffer`. 31 - 32 29 33 30 Description 34 31 =========== ··· 65 66 66 67 The struct :c:type:`v4l2_buffer` structure is specified in 67 68 :ref:`buffer`. 68 - 69 69 70 70 Return Value 71 71 ============
+6 -10
Documentation/userspace-api/media/v4l/vidioc-querycap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERYCAP: 4 5 ··· 12 11 13 12 VIDIOC_QUERYCAP - Query device capabilities 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QUERYCAP, struct v4l2_capability *argp ) 20 - :name: VIDIOC_QUERYCAP 17 + .. c:macro:: VIDIOC_QUERYCAP 21 18 19 + ``int ioctl(int fd, VIDIOC_QUERYCAP, struct v4l2_capability *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_capability`. 31 - 32 29 33 30 Description 34 31 =========== ··· 37 38 pointer to a struct :c:type:`v4l2_capability` which is 38 39 filled by the driver. When the driver is not compatible with this 39 40 specification the ioctl returns an ``EINVAL`` error code. 40 - 41 41 42 42 .. tabularcolumns:: |p{1.5cm}|p{2.5cm}|p{13cm}| 43 43 ··· 128 130 - ``reserved``\ [3] 129 131 - Reserved for future extensions. Drivers must set this array to 130 132 zero. 131 - 132 133 133 134 134 135 .. tabularcolumns:: |p{6.1cm}|p{2.2cm}|p{8.7cm}| ··· 240 243 - The device supports the :ref:`metadata` capture interface. 241 244 * - ``V4L2_CAP_READWRITE`` 242 245 - 0x01000000 243 - - The device supports the :ref:`read() <rw>` and/or 244 - :ref:`write() <rw>` I/O methods. 246 + - The device supports the :c:func:`read()` and/or 247 + :c:func:`write()` I/O methods. 245 248 * - ``V4L2_CAP_ASYNCIO`` 246 249 - 0x02000000 247 250 - The device supports the :ref:`asynchronous <async>` I/O methods. ··· 265 268 - The driver fills the ``device_caps`` field. This capability can 266 269 only appear in the ``capabilities`` field and never in the 267 270 ``device_caps`` field. 268 - 269 271 270 272 Return Value 271 273 ============
+8 -14
Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERYCTRL: 4 5 ··· 12 11 13 12 VIDIOC_QUERYCTRL - VIDIOC_QUERY_EXT_CTRL - VIDIOC_QUERYMENU - Enumerate controls and menu control items 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, int VIDIOC_QUERYCTRL, struct v4l2_queryctrl *argp ) 20 - :name: VIDIOC_QUERYCTRL 17 + ``int ioctl(int fd, int VIDIOC_QUERYCTRL, struct v4l2_queryctrl *argp)`` 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_QUERY_EXT_CTRL, struct v4l2_query_ext_ctrl *argp ) 23 - :name: VIDIOC_QUERY_EXT_CTRL 19 + .. c:macro:: VIDIOC_QUERY_EXT_CTRL 24 20 25 - .. c:function:: int ioctl( int fd, VIDIOC_QUERYMENU, struct v4l2_querymenu *argp ) 26 - :name: VIDIOC_QUERYMENU 21 + ``int ioctl(int fd, VIDIOC_QUERY_EXT_CTRL, struct v4l2_query_ext_ctrl *argp)`` 27 22 23 + .. c:macro:: VIDIOC_QUERYMENU 24 + 25 + ``int ioctl(int fd, VIDIOC_QUERYMENU, struct v4l2_querymenu *argp)`` 28 26 29 27 Arguments 30 28 ========= 31 29 32 30 ``fd`` 33 - File descriptor returned by :ref:`open() <func-open>`. 31 + File descriptor returned by :c:func:`open()`. 34 32 35 33 ``argp`` 36 34 Pointer to struct :c:type:`v4l2_queryctrl`, :c:type:`v4l2_query_ext_ctrl` 37 35 or :c:type:`v4l2_querymenu` (depending on the ioctl). 38 - 39 36 40 37 Description 41 38 =========== ··· 93 94 this driver. Also note that the ``minimum`` value is not necessarily 0. 94 95 95 96 See also the examples in :ref:`control`. 96 - 97 97 98 98 .. tabularcolumns:: |p{1.2cm}|p{3.6cm}|p{12.7cm}| 99 99 ··· 170 172 - ``reserved``\ [2] 171 173 - Reserved for future extensions. Drivers must set the array to 172 174 zero. 173 - 174 175 175 176 176 177 .. tabularcolumns:: |p{1.2cm}|p{5.0cm}|p{11.3cm}| ··· 272 275 the array to zero. 273 276 274 277 275 - 276 278 .. tabularcolumns:: |p{1.2cm}|p{1.0cm}|p{1.7cm}|p{13.0cm}| 277 279 278 280 .. _v4l2-querymenu: ··· 305 309 - ``reserved`` 306 310 - Reserved for future extensions. Drivers must set the array to 307 311 zero. 308 - 309 312 310 313 311 314 .. tabularcolumns:: |p{5.8cm}|p{1.4cm}|p{1.0cm}|p{1.4cm}|p{6.9cm}| ··· 576 581 ``V4L2_CTRL_FLAG_GRABBED`` flag when buffers are allocated or 577 582 streaming is in progress since most drivers do not support changing 578 583 the format in that case. 579 - 580 584 581 585 Return Value 582 586 ============
+7 -8
Documentation/userspace-api/media/v4l/vidioc-querystd.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_QUERYSTD: 4 5 ··· 12 11 13 12 VIDIOC_QUERYSTD - VIDIOC_SUBDEV_QUERYSTD - Sense the video standard received by the current input 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_QUERYSTD, v4l2_std_id *argp ) 20 - :name: VIDIOC_QUERYSTD 17 + .. c:macro:: VIDIOC_QUERYSTD 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERYSTD, v4l2_std_id *argp ) 23 - :name: VIDIOC_SUBDEV_QUERYSTD 19 + ``int ioctl(int fd, VIDIOC_QUERYSTD, v4l2_std_id *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_QUERYSTD 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_QUERYSTD, v4l2_std_id *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to :c:type:`v4l2_std_id`. 34 - 35 33 36 34 Description 37 35 =========== ··· 57 57 will have to call :ref:`VIDIOC_QUERYSTD`, and if the detected video 58 58 standard is valid they will have to stop streaming, set the new 59 59 standard, allocate new buffers and start streaming again. 60 - 61 60 62 61 Return Value 63 62 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-reqbufs.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_REQBUFS: 4 5 ··· 12 11 13 12 VIDIOC_REQBUFS - Initiate Memory Mapping, User Pointer I/O or DMA buffer I/O 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_REQBUFS, struct v4l2_requestbuffers *argp ) 20 - :name: VIDIOC_REQBUFS 17 + .. c:macro:: VIDIOC_REQBUFS 21 18 19 + ``int ioctl(int fd, VIDIOC_REQBUFS, struct v4l2_requestbuffers *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_requestbuffers`. ··· 68 68 fds are closed. A ``count`` value of zero frees or orphans all buffers, after 69 69 aborting or finishing any DMA in progress, an implicit 70 70 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`. 71 - 72 71 73 72 .. c:type:: v4l2_requestbuffers 74 73 ··· 156 157 queue is used for :ref:`memory mapping <mmap>` streaming I/O. See 157 158 :ref:`V4L2_BUF_FLAG_NO_CACHE_INVALIDATE <V4L2-BUF-FLAG-NO-CACHE-INVALIDATE>` and 158 159 :ref:`V4L2_BUF_FLAG_NO_CACHE_CLEAN <V4L2-BUF-FLAG-NO-CACHE-CLEAN>`. 159 - 160 160 161 161 Return Value 162 162 ============
+4 -7
Documentation/userspace-api/media/v4l/vidioc-s-hw-freq-seek.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_S_HW_FREQ_SEEK: 4 5 ··· 12 11 13 12 VIDIOC_S_HW_FREQ_SEEK - Perform a hardware frequency seek 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_S_HW_FREQ_SEEK, struct v4l2_hw_freq_seek *argp ) 20 - :name: VIDIOC_S_HW_FREQ_SEEK 17 + .. c:macro:: VIDIOC_S_HW_FREQ_SEEK 21 18 19 + ``int ioctl(int fd, VIDIOC_S_HW_FREQ_SEEK, struct v4l2_hw_freq_seek *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_hw_freq_seek`. 31 - 32 29 33 30 Description 34 31 =========== ··· 57 58 58 59 If this ioctl is called from a non-blocking filehandle, then ``EAGAIN`` 59 60 error code is returned and no seek takes place. 60 - 61 61 62 62 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 63 63 ··· 113 115 - ``reserved``\ [5] 114 116 - Reserved for future extensions. Applications must set the array to 115 117 zero. 116 - 117 118 118 119 Return Value 119 120 ============
+7 -7
Documentation/userspace-api/media/v4l/vidioc-streamon.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_STREAMON: 4 5 ··· 12 11 13 12 VIDIOC_STREAMON - VIDIOC_STREAMOFF - Start or stop streaming I/O 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_STREAMON, const int *argp ) 20 - :name: VIDIOC_STREAMON 17 + .. c:macro:: VIDIOC_STREAMON 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_STREAMOFF, const int *argp ) 23 - :name: VIDIOC_STREAMOFF 19 + ``int ioctl(int fd, VIDIOC_STREAMON, const int *argp)`` 24 20 21 + .. c:macro:: VIDIOC_STREAMOFF 22 + 23 + ``int ioctl(int fd, VIDIOC_STREAMOFF, const int *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to an integer. ··· 84 83 or after the ``VIDIOC_STREAMON`` or ``VIDIOC_STREAMOFF`` calls, there is 85 84 no notion of starting or stopping "now". Buffer timestamps can be used 86 85 to synchronize with other events. 87 - 88 86 89 87 Return Value 90 88 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-subdev-enum-frame-interval.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL - Enumerate frame intervals 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, struct v4l2_subdev_frame_interval_enum * argp ) 20 - :name: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL 17 + .. c:macro:: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL 21 18 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL, struct v4l2_subdev_frame_interval_enum * argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_subdev_frame_interval_enum`. 31 - 32 29 33 30 Description 34 31 =========== ··· 95 96 - ``reserved``\ [8] 96 97 - Reserved for future extensions. Applications and drivers must set 97 98 the array to zero. 98 - 99 99 100 100 Return Value 101 101 ============
+4 -7
Documentation/userspace-api/media/v4l/vidioc-subdev-enum-frame-size.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_ENUM_FRAME_SIZE: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_ENUM_FRAME_SIZE - Enumerate media bus frame sizes 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_FRAME_SIZE, struct v4l2_subdev_frame_size_enum * argp ) 20 - :name: VIDIOC_SUBDEV_ENUM_FRAME_SIZE 17 + .. c:macro:: VIDIOC_SUBDEV_ENUM_FRAME_SIZE 21 18 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_FRAME_SIZE, struct v4l2_subdev_frame_size_enum * argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_subdev_frame_size_enum`. 31 - 32 29 33 30 Description 34 31 =========== ··· 60 61 current values of V4L2 controls. See 61 62 :ref:`VIDIOC_SUBDEV_G_FMT` for more 62 63 information about try formats. 63 - 64 64 65 65 .. c:type:: v4l2_subdev_frame_size_enum 66 66 ··· 100 102 - ``reserved``\ [8] 101 103 - Reserved for future extensions. Applications and drivers must set 102 104 the array to zero. 103 - 104 105 105 106 Return Value 106 107 ============
+4 -6
Documentation/userspace-api/media/v4l/vidioc-subdev-enum-mbus-code.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_ENUM_MBUS_CODE: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_ENUM_MBUS_CODE - Enumerate media bus formats 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_MBUS_CODE, struct v4l2_subdev_mbus_code_enum * argp ) 20 - :name: VIDIOC_SUBDEV_ENUM_MBUS_CODE 17 + .. c:macro:: VIDIOC_SUBDEV_ENUM_MBUS_CODE 21 18 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_MBUS_CODE, struct v4l2_subdev_mbus_code_enum * argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_subdev_mbus_code_enum`. 31 - 32 29 33 30 Description 34 31 =========== ··· 45 46 other pads of the sub-device, as well as on the current active links. 46 47 See :ref:`VIDIOC_SUBDEV_G_FMT` for more 47 48 information about the try formats. 48 - 49 49 50 50 .. c:type:: v4l2_subdev_mbus_code_enum 51 51
+7 -9
Documentation/userspace-api/media/v4l/vidioc-subdev-g-crop.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_G_CROP: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_G_CROP - VIDIOC_SUBDEV_S_CROP - Get or set the crop rectangle on a subdev pad 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_CROP, struct v4l2_subdev_crop *argp ) 20 - :name: VIDIOC_SUBDEV_G_CROP 17 + .. c:macro:: VIDIOC_SUBDEV_G_CROP 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_CROP, const struct v4l2_subdev_crop *argp ) 23 - :name: VIDIOC_SUBDEV_S_CROP 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_CROP, struct v4l2_subdev_crop *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_S_CROP 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_CROP, const struct v4l2_subdev_crop *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_subdev_crop`. 34 - 35 33 36 34 Description 37 35 =========== ··· 76 76 modify the rectangle to match what the hardware can provide. The 77 77 modified format should be as close as possible to the original request. 78 78 79 - 80 79 .. c:type:: v4l2_subdev_crop 81 80 82 81 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 99 100 - ``reserved``\ [8] 100 101 - Reserved for future extensions. Applications and drivers must set 101 102 the array to zero. 102 - 103 103 104 104 Return Value 105 105 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-subdev-g-fmt.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_G_FMT: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_G_FMT - VIDIOC_SUBDEV_S_FMT - Get or set the data format on a subdev pad 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_FMT, struct v4l2_subdev_format *argp ) 20 - :name: VIDIOC_SUBDEV_G_FMT 17 + .. c:macro:: VIDIOC_SUBDEV_G_FMT 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_FMT, struct v4l2_subdev_format *argp ) 23 - :name: VIDIOC_SUBDEV_S_FMT 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_FMT, struct v4l2_subdev_format *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_S_FMT 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_FMT, struct v4l2_subdev_format *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_subdev_format`. 34 - 35 33 36 34 Description 37 35 =========== ··· 81 81 format to match what the hardware can provide. The modified format 82 82 should be as close as possible to the original request. 83 83 84 - 85 84 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| 86 85 87 86 .. c:type:: v4l2_subdev_format ··· 107 108 the array to zero. 108 109 109 110 110 - 111 111 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| 112 112 113 113 .. _v4l2-subdev-format-whence: ··· 122 124 * - V4L2_SUBDEV_FORMAT_ACTIVE 123 125 - 1 124 126 - Active formats, applied to the hardware. 125 - 126 127 127 128 Return Value 128 129 ============
+7 -9
Documentation/userspace-api/media/v4l/vidioc-subdev-g-frame-interval.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_G_FRAME_INTERVAL: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_G_FRAME_INTERVAL - VIDIOC_SUBDEV_S_FRAME_INTERVAL - Get or set the frame interval on a subdev pad 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp ) 20 - :name: VIDIOC_SUBDEV_G_FRAME_INTERVAL 17 + .. c:macro:: VIDIOC_SUBDEV_G_FRAME_INTERVAL 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp ) 23 - :name: VIDIOC_SUBDEV_S_FRAME_INTERVAL 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_S_FRAME_INTERVAL 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_FRAME_INTERVAL, struct v4l2_subdev_frame_interval *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_subdev_frame_interval`. 34 - 35 33 36 34 Description 37 35 =========== ··· 74 74 on a single pad only. Their behaviour when supported on multiple pads of 75 75 the same sub-device is not defined. 76 76 77 - 78 77 .. c:type:: v4l2_subdev_frame_interval 79 78 80 79 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| ··· 93 94 - ``reserved``\ [9] 94 95 - Reserved for future extensions. Applications and drivers must set 95 96 the array to zero. 96 - 97 97 98 98 Return Value 99 99 ============
+7 -10
Documentation/userspace-api/media/v4l/vidioc-subdev-g-selection.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_G_SELECTION: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_G_SELECTION - VIDIOC_SUBDEV_S_SELECTION - Get or set selection rectangles on a subdev pad 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_SELECTION, struct v4l2_subdev_selection *argp ) 20 - :name: VIDIOC_SUBDEV_G_SELECTION 17 + .. c:macro:: VIDIOC_SUBDEV_G_SELECTION 21 18 22 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_SELECTION, struct v4l2_subdev_selection *argp ) 23 - :name: VIDIOC_SUBDEV_S_SELECTION 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_G_SELECTION, struct v4l2_subdev_selection *argp)`` 24 20 21 + .. c:macro:: VIDIOC_SUBDEV_S_SELECTION 22 + 23 + ``int ioctl(int fd, VIDIOC_SUBDEV_S_SELECTION, struct v4l2_subdev_selection *argp)`` 25 24 26 25 Arguments 27 26 ========= 28 27 29 28 ``fd`` 30 - File descriptor returned by :ref:`open() <func-open>`. 29 + File descriptor returned by :c:func:`open()`. 31 30 32 31 ``argp`` 33 32 Pointer to struct :c:type:`v4l2_subdev_selection`. 34 - 35 33 36 34 Description 37 35 =========== ··· 58 58 targets are the targets which configure the hardware. The BOUNDS target 59 59 will return a rectangle that contain all possible actual rectangles. 60 60 61 - 62 61 Discovering supported features 63 62 ------------------------------ 64 63 ··· 67 68 68 69 Selection targets and flags are documented in 69 70 :ref:`v4l2-selections-common`. 70 - 71 71 72 72 .. c:type:: v4l2_subdev_selection 73 73 ··· 97 99 - ``reserved``\ [8] 98 100 - Reserved for future extensions. Applications and drivers must set 99 101 the array to zero. 100 - 101 102 102 103 Return Value 103 104 ============
+4 -5
Documentation/userspace-api/media/v4l/vidioc-subdev-querycap.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBDEV_QUERYCAP: 4 5 ··· 12 11 13 12 VIDIOC_SUBDEV_QUERYCAP - Query sub-device capabilities 14 13 15 - 16 14 Synopsis 17 15 ======== 18 16 19 - .. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERYCAP, struct v4l2_subdev_capability *argp ) 20 - :name: VIDIOC_SUBDEV_QUERYCAP 17 + .. c:macro:: VIDIOC_SUBDEV_QUERYCAP 21 18 19 + ``int ioctl(int fd, VIDIOC_SUBDEV_QUERYCAP, struct v4l2_subdev_capability *argp)`` 22 20 23 21 Arguments 24 22 ========= 25 23 26 24 ``fd`` 27 - File descriptor returned by :ref:`open() <func-open>`. 25 + File descriptor returned by :c:func:`open()`. 28 26 29 27 ``argp`` 30 28 Pointer to struct :c:type:`v4l2_subdev_capability`. 31 - 32 29 33 30 Description 34 31 ===========
+7 -10
Documentation/userspace-api/media/v4l/vidioc-subscribe-event.rst
··· 1 1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2 + .. c:namespace:: V4L 2 3 3 4 .. _VIDIOC_SUBSCRIBE_EVENT: 4 5 .. _VIDIOC_UNSUBSCRIBE_EVENT: ··· 13 12 14 13 VIDIOC_SUBSCRIBE_EVENT - VIDIOC_UNSUBSCRIBE_EVENT - Subscribe or unsubscribe event 15 14 16 - 17 15 Synopsis 18 16 ======== 19 17 20 - .. c:function:: int ioctl( int fd, VIDIOC_SUBSCRIBE_EVENT, struct v4l2_event_subscription *argp ) 21 - :name: VIDIOC_SUBSCRIBE_EVENT 18 + .. c:macro:: VIDIOC_SUBSCRIBE_EVENT 22 19 23 - .. c:function:: int ioctl( int fd, VIDIOC_UNSUBSCRIBE_EVENT, struct v4l2_event_subscription *argp ) 24 - :name: VIDIOC_UNSUBSCRIBE_EVENT 20 + ``int ioctl(int fd, VIDIOC_SUBSCRIBE_EVENT, struct v4l2_event_subscription *argp)`` 25 21 22 + .. c:macro:: VIDIOC_UNSUBSCRIBE_EVENT 23 + 24 + ``int ioctl(int fd, VIDIOC_UNSUBSCRIBE_EVENT, struct v4l2_event_subscription *argp)`` 26 25 27 26 Arguments 28 27 ========= 29 28 30 29 ``fd`` 31 - File descriptor returned by :ref:`open() <func-open>`. 30 + File descriptor returned by :c:func:`open()`. 32 31 33 32 ``argp`` 34 33 Pointer to struct :c:type:`v4l2_event_subscription`. 35 - 36 34 37 35 Description 38 36 =========== 39 37 40 38 Subscribe or unsubscribe V4L2 event. Subscribed events are dequeued by 41 39 using the :ref:`VIDIOC_DQEVENT` ioctl. 42 - 43 40 44 41 .. tabularcolumns:: |p{4.6cm}|p{4.4cm}|p{8.7cm}| 45 42 ··· 69 70 - ``reserved``\ [5] 70 71 - Reserved for future extensions. Drivers and applications must set 71 72 the array to zero. 72 - 73 73 74 74 75 75 .. tabularcolumns:: |p{6.8cm}|p{2.2cm}|p{8.5cm}| ··· 104 106 105 107 Think carefully when you set this flag so you won't get into 106 108 situations like that. 107 - 108 109 109 110 Return Value 110 111 ============
+1
Documentation/virt/uml/user_mode_linux_howto_v2.rst
··· 679 679 680 680 We can now run UML. 681 681 :: 682 + 682 683 # linux mem=2048M umid=TEST \ 683 684 ubd0=Filesystem.img \ 684 685 vec0:transport=tap,ifname=tap0,depth=128,gro=1 \
+1 -1
Documentation/vm/hmm.rst
··· 360 360 system memory page, locks the page with ``lock_page()``, and fills in the 361 361 ``dst`` array entry with:: 362 362 363 - dst[i] = migrate_pfn(page_to_pfn(dpage)) | MIGRATE_PFN_LOCKED; 363 + dst[i] = migrate_pfn(page_to_pfn(dpage)) | MIGRATE_PFN_LOCKED; 364 364 365 365 Now that the driver knows that this page is being migrated, it can 366 366 invalidate device private MMU mappings and copy device private memory
+1 -1
Documentation/vm/ksm.rst
··· 26 26 27 27 If a KSM page is shared between less than ``max_page_sharing`` VMAs, 28 28 the node of the stable tree that represents such KSM page points to a 29 - list of :c:type:`struct rmap_item` and the ``page->mapping`` of the 29 + list of struct rmap_item and the ``page->mapping`` of the 30 30 KSM page points to the stable tree node. 31 31 32 32 When the sharing passes this threshold, KSM adds a second dimension to
+3 -3
Documentation/vm/memory-model.rst
··· 24 24 although it is still in use by several architectures. 25 25 26 26 All the memory models track the status of physical page frames using 27 - :c:type:`struct page` arranged in one or more arrays. 27 + struct page arranged in one or more arrays. 28 28 29 29 Regardless of the selected memory model, there exists one-to-one 30 30 mapping between the physical page frame number (PFN) and the ··· 111 111 the memory map for larger systems. 112 112 113 113 The SPARSEMEM model presents the physical memory as a collection of 114 - sections. A section is represented with :c:type:`struct mem_section` 114 + sections. A section is represented with struct mem_section 115 115 that contains `section_mem_map` that is, logically, a pointer to an 116 116 array of struct pages. However, it is stored with some other magic 117 117 that aids the sections management. The section size and maximal number ··· 172 172 173 173 The virtually mapped memory map allows storing `struct page` objects 174 174 for persistent memory devices in pre-allocated storage on those 175 - devices. This storage is represented with :c:type:`struct vmem_altmap` 175 + devices. This storage is represented with struct vmem_altmap 176 176 that is eventually passed to vmemmap_populate() through a long chain 177 177 of function calls. The vmemmap_populate() implementation may use the 178 178 `vmem_altmap` along with :c:func:`vmemmap_alloc_block_buf` helper to
+8 -8
MAINTAINERS
··· 1500 1500 S: Maintained 1501 1501 F: Documentation/devicetree/bindings/arm/actions.yaml 1502 1502 F: Documentation/devicetree/bindings/clock/actions,owl-cmu.txt 1503 - F: Documentation/devicetree/bindings/dma/owl-dma.txt 1503 + F: Documentation/devicetree/bindings/dma/owl-dma.yaml 1504 1504 F: Documentation/devicetree/bindings/i2c/i2c-owl.txt 1505 1505 F: Documentation/devicetree/bindings/interrupt-controller/actions,owl-sirq.yaml 1506 1506 F: Documentation/devicetree/bindings/mmc/owl-mmc.yaml ··· 5868 5868 S: Supported 5869 5869 T: git git://linuxtv.org/pinchartl/media drm/du/next 5870 5870 F: Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt 5871 - F: Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt 5871 + F: Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml 5872 5872 F: Documentation/devicetree/bindings/display/renesas,du.txt 5873 5873 F: drivers/gpu/drm/rcar-du/ 5874 5874 F: drivers/gpu/drm/shmobile/ ··· 7000 7000 L: linux-arm-kernel@lists.infradead.org 7001 7001 S: Maintained 7002 7002 F: Documentation/admin-guide/perf/imx-ddr.rst 7003 - F: Documentation/devicetree/bindings/perf/fsl-imx-ddr.txt 7003 + F: Documentation/devicetree/bindings/perf/fsl-imx-ddr.yaml 7004 7004 F: drivers/perf/fsl_imx8_ddr_perf.c 7005 7005 7006 7006 FREESCALE IMX I2C DRIVER ··· 7008 7008 R: Pengutronix Kernel Team <kernel@pengutronix.de> 7009 7009 L: linux-i2c@vger.kernel.org 7010 7010 S: Maintained 7011 - F: Documentation/devicetree/bindings/i2c/i2c-imx.txt 7011 + F: Documentation/devicetree/bindings/i2c/i2c-imx.yaml 7012 7012 F: drivers/i2c/busses/i2c-imx.c 7013 7013 7014 7014 FREESCALE IMX LPI2C DRIVER ··· 7016 7016 L: linux-i2c@vger.kernel.org 7017 7017 L: linux-imx@nxp.com 7018 7018 S: Maintained 7019 - F: Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.txt 7019 + F: Documentation/devicetree/bindings/i2c/i2c-imx-lpi2c.yaml 7020 7020 F: drivers/i2c/busses/i2c-imx-lpi2c.c 7021 7021 7022 7022 FREESCALE QORIQ DPAA ETHERNET DRIVER ··· 11677 11677 M: Paul Burton <paulburton@kernel.org> 11678 11678 L: linux-mips@vger.kernel.org 11679 11679 S: Supported 11680 - F: Documentation/devicetree/bindings/power/mti,mips-cpc.txt 11680 + F: Documentation/devicetree/bindings/power/mti,mips-cpc.yaml 11681 11681 F: arch/mips/generic/ 11682 11682 F: arch/mips/tools/generic-board-config.sh 11683 11683 ··· 12568 12568 M: Fabio Estevam <festevam@gmail.com> 12569 12569 L: alsa-devel@alsa-project.org (moderated for non-subscribers) 12570 12570 S: Maintained 12571 - F: Documentation/devicetree/bindings/sound/sgtl5000.txt 12571 + F: Documentation/devicetree/bindings/sound/sgtl5000.yaml 12572 12572 F: sound/soc/codecs/sgtl5000* 12573 12573 12574 12574 NXP SJA1105 ETHERNET SWITCH DRIVER ··· 16868 16868 M: Viresh Kumar <vireshk@kernel.org> 16869 16869 R: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 16870 16870 S: Maintained 16871 - F: Documentation/devicetree/bindings/dma/snps-dma.txt 16871 + F: Documentation/devicetree/bindings/dma/snps,dma-spear1340.yaml 16872 16872 F: drivers/dma/dw/ 16873 16873 F: include/dt-bindings/dma/dw-dmac.h 16874 16874 F: include/linux/dma/dw.h
+2 -2
block/bio.c
··· 327 327 /** 328 328 * bio_chain - chain bio completions 329 329 * @bio: the target bio 330 - * @parent: the @bio's parent bio 330 + * @parent: the parent bio of @bio 331 331 * 332 332 * The caller won't have a bi_end_io called when @bio completes - instead, 333 333 * @parent's bi_end_io won't be called until both @parent and @bio have ··· 1093 1093 * released. 1094 1094 * 1095 1095 * The function tries, but does not guarantee, to pin as many pages as 1096 - * fit into the bio, or are requested in *iter, whatever is smaller. If 1096 + * fit into the bio, or are requested in @iter, whatever is smaller. If 1097 1097 * MM encounters an error pinning the requested pages, it stops. Error 1098 1098 * is returned only if 0 pages could be pinned. 1099 1099 */
+5 -2
drivers/base/core.c
··· 4212 4212 * -EPROBE_DEFER and propagate error upwards. 4213 4213 * In case of -EPROBE_DEFER it sets also defer probe reason, which can be 4214 4214 * checked later by reading devices_deferred debugfs attribute. 4215 - * It replaces code sequence: 4215 + * It replaces code sequence:: 4216 + * 4216 4217 * if (err != -EPROBE_DEFER) 4217 4218 * dev_err(dev, ...); 4218 4219 * else 4219 4220 * dev_dbg(dev, ...); 4220 4221 * return err; 4221 - * with 4222 + * 4223 + * with:: 4224 + * 4222 4225 * return dev_err_probe(dev, err, ...); 4223 4226 * 4224 4227 * Returns @err.
+1 -1
drivers/net/appletalk/Kconfig
··· 48 48 If you are in doubt, this card is the one with the 65C02 chip on it. 49 49 You also need version 1.3.3 or later of the netatalk package. 50 50 This driver is experimental, which means that it may not work. 51 - See the file <file:Documentation/networking/ltpc.rst>. 51 + See the file <file:Documentation/networking/device_drivers/appletalk/ltpc.rst>. 52 52 53 53 config COPS 54 54 tristate "COPS LocalTalk PC support"
+1 -1
drivers/net/hamradio/scc.c
··· 7 7 * ------------------ 8 8 * 9 9 * You can find a subset of the documentation in 10 - * Documentation/networking/device_drivers/wan/z8530drv.rst. 10 + * Documentation/networking/device_drivers/hamradio/z8530drv.rst. 11 11 */ 12 12 13 13 /*
+9 -5
include/kunit/test.h
··· 25 25 /** 26 26 * struct kunit_resource - represents a *test managed resource* 27 27 * @data: for the user to store arbitrary data. 28 + * @name: optional name 28 29 * @free: a user supplied function to free the resource. Populated by 29 30 * kunit_resource_alloc(). 30 31 * ··· 81 80 */ 82 81 struct kunit_resource { 83 82 void *data; 84 - const char *name; /* optional name */ 83 + const char *name; 84 + kunit_resource_free_t free; 85 85 86 86 /* private: internal use only. */ 87 - kunit_resource_free_t free; 88 87 struct kref refcount; 89 88 struct list_head node; 90 89 }; ··· 349 348 * none is supplied, the resource data value is simply set to @data. 350 349 * If an init function is supplied, @data is passed to it instead. 351 350 * @free: a user-supplied function to free the resource (if needed). 351 + * @res: The resource. 352 352 * @data: value to pass to init function or set in resource data field. 353 353 */ 354 354 int kunit_add_resource(struct kunit *test, ··· 363 361 * @test: The test context object. 364 362 * @init: a user-supplied function to initialize the resource data, if needed. 365 363 * @free: a user-supplied function to free the resource data, if needed. 366 - * @name_data: name and data to be set for resource. 364 + * @res: The resource. 365 + * @name: name to be set for resource. 366 + * @data: value to pass to init function or set in resource data field. 367 367 */ 368 368 int kunit_add_named_resource(struct kunit *test, 369 369 kunit_resource_init_t init, ··· 503 499 } 504 500 505 501 /** 506 - * kunit_remove_resource: remove resource from resource list associated with 507 - * test. 502 + * kunit_remove_resource() - remove resource from resource list associated with 503 + * test. 508 504 * @test: The test context object. 509 505 * @res: The resource to be removed. 510 506 *
+1 -6
include/linux/devfreq.h
··· 228 228 void devfreq_suspend(void); 229 229 void devfreq_resume(void); 230 230 231 - /** 232 - * update_devfreq() - Reevaluate the device and configure frequency 233 - * @devfreq: the devfreq device 234 - * 235 - * Note: devfreq->lock must be held 236 - */ 231 + /* update_devfreq() - Reevaluate the device and configure frequency */ 237 232 int update_devfreq(struct devfreq *devfreq); 238 233 239 234 /* Helper functions for devfreq user device driver with OPP. */
+1
include/linux/input/sparse-keymap.h
··· 20 20 * private definitions. 21 21 * @code: Device-specific data identifying the button/switch 22 22 * @keycode: KEY_* code assigned to a key/button 23 + * @sw: struct with code/value used by KE_SW and KE_VSW 23 24 * @sw.code: SW_* code assigned to a switch 24 25 * @sw.value: Value that should be sent in an input even when KE_SW 25 26 * switch is toggled. KE_VSW switches ignore this field and
+4 -4
include/linux/math64.h
··· 28 28 return dividend / divisor; 29 29 } 30 30 31 - /** 31 + /* 32 32 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder 33 33 * @dividend: signed 64bit dividend 34 34 * @divisor: signed 32bit divisor ··· 42 42 return dividend / divisor; 43 43 } 44 44 45 - /** 45 + /* 46 46 * div64_u64_rem - unsigned 64bit divide with 64bit divisor and remainder 47 47 * @dividend: unsigned 64bit dividend 48 48 * @divisor: unsigned 64bit divisor ··· 56 56 return dividend / divisor; 57 57 } 58 58 59 - /** 59 + /* 60 60 * div64_u64 - unsigned 64bit divide with 64bit divisor 61 61 * @dividend: unsigned 64bit dividend 62 62 * @divisor: unsigned 64bit divisor ··· 68 68 return dividend / divisor; 69 69 } 70 70 71 - /** 71 + /* 72 72 * div64_s64 - signed 64bit divide with 64bit divisor 73 73 * @dividend: signed 64bit dividend 74 74 * @divisor: signed 64bit divisor
+16
include/linux/usb/typec_altmode.h
··· 152 152 #define to_altmode_driver(d) container_of(d, struct typec_altmode_driver, \ 153 153 driver) 154 154 155 + /** 156 + * typec_altmode_register_driver - registers a USB Type-C alternate mode 157 + * device driver 158 + * @drv: pointer to struct typec_altmode_driver 159 + * 160 + * These drivers will be bind to the partner alternate mode devices. They will 161 + * handle all SVID specific communication. 162 + */ 155 163 #define typec_altmode_register_driver(drv) \ 156 164 __typec_altmode_register_driver(drv, THIS_MODULE) 157 165 int __typec_altmode_register_driver(struct typec_altmode_driver *drv, 158 166 struct module *module); 167 + /** 168 + * typec_altmode_unregister_driver - unregisters a USB Type-C alternate mode 169 + * device driver 170 + * @drv: pointer to struct typec_altmode_driver 171 + * 172 + * These drivers will be bind to the partner alternate mode devices. They will 173 + * handle all SVID specific communication. 174 + */ 159 175 void typec_altmode_unregister_driver(struct typec_altmode_driver *drv); 160 176 161 177 #define module_typec_altmode_driver(__typec_altmode_driver) \
+1
include/net/cfg80211.h
··· 474 474 * @n_bitrates: Number of bitrates in @bitrates 475 475 * @ht_cap: HT capabilities in this band 476 476 * @vht_cap: VHT capabilities in this band 477 + * @s1g_cap: S1G capabilities in this band 477 478 * @edmg_cap: EDMG capabilities in this band 478 479 * @s1g_cap: S1G capabilities in this band (S1B band only, of course) 479 480 * @n_iftype_data: number of iftype data entries
+6 -8
kernel/rcu/tree.c
··· 3022 3022 * @monitor_todo: Tracks whether a @monitor_work delayed work is pending 3023 3023 * @initialized: The @rcu_work fields have been initialized 3024 3024 * @count: Number of objects for which GP not started 3025 + * @bkvcache: 3026 + * A simple cache list that contains objects for reuse purpose. 3027 + * In order to save some per-cpu space the list is singular. 3028 + * Even though it is lockless an access has to be protected by the 3029 + * per-cpu lock. 3030 + * @nr_bkv_objs: number of allocated objects at @bkvcache. 3025 3031 * 3026 3032 * This is a per-CPU structure. The reason that it is not included in 3027 3033 * the rcu_data structure is to permit this code to be extracted from ··· 3043 3037 bool monitor_todo; 3044 3038 bool initialized; 3045 3039 int count; 3046 - 3047 - /* 3048 - * A simple cache list that contains objects for 3049 - * reuse purpose. In order to save some per-cpu 3050 - * space the list is singular. Even though it is 3051 - * lockless an access has to be protected by the 3052 - * per-cpu lock. 3053 - */ 3054 3040 struct llist_head bkvcache; 3055 3041 int nr_bkv_objs; 3056 3042 };
+3
kernel/workqueue.c
··· 1212 1212 * stable state - idle, on timer or on worklist. 1213 1213 * 1214 1214 * Return: 1215 + * 1216 + * ======== ================================================================ 1215 1217 * 1 if @work was pending and we successfully stole PENDING 1216 1218 * 0 if @work was idle and we claimed PENDING 1217 1219 * -EAGAIN if PENDING couldn't be grabbed at the moment, safe to busy-retry 1218 1220 * -ENOENT if someone else is canceling @work, this state may persist 1219 1221 * for arbitrarily long 1222 + * ======== ================================================================ 1220 1223 * 1221 1224 * Note: 1222 1225 * On >= 0 return, the caller owns @work's PENDING bit. To avoid getting
+1 -1
mm/ksm.c
··· 81 81 * different KSM page copy of that content 82 82 * 83 83 * Internally, the regular nodes, "dups" and "chains" are represented 84 - * using the same :c:type:`struct stable_node` structure. 84 + * using the same struct stable_node structure. 85 85 * 86 86 * In addition to the stable tree, KSM uses a second data structure called the 87 87 * unstable tree: this tree holds pointers to pages which have been found to
+4 -4
mm/memblock.c
··· 48 48 * boot regardless of the possible restrictions and memory hot(un)plug; 49 49 * the ``physmem`` type is only available on some architectures. 50 50 * 51 - * Each region is represented by :c:type:`struct memblock_region` that 51 + * Each region is represented by struct memblock_region that 52 52 * defines the region extents, its attributes and NUMA node id on NUMA 53 - * systems. Every memory type is described by the :c:type:`struct 54 - * memblock_type` which contains an array of memory regions along with 53 + * systems. Every memory type is described by the struct memblock_type 54 + * which contains an array of memory regions along with 55 55 * the allocator metadata. The "memory" and "reserved" types are nicely 56 - * wrapped with :c:type:`struct memblock`. This structure is statically 56 + * wrapped with struct memblock. This structure is statically 57 57 * initialized at build time. The region arrays are initially sized to 58 58 * %INIT_MEMBLOCK_REGIONS for "memory" and %INIT_MEMBLOCK_RESERVED_REGIONS 59 59 * for "reserved". The region array for "physmem" is initially sized to
+222 -81
scripts/kernel-doc
··· 56 56 -rst Output reStructuredText format. 57 57 -none Do not output documentation, only warnings. 58 58 59 + Output format selection modifier (affects only ReST output): 60 + 61 + -sphinx-version Use the ReST C domain dialect compatible with an 62 + specific Sphinx Version. 63 + If not specified, kernel-doc will auto-detect using 64 + the sphinx-build version found on PATH. 65 + 59 66 Output selection (mutually exclusive): 60 67 -export Only output documentation for symbols that have been 61 68 exported using EXPORT_SYMBOL() or EXPORT_SYMBOL_GPL() ··· 73 66 -function NAME Only output documentation for the given function(s) 74 67 or DOC: section title(s). All other functions and DOC: 75 68 sections are ignored. May be specified multiple times. 76 - -nofunction NAME Do NOT output documentation for the given function(s); 77 - only output documentation for the other functions and 78 - DOC: sections. May be specified multiple times. 69 + -nosymbol NAME Exclude the specified symbols from the output 70 + documentation. May be specified multiple times. 79 71 80 72 Output selection modifiers: 81 73 -no-doc-sections Do not output DOC: sections. ··· 277 271 } 278 272 279 273 my $kernelversion; 274 + my ($sphinx_major, $sphinx_minor, $sphinx_patch); 275 + 280 276 my $dohighlight = ""; 281 277 282 278 my $verbose = 0; ··· 294 286 use constant { 295 287 OUTPUT_ALL => 0, # output all symbols and doc sections 296 288 OUTPUT_INCLUDE => 1, # output only specified symbols 297 - OUTPUT_EXCLUDE => 2, # output everything except specified symbols 298 - OUTPUT_EXPORTED => 3, # output exported symbols 299 - OUTPUT_INTERNAL => 4, # output non-exported symbols 289 + OUTPUT_EXPORTED => 2, # output exported symbols 290 + OUTPUT_INTERNAL => 3, # output non-exported symbols 300 291 }; 301 292 my $output_selection = OUTPUT_ALL; 302 293 my $show_not_found = 0; # No longer used ··· 320 313 # CAVEAT EMPTOR! Some of the others I localised may not want to be, which 321 314 # could cause "use of undefined value" or other bugs. 322 315 my ($function, %function_table, %parametertypes, $declaration_purpose); 316 + my %nosymbol_table = (); 323 317 my $declaration_start_line; 324 318 my ($type, $declaration_name, $return_type); 325 319 my ($newsection, $newcontents, $prototype, $brcount, %source_map); ··· 440 432 $output_selection = OUTPUT_INCLUDE; 441 433 $function = shift @ARGV; 442 434 $function_table{$function} = 1; 443 - } elsif ($cmd eq "nofunction") { # output all except specific functions 444 - $output_selection = OUTPUT_EXCLUDE; 445 - $function = shift @ARGV; 446 - $function_table{$function} = 1; 435 + } elsif ($cmd eq "nosymbol") { # Exclude specific symbols 436 + my $symbol = shift @ARGV; 437 + $nosymbol_table{$symbol} = 1; 447 438 } elsif ($cmd eq "export") { # only exported symbols 448 439 $output_selection = OUTPUT_EXPORTED; 449 440 %function_table = (); ··· 464 457 $enable_lineno = 1; 465 458 } elsif ($cmd eq 'show-not-found') { 466 459 $show_not_found = 1; # A no-op but don't fail 460 + } elsif ($cmd eq "sphinx-version") { 461 + my $ver_string = shift @ARGV; 462 + if ($ver_string =~ m/^(\d+)(\.\d+)?(\.\d+)?/) { 463 + $sphinx_major = $1; 464 + if (defined($2)) { 465 + $sphinx_minor = substr($2,1); 466 + } else { 467 + $sphinx_minor = 0; 468 + } 469 + if (defined($3)) { 470 + $sphinx_patch = substr($3,1) 471 + } else { 472 + $sphinx_patch = 0; 473 + } 474 + } else { 475 + die "Sphinx version should either major.minor or major.minor.patch format\n"; 476 + } 467 477 } else { 468 478 # Unknown argument 469 479 usage(); ··· 488 464 } 489 465 490 466 # continue execution near EOF; 467 + 468 + # The C domain dialect changed on Sphinx 3. So, we need to check the 469 + # version in order to produce the right tags. 470 + sub findprog($) 471 + { 472 + foreach(split(/:/, $ENV{PATH})) { 473 + return "$_/$_[0]" if(-x "$_/$_[0]"); 474 + } 475 + } 476 + 477 + sub get_sphinx_version() 478 + { 479 + my $ver; 480 + 481 + my $cmd = "sphinx-build"; 482 + if (!findprog($cmd)) { 483 + my $cmd = "sphinx-build3"; 484 + if (!findprog($cmd)) { 485 + $sphinx_major = 1; 486 + $sphinx_minor = 2; 487 + $sphinx_patch = 0; 488 + printf STDERR "Warning: Sphinx version not found. Using default (Sphinx version %d.%d.%d)\n", 489 + $sphinx_major, $sphinx_minor, $sphinx_patch; 490 + return; 491 + } 492 + } 493 + 494 + open IN, "$cmd --version 2>&1 |"; 495 + while (<IN>) { 496 + if (m/^\s*sphinx-build\s+([\d]+)\.([\d\.]+)(\+\/[\da-f]+)?$/) { 497 + $sphinx_major = $1; 498 + $sphinx_minor = $2; 499 + $sphinx_patch = $3; 500 + last; 501 + } 502 + # Sphinx 1.2.x uses a different format 503 + if (m/^\s*Sphinx.*\s+([\d]+)\.([\d\.]+)$/) { 504 + $sphinx_major = $1; 505 + $sphinx_minor = $2; 506 + $sphinx_patch = $3; 507 + last; 508 + } 509 + } 510 + close IN; 511 + } 491 512 492 513 # get kernel version from env 493 514 sub get_kernel_version() { ··· 600 531 return; 601 532 } 602 533 534 + return if (defined($nosymbol_table{$name})); 535 + 603 536 if (($output_selection == OUTPUT_ALL) || 604 - ($output_selection == OUTPUT_INCLUDE && 605 - defined($function_table{$name})) || 606 - ($output_selection == OUTPUT_EXCLUDE && 607 - !defined($function_table{$name}))) 537 + (($output_selection == OUTPUT_INCLUDE) && 538 + defined($function_table{$name}))) 608 539 { 609 540 dump_section($file, $name, $contents); 610 541 output_blockhead({'sectionlist' => \@sectionlist, ··· 687 618 $type = $args{'parametertypes'}{$parameter}; 688 619 if ($type =~ m/([^\(]*\(\*)\s*\)\s*\(([^\)]*)\)/) { 689 620 # pointer-to-function 690 - print ".BI \"" . $parenth . $1 . "\" " . $parameter . " \") (" . $2 . ")" . $post . "\"\n"; 621 + print ".BI \"" . $parenth . $1 . "\" " . " \") (" . $2 . ")" . $post . "\"\n"; 691 622 } else { 692 623 $type =~ s/([^\*])$/$1 /; 693 - print ".BI \"" . $parenth . $type . "\" " . $parameter . " \"" . $post . "\"\n"; 624 + print ".BI \"" . $parenth . $type . "\" " . " \"" . $post . "\"\n"; 694 625 } 695 626 $count++; 696 627 $parenth = ""; ··· 830 761 my ($parameter, $section); 831 762 832 763 foreach $section (@{$args{'sectionlist'}}) { 764 + next if (defined($nosymbol_table{$section})); 765 + 833 766 if ($output_selection != OUTPUT_INCLUDE) { 834 767 print "**$section**\n\n"; 835 768 } ··· 917 846 my ($parameter, $section); 918 847 my $oldprefix = $lineprefix; 919 848 my $start = ""; 849 + my $is_macro = 0; 920 850 921 - if ($args{'typedef'}) { 922 - print ".. c:type:: ". $args{'function'} . "\n\n"; 923 - print_lineno($declaration_start_line); 924 - print " **Typedef**: "; 925 - $lineprefix = ""; 926 - output_highlight_rst($args{'purpose'}); 927 - $start = "\n\n**Syntax**\n\n ``"; 851 + if ($sphinx_major < 3) { 852 + if ($args{'typedef'}) { 853 + print ".. c:type:: ". $args{'function'} . "\n\n"; 854 + print_lineno($declaration_start_line); 855 + print " **Typedef**: "; 856 + $lineprefix = ""; 857 + output_highlight_rst($args{'purpose'}); 858 + $start = "\n\n**Syntax**\n\n ``"; 859 + $is_macro = 1; 860 + } else { 861 + print ".. c:function:: "; 862 + } 928 863 } else { 929 - print ".. c:function:: "; 864 + if ($args{'typedef'} || $args{'functiontype'} eq "") { 865 + $is_macro = 1; 866 + print ".. c:macro:: ". $args{'function'} . "\n\n"; 867 + } else { 868 + print ".. c:function:: "; 869 + } 870 + 871 + if ($args{'typedef'}) { 872 + print_lineno($declaration_start_line); 873 + print " **Typedef**: "; 874 + $lineprefix = ""; 875 + output_highlight_rst($args{'purpose'}); 876 + $start = "\n\n**Syntax**\n\n ``"; 877 + } else { 878 + print "``" if ($is_macro); 879 + } 930 880 } 931 881 if ($args{'functiontype'} ne "") { 932 882 $start .= $args{'functiontype'} . " " . $args{'function'} . " ("; ··· 968 876 # pointer-to-function 969 877 print $1 . $parameter . ") (" . $2 . ")"; 970 878 } else { 971 - print $type . " " . $parameter; 879 + print $type; 972 880 } 973 881 } 974 - if ($args{'typedef'}) { 975 - print ");``\n\n"; 882 + if ($is_macro) { 883 + print ")``\n\n"; 976 884 } else { 977 885 print ")\n\n"; 886 + } 887 + if (!$args{'typedef'}) { 978 888 print_lineno($declaration_start_line); 979 889 $lineprefix = " "; 980 890 output_highlight_rst($args{'purpose'}); ··· 991 897 $type = $args{'parametertypes'}{$parameter}; 992 898 993 899 if ($type ne "") { 994 - print "``$type $parameter``\n"; 900 + print "``$type``\n"; 995 901 } else { 996 902 print "``$parameter``\n"; 997 903 } ··· 1032 938 my ($parameter); 1033 939 my $oldprefix = $lineprefix; 1034 940 my $count; 1035 - my $name = "enum " . $args{'enum'}; 1036 941 1037 - print "\n\n.. c:type:: " . $name . "\n\n"; 942 + if ($sphinx_major < 3) { 943 + my $name = "enum " . $args{'enum'}; 944 + print "\n\n.. c:type:: " . $name . "\n\n"; 945 + } else { 946 + my $name = $args{'enum'}; 947 + print "\n\n.. c:enum:: " . $name . "\n\n"; 948 + } 1038 949 print_lineno($declaration_start_line); 1039 950 $lineprefix = " "; 1040 951 output_highlight_rst($args{'purpose'}); ··· 1065 966 my %args = %{$_[0]}; 1066 967 my ($parameter); 1067 968 my $oldprefix = $lineprefix; 1068 - my $name = "typedef " . $args{'typedef'}; 969 + my $name; 1069 970 971 + if ($sphinx_major < 3) { 972 + $name = "typedef " . $args{'typedef'}; 973 + } else { 974 + $name = $args{'typedef'}; 975 + } 1070 976 print "\n\n.. c:type:: " . $name . "\n\n"; 1071 977 print_lineno($declaration_start_line); 1072 978 $lineprefix = " "; ··· 1086 982 my %args = %{$_[0]}; 1087 983 my ($parameter); 1088 984 my $oldprefix = $lineprefix; 1089 - my $name = $args{'type'} . " " . $args{'struct'}; 1090 985 1091 - print "\n\n.. c:type:: " . $name . "\n\n"; 986 + if ($sphinx_major < 3) { 987 + my $name = $args{'type'} . " " . $args{'struct'}; 988 + print "\n\n.. c:type:: " . $name . "\n\n"; 989 + } else { 990 + my $name = $args{'struct'}; 991 + print "\n\n.. c:struct:: " . $name . "\n\n"; 992 + } 1092 993 print_lineno($declaration_start_line); 1093 994 $lineprefix = " "; 1094 995 output_highlight_rst($args{'purpose'}); ··· 1152 1043 my $name = shift; 1153 1044 my $functype = shift; 1154 1045 my $func = "output_${functype}_$output_mode"; 1046 + 1047 + return if (defined($nosymbol_table{$name})); 1048 + 1155 1049 if (($output_selection == OUTPUT_ALL) || 1156 1050 (($output_selection == OUTPUT_INCLUDE || 1157 1051 $output_selection == OUTPUT_EXPORTED) && 1158 1052 defined($function_table{$name})) || 1159 - (($output_selection == OUTPUT_EXCLUDE || 1160 - $output_selection == OUTPUT_INTERNAL) && 1053 + ($output_selection == OUTPUT_INTERNAL && 1161 1054 !($functype eq "function" && defined($function_table{$name})))) 1162 1055 { 1163 1056 &$func(@_); ··· 1340 1229 my $functype = shift; 1341 1230 my $name = shift; 1342 1231 1232 + return 0 if (defined($nosymbol_table{$name})); 1233 + 1343 1234 return 1 if ($output_selection == OUTPUT_ALL); 1344 1235 1345 1236 if ($output_selection == OUTPUT_EXPORTED) { ··· 1365 1252 return 0; 1366 1253 } 1367 1254 } 1368 - if ($output_selection == OUTPUT_EXCLUDE) { 1369 - if (!defined($function_table{$name})) { 1370 - return 1; 1371 - } else { 1372 - return 0; 1373 - } 1374 - } 1375 1255 die("Please add the new output type at show_warnings()"); 1376 1256 } 1377 1257 1378 1258 sub dump_enum($$) { 1379 1259 my $x = shift; 1380 1260 my $file = shift; 1261 + my $members; 1262 + 1381 1263 1382 1264 $x =~ s@/\*.*?\*/@@gos; # strip comments. 1383 1265 # strip #define macros inside enums 1384 1266 $x =~ s@#\s*((define|ifdef)\s+|endif)[^;]*;@@gos; 1385 1267 1386 - if ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) { 1268 + if ($x =~ /typedef\s+enum\s*\{(.*)\}\s*(\w*)\s*;/) { 1269 + $declaration_name = $2; 1270 + $members = $1; 1271 + } elsif ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) { 1387 1272 $declaration_name = $1; 1388 - my $members = $2; 1273 + $members = $2; 1274 + } 1275 + 1276 + if ($declaration_name) { 1389 1277 my %_members; 1390 1278 1391 1279 $members =~ s/\s+$//; ··· 1421 1307 'sections' => \%sections, 1422 1308 'purpose' => $declaration_purpose 1423 1309 }); 1424 - } 1425 - else { 1310 + } else { 1426 1311 print STDERR "${file}:$.: error: Cannot parse enum!\n"; 1427 1312 ++$errors; 1428 1313 } ··· 1516 1403 # Treat preprocessor directive as a typeless variable just to fill 1517 1404 # corresponding data structures "correctly". Catch it later in 1518 1405 # output_* subs. 1519 - push_parameter($arg, "", $file); 1406 + push_parameter($arg, "", "", $file); 1520 1407 } elsif ($arg =~ m/\(.+\)\s*\(/) { 1521 1408 # pointer-to-function 1522 1409 $arg =~ tr/#/,/; ··· 1525 1412 $type = $arg; 1526 1413 $type =~ s/([^\(]+\(\*?)\s*$param/$1/; 1527 1414 save_struct_actual($param); 1528 - push_parameter($param, $type, $file, $declaration_name); 1415 + push_parameter($param, $type, $arg, $file, $declaration_name); 1529 1416 } elsif ($arg) { 1530 1417 $arg =~ s/\s*:\s*/:/g; 1531 1418 $arg =~ s/\s*\[/\[/g; ··· 1550 1437 foreach $param (@args) { 1551 1438 if ($param =~ m/^(\*+)\s*(.*)/) { 1552 1439 save_struct_actual($2); 1553 - push_parameter($2, "$type $1", $file, $declaration_name); 1440 + 1441 + push_parameter($2, "$type $1", $arg, $file, $declaration_name); 1554 1442 } 1555 1443 elsif ($param =~ m/(.*?):(\d+)/) { 1556 1444 if ($type ne "") { # skip unnamed bit-fields 1557 1445 save_struct_actual($1); 1558 - push_parameter($1, "$type:$2", $file, $declaration_name) 1446 + push_parameter($1, "$type:$2", $arg, $file, $declaration_name) 1559 1447 } 1560 1448 } 1561 1449 else { 1562 1450 save_struct_actual($param); 1563 - push_parameter($param, $type, $file, $declaration_name); 1451 + push_parameter($param, $type, $arg, $file, $declaration_name); 1564 1452 } 1565 1453 } 1566 1454 } 1567 1455 } 1568 1456 } 1569 1457 1570 - sub push_parameter($$$$) { 1458 + sub push_parameter($$$$$) { 1571 1459 my $param = shift; 1572 1460 my $type = shift; 1461 + my $org_arg = shift; 1573 1462 my $file = shift; 1574 1463 my $declaration_name = shift; 1575 1464 ··· 1635 1520 # "[blah" in a parameter string; 1636 1521 ###$param =~ s/\s*//g; 1637 1522 push @parameterlist, $param; 1638 - $type =~ s/\s\s+/ /g; 1639 - $parametertypes{$param} = $type; 1523 + $org_arg =~ s/\s\s+/ /g; 1524 + $parametertypes{$param} = $org_arg; 1640 1525 } 1641 1526 1642 1527 sub check_sections($$$$$) { ··· 1710 1595 my $file = shift; 1711 1596 my $noret = 0; 1712 1597 1713 - print_lineno($.); 1598 + print_lineno($new_start_line); 1714 1599 1715 1600 $prototype =~ s/^static +//; 1716 1601 $prototype =~ s/^extern +//; ··· 1787 1672 return; 1788 1673 } 1789 1674 1790 - my $prms = join " ", @parameterlist; 1791 - check_sections($file, $declaration_name, "function", $sectcheck, $prms); 1675 + my $prms = join " ", @parameterlist; 1676 + check_sections($file, $declaration_name, "function", $sectcheck, $prms); 1792 1677 1793 - # This check emits a lot of warnings at the moment, because many 1794 - # functions don't have a 'Return' doc section. So until the number 1795 - # of warnings goes sufficiently down, the check is only performed in 1796 - # verbose mode. 1797 - # TODO: always perform the check. 1798 - if ($verbose && !$noret) { 1799 - check_return_section($file, $declaration_name, $return_type); 1800 - } 1678 + # This check emits a lot of warnings at the moment, because many 1679 + # functions don't have a 'Return' doc section. So until the number 1680 + # of warnings goes sufficiently down, the check is only performed in 1681 + # verbose mode. 1682 + # TODO: always perform the check. 1683 + if ($verbose && !$noret) { 1684 + check_return_section($file, $declaration_name, $return_type); 1685 + } 1801 1686 1802 - output_declaration($declaration_name, 1803 - 'function', 1804 - {'function' => $declaration_name, 1805 - 'module' => $modulename, 1806 - 'functiontype' => $return_type, 1807 - 'parameterlist' => \@parameterlist, 1808 - 'parameterdescs' => \%parameterdescs, 1809 - 'parametertypes' => \%parametertypes, 1810 - 'sectionlist' => \@sectionlist, 1811 - 'sections' => \%sections, 1812 - 'purpose' => $declaration_purpose 1813 - }); 1687 + # The function parser can be called with a typedef parameter. 1688 + # Handle it. 1689 + if ($return_type =~ /typedef/) { 1690 + output_declaration($declaration_name, 1691 + 'function', 1692 + {'function' => $declaration_name, 1693 + 'typedef' => 1, 1694 + 'module' => $modulename, 1695 + 'functiontype' => $return_type, 1696 + 'parameterlist' => \@parameterlist, 1697 + 'parameterdescs' => \%parameterdescs, 1698 + 'parametertypes' => \%parametertypes, 1699 + 'sectionlist' => \@sectionlist, 1700 + 'sections' => \%sections, 1701 + 'purpose' => $declaration_purpose 1702 + }); 1703 + } else { 1704 + output_declaration($declaration_name, 1705 + 'function', 1706 + {'function' => $declaration_name, 1707 + 'module' => $modulename, 1708 + 'functiontype' => $return_type, 1709 + 'parameterlist' => \@parameterlist, 1710 + 'parameterdescs' => \%parameterdescs, 1711 + 'parametertypes' => \%parametertypes, 1712 + 'sectionlist' => \@sectionlist, 1713 + 'sections' => \%sections, 1714 + 'purpose' => $declaration_purpose 1715 + }); 1716 + } 1814 1717 } 1815 1718 1816 1719 sub reset_state { ··· 2006 1873 2007 1874 while (<IN>) { 2008 1875 if (/$export_symbol/) { 1876 + next if (defined($nosymbol_table{$2})); 2009 1877 $function_table{$2} = 1; 2010 1878 } 2011 1879 } ··· 2038 1904 if (/$doc_block/o) { 2039 1905 $state = STATE_DOCBLOCK; 2040 1906 $contents = ""; 2041 - $new_start_line = $. + 1; 1907 + $new_start_line = $.; 2042 1908 2043 1909 if ( $1 eq "" ) { 2044 1910 $section = $section_intro; ··· 2121 1987 if ($state == STATE_BODY_WITH_BLANK_LINE && /^\s*\*\s?\S/) { 2122 1988 dump_section($file, $section, $contents); 2123 1989 $section = $section_default; 1990 + $new_start_line = $.; 2124 1991 $contents = ""; 2125 1992 } 2126 1993 ··· 2177 2042 $prototype = ""; 2178 2043 $state = STATE_PROTO; 2179 2044 $brcount = 0; 2045 + $new_start_line = $. + 1; 2180 2046 } elsif (/$doc_content/) { 2181 2047 if ($1 eq "") { 2182 2048 if ($section eq $section_context) { ··· 2325 2189 2326 2190 $file = map_filename($orig_file); 2327 2191 2328 - if (!open(IN,"<$file")) { 2192 + if (!open(IN_FILE,"<$file")) { 2329 2193 print STDERR "Error: Cannot open file $file\n"; 2330 2194 ++$errors; 2331 2195 return; ··· 2334 2198 $. = 1; 2335 2199 2336 2200 $section_counter = 0; 2337 - while (<IN>) { 2201 + while (<IN_FILE>) { 2338 2202 while (s/\\\s*$//) { 2339 - $_ .= <IN>; 2203 + $_ .= <IN_FILE>; 2340 2204 } 2341 2205 # Replace tabs by spaces 2342 2206 while ($_ =~ s/\t+/' ' x (length($&) * 8 - length($`) % 8)/e) {}; ··· 2368 2232 print STDERR "${file}:1: warning: no structured comments found\n"; 2369 2233 } 2370 2234 } 2235 + close IN_FILE; 2371 2236 } 2372 2237 2238 + 2239 + if ($output_mode eq "rst") { 2240 + get_sphinx_version() if (!$sphinx_major); 2241 + } 2373 2242 2374 2243 $kernelversion = get_kernel_version(); 2375 2244