AgeCommit message (Collapse)AuthorFilesLines
2019-05-15cec-ctl: add --raw-msg optioncecHans Verkuil1-0/+4
This option sets the CEC_MSG_FL_RAW flag. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-05-15Sync with masterHans Verkuil8-11/+60
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-05-15lib/libdvdv5: add #if __GNUC__ >= 9 before #pragmaHans Verkuil32-0/+64
The -Waddress-of-packed-member option is only available in gcc versions 9 and up. So add '#if __GNUC__ >= 9' before this pragma: #pragma GCC diagnostic ignored "-Waddress-of-packed-member" to avoid compiler warnings when compiled with older gcc versions. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-05-09v4l2-compliance: if G_FMT returns 0, mark buftype as validHans Verkuil1-3/+5
Currently a buftype was only marked as valid in node->valid_buftypes if G_FMT returned 0 AND the validation of the returned v4l2_format was also successful. But this gave bad knock-on effects in later tests. So mark the buftype as valid if G_FMT returns 0, independent of the later tests. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-05-09qvidcap: toLatin1 -> toUtf8Hans Verkuil2-10/+10
Output UTF8 instead of Latin1 for better locale support. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-05-09qv4l2: Fix UTF8 error message stringsTasos Sahanidis1-4/+4
In locales such as el_GR.UTF-8, sterror() returns localised error messages, which get printed as question marks due to the conversion in QString::toLatin1(). Calling QString::toUtf8 instead, corrects this error. Signed-off-by: Tasos Sahanidis <tasos@tasossah.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-05-03libdvbv5: Fix typo in warning messageGregor Jasny9-9/+9
2019-05-01libdvbv5: shut up gcc 9 "-Waddress-of-packed-member" noiseMauro Carvalho Chehab32-0/+64
At the DVB code, descriptors use unaligned structs in order to parse MPEG-TS. Yeah, we know that the data may not be aligned. That's exactly what we want do to. So, just shut up those warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-29v4l2-ctl: disable tracing in get_codec_type and do_setup_out_buffersHans Verkuil1-12/+16
Disable spurious tracing messages in the get_codec_type() and do_setup_out_buffers() functions. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-29v4l2-compliance: re-enable fail_on_test(!buf.qbuf(node)) testHans Verkuil1-3/+1
Commit 0efd87d40586 ("v4l2-compliance: fix and comment out qbuf test") commented out this qbuf test, but it can now be enabled again since the vb2 bug that caused the failure has now been fixed. The vb2 fix was commit 1f7f11e8ca15 ("videobuf2-v4l2.c: move up STATE_DEQUEUED check"). Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-26Revert "libdvbv5: leaks and double free in dvb_fe_open_fname()"Mauro Carvalho Chehab2-9/+11
This reverts commit c82608ca1595427c2bdbd4abb9aca9163e1df60a. This patch is buggy, as reported at: https://bugs.kde.org/show_bug.cgi?id=406145 https://bugzilla.redhat.com/show_bug.cgi?id=1695023 So, revert it, in order to make Kaffeine work again. Thanks to Wolfgang Ulbrich with detected the bad patch and checked that reverting it fixes the issue. Fix tested with a PCTV 461 and a DVB-S2 stream from my TV provider. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-04-24cec-compliance: add colorsPhilipp Zabel3-7/+52
Use color codes to mark OK, warn, and FAIL messages with green, bold, and bright red accents, respectively. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-24cec-compliance: use warn() in warn_once()Philipp Zabel1-6/+1
Use the warn() macro in warn_once() instead of duplicating its contents. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-24v4l2-compliance: add colorsPhilipp Zabel3-6/+51
Use color codes to mark OK, warn, and FAIL messages with green, bold, and bright red accents, respectively. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-24v4l2-compliance: use warn() in warn_once()Philipp Zabel1-6/+1
Use the warn() macro in warn_once() instead of duplicating its contents. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-24configure.ac: Add AM_GNU_GETTEXT_VERSION([0.19.8])Hans de Goede1-0/+1
Add AM_GNU_GETTEXT_VERSION([0.19.8]) so that autoreconf will properly run autopoint instead of failing because build-aux/config.rpath is not copied. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-18libv4lconvert: Add support for V4L2_PIX_FMT_NV12Ricardo Ribalda Delgado3-0/+81
NV12 is a two-plane version YUV 4:2:0, where the U and V components are subsampled 2x2. Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-04-18libv4lconvert: Port supported_src_formats to bit-opsRicardo Ribalda Delgado2-6/+37
We have passed the barrier of 64 supported formats, therefore a int64_t is not enough for holding the bitfield. Instead use bit-ops ala kernel. Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> Suggested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-04-03keytable: improve description of ir-keytableSean Young2-6/+12
Signed-off-by: Sean Young <sean@mess.org>
2019-04-02v4l2-ctl: disable_trace disabled too muchHans Verkuil2-25/+45
When trying to stream twice from the same device the second attempt silently exits since REQBUFS returns EBUSY. The problem is that there is no feedback of the ioctl error to the user, and that is because the ioctl tracing is disabled before REQBUFS is called. Change the code to be a bit more refined w.r.t. what is traced and what isn't. Now a proper error code is shown. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-04-01v4l2-compliance: fix and comment out qbuf testHans Verkuil1-1/+3
The fail_on_test(qbuf()) check was missing a !. But if after this correctly-failing qbuf() the querybuf ioctl is called again, all the request information is dropped from the result. So comment this out while a investigation this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: 7ee189ecae01 ("v4l2-compliance: fix request API test")
2019-04-01keytable: no need to explain -s option separatelySean Young2-17/+12
Signed-off-by: Sean Young <sean@mess.org>
2019-03-31v4l2-ctl: fix debug printsDafna Hirschfeld1-2/+2
replace 'set_fwht_ext_ctrls' with 'set_fwht_ext_ctrl' in debug prints Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-31v4l2-ctl: declare hdr variable as constDafna Hirschfeld1-3/+3
declare the hdr param with 'const' in functions that use fwht header in order to set the fwht stateless params. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-30v4l2-ctl: suppress warning messages when decodingHans Verkuil1-3/+2
When reading from a compressed file the amount of data read can be less than the buffer size. Don't warn about that, it's perfectly normal. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-30v4l2-ctl: get fmt after source changeHans Verkuil1-2/+1
When a source change event arrives during decoding get the new format at that point instead of after restarting streaming. If there is another source change queued up, then when you call streamon for CAPTURE again it might send the new source change event and update the format for that one, so reading the format after streamon might give the wrong format. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-30v4l2-ctl: fix broken stateless decodingHans Verkuil1-5/+5
The last argument for do_handle_out was set to true instead of false, causing do_handle_out to think that the stateless decoder had stopped. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-compliance: fix request API testHans Verkuil1-3/+20
The vicodec driver's media controller supports requests, but the stateful en/decoder video nodes do not: improve the request API test to handle this somewhat uncommon case. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-compliance: add stateful encoder stream testingHans Verkuil2-16/+69
- Don't test the 'no poll' streaming case: it doesn't really work since there is no reliable 1-1 mapping of output and capture buffers. - Check the EOS event. - Test CMD_STOP. - Test V4L2_BUF_FLAG_LAST. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-compliance: check for EVENT_EOS for stateful encoderHans Verkuil1-0/+2
Stateful encoders require the presence of EVENT_EOS. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-compliance: check for the presence of MIN_BUFFERS_OUTPUTHans Verkuil1-0/+3
This control is required for stateful encoders. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-compliance: check presence of enum_framesizes for encHans Verkuil1-0/+2
Stateful encoders must support ENUM_FRAMESIZES. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-compliance: check if en/decoder commands are presentHans Verkuil1-2/+8
The stateful codecs require the encoder or decoder command ioctls. Check this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-compliance: fill first output bufferHans Verkuil1-0/+1
In setupMmap() the fill_output_buffer() function was never called for the first output buffer, so it was never filled with data when reading from a file. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-compliance: for m2m devices fix frame countingHans Verkuil1-0/+7
For m2m devices the pre-queued output buffers need to be taken into account when calculating the number of frames that have been streamed. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-ctl: use defines instead of -1 and -2Hans Verkuil1-32/+35
Several queueing related functions return -1 on error and -2 to indicate that the queue is stopped (i.e. no more buffers should be queued). Use defines for these two values to make the code more readable. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-ctl: fixes relating to frame counting and drainingHans Verkuil1-17/+27
do_handle_cap assumed that it could skip frame counting for m2m devices, but that's not true. It should count frames for stateful encoders and for the cap2out streaming use-case. So make this an argument to do_handle_cap instead. Also fix various issues with detecting when the output side of an m2m device is stopped (e.g. because --stream-count buffers have been queued up). Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-ctl: ignore empty and error frames w.r.t. --stream-countHans Verkuil1-1/+7
Empty frames and error frames should not decrement the counter set by --stream-count. Only count valid non-empty frames. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-ctl: reset internal counters after a source changeHans Verkuil1-0/+6
If a source change events arrives, then streaming stops, all buffers are reallocated and streaming restarts, but then various internal counters have to be reset since streaming starts with a clean slate. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-ctl: bytesused was reported as 0 when logging the bufferHans Verkuil1-2/+3
In do_handle_out() when the buffer information was logged the bytesused value was always 0. Move the code the clears this field to *after* the logging function so the actual values are logged. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-ctl: add missing cleanup to stateless_m2m()Hans Verkuil1-0/+9
stateless_m2m() didn't free allocated resources. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-ctl: Add implementation for the stateless fwht decoder.Dafna Hirschfeld1-8/+210
Add code to support the stateless decoder and the function 'stateless_m2m' that implements it. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: use g_timestamp_ns instead of get_ns_timestamp]
2019-03-29v4l2-ctl: Add functions and variables to support fwht stateless decoderDafna Hirschfeld1-0/+132
Add the variable 'last_fwht_bf_ts' and the array 'fwht_reqs' to allow the fwht stateless decoder to maintain the requests. Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: dropped get_ns_timestamp]
2019-03-29cv4l-helpers.h: add g_timestamp_ns()Hans Verkuil1-0/+1
Add helper to return a v4l2_buffer timestamp as nanoseconds. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29vim2m_test_with_qvidcap: fix output formatMauro Carvalho Chehab1-1/+1
Now that v4l2-ctl checks the validity of formats, we need to use a valid format there. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-29v4l2-ctl: fix compiler warningHans Verkuil1-1/+2
v4l2-ctl-streaming.cpp: In function ‘__u32 read_u32(FILE*)’: v4l2-ctl-streaming.cpp:434:7: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’, declared with attribute warn_unused_result [-Wunused-result] fread(&v, 1, sizeof(v), f); ^ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-29vim2m_test_with_qvidcap: fix formats selectionMauro Carvalho Chehab1-2/+19
The formats selection was wrong: it was setting the format at the output, instead of changing it at the capture stream. As it makes sense to change both, add such support to the script. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2019-03-29v4l2-ctl: print an error for invalid pixelformatsHans Verkuil4-24/+99
If the given pixelformat was invalid, then it was silently replaced by the driver with a default format. Give an error instead and bail out. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29v4l2-ctl: support -BE handling for list framesize/ivalsHans Verkuil1-4/+17
With the G/S/TRY_FMT ioctls the -BE suffix to a fourcc was handled correctly, but this was not supported for the ENUM_FRAMESIZES and the ENUM_FRAMEINTERVALS ioctls. Support it there as well. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2019-03-29Revert "cec-compliance: suppress some warnings for vivid"Hans Verkuil3-9/+2
Instead of changing the adapter test itself (and thus hiding the very real vivid bug), we drop the -A option in test-media instead. This reverts commit 336df387b517572f06d37bbc79a9337804291530.

Privacy Policy