aboutsummaryrefslogtreecommitdiffstats
path: root/utils
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13Add property compliance supportprops2Hans Verkuil3-3/+178
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-13syncHans Verkuil1-2/+2
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-12-11cec-compliance: really fix wrong test for no HPD in testRemote()Hans Verkuil1-1/+1
Use log_addr_mask to detect if HPD is low instead of num_log_addrs. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 8c5a3e1d7431 ("fix wrong test for no HPD in testRemote()")
2018-12-11v4l-stream.c: add support for alpha planesHans Verkuil1-1/+2
Support was added to the fwht codec to handle alpha planes, but v4l-stream.c was never updated for that. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-11cec-ctl: improve the man pageHans Verkuil1-0/+21
Add some useful examples. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-11v4l2-ctl: make meta handling more genericHans Verkuil1-13/+14
This prepares the code for meta output support. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-10v4l2-compliance: test 'invalid request' error injectionHans Verkuil1-1/+4
Use the new vivid capability to inject an error into the request validation. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-10v4l-utils: sync with latest kernel codeHans Verkuil3-4/+2
Updated to the latest code from the media_tree master. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-10v4l2-compliance: test orphaned buffer supportPhilipp Zabel3-6/+64
Test that V4L2_BUF_CAP_SUPPORTS_ORPHANED_BUFS is reported equally for both MMAP and DMABUF memory types. If supported, try to orphan buffers by calling reqbufs(0) before unmapping or closing DMABUF fds. Also close exported DMABUF fds and free buffers in testDmaBuf if orphaned buffers are not supported. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco: rebase, add missing m2m_q cleanup in testDmaBuf()]
2018-12-10v4l2-compliance: add filehandles classHans Verkuil2-10/+42
Add a simple class to store filehandles. The destructor will close all pending filehandles on error. This ensures that when working with requests no request or media filehandles remain open after a test fails. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-10v4l2-compliance: reopen if buffers might have been allocatedHans Verkuil1-0/+6
Some of the tests allocate buffers, but if there was a failure in that test, then the buffers wouldn't be freed. Do that one level up in v4l2-compliance.cpp. Otherwise this would cause confusing knock-on failures later in the test. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-07v4l2-compliance: Remove spurious error messagesEzequiel Garcia1-4/+2
Get rid of a couple confusing error messages, namely: test VIDIOC_G_FMT: OK fail: v4l2-test-formats.cpp(464): pix_mp.plane_fmt[0].reserved not zeroed fail: v4l2-test-formats.cpp(752): Video Output Multiplanar is valid, but TRY_FMT failed to return a format test VIDIOC_TRY_FMT: FAIL fail: v4l2-test-formats.cpp(464): pix_mp.plane_fmt[0].reserved not zeroed fail: v4l2-test-formats.cpp(1017): Video Output Multiplanar is valid, but no S_FMT was implemented test VIDIOC_S_FMT: FAI Where only the first message "pix_mp.plane_fmt[0].reserved not zeroed" is accurate. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-06Makefile.am: don't use relative paths for includeMauro Carvalho Chehab1-2/+2
Those break builds like: mkdir build; cd build; ../configure; make Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-12-06v4l2-compliance needs forkFabrice Fontaine1-1/+5
v4l2-compliance uses fork, since https://git.linuxtv.org/v4l-utils.git/commit/utils/v4l2-compliance/?id=79d98edd1a27233667a6bc38d3d7f8958c2ec02c So don't build it if fork is not available Fixes: - http://autobuild.buildroot.org/results/447d792ce21c0e33a36ca9384fee46e099435ed8 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-06cec-ctl: fix Remote Control Passthrough FeatureHans Verkuil1-1/+4
This feature didn't show up in the --help due to a parsing bug. This feature is unusual because it only has 'Has also' messages and that was something the parses couldn't handle. Also add an extra newline when printing the feature name in the help to make it easier to read. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-12-06cec-compliance: check if SET_OSD_NAME gives valid OSD nameHans Verkuil1-0/+2
Check for empty OSD name or if there are trailing 0 bytes transmitted after the string. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-30v4l2-compliance: verify QBUF restores length and bytesusedHans Verkuil1-4/+16
Check that QBUF fills in the correct length and bytesused values. Especially important if they have to come from a previous PREPARE_BUF call. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-11-30v4l2-compliance: better field and prepbuf/qbuf testsHans Verkuil1-1/+17
When queueing a buffer to an OUTPUT device with V4L2_FIELD_ANY, then VIDIOC_QBUF shall return a non-ANY field value. Check this. If a buffer has been prepared before VIDIOC_QBUF was called, then for USERPTR and DMABUF the userpointers and dmabuf fds are ignored and instead it will return the ones used when VIDIOC_PREPARE_BUF was called. Check this. Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-11-29v4l2-compliance: fix multiple issues when testing vividHans Verkuil3-27/+48
'v4l2-compliance -m0' for the vivid driver resulted in several failures that are now fixed: 1) The bus_info argument to mi_get_media_fd() wasn't used for every call, causing problems for multiple vivid instances. 2) Various capability values (e.g. valid_buftypes) that differ for different inputs were not reset to 0 when testing a new input. 3) Store the buffer capabilities in the node for easy access. 4) Fix an issue with the EXPBUF test which isn't available in some circumstances (streaming from a VBI device when the input isn't SDTV). 5) Add tests for V4L2_BUF_CAP_SUPPORTS_REQUESTS 6) Fix an issue with selecting the right VBI format (raw vs sliced) 7) Fix an issue with swradio that needs min_bufs buffers before it can start streaming. It was luck that it worked for other devices since they all needed a minimum of 2 buffers, whereas swradio needed 8. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-29media-info: fix more checks around radio interfacesHans Verkuil1-14/+29
Radio interfaces do not link to an entity, so link/entity checking should be skipped. Commit dce0945e8220 tried to fix this, but it was incomplete. This change completely skips the link and entity checks of an interface since radio interfaces are completely stand-alone at the moment. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-29cec-compliance: fix wrong test for no HPD in testRemote()Hans Verkuil1-1/+1
If the 'standby' flag for the test-to-be-performed is set to true, then the code needs to check is the remote device pulls down the HPD when in standby. In that case the test should be skipped since it is not a valid test for such devices. However, the check was wrong and these tests were still performed. Fix the check. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-28v4l2-compliance: use inject_error and improve MEDIA_REQUEST_IOC_QUEUE testsHans Verkuil1-23/+9
The error injection test for MEDIA_REQUEST_IOC_QUEUE failed for already prepared buffers since in that case it won't call buf_prepare again and vivid cannot inject the error there. So skip that test for every other buffer (all even buffers are prepared, all odd buffers aren't). Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-28v4l2-compliance: add inject_error helper methodHans Verkuil1-0/+9
This simplifies the error injection tests. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-28v4l2-compliance: test failure during req_validateHans Verkuil1-2/+16
Test what happens if the validation of a queued request fails. Testing using vivid and its error injection feature. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-27v4l2-compliance: add test to close the request after queueingHans Verkuil1-4/+14
Close some of the request fds after they are queued. This tests if what are basically orphaned requests are still handled correctly. And no, they weren't and patches to fix this are on their way :-) Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-27v4l2-compliance: test 'start streaming' error injectionHans Verkuil1-1/+17
If the driver under test is vivid, then make use of the 'start streaming' error injection feature to test what happens when it fails. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-27v4l2-compliance: work around vivid error injection controlsHans Verkuil3-17/+15
v4l2-compliance refuses to work with vivid if vivid is loaded without the no_error_inj=1 module option since some of the compliance tests trigger the error injection, thus failing the test. Make v4l2-compliance smarter by ignoring all vivid class controls if it detects that the driver is in fact vivid. This allows it to successfully pass all tests. The main reason for this change is that this allows us to use the error injection controls to test how the kernel handles various error conditions that are otherwise hard to test. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-27v4l2-compliance: fixes output request handlingHans Verkuil1-6/+7
An earlier patch modified the 'output' counter for output buffer types in captureBufs() which caused the wrong request fd to be set. Remove the change to the output counter and make the index calculation for the buf_req_fds array more robust. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 99dfae1aa052 ('v4l2-compliance: add --stream-from and --stream-from-hdr options')
2018-11-27v4l2-info: show ts mask values in bufferflags2sHans Verkuil1-2/+28
The V4L2_BUF_FLAG_TIMESTAMP_MASK and V4L2_BUF_FLAG_TSTAMP_SRC_MASK were not shown in bufferflags2s(). Also prefix the hex value in num2s by '0x'. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-26media-info: use hex to log IDs, fix radio interface checkHans Verkuil1-4/+4
In two places an object ID was printed in decimal instead of hex. Change this to hex to consistency. The interface check was also wrong: radio devices do not have a link to an entity since the actual audio signal goes via alsa or an external loopback cable. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-26v4l2-compliance: select the right mediaX for vividHans Verkuil1-3/+4
The vivid driver is unusual since it creates multiple media devices for one driver instance. Use the bus_info to match the right media device. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-26media-info: add bus_info arg to mi_get_media_fd()Hans Verkuil2-2/+13
Some drivers might have multiple media devices, and in that case you have to select the right one based on the bus_info. Currently this is only the case for the vivid driver if it creates multiple instances. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-23v4l-utils: sync with latest kernelHans Verkuil6-70/+173
Sync with the latest and greatest kernel code. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2018-11-23keytable: do not install bpf protocols decoders with execute permissionSean Young1-1/+1
The rpm packaging system will try to extract debug information, which fails since there is no build id. This can be avoided by removing the execute permission. BPF relocatable files are executable anyway so this is the right thing to do. See: https://github.com/rpm-software-management/rpm/pull/604 Signed-off-by: Sean Young <sean@mess.org>
2018-11-22sync with kernelSean Young8-1/+231
Signed-off-by: Sean Young <sean@mess.org>
2018-11-22keytable: bpf decoder and keymap for XBox DVD RemoteSean Young3-1/+161
This uses a modified nec protocol, where 24 bits are sent and the first 12 bits are inverted. Signed-off-by: Sean Young <sean@mess.org>
2018-11-21keytable: match every entry in rc_maps.cfg, don't stop at the first matchSean Young1-36/+38
Signed-off-by: Sean Young <sean@mess.org>
2018-11-21v4l2-compliance: add Request API testsHans Verkuil3-3/+319
Add the Request API tests. These tests are currently primarily targetted at vivid/vimc, and will need to be improved to handle actual codecs like cedrus and (in the future) vicodec. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-20qvidcap: rename CaptureGLWin to CaptureWinHans Verkuil4-69/+69
The GL in the name is rather pointless. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-20qvidcap: split up capture-win-gl.cpp into capture.cpp and paint.cppHans Verkuil8-1199/+1224
The capture-win-gl.cpp was too large, so it is now split in one part (capture.cpp) that deals with streaming and one (paint.cpp) that deals with the openGL shader and render code. It has also been renamed since the -win-gl bit was really a leftover from qv4l2 and made no sense for the openGL-only qvidcap. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-19v4l-stream.c: check FWHT macroblock alignmentHans Verkuil1-1/+3
The FWHT codec currently expects macroblock alignment of the resolution. So reject the use of FWHT if that's not the case. It will fallback to lossless compression. This restriction can be lifted once the FWHT codec supports non-aligned resolutions as well. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-17v4l2-compliance: add --stream-from and --stream-from-hdr optionsHans Verkuil4-62/+311
One major missing piece of functionality has been to read the contents of output buffers from a file. This made it impossible to test decoders in particular. New --stream-from and --stream-from-hdr (matching --stream-to and --stream-to-hdr from v4l2-ctl) options have been added to support this. It is also possible to specify files for specific pixelformats by prefixing the filename with '<fourcc>=', i.e.: FWHT=test.fwht Multiple files for different pixelformats can be given this way. The file given without a prefix is used as the default file if no file for the current pixelformat was found. Note: the compliance test for codecs is still under development and it may not always work. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-16v4l2-ctl: support VBI and META streamingHans Verkuil1-62/+107
Add streaming support for VBI capture and output (both sliced and raw) and for META data capture. Also add verbose support when streaming to an output to see the buffer values. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-16v4l2-ctl: fix set raw/sliced vbi formatHans Verkuil1-34/+34
Setting the raw or sliced VBI format didn't work correctly. It was supposed to get the current format, then copy the changed fields over to obtain the updated format. Instead it used the format based on the values specified by the user, i.e. it never used the updated current format. As part of this patch the vbi_fmt(_out) variables were renamed to sliced_fmt(_out) since it was not clear at all that vbi_fmt referred to sliced VBI as opposed to raw VBI. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-16v4l2-ctl: add space before "dropped" messageHans Verkuil1-1/+1
A line like this is ugly: idx: 3 seq: 382 bytesused: 829440 ts: 1289.781176 delta: 80.000 ms fps: 25.00dropped: 1 (timecode) Add the forgotten space before "dropped". Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-15v4l2-compliance: relax SUPPORTS_DMABUF checkHans Verkuil1-3/+1
This check would fail with older kernels, which is a bit too strict. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-14v4l2-compliance: limit acceptable width/height to 65536 in ↵Philipp Zabel1-2/+2
VIDIOC_SUBDEV_G/S_FMT test Fail if the driver returns unrealistically large frame sizes. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
2018-11-13v4l-utils: fix SHA detectionHans Verkuil3-6/+6
Check if there is a .git directory at the top-level, and only then get the SHA of the HEAD. If the release tarball (which doesn't have a .git directory) is extracted inside another git repo, then the current SHA code would find the SHA of the enclosing git repo, which is not what you want. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2018-11-07keytable: fix BPF protocol compilation on mipsSean Young1-1/+1
clang -idirafter /usr/local/include -idirafter +/usr/lib/llvm-6.0/lib/clang/6.0.1/include -idirafter +/usr/include/mips64el-linux-gnuabi64 -idirafter /usr/include +-I../../../include -target bpf -O2 -c grundig.c > In file included from grundig.c:5: > In file included from ../../../include/linux/lirc.h:10: > In file included from /usr/include/linux/types.h:9: > In file included from /usr/include/linux/posix_types.h:36: > In file included from +/usr/include/mips64el-linux-gnuabi64/asm/posix_types.h:13: > /usr/include/mips64el-linux-gnuabi64/asm/sgidefs.h:19:2: error: Use a Linux +compiler or give up. > #error Use a Linux compiler or give up. This requires __linux__ to be defined. Signed-off-by: Sean Young <sean@mess.org>
2018-11-07keytable: fix compilation warningSean Young1-1/+1
keytable.c: In function ‘parse_opt’: keytable.c:835:7: warning: ‘param’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Sean Young <sean@mess.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>

Privacy Policy