Copyright © 1991-: LinuxTV Developers
Linux Kernel Media Documentation¶
- Media subsystem admin and user guide
- The media subsystem
- 1. Introduction
- 2. Building support for a media device
- 3. Infrared remote control support in video4linux drivers
- 4. HDMI CEC
- 5. Digital TV
- 6. Cards List
- 7. Video4Linux (V4L) driver-specific documentation
- 7.1. The bttv driver
- 7.2. The cafe_ccic driver
- 7.3. The cx88 driver
- 7.4. The Samsung S5P/Exynos4 FIMC driver
- 7.5. i.MX Video Capture Driver
- 7.6. i.MX7 Video Capture Driver
- 7.7. Intel Image Processing Unit 3 (IPU3) Imaging Unit (ImgU) driver
- 7.8. The ivtv driver
- 7.9. mgb4 sysfs interface
- 7.10. mgb4 mtd partitions
- 7.11. mgb4 iio (triggers)
- 7.12. OMAP 3 Image Signal Processor (ISP) driver
- 7.13. OMAP4 ISS Driver
- 7.14. Philips webcams (pwc driver)
- 7.15. Qualcomm Camera Subsystem driver
- 7.16. Renesas R-Car Fine Display Processor (FDP1) Driver
- 7.17. Rockchip Image Signal Processor (rkisp1)
- 7.18. The saa7134 driver
- 7.19. The Silicon Labs Si470x FM Radio Receivers driver
- 7.20. The Silicon Labs Si4713 FM Radio Transmitter Driver
- 7.21. The SI476x Driver
- 7.22. Starfive Camera Subsystem driver
- 7.23. The Virtual Media Controller Driver (vimc)
- 7.24. The Virtual Stateless Decoder Driver (visl)
- 7.25. The Virtual Video Test Driver (vivid)
- 8. Digital TV driver-specific documentation
- The media subsystem
- Media subsystem kernel internal API
- 1. Media Subsystem Profile
- 2. Video4Linux devices
- 2.1. Introduction
- 2.2. Structure of a V4L driver
- 2.3. Structure of the V4L2 framework
- 2.4. Video device' s internal representation
- 2.5. V4L2 device instance
- 2.6. V4L2 File handlers
- 2.7. V4L2 sub-devices
- 2.8. V4L2 sub-device userspace API
- 2.9. Read-only sub-device userspace API
- 2.10. I2C sub-device drivers
- 2.11. Centrally managed subdev active state
- 2.12. Streams, multiplexed media pads and internal routing
- 2.13. V4L2 sub-device functions and data structures
- 2.14. V4L2 events
- 2.15. V4L2 Controls
- 2.15.1. Introduction
- 2.15.2. Objects in the framework
- 2.15.3. Basic usage for V4L2 and sub-device drivers
- 2.15.4. Inheriting Sub-device Controls
- 2.15.5. Accessing Control Values
- 2.15.6. Menu Controls
- 2.15.7. Custom Controls
- 2.15.8. Active and Grabbed Controls
- 2.15.9. Control Clusters
- 2.15.10. Handling autogain/gain-type Controls with Auto Clusters
- 2.15.11. VIDIOC_LOG_STATUS Support
- 2.15.12. Different Handlers for Different Video Nodes
- 2.15.13. Finding Controls
- 2.15.14. Preventing Controls inheritance
- 2.15.15. V4L2_CTRL_TYPE_CTRL_CLASS Controls
- 2.15.16. Adding Notify Callbacks
- 2.15.17. v4l2_ctrl functions and data structures
- 2.16. V4L2 videobuf2 functions and data structures
- 2.17. V4L2 DV Timings functions
- 2.18. V4L2 flash functions and data structures
- 2.19. V4L2 Media Controller functions and data structures
- 2.20. V4L2 Media Bus functions and data structures
- 2.21. V4L2 Memory to Memory functions and data structures
- 2.22. V4L2 async kAPI
- 2.23. V4L2 fwnode kAPI
- 2.24. V4L2 CCI kAPI
- 2.25. V4L2 rect helper functions
- 2.26. Tuner functions and data structures
- 2.27. V4L2 common functions and data structures
- 2.28. Hauppauge TV EEPROM functions and data structures
- 3. Digital TV (DVB) devices
- 4. Remote Controller devices
- 5. Media Controller devices
- 5.1. Media Controller
- 5.1.1. Abstract media device model
- 5.1.2. Media device
- 5.1.3. Entities
- 5.1.4. Interfaces
- 5.1.5. Pads
- 5.1.6. Links
- 5.1.7. Graph traversal
- 5.1.8. Use count and power handling
- 5.1.9. Links setup
- 5.1.10. Pipelines and media streams
- 5.1.11. Link validation
- 5.1.12. Media Controller Device Allocator API
- 5.1.13. API Definitions
- 5.1. Media Controller
- 6. CEC Kernel Support
- 6.1. The CEC Protocol
- 6.2. CEC Adapter Interface
- 6.3. Implementing the Low-Level CEC Adapter
- 6.4. Implementing the interrupt handler
- 6.5. Optional: Implementing Error Injection Support
- 6.6. Implementing the High-Level CEC Adapter
- 6.7. CEC framework functions
- 6.8. CEC Pin framework
- 6.9. CEC Notifier framework
- 7. Pixel data transmitter and receiver drivers
- 8. Writing camera sensor drivers
- 9. Media driver-specific documentation
- 9.1. Video4Linux (V4L) drivers
- 9.1.1. The bttv driver
- 9.1.2. The cx2341x driver
- 9.1.3. The cx88 driver
- 9.1.4. The Samsung S5P/EXYNOS4 FIMC driver
- 9.1.5. The pvrusb2 driver
- 9.1.6. PXA-Camera Host Driver
- 9.1.7. The Radiotrack radio driver
- 9.1.8. The Rockchip Image Signal Processor Driver (rkisp1)
- 9.1.9. The saa7134 driver
- 9.1.10. Cropping and Scaling algorithm, used in the sh_mobile_ceu_camera driver
- 9.1.11. Tuner drivers
- 9.1.12. The Virtual Media Controller Driver (vimc)
- 9.1.13. The Zoran driver
- 9.1.14. MIPI CCS camera sensor driver
- 9.1.15. CCS PLL calculator
- 9.2. Digital TV drivers
- 9.1. Video4Linux (V4L) drivers
- Linux Media Infrastructure userspace API
- Introduction
- Part I - Video for Linux API
- 1. Common API Elements
- 1.1. Opening and Closing Devices
- 1.2. Querying Capabilities
- 1.3. Application Priority
- 1.4. Video Inputs and Outputs
- 1.5. Audio Inputs and Outputs
- 1.6. Tuners and Modulators
- 1.7. Video Standards
- 1.8. Digital Video (DV) Timings
- 1.9. User Controls
- 1.10. Extended Controls API
- 1.11. Camera Control Reference
- 1.12. Flash Control Reference
- 1.13. Image Source Control Reference
- 1.14. Image Process Control Reference
- 1.15. Codec Control Reference
- 1.16. Stateless Codec Control Reference
- 1.17. JPEG Control Reference
- 1.18. Digital Video Control Reference
- 1.19. RF Tuner Control Reference
- 1.20. FM Transmitter Control Reference
- 1.21. FM Receiver Control Reference
- 1.22. Detect Control Reference
- 1.23. Colorimetry Control Reference
- 1.24. Guidelines for Video4Linux pixel format 4CCs
- 1.25. Data Formats
- 1.26. Single- and multi-planar APIs
- 1.27. Cropping, composing and scaling -- the SELECTION API
- 1.28. Image Cropping, Insertion and Scaling -- the CROP API
- 1.29. Streaming Parameters
- 2. Image Formats
- 2.1. Single-planar format structure
- 2.2. Multi-planar format structures
- 2.3. Standard Image Formats
- 2.4. Indexed Format
- 2.5. RGB Formats
- 2.6. Raw Bayer Formats
- 2.7. YUV Formats
- 2.8. HSV Formats
- 2.9. Depth Formats
- 2.10. Compressed Formats
- 2.11. SDR Formats
- 2.12. Touch Formats
- 2.13. Metadata Formats
- 2.14. Reserved Format Identifiers
- 2.15. Colorspaces
- 2.16. Defining Colorspaces in V4L2
- 2.17. Detailed Colorspace Descriptions
- 2.18. Detailed Transfer Function Descriptions
- 3. Input/Output
- 4. Interfaces
- 4.1. Video Capture Interface
- 4.2. Video Overlay Interface
- 4.3. Video Output Interface
- 4.4. Video Output Overlay Interface
- 4.5. Video Memory-To-Memory Interface
- 4.6. Raw VBI Data Interface
- 4.7. Sliced VBI Data Interface
- 4.8. Radio Interface
- 4.9. RDS Interface
- 4.10. Software Defined Radio Interface (SDR)
- 4.11. Touch Devices
- 4.12. Event Interface
- 4.13. Sub-device Interface
- 4.14. Metadata Interface
- 5. Libv4l Userspace Library
- 6. Changes
- 7. Function Reference
- 7.1. V4L2 close()
- 7.2. V4L2 ioctl()
- 7.3. ioctl VIDIOC_CREATE_BUFS
- 7.4. ioctl VIDIOC_CROPCAP
- 7.5. ioctl VIDIOC_DBG_G_CHIP_INFO
- 7.6. ioctl VIDIOC_DBG_G_REGISTER, VIDIOC_DBG_S_REGISTER
- 7.7. ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD
- 7.8. ioctl VIDIOC_DQEVENT
- 7.9. ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP
- 7.10. ioctl VIDIOC_ENCODER_CMD, VIDIOC_TRY_ENCODER_CMD
- 7.11. ioctl VIDIOC_ENUMAUDIO
- 7.12. ioctl VIDIOC_ENUMAUDOUT
- 7.13. ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS
- 7.14. ioctl VIDIOC_ENUM_FMT
- 7.15. ioctl VIDIOC_ENUM_FRAMESIZES
- 7.16. ioctl VIDIOC_ENUM_FRAMEINTERVALS
- 7.17. ioctl VIDIOC_ENUM_FREQ_BANDS
- 7.18. ioctl VIDIOC_ENUMINPUT
- 7.19. ioctl VIDIOC_ENUMOUTPUT
- 7.20. ioctl VIDIOC_ENUMSTD, VIDIOC_SUBDEV_ENUMSTD
- 7.21. ioctl VIDIOC_EXPBUF
- 7.22. ioctl VIDIOC_G_AUDIO, VIDIOC_S_AUDIO
- 7.23. ioctl VIDIOC_G_AUDOUT, VIDIOC_S_AUDOUT
- 7.24. ioctl VIDIOC_G_CROP, VIDIOC_S_CROP
- 7.25. ioctl VIDIOC_G_CTRL, VIDIOC_S_CTRL
- 7.26. ioctl VIDIOC_G_DV_TIMINGS, VIDIOC_S_DV_TIMINGS
- 7.27. ioctl VIDIOC_G_EDID, VIDIOC_S_EDID, VIDIOC_SUBDEV_G_EDID, VIDIOC_SUBDEV_S_EDID
- 7.28. ioctl VIDIOC_G_ENC_INDEX
- 7.29. ioctl VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS, VIDIOC_TRY_EXT_CTRLS
- 7.30. ioctl VIDIOC_G_FBUF, VIDIOC_S_FBUF
- 7.31. ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT
- 7.32. ioctl VIDIOC_G_FREQUENCY, VIDIOC_S_FREQUENCY
- 7.33. ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT
- 7.34. ioctl VIDIOC_G_JPEGCOMP, VIDIOC_S_JPEGCOMP
- 7.35. ioctl VIDIOC_G_MODULATOR, VIDIOC_S_MODULATOR
- 7.36. ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT
- 7.37. ioctl VIDIOC_G_PARM, VIDIOC_S_PARM
- 7.38. ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY
- 7.39. ioctl VIDIOC_G_SELECTION, VIDIOC_S_SELECTION
- 7.40. ioctl VIDIOC_G_SLICED_VBI_CAP
- 7.41. ioctl VIDIOC_G_STD, VIDIOC_S_STD, VIDIOC_SUBDEV_G_STD, VIDIOC_SUBDEV_S_STD
- 7.42. ioctl VIDIOC_G_TUNER, VIDIOC_S_TUNER
- 7.43. ioctl VIDIOC_LOG_STATUS
- 7.44. ioctl VIDIOC_OVERLAY
- 7.45. ioctl VIDIOC_PREPARE_BUF
- 7.46. ioctl VIDIOC_QBUF, VIDIOC_DQBUF
- 7.47. ioctl VIDIOC_QUERYBUF
- 7.48. ioctl VIDIOC_QUERYCAP
- 7.49. ioctls VIDIOC_QUERYCTRL, VIDIOC_QUERY_EXT_CTRL and VIDIOC_QUERYMENU
- 7.50. ioctl VIDIOC_QUERY_DV_TIMINGS
- 7.51. ioctl VIDIOC_QUERYSTD, VIDIOC_SUBDEV_QUERYSTD
- 7.52. ioctl VIDIOC_REQBUFS
- 7.53. ioctl VIDIOC_S_HW_FREQ_SEEK
- 7.54. ioctl VIDIOC_STREAMON, VIDIOC_STREAMOFF
- 7.55. ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL
- 7.56. ioctl VIDIOC_SUBDEV_ENUM_FRAME_SIZE
- 7.57. ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE
- 7.58. ioctl VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP
- 7.59. ioctl VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT
- 7.60. ioctl VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_S_FRAME_INTERVAL
- 7.61. ioctl VIDIOC_SUBDEV_G_ROUTING, VIDIOC_SUBDEV_S_ROUTING
- 7.62. ioctl VIDIOC_SUBDEV_G_SELECTION, VIDIOC_SUBDEV_S_SELECTION
- 7.63. ioctl VIDIOC_SUBDEV_G_CLIENT_CAP, VIDIOC_SUBDEV_S_CLIENT_CAP
- 7.64. ioctl VIDIOC_SUBDEV_QUERYCAP
- 7.65. ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT
- 7.66. V4L2 mmap()
- 7.67. V4L2 munmap()
- 7.68. V4L2 open()
- 7.69. V4L2 poll()
- 7.70. V4L2 read()
- 7.71. V4L2 select()
- 7.72. V4L2 write()
- 8. Common definitions for V4L2 and V4L2 subdev interfaces
- 9. Video For Linux Two Header File
- 10. Video Capture Example
- 11. Video Grabber example using libv4l
- 12. References
- 12.1. CEA 608-E
- 12.2. EN 300 294
- 12.3. ETS 300 231
- 12.4. ETS 300 706
- 12.5. ISO 13818-1
- 12.6. ISO 13818-2
- 12.7. ITU BT.470
- 12.8. ITU BT.601
- 12.9. ITU BT.653
- 12.10. ITU BT.709
- 12.11. ITU BT.1119
- 12.12. ITU-T Rec. H.264 Specification (04/2017 Edition)
- 12.13. ITU H.265/HEVC
- 12.14. JFIF
- 12.15. ITU-T.81
- 12.16. W3C JPEG JFIF
- 12.17. SMPTE 12M
- 12.18. SMPTE 170M
- 12.19. SMPTE 240M
- 12.20. SMPTE RP 431-2
- 12.21. SMPTE ST 2084
- 12.22. sRGB
- 12.23. sYCC
- 12.24. xvYCC
- 12.25. opRGB
- 12.26. ITU BT.2020
- 12.27. EBU Tech 3213
- 12.28. EBU Tech 3321
- 12.29. IEC 62106
- 12.30. NRSC-4-B
- 12.31. ISO 12232:2006
- 12.32. CEA-861-E
- 12.33. VESA DMT
- 12.34. EDID
- 12.35. HDCP
- 12.36. HDMI
- 12.37. HDMI2
- 12.38. DP
- 12.39. poynton
- 12.40. colimg
- 12.41. VP8
- 12.42. VP9
- 12.43. AV1
- Revision and Copyright
- Revision History
- 1. Common API Elements
- Part II - Digital TV API
- Part III - Remote Controller API
- 1. Introduction
- 2. Remote Controller's sysfs nodes
- 3. Remote Controller Protocols and Scancodes
- 3.1. rc-5 (RC_PROTO_RC5)
- 3.2. rc-5-sz (RC_PROTO_RC5_SZ)
- 3.3. rc-5x-20 (RC_PROTO_RC5X_20)
- 3.4. jvc (RC_PROTO_JVC)
- 3.5. sony-12 (RC_PROTO_SONY12)
- 3.6. sony-15 (RC_PROTO_SONY15)
- 3.7. sony-20 (RC_PROTO_SONY20)
- 3.8. nec (RC_PROTO_NEC)
- 3.9. nec-x (RC_PROTO_NECX)
- 3.10. nec-32 (RC_PROTO_NEC32)
- 3.11. sanyo (RC_PROTO_SANYO)
- 3.12. mcir2-kbd (RC_PROTO_MCIR2_KBD)
- 3.13. mcir2-mse (RC_PROTO_MCIR2_MSE)
- 3.14. rc-6-0 (RC_PROTO_RC6_0)
- 3.15. rc-6-6a-20 (RC_PROTO_RC6_6A_20)
- 3.16. rc-6-6a-24 (RC_PROTO_RC6_6A_24)
- 3.17. rc-6-6a-32 (RC_PROTO_RC6_6A_32)
- 3.18. rc-6-mce (RC_PROTO_RC6_MCE)
- 3.19. sharp (RC_PROTO_SHARP)
- 3.20. xmp (RC_PROTO_XMP)
- 3.21. cec (RC_PROTO_CEC)
- 3.22. imon (RC_PROTO_IMON)
- 3.23. rc-mm-12 (RC_PROTO_RCMM12)
- 3.24. rc-mm-24 (RC_PROTO_RCMM24)
- 3.25. rc-mm-32 (RC_PROTO_RCMM32)
- 3.26. xbox-dvd (RC_PROTO_XBOX_DVD)
- 4. Remote controller tables
- 5. Changing default Remote Controller mappings
- 6. LIRC Device Interface
- Revision and Copyright
- Revision History
- Part IV - Media Controller API
- 1. Introduction
- 2. Media device model
- 3. Types and flags used to represent the media graph elements
- 4. Request API
- 5. Function Reference
- 5.1. media open()
- 5.2. media close()
- 5.3. media ioctl()
- 5.4. ioctl MEDIA_IOC_DEVICE_INFO
- 5.5. ioctl MEDIA_IOC_G_TOPOLOGY
- 5.6. ioctl MEDIA_IOC_ENUM_ENTITIES
- 5.7. ioctl MEDIA_IOC_ENUM_LINKS
- 5.8. ioctl MEDIA_IOC_SETUP_LINK
- 5.9. ioctl MEDIA_IOC_REQUEST_ALLOC
- 5.10. request close()
- 5.11. request ioctl()
- 5.12. request poll()
- 5.13. ioctl MEDIA_REQUEST_IOC_QUEUE
- 5.14. ioctl MEDIA_REQUEST_IOC_REINIT
- 6. Media Controller Header File
- Revision and Copyright
- Revision History
- Part V - Consumer Electronics Control API
- 1. Introduction
- 2. Function Reference
- 2.1. cec open()
- 2.2. cec close()
- 2.3. cec ioctl()
- 2.4. cec poll()
- 2.5. ioctl CEC_ADAP_G_CAPS
- 2.6. ioctls CEC_ADAP_G_LOG_ADDRS and CEC_ADAP_S_LOG_ADDRS
- 2.7. ioctls CEC_ADAP_G_PHYS_ADDR and CEC_ADAP_S_PHYS_ADDR
- 2.8. ioctl CEC_ADAP_G_CONNECTOR_INFO
- 2.9. ioctl CEC_DQEVENT
- 2.10. ioctls CEC_G_MODE and CEC_S_MODE
- 2.11. ioctls CEC_RECEIVE and CEC_TRANSMIT
- 3. CEC Pin Framework Error Injection
- 4. CEC Header File
- Revision and Copyright
- Revision History
- Generic Error Codes
- Glossary
- GNU Free Documentation License
- Video4Linux (V4L) driver-specific documentation
- 1. ASPEED video driver
- 2. Using camera sensor drivers
- 3. MIPI CCS camera sensor driver
- 4. The cx2341x driver
- 5. DW100 dewarp driver
- 6. i.MX Video Capture Driver
- 7. Maxim Integrated MAX2175 RF to bits tuner driver
- 8. NPCM video driver
- 9. OMAP 3 Image Signal Processor (ISP) driver
- 10. ST VGXY61 camera sensor driver
- 11. THine THP7312 ISP driver
- 12. The Linux USB Video Class (UVC) driver