Age | Commit message (Collapse) | Author | Files | Lines |
|
An end-of-bit event is generated if a CEC pin event arrives that
indicates that the CEC bus remained high for longer than a bit period,
which means that it was the end of the message.
But this was also done for HPD/5V events, which is incorrect.
Especially since HPD/5V events might have a timestamp that is
later than a CEC event (probably due to a driver or framework
bug). In any case, the eob generator has nothing to do with HPD/5V
events.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The timestamp format for HPD and 5V changes was slightly different
compared to CEC changes. Make them consistent to improve readability
of the logs.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The codec tests checked if the function of the device as reported
by the media controller is that of an de/encoder. But that test
was also done for codecs without a MC, and then it fails.
So only do this test if an MC was found.
Also test that stateless codecs always have a MC since it is
required for such codecs.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
|
|
Add a check for V4L2_CTRL_FLAG_READ_ONLY to avoid request
testing for such controls.
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This reverts commit e5000e09485c5b92874c21810336823de4f23dfd due to a
wrong SoB address.
|
|
Add a check for V4L2_CTRL_FLAG_READ_ONLY to avoid request
testing for such controls.
Signed-off-by: Dikshita Agarwal <dikshita@qti.qualcomm.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Signed-off-by: Sean Young <sean@mess.org>
|
|
This merges the latest lirc.h changes.
Signed-off-by: Sean Young <sean@mess.org>
|
|
Running the "Stream video from a capture video device (/dev/video1) to an
output video device (/dev/video2)" example from the manpage with vivid
as the output device failed with a error message.
vedant@pc ~$ v4l2-ctl --list-devices
vivid (platform:vivid-000):
/dev/video2
/dev/video3
/dev/radio0
/dev/radio1
/dev/vbi0
/dev/vbi1
/dev/swradio0
/dev/media1
HD WebCam: HD WebCam (usb-0000:00:14.0-7):
/dev/video0
/dev/video1
/dev/media0
vedant@pc ~$ v4l2-ctl -d0 --stream-mmap --out-device /dev/video3 --stream-out-dmabuf
VIDIOC_G_FMT returned -1 (Invalid argument)
<VIDIOC_QBUF: failed: Invalid argument
handle out -1
handle out2in -1
While using the --out-device mode g_fmt must be operated on out_fd as
well. determine_field was called on fps_timestamp object for output, but was
not passed out_fd.
This patch fixes the VIDIOC_G_FMT returned -1 (Invalid argument) error.
Signed-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The video output get, set and list options operate on the device set by
--device, even if the --out-device option is specified to select a
different output device. Fix it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
v4l2-ctl can now read EDID output from edid-decode as a file format
with --set-edid file=<edid-file>.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The monotonic time and the wallclock time diverge over time. To help
analyze 'pin' logs (--monitor-pin) insert the monotonic and wallclock
time every hour into the pin log, and --analyze-pin will use that
information to keep the wallclock time as reported by -w reasonably
in sync.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Events (HPD/5V) didn't report the timestamp, unless --verbose was
added. But this is very useful to know, so change it to always report
the timestamp.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
For example:
ir-ctl --send=part1 --gap=10000 --send=part2 --gap=20000 --send=part3
This would introduce a gap of 10000 microseconds between part1 and
part2, and 20000 microseconds between part2 and part3.
Signed-off-by: Sean Young <sean@mess.org>
|
|
These warnings check the vivid_ro_ctrl value against the expected value.
Improve them to show the actual values. Hopefully this helps debugging
to make this test more reliable since it regularly warns in the daily
tests.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This test checks that at least one of the read or write fds are
set upon return from select(). But it is possible while streaming
that only an event is returned. In that case this check would fail.
Add a check for an event (exception) as well.
This should solve a regular occuring failure in the compliance test.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When running the compliance tests in a VM sometimes the VM takes
a lot longer to respond than you expect. Increase a few usleeps that
are too tight to avoid the tests failing because of that.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
It can be inconvenient to stop or start the stream when the capture
window obscures most or all of the application window. Register the
current application window stream toggle QAction to the capture
window as well. Register a more standard Control-W to close the
window. Add both to the context menu to allow them to be visible and
discovered.
Signed-off-by: David Fries <David@Fries.net>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The commit 37f42eb35d87 ("qv4l2: reorganize colorspace handling")
disabled the play action on non-streaming devices.
This patch enables the play action 'm_capStartAct' on non-streaming
radio rx (audio-only) devices, assuming that 'isCapture' should exclude
radio tx. In addition, it also disables the step-frame action
'm_capStepAct' on radio devices.
Signed-off-by: Jorge Maidana <jorgem.seq@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Check if the OS has an MMU. If not, then skip tests that only work for
systems that have an MMU.
The safest and most generic method I found is the FIONBIO ioctl that is
available for any file descriptor and is a write-only ioctl, so no memory
will be accidentally written. On a MMU system this will return EFAULT, and
on a ucLinux system this will return 0.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Lots of headers are not used in these two utils. Drop them.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Android doesn't have getsubopt at all, and some libc implementations
use a getsubopt variant that behaves slightly different.
So add a new v4l-getsubopt.h header that either just uses the glibc
function (if glibc is detected) or uses a static inline v4l_getsubopt
that is copied from glibc. This should avoid such problems.
Reported-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Rename HM12 to NV12_16L16 (HM12 is now redefined to this new, more generic,
pixel format).
So don't use the old name anymore, only use the new pixel format name.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Understand V4L2_CTRL_TYPE_VP9_FRAME and V4L2_PIX_FMT_VP9_FRAME.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The main addition is VP9 stateless codec support.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The delta between the 64 bit DQEVENT timestamp and the 32 bit timestamp
doesn't have to be <= 10 ms, that's too short when run in a VM instance.
Change it to 500 ms, that should be fine for this test. It's not about
performance, but about checking that the timestamps retrieved through
the 32 bit compat API are sane.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Setting a control while inactive is meant to work, but it might
not be actually written to the hardware until control becomes active.
v4l2-compliance should allow -EACCES as an error code, but only for
the uvcdriver when an attempt is made to set inactive controls.
The control framework is able to handle this case more elegantly:
it will remember the last set inactive value, and when the control
becomes active it will update the hardware. But that's really hard
to model in uvc.
Suggested-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Ricardo Ribalda <ricardo@ribalda.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Add a framerate estimation after the end of the capture loop.
the start time is calculated just after streamon for mmap/userptr,
in order to avoid counting the time to allocate/mmap buffers and
to prepare the device for start streaming.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This helps debugging this issue.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
A sleep of 1 is apparently sometimes too short and the
following v4l2-ctl calls fail. Increment to 3 and hope that
that is sufficient. Also reload vivid with the same
cache_hints module option as the first modprobe for vivid.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
If there are multiple instances of vivid, then mi_get_media_fd() needs
to find the media device corresponding to the bus_info of the video
device, and not just return the first media device it finds in /dev.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
|
|
fail() by itself does not return, the correct usage is 'return fail();'
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Show the exact values for the exp_q.g_length(p) < buf.g_length(p)
check.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
In the eventual case where sizeimage is zero, userptr will fail.
So, add a default.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Implement a logic to detect between full-range and limited
range, instead of hardcoding it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Instead of hardcoding depth and other per-format properties,
place them into an array, in order to make easier to parse.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The 3rd argument should be a const char *, not a const char array.
This fixes a lot of compiler warnings for this source.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
decode_tm6000.c: In function ‘main’:
decode_tm6000.c:354:25: warning: ‘img’ may be used uninitialized [-Wmaybe-uninitialized]
354 | memcpy(buf,&img[pos],sizeof(buf));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
decode_tm6000.c:253:48: note: ‘img’ declared here
253 | unsigned char buf[TM6000_URB_MSG_LEN], img[720*2*480];
| ^~~
Just initialize img to all 0.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Sometimes, we just want to write files in raw mode, in order
to let some other utility to decode it. So, add a new program
option to force raw mode.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
If the device is in raw mode, it shouln't touch the image,
just store it as-is.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Those are pretty simple to add. As we don't have much to do with
that, just ignore the alpha channel, if present.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Now that planes support is in place, add support for YUV and
YVU 4:2:0 planar and semi-planar formats.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Planar formats usually place 3 planes. On YUV formats,
the plane 0 is luma, and planes 1 and 2 are for the chroma
components, which are usually decimated.
Add support for that at the core of the conversion logic.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Rewrite the conversion code in order to simplify the addition
of other YUV formats.
While here, also use full-range by default, preparing ground
to support other colorspace ranges.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Rely on colorspace/ycrcb encoding fields in order to handle
the YUV conversions. Currently, just BT.709 and BT.601 are
supported.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Right now, it colorspace parameters are not passed to the
conversion routines. However, those are needed at the conversion
routines, in order to be able to properly handle YUV conversion.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This is more commonly found those days. Yet, the right approach
would be, instead, to add full support for colorspace. So,
add a note there, while keeping the BT.601 table too.
As the hole idea of v4l2grab is to do quick tests, let's
keep using an integer arithimetic, as this should be faster.
Yet, let's improve its precision.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The conversion routines came from the vimc driver, where they
also re-scale and flip images vertically and horizontally
and can convert into several formats including Bayer.
So, it was done in two steps. As we just want to convert
everything into RGB24, this can be simplified in order
to avoid double-buffering.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Extend the logic to accecpt non-RGB24 formats.
The basic import the conversion logic from the vimc Kernel
driver, removing the scaling logic from it.
The YUV conversion logic is based on the formulas found at
Wikipedia.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Instead of just saying that libv4l doesn't support a format,
print its fourcc.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
|
|
This avoids a deprecation warning on Debian on /usr/bin/which.
|
|
That file used to be part of gettext but as of 0.21 it is not,
anymore. The file has been copied from gnulib.
|
|
Until now, if the remote device was in standby the test would just
abort with a message that the remote device should be woken up manually.
This patch changes this to attempt to automatically wake up the remote
device. Basically it adds the 'Wake up' to the core tests, but it is
only run if the remote device was in standby, otherwise it is skipped.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
|
|
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
|
|
Codec devices must have entity function MEDIA_ENT_F_PROC_VIDEO_ENCODER
or _DECODER. Check this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Fix confusing messages like this:
Transient state after 0 s, stable state On after 0 s
This really means that no transient state was reported, and only
a stable state.
Report this as such.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
"Device is woken up" suggests that the device has just woken up,
but what is actually meant is: "Wait for device to wake up".
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The poll_stable_power_status() function reported the unresponsive_time,
which is not the duration the device is unresponsive during a power state
transition, but the time of the last unresponsive attempt since the start
of that state transition.
That's not what was intended, so change unresponsive_time to
unresponsive_cnt where we keep track of the number of unresponsive
attempts. Adjust the messages accordingly.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Log the version info earlier and also log the command line arguments.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
There are too many issues with the vidtv driver. So for now drop it
from the list of drivers that the 'mc' target activates.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Since DVB can also use the media controller, add 'vidtv' to the
list of drivers that the 'mc' option enables.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Add a 'date' command at the beginning and the end to make it easier
to see how much time the script takes.
Also show the kernel version and v4l2-compliance version at the
start to check that the expected versions are used for testing.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
There was one other place where the scaler had to be configured.
Add this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
With the new vimc scaler patch the scaler has to be configured
correctly, otherwise the vimc test will fail.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Add -E (exit-on-fail) and -W (exit-on-warn) options.
This helps debugging test failures.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Often a return code is checked against allowed values. It is
very useful if that return code is shown in the fail message
if it has a wrong value. Add fail_on_test_val() for that.
Use it in v4l2-test-buffers.cpp to start with.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This returns back non-coherent (previously known as NON_COHERENT)
memory flag and buffer cache management hints testing (for VB2_MEMORY_MMAP
buffers).
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This merges the new vb2 non-coherent API.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Air conditioner codes typically have 100 pulse/space pairs (12 bytes +
headers). The resulting raw IR line length is 1063, which exceeds the
current 1024 byte buffer, and results in an error trying to parse the
line.
The buffers used to read pulse/space files are significantly larger than
needed so this decreases their size, and allocates the difference to the
buffer used to read raw IR files in order to keep the total size of
buffers the same.
Signed-off-by: Norman Rasmussen <norman@rasmussen.co.za>
Signed-off-by: Sean Young <sean@mess.org>
|
|
When a 32-bit application is running on a 64-bit kernel then there
can be two different VIDIOC_DQEVENT ioctls: one using 32-bit time
fields, one using 64-bit time fields (year 2038 safe).
Test that each version (if available) reports sane values.
This test is only run from the 32-bit version of v4l2-compliance.
It currently only supports VIDIOC_DQEVENT and not yet the ioctls
that use struct v4l2_buffer.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This check was missing, add it.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
- The hdmi-4k-600mhz version didn't set SCDC support
- Add support for the new Video Format Preference Data Block
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
sizeof(*msg->cmd) should have been sizeof(msg->cmd).
Also, call strncpy with siz - 1 instead of siz to avoid this
compiler warning:
CC libdvbv5_la-dvb-dev-remote.lo
In function ‘my_strlcpy’,
inlined from ‘send_buf.isra.0.constprop’ at dvb-dev-remote.c:350:2:
dvb-dev-remote.c:121:7: warning: ‘strncpy’ output truncated copying 1 byte from a string of length 12 [-Wstringop-truncation]
121 | rc = strncpy(dst, src, siz);
| ^~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Avoids having to call the constructor as it forwards the arguments
directly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The members can be initialized directly, allowing to remove the
onstructor.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
If the remote device doesn't support the Timer Feature, then do
not attempt to test for timer errors or overlapped timers.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The current wait time of 3 seconds is a bit too short, increase to
10 seconds.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Drop the unnecessary printf '\"' and incorporate the " instead in
the --date='format-local:"%F %T"' option.
It looks like this was a partial copy-and-paste from GIT_COMMIT_CNT,
but it is unnecessarily complex for GIT_COMMIT_DATE.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Idar Tollefsen <itollefs@cisco.com>
|
|
Properly comment this function.
As part of the commenting process several bugs were also fixed:
- when determining the Signal Free Time, ignore messages with
non-OK and non-NACK results, since in those cases nothing was
actually transmitted.
- always show the detected SFTs: this helps verifying that the
measured SFTs are sane. Before they were only shown if there
were failures or warnings, or if --verbose was used.
- the meaning of the first 'sft' array dimension was changed
(effectively inverted), making it a bit easier to explain what
it stood for.
- replace the various pending_tx_rx_*_msgs counters with just one
(pending_tx_rx_msgs). This really shouldn't happen at all, so it
is overkill to split it up by the possible rx results.
- multiple tx_status bits could be set, count them all and don't
stop at the first detected bit.
- add a new check to verify that only the oldest transmit result
was lost in the message queue.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When exporting buffers from a capture device
to an output device. There are several bugs:
1. The bytesused are set from the exported buffer,
the value might be bigger than the length of the output buffer.
2. The file descriptor field 'm.fd' in 'struct v4l2_buffer' is not set.
This patch fix those issues.
Testing:
modprobe vimc
modprobe vivid
//configure vimc pipeline
media-ctl -d platform:vimc -V '"Sensor A":0[fmt:SBGGR8_1X8/640x480]'
media-ctl -d platform:vimc -V '"Debayer A":0[fmt:SBGGR8_1X8/640x480]'
media-ctl -d platform:vimc -V '"Sensor B":0[fmt:SBGGR8_1X8/640x480]'
media-ctl -d platform:vimc -V '"Debayer B":0[fmt:SBGGR8_1X8/640x480]'
v4l2-ctl -z platform:vimc -d "RGB/YUV Capture" -v width=1920,height=1440
v4l2-ctl -z platform:vimc -d "Raw Capture 0" -v pixelformat=BA81
v4l2-ctl -z platform:vimc -d "Raw Capture 1" -v pixelformat=BA81
// export buffers from vimc capture device (/dev/video2) to vivid output device (/dev/video4)
v4l2-ctl -d2 --stream-mmap --out-device /dev/video4 --stream-out-dmabuf
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When an operation fails, print an error message
that specify the specific operation that failed
prefixed with the current function name.
This makes debugging less painful.
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The warning about a late reply or Feature Abort to a transmitted
message was rather vague. Show whether it is a late reply or a
late Feature Abort and report the opcode in human readable format.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Split off the tuner, record and timer tests into a separate
source since cec-test.cpp became a bit too big.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The 'Day error: November 31, at 6:00 am, for 1 hr.' test can also use
the send_timer_error helper.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
A single function dealt with tuner, record and timer messages,
split this up into three, one function for each type of message.
The programmed timer handling in the main processing loop is also
split off into its own function.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Start and stop recording as timers are scheduled. Schedule future timers
if a completed timer has a recording sequence. Delete overlapped and
unfinished timers. Reduce available media space when a recording is
completed.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Check that Timer Status and Time Cleared Status replies have a valid
operand. Send timers with out-of-range dates and check follower's
response. Send an out-of-range recording sequence and check that the timer
is not set. Send a duplicate timer and check that the timer is not set.
Set overlapping timers and check that the timer overlap warning is set.
In the follower, keep track of timers that have been received and warn
if there may be insufficient space for a programmed recording.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This change was totally wrong. All the existing drivers (except
rc-loopback) return the number of transmitters, not what would be
a valid mask. The documentation also says so.
This reverts commit eb47c00736586329a2043512dacb10fcf95aa58a.
Signed-off-by: Sean Young <sean@mess.org>
|
|
Signed-off-by: Sean Young <sean@mess.org>
|
|
Check that the recording device ignores a Standby message while it is
recording. When the recording is finished, check that the recording device
enters standby unless the recording device is the active source.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Expand the One Touch Record tests so that the follower and initiator know
their local and remote device types and respond accordingly. Send Record
TV Screen and check that Record On source replies are valid. Send Record
On source messages and check that Record Status replies are valid. Send
Record Off and check that the recording terminates.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The logging of the signal free time was no longer done when
show == true and verbose == false, fix the logic.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: 8639ff89 ("cec-ctl: report low drive without --verbose")
|
|
Use the same phrase as in the CEC specification.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The vidtv test requires CONFIG_MEDIA_CONTROLLER_DVB=y, so drop this
from the 'mc' target and if vidtv is explicitly selected as target,
then verify (if possible) that this config option is set.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Also document that vidtv is part of the all and mc targets.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When analyzing a low-level pin log with (--analyze-pin the low
drive condition was only reported if --verbose was also given.
But this is important enough that it should also be reported without
--verbose.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The CEC_MSG_ROUTING_INFORMATION handler fell through to the
CEC_MSG_GET_MENU_LANGUAGE handler for no good reason. Just return
instead.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
A device may use a Backup logical address (aka Reserved in CEC
Version < 2.0) if the logical addresses that the device would normally
used are unavailable. Since a Backup logical address is not unique to any
device type, it cannot be used to determine the device type of the
follower. Instead use the more accurate log_addr_type as returned by
CEC_ADAP_G_LOG_ADDRS to find the device type.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Remove the Record Status test for One Touch Record because the follower
sends these kinds of messages in response to Record On.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The convention is to have the type ("lirc_mode2/") prefixed so the
BPF loader knows what type it is.
Signed-off-by: Sean Young <sean@mess.org>
|
|
Logical Addresses 12 and 13 were called Reserved 1/2 in CEC 1.4,
but were renamed to Backup 1/2 in CEC 2.0. Follow that new name,
also because the corresponding #defines in cec.h use BACKUP as well.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
It is redundant to initialize a struct cec_msg variable with an empty list
if the variable is also initialized by a call to cec_msg_init. Remove
these redundant initializations.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Test that a deck in standby will wake up upon receiving the Deck Control
messages Eject or Play Forward.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This fixes the following warnings on a 32-bit system:
cec-test.cpp: In function ‘int deck_ctl_deck_ctl(node*, unsigned int, unsigned int, bool)’:
cec-test.cpp:742:69: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘time_t’ {aka ‘long int’} [-Wsign-compare]
742 | for (unsigned i = 0; deck_status == CEC_OP_DECK_INFO_SKIP_FWD && i < long_timeout; i++) {
| ~~^~~~~~~~~~~~~~
cec-test.cpp:754:69: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘time_t’ {aka ‘long int’} [-Wsign-compare]
754 | for (unsigned i = 0; deck_status == CEC_OP_DECK_INFO_SKIP_REV && i < long_timeout; i++) {
| ~~^~~~~~~~~~~~~~
cec-processing.cpp: In function ‘void testProcessing(node*, bool)’:
cec-processing.cpp:1105:47: warning: comparison of integer expressions of different signedness: ‘time_t’ {aka ‘long int’} and ‘unsigned int’ [-Wsign-compare]
1105 | (time(nullptr) - last_pwr_status_toggle > node->state.toggle_power_status)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
|
|
g++ version 7 has problems with this assignment:
v4l2_ext_controls vivid_ro_ctrls = {
.which = V4L2_CTRL_WHICH_REQUEST_VAL,
.count = 1,
.controls = &vivid_ro_ctrl,
};
Probably because 'which' is part of an anonymous union.
Go back to assigning this the old fashioned way to allow
v4l2-compliance to be compiled with g++ 7.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
|
|
Remove the Deck Status message test because invalid Deck Status messages
are already captured by cec-compliance in other tests.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Send all Deck Play commands and check that the follower implements them.
Test that the follower returns Feature Abort for invalid Play operands.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Send all Deck Control commands Skip Forward, Skip Reverse, Stop and Eject
and check the corresponding deck status. Test that the follower returns
Feature Abort for invalid Deck Control operands.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: move CEC_OP_DECK_CTL_MODE_EJECT up to after MODE_STOP]
|
|
Fix bad indentation in checkInput().
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The -setup option just does the device setup and test file generation
without running any tests or unloading modules.
This makes it easy to set everything up, but run the tests manually.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Add a lot of comments to explain the various tests. Also check
that all controls are filled in correctly upon completion of a
request, even if no controls were set in the queued request.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This will update v4l2-controls.h, adding _BITUL support
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Very old kernels do not have the _BITUL define. Test for this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
You want to be able to set the sleep values to e.g. 0.1 seconds,
so use a double instead of unsigned.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When sleeping before Image View On or Standby, clarify before which
message the Sleep comes. This makes it easier to grep for a sleep
for Standby or a sleep for Image View On.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Test that a valid Deck Status message is received in response to Give Deck
Status and that Give Deck Status automatic reporting can be turned on and
off. Test that the follower returns Feature Abort for an invalid Give Deck
Status operand.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
For CEC adapters using versions < CEC 2.0, read the CEC Features
as configured in the CEC adapter and emulate the features that are
present.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Several CDC helper functions were in cec-compliance.cpp, but
they belong to cec-test.cpp where the CDC tests happen. Move
them to cec-test.cpp.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Several audio helper functions that were in cec-compliance.cpp
really belong to cec-test-audio.cpp. Move them.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Update headers from latest media_tree/master kernel.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The warning about an invalid audio_out_delay was shown even
if the value was valid (1). Check if it is != 1 first.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Correctly detect and log hdr10, mpeg2 and vp8 control types.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Update to the latest kernel media headers.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The compliance utility didn't detect that V4L2_PIX_FMT_VP8_FRAME
represents a stateless decoder. Add support for this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
If audio_out_delay is not present in the message, then set
the value to 1.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Found with -Wimplicit-fallthrough
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Found by -Wmissing-prototypes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Use constexpr instead of const, ensuring these are all initialized
at compile time.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Rephrase error message to avoid the ugly:
'Expected no warnings, got 1 warnings'
Now it says: 'Expected no warnings, but got 1'
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
cec_ops_report_current_latency() hardcodes the audio_out_delay value
if it is unused, ignoring the actual value. Which is fine, except when
running a compliance test, then you want the actual value.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The warning when a reserved audio out delay value was used
didn't include that value 1 should be used instead. Clarify
this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
'type=list' lists all supported EDID types. This makes life a little
bit easier when trying out different EDIDs.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Either report it as '0x010203 (Name)' or '0x010203, 66051',
depending on whether the Vendor ID is a vendor that is known
by libcecutil.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The Vendor ID is just 24 bits, so report only 6 digits (%06x)
instead of 8 (%08x).
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Reported-by: Luca Di Gregorio <lucdig@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
|
|
If the controlling device simply stops sending audio rate messages, give
the cec-follower the ability to detect that it has not received an audio
rate message within 2 seconds as required. The cec-follower will quit the
audio rate controlled mode. Eliminate the need to measure an interval
between two audio rate messages.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Measure the interval since the last audio rate control message in
nanoseconds instead of seconds. Increasing the precision catches audio
rate messages that are late by less than a second.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The vivid controls are defined in two places: the header
and v4l2-test-buffers.cpp. Move them all to the header so they
are all in a single place.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Fix this coverity report:
*** CID 1452658: Control flow issues (NO_EFFECT)
/utils/v4l2-dbg/v4l2-dbg.cpp: 567 in main()
561 if (doioctl(fd, VIDIOC_DBG_G_CHIP_INFO, &chip_info, "VIDIOC_DBG_G_CHIP_INFO") != 0)
562 chip_info.name[0] = '\0';
563
564 if (!strncasecmp(match.name, "ac97", 4)) {
565 curr_bd = &boards[AC97_BOARD];
566 } else {
>>> >>> CID 1452658: Control flow issues (NO_EFFECT)
>>> >>> This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "board >= 0UL".
567 for (size_t board = boards.size() - 1; board >= 0; board--) {
568 if (!strcasecmp(chip_info.name, boards[board].name)) {
569 curr_bd = &boards[board];
570 break;
571 }
572 }
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: bafe32e7 ("v4l-utils: convert board_list to vector")
|
|
Add a test in cec-compliance that sends an Audio Rate Control message
with an invalid operand. Check that it receives a Feature Abort reply
due to the invalid operand. Add a response in cec-follower to Feature
Abort due to an invalid operand.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The controlling device should send an Audio Rate Control message at least
once every 2 seconds for active sensing. Add a test in cec-compliance to
delay the message by more than 2 seconds. Check the interval between
messages in cec-follower and warn if the delay is greater than 2 seconds.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
An Audio System can support Audio Rate Control, so add the
Audio System as a possible source in the Set Audio Rate test.
Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This struct is no longer used, remove it.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Add missing const to the static struct mbus_name mbus_names array.
Use struct v4l2_subdev_mbus_code_enum mbus_code = {}; instead of
memsetting the struct to zero. This is based on a patch from
Rosen Penev <rosenp@gmail.com>.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Forces evaluation at compile time and allows usage of a for range loop.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Allows getting rid of sizeof macros.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This is a C construct that is not really needed in C++.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Found with modernize-use-nullptr
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Found with modernize-use-auto
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
I found stvec to be a bit too obscure, so renamed it.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Found with modernize-use-using
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Removes boilerplate code with a slight reduction in size.
Ran through git clang-format
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Easier to read and allows removing some boilerplate code. Only a
moderate size increase.
Ran through git clang-format
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
FreeBSD doesn't have the same uevent and sys filesystem that Linux
does. So, use the VIDIOC_QUERYCAP ioctl to find out basic capabilities
for a device. The ioctl doesn't give us as much information, but it
gets things like webcams, VBIs, and radios. This is better than what
was there previously, which was returning unknown.
This makes some v4l-utils like v4l2-ctl a little more useful.
Signed-off-by: Trenton Schulz <trenton@norwegianrockcat.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Since the addition of the --without-libudev option automatic detection
of missing libudev have been broken and fails with,
configure: error: Package requirements (libudev) were not met:
Package 'libudev', required by 'virtual:world', not found
This is because autotools macro PKG_CHECK_MODULES action-if-not-found
behaves differently from most other macros,
As most of the original autoconf macros, there are boolean values
provided, for the cases when the check succeeded or failed. In
contrast with almost all of the original macros, though, the default
action-if-not-found will end the execution with an error for not
having found the dependency.
As the AS_IF check following the PKG_CHECK_MODULES prints a warning if
libudev is not found the intention can't have been to fail configure if
libudev not found. Fix this by setting have_libudev=no instead of
failing due to the default action.
Fixes: 49316dc21f806d0c ("configure.ac: Add --without-libudev option to avoid automagic dep")
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
If the v4l-utils repository is a git submodule the $(top_srcdir)/.git is
a file and not a directory. Update the shell checks to allow the test to
pass in both cases.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Always log the translated vendor ID string if available.
This helps debugging.
Also add a new vendor ID string.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
It is only needed if BPF is effectively used and the package is compiled for a
systemd based target.
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sean Young <sean@mess.org>
|
|
Import systemd's official suggestion [1] how this should be handled in packages
using autoconf. A side effect of this is the removal of the hardcoded fallback
path "/lib/systemd/system" which leaks build host information when cross
compiling v4l-utils and therefore defeats reproducible builds.
[1] https://www.freedesktop.org/software/systemd/man/daemon.html#Installing%20systemd%20Service%20Files
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sean Young <sean@mess.org>
|
|
At least v4l2-ctl -l now shows the proper type instead of 'unknown'.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
window()->windowHandle() can return NULL, in that case fallback
to a 1920x1080 screen resolution. Still better than a crash.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Fixed incorrect DisplayID timings (swapped front and backporches)
and wrong aspect ratio (1:1 instead of 16:9).
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Provide a more detailed description of the various EDID types.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
The first DTD had a wrong vsync (6 instead of 5). Fixed.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
This:
v4l2-ctl -c auto_exposure=3,exposure_time_absolute=100,auto_exposure=1,exposure_time_absolute=200
should turn into a single VIDIOC_S_EXT_CTRLS call with 4 controls instead
of 2 controls with just the last value for each control.
This helps testing VIDIOC_S_EXT_CTRLS to check if drivers handle this
correctly (only the last value for each control should be used).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
|
|
|
|
|
|
Add a new --show-edid option that dumps the EDID you would write
with --set-edid.
Updated existing EDIDs (fixing small edid-decode conformity warnings)
and add new EDIDs for displayport and 3 and 4 block EDIDs.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Don't warn about unexpected sequence counters for metadata streams:
the sequence counter is typically linked to the video capture to sync
the metadata with the video data. So the sequence counter would start
at a non-zero value and produce a warning when it shouldn't.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
|
|
With gcc 11 the min/max defines clash with what gcc provides,
so rename these defines. They are only used in the min3/max3
defines, so the change it kept to a minimum.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Gregor Jasny <gjasny@googlemail.com>
|
|
Verify that QUERY_EXT_CTRLS and QUERYCTRLS handle enumerating
only regular controls or only compound controls correctly.
Before v4l2-compliance only checked that enumerating all controls
was done correctly.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Check that the driver doesn't make up pixelformat descriptions.
It should be left to the v4l2 core.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Also drop the 'grep -v V4L2_PIX_FMT_H264_SLICE' in sync-with-kernel.sh.
This is now part of the stable API, so allow this.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
Sync with 5.12-rc1
Signed-off-by: Sean Young <sean@mess.org>
|
|
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sean Young <sean@mess.org>
|
|
Add comments to mention that keymap files are generated, and list which
tool was used to generate them and the kernel source filename.
This should make it less likely that generated files are used as
examples to contribute keymaps from, and more likely that upstream
changes are channeled through the right source tree.
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Sean Young <sean@mess.org>
|
|
Gettext 0.19.8 wants to see AM_GNU_GETTEXT_VERSION, but gettext 0.21
wants AM_GNU_GETTEXT_REQUIRE_VERSION.
Test if AM_GNU_GETTEXT_REQUIRE_VERSION is supported and use that,
otherwise fall back to AM_GNU_GETTEXT_VERSION.
This also prevents gettextize from overwriting configure.ac with
an updated AM_GNU_GETTEXT_VERSION version number, which was really
annoying since configure.ac is under version control.
Tested with both gettext versions.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Suggested-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
AM_GNU_GETTEXT_VERSION was changed accidentally to version 0.21 in
the previous commit, but this fails on some distros with an older
gettext. Go back to the old AM_GNU_GETTEXT_VERSION([0.19.8]).
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
If audio_out_delay is unused, then still check that:
1) the value is not a reserved value,
2) that the value is set to 1 as the recommended (sane) default.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
|
When V=0, suppress:
- make entering/leaving messages
- some scripting logic called on a few makefiles.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The print message there can dereference a null pointer, if
the first check is true.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Print an error if it can't adjust the size of the RCV buffer.
As it might still work, let the code to continue.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Use a define and add a few checks in order to avoid potential
mistakes in the future.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Clearly, the free() call should be for args.server ;-)
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
err_cnt is unsigned. So, it can't be below zero.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
If something goes wrong, just sleep and re-try inside the
timeout loop.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
It doesn't make sense to have a return NULL inside it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The current logic is broken for default values,
due to a misplaced '}'.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
descriptior->descriptor
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Reject it when the size doesn't match what's expected.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Add a check if the CA descriptor has at least 4 bytes, and
cleanup the logic, in order to avoid using magic numbers,
by using offsetof() and sizeof().
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Check if the size has the expected value.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
This is a very simple descriptor. Make the code equally simple.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
Instead of relying that all descriptors will report the
error conditions, add a generic handler, as it may help to
discover hidden problems.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
A fixup patch actually broke the parser, as it was copying data
to the wrong place.
Yet, while testing it, it was noticed some streams that have a
descriptor 0xa1 whose the language code is bogus:
| pcr PID 1539
|\ elementary service - 3 elementaries
|- elementary 0
|- | stream type 0x00
|- | PID 1
|- | Language .'. (0xcf 0x27 0x04)
|- elementary 1
|- | stream type 0x04
|- | PID 0
|- | Language ..& (0x01 0xcf 0x26)
|- elementary 2
|- | stream type 0x05
|- | PID 1280
|- | Language ... (0x00 0x01 0xcf)
So, clearly this is not an ATSC descriptor. So, improve the
logic to allow displaying invalid language codes, plus
check if the descriptor's size is what it was expected.
Fixes: 868ca548b10a ("libdvbv5: fix init of the ATSC service location")
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The realloc() call assumes that, when realloc() succeeds,
the return pointer is identical.
This should always be the case here, as the code is reducing
the size of the struct. Yet, an assumption like that can
be dangerous, if used with a library different than the
standard glibc.
So, let's store the returned pointer.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
The logic which detects changes at the DVB devices can leak
data or try to do double-free, if errors occur.
Fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|
|
If errors occur, ensure that the message buffer will be freed.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
|