aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/video4linux/v4l2-framework.txt25
1 files changed, 23 insertions, 2 deletions
diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index a11dff07ef71..f586e29ce221 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -793,8 +793,10 @@ video_register_device_no_warn() instead.
793 793
794Whenever a device node is created some attributes are also created for you. 794Whenever a device node is created some attributes are also created for you.
795If you look in /sys/class/video4linux you see the devices. Go into e.g. 795If you look in /sys/class/video4linux you see the devices. Go into e.g.
796video0 and you will see 'name' and 'index' attributes. The 'name' attribute 796video0 and you will see 'name', 'debug' and 'index' attributes. The 'name'
797is the 'name' field of the video_device struct. 797attribute is the 'name' field of the video_device struct. The 'debug' attribute
798can be used to enable core debugging. See the next section for more detailed
799information on this.
798 800
799The 'index' attribute is the index of the device node: for each call to 801The 'index' attribute is the index of the device node: for each call to
800video_register_device() the index is just increased by 1. The first video 802video_register_device() the index is just increased by 1. The first video
@@ -816,6 +818,25 @@ video_device was embedded in it. The vdev->release() callback will never
816be called if the registration failed, nor should you ever attempt to 818be called if the registration failed, nor should you ever attempt to
817unregister the device if the registration failed. 819unregister the device if the registration failed.
818 820
821video device debugging
822----------------------
823
824The 'debug' attribute that is created for each video, vbi, radio or swradio
825device in /sys/class/video4linux/<devX>/ allows you to enable logging of
826file operations.
827
828It is a bitmask and the following bits can be set:
829
8300x01: Log the ioctl name and error code. VIDIOC_(D)QBUF ioctls are only logged
831 if bit 0x08 is also set.
8320x02: Log the ioctl name arguments and error code. VIDIOC_(D)QBUF ioctls are
833 only logged if bit 0x08 is also set.
8340x04: Log the file operations open, release, read, write, mmap and
835 get_unmapped_area. The read and write operations are only logged if
836 bit 0x08 is also set.
8370x08: Log the read and write file operations and the VIDIOC_QBUF and
838 VIDIOC_DQBUF ioctls.
8390x10: Log the poll file operation.
819 840
820video_device cleanup 841video_device cleanup
821-------------------- 842--------------------