AgeCommit message (Collapse)AuthorFilesLines
2019-02-17v4l2-compliance: add --no-progress optionHans Verkuil4-10/+32
The --no-progress option stops showing the progress messages while streaming. These messages use \r and this gives ugly results if the v4l2-compliance is redirected to a file. Also fix a bug where '-f' would keep streaming for m2m devices since frame_count was 0. Instead, if 0 was passed replace it by 10. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-16test-media: run memleak per driver testHans Verkuil1-9/+112
Instead of only testing for memory leaks at the end, do this for each driver under test. Also improve the readability of the output. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-16test-media: reset console debug level for each testHans Verkuil1-0/+9
If a WARNING or kernel oops is generated, then the console debug level is automatically bumped to 15. Before each test reset it to 6 (notice), and at the end of the test sequence restore it to the original value. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-16test-media: update year of the copyright.Hans Verkuil1-1/+1
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-16test-media: add -dmesg optionHans Verkuil1-4/+26
When running under virtme it can be useful to dump the full kernel log at the end of all the tests. Also clean up the usage message. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-16test-media: add -kmemleak optionHans Verkuil1-1/+25
Add support for memory leak detection. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-16test-media: only unload media modules if -unload was givenHans Verkuil1-2/+10
When running virtme there is no need to unload media modules, so only do this if the -unload option is given. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-15test-media: only modprobe drivers that are being testedHans Verkuil1-6/+8
Originally all drivers were loaded to ensure fixed device node numbering. That is no longer needed, so only load drivers when they are being tested. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-15test-media: replace the last hardcoded device nameHans Verkuil1-2/+2
media-ctl now understands the bus-info name to refer to a media device, so replace /dev/media4 with platform:vimc. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-15media-ctl: support a bus-info string as argument to -dHans Verkuil1-1/+51
If the device passed to the -d option is not found, then interpret it as a bus-info string and try to open all media devices and see which one reports a bus-info string equal to the -d argument. That makes it possible to open a specific media device without having to know the name of the media device. Similar functionality has been implemented for v4l2-ctl and v4l2-compliance, and for the cec utilities. This allows scripts that no longer need to care about the name of a device node, instead they can find it based on a unique string. Also extend the -d option to support -d0 as a shorthand for /dev/media0 to make it consistent with the other utils. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-15libv4lconvert: Fix support for compressed bayer formatsRicardo Ribalda Delgado1-8/+18
10 bit packet Bayer format broke the support for the other compressed bayer formats. Due to the fallthrough of the compressed formats, 10b code will be executed for every 10b format. Fixes: c44b30096589 ("libv4l: Add support for BAYER10P format conversion") Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: tidy up the code a little bit]
2019-02-14v4l2-compliance: remove duplicate MEDIA_IOC_DEVICE_INFO ioctl callHans Verkuil1-1/+0
The MEDIA_IOC_DEVICE_INFO ioctl is called twice, discarding the result of the first call. Just remove the first call, looks to be a left-over from some debug code. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-08v4l2-compliance: -f bug fixesHans Verkuil1-15/+17
- Set the capture resolution based on the output resolution - Fix various logic errors in setting up the output formats Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-08v4l2-compliance: support m2m devices with -fHans Verkuil5-35/+192
It is now possible to test m2m devices with the -f option. All combinations of output and capture formats will be tested. In order to speed up this test an optional argument can be given to have to capture only that many frames per streaming test. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-07test-media: use bus_info for vim2m and vimc testsHans Verkuil1-5/+4
Don't use device nodes but let v4l2-ctl/v4l2-compliance find the device nodes based on the bus_info string. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-07v4l2-ctl: add --epoll-for-event optionHans Verkuil3-0/+58
With that option it is possible to test epoll as opposed to select which --poll-for-event uses. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-05test-media: improve the formatting of the summaryHans Verkuil1-3/+9
Add some newlines to make it easier to read. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-04test-media: use -D and -a for the cec commandsHans Verkuil1-6/+6
Instead of using -d /dev/cecX use the -D and -a options to specify the driver and adapter name which uniquely identifies the cec adapter that should be used. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-04cec-follower: add -D and -a supportHans Verkuil2-6/+41
With these options you can uniquely identify a CEC device without having to know the device node name. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-04cec-compliance: add -D and -a supportHans Verkuil2-9/+45
With these options you can uniquely identify a CEC device without having to know the device node name. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-04cec-ctl: add -D and -a supportHans Verkuil2-6/+41
With these options you can uniquely identify a CEC device without having to know the device node name. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-04cec-info: add cec_device_find functionHans Verkuil2-0/+42
This function will find the first cec device whose driver and adapter names as returned by CEC_ADAP_G_CAPS matches the driver and adapter names given as arguments. This allows you to uniquely specify a cec device without having to rely on the device node numbering. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-02v4l2-ctl: Add support for META_OUTPUT buffer typeSakari Ailus3-32/+72
Add support for META_OUTPUT buffer type to v4l2-ctl. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2019-02-02test-media: fix regexp to include cec tests in the Final SummaryHans Verkuil1-1/+1
The totals of the cec tests weren't included, fix the regexp. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2019-02-02test-media: use new bus info/entity name to identify devicesHans Verkuil1-8/+8
Using /dev/videoX or /dev/mediaX is a bad idea since X is unstable and depends on when drivers are loaded. It is now possible (at least for vivid) to select devices by media bus_info and by entity name. Use this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2019-02-02v4l2-compliance: -e didn't use make_devnameHans Verkuil2-29/+38
The -e option didn't use make_devname, this is now fixed. Also fix a bug where -z would overwrite the devname result of -m. Finally also allow -m/-M to use a bus_info string to find the corresponding media device. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2019-02-01v4l2-compliance: add -z option to make it possible to use entity namesHans Verkuil2-29/+161
The -z option refers to a media device by bus_info, and if this is known, then device nodes can be found with G_TOPOLOGY and the name of the entity associated with the interface link or the interface ID. This uniquely identifies a device node, independently of how it is named. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-01v4l2-ctl: add -z option to make it possible to use entity namesHans Verkuil4-23/+142
The -z option refers to a media device by bus_info, and if this is known, then device nodes can be found with G_TOPOLOGY and the name of the entity associated with the interface link or the interface ID. This uniquely identifies a device node, independently of how it is named. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-02-01v4l2-compliance: check for valid media bus_infoHans Verkuil3-6/+26
Currently it just warns about missing bus_info strings, but this will become a fail at some point in the future. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-31v4l2-compliance: add V4L2_EVENT_SOURCE_CHANGE/EOS checksHans Verkuil1-0/+28
Codecs have special requirements w.r.t. these event. Verify that they are implemented correctly. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-31v4l2-compliance: validate codec_maskHans Verkuil2-14/+102
Rename codec_type to codec_mask. Improve the determination of the codec_mask (you have encoders and decoders, each of type JPEG, STATEFUL or STATELESS). Also validate that the mask makes sense. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-31v4l2-ctl: add function vidcap_get_and_update_fmtDafna Hirschfeld3-61/+89
add a function vidcap_get_and_update_fmt to set the format from cmd params. Use it in capture_setup. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l2-ctl: call s_trace after opening the device, not beforeHans Verkuil1-2/+2
Calling it before will generate spurious trace messages of the ioctls that are performed during open() that are confusing. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l2-compliance: determine the codec typeHans Verkuil2-0/+45
This information will be used in follow-up patches. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l2-ctl: --list-devices: generate bus_info if missingHans Verkuil1-1/+4
If the bus_info in media_device_info is not filled in, then generate it based on the driver name. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l2-ctl: include media devices in --list-devicesHans Verkuil1-2/+19
--list-devices didn't list /dev/mediaX devices. Add support for this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l-stream: adapt to latest fwht codec changesHans Verkuil1-0/+3
The merge of the latest fwht codec code required some additional changes in v4l-stream.c: 1) state->stride now has to be filled in 2) the decoder expects the fwht header in state->header Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l2-ctl: fix codec type detection for multiplanar driversHans Verkuil1-2/+2
If the m2m driver is multiplanar, then enum_fmt would fail due to the hardcoded VIDEO_CAPTURE/OUTPUT buffer type. Query the buffer type instead of hardcoding it. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l2-ctl: check for presence of the SOURCE_CHANGE eventHans Verkuil1-3/+2
If this event doesn't exist, then also call capture_setup() when you start streaming. This would be the case for e.g. JPEG decoders. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30ir-ctl: Print receiver timeoutSean Young1-3/+8
Signed-off-by: Sean Young <sean@mess.org>
2019-01-30v4l2-ctl: document the new --export-device optionHans Verkuil2-0/+6
Forgot to do that in the patch that added this option. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l2-ctl.1.in: add some example commandsHans Verkuil1-0/+32
Add some example commands to get started. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30v4l2-ctl: add --export-device optionHans Verkuil3-18/+95
In order to test --stream-dmabuf/--stream-out-dmabuf you need a device to export the buffers from. Add --export-device to select a video device for that (vivid is a good choice). Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-30(c)v4l-helpers.h: add v4l_queue_buffer_update()Hans Verkuil2-2/+16
The existing v4l_queue_buffer_init() clears all fields of a buffer, but that's not what is needed when queueing an output buffer: in that case the values returned by QUERYBUF should be kept, and only the relevant fields for MEMORY_USERPTR and MEMORY_DMABUF should be updated. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-29v4l2-ctl: alloc --stream-to or --stream-to-host for m2m devicesHans Verkuil1-226/+218
Support for this was missing. Add it. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-29v4l2-ctl: fix support for non-codec m2m devicesHans Verkuil1-5/+2
The new code to support codec devices inadvertently broke the support for non-codec m2m devices such as vim2m. Restore support for this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-29v4l2-compliance: fix broken test if the Request API is disabledHans Verkuil1-1/+6
If the Request API is disabled in the kernel, then the test that allocates a request object fails. But in that case the ioctl returns ENOTTY, so that should just be returned and it shouldn't fail. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-28v4l-utils: add test-media regression testsHans Verkuil2-0/+294
This is the first version of the regression tests. To do: - It assumes that all video devices are at the same number (e.g. video0 is always the first vivid capture device). Instead it should discover this based on media driver names and bus_info. Once this in place it is likely that the test-media-unload.pl script can be dropped, and that these drivers can also be compiled directly into the kernel instead of as modules. - There are still a few fails due to kernel code that has not yet been merged. - The vicodec driver isn't included in the tests as it needs more work, both in the driver itself and in the compliance tests. - vivid generates a few warnings. Work is progressing to fix those. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-28v4l2-ctl: Add support for source change event for m2m decoderDafna Hirschfeld1-27/+85
Subscribe to source change event. The capture setup sequence is executed only due to a change event. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-01-28v4l2-ctl: Introduce capture_setupDafna Hirschfeld1-8/+38
Add function capture_setup that implements the capture setup sequence. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Privacy Policy