diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-12-01 08:10:45 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-23 07:32:52 -0500 |
commit | 88f414f476bdf9def8123fec49890a3c94b5fb53 (patch) | |
tree | ef5f4ff015c2c169850a38ac22f515bd4e60fcdc /Documentation/video4linux | |
parent | 17028cdb74bf8bb593aebe5550bc90325fa9af88 (diff) |
[media] v4l2-framework.txt: document debug attribute
The debug attribute in /sys/class/video4linux/<devX>/debug was never
documented. Add this.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r-- | Documentation/video4linux/v4l2-framework.txt | 25 |
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 | ||
794 | Whenever a device node is created some attributes are also created for you. | 794 | Whenever a device node is created some attributes are also created for you. |
795 | If you look in /sys/class/video4linux you see the devices. Go into e.g. | 795 | If you look in /sys/class/video4linux you see the devices. Go into e.g. |
796 | video0 and you will see 'name' and 'index' attributes. The 'name' attribute | 796 | video0 and you will see 'name', 'debug' and 'index' attributes. The 'name' |
797 | is the 'name' field of the video_device struct. | 797 | attribute is the 'name' field of the video_device struct. The 'debug' attribute |
798 | can be used to enable core debugging. See the next section for more detailed | ||
799 | information on this. | ||
798 | 800 | ||
799 | The 'index' attribute is the index of the device node: for each call to | 801 | The 'index' attribute is the index of the device node: for each call to |
800 | video_register_device() the index is just increased by 1. The first video | 802 | video_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 | |||
816 | be called if the registration failed, nor should you ever attempt to | 818 | be called if the registration failed, nor should you ever attempt to |
817 | unregister the device if the registration failed. | 819 | unregister the device if the registration failed. |
818 | 820 | ||
821 | video device debugging | ||
822 | ---------------------- | ||
823 | |||
824 | The 'debug' attribute that is created for each video, vbi, radio or swradio | ||
825 | device in /sys/class/video4linux/<devX>/ allows you to enable logging of | ||
826 | file operations. | ||
827 | |||
828 | It is a bitmask and the following bits can be set: | ||
829 | |||
830 | 0x01: Log the ioctl name and error code. VIDIOC_(D)QBUF ioctls are only logged | ||
831 | if bit 0x08 is also set. | ||
832 | 0x02: Log the ioctl name arguments and error code. VIDIOC_(D)QBUF ioctls are | ||
833 | only logged if bit 0x08 is also set. | ||
834 | 0x04: 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. | ||
837 | 0x08: Log the read and write file operations and the VIDIOC_QBUF and | ||
838 | VIDIOC_DQBUF ioctls. | ||
839 | 0x10: Log the poll file operation. | ||
819 | 840 | ||
820 | video_device cleanup | 841 | video_device cleanup |
821 | -------------------- | 842 | -------------------- |