AgeCommit message (Collapse)AuthorFilesLines
2021-09-15ir-ctl: increase the size of the buffer used to read raw filesSean Young1-3/+5
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>
2021-09-03v4l2-compliance: add new test for 32/64 bit time handlingHans Verkuil4-1/+193
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>
2021-09-03v4l2-compliance: add 0 check for v4l2_event reserved fieldHans Verkuil1-0/+1
This check was missing, add it. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-09-01v4l2-ctl: update test EDIDsHans Verkuil1-37/+37
- 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>
2021-09-01v4l-utils: libdvbv5: fix broken my_strlcpy callsHans Verkuil1-3/+3
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>
2021-09-01utils: replace push_back with emplace_backRosen Penev2-3/+3
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>
2021-09-01remove pointless constructorRosen Penev1-4/+2
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>
2021-08-25cec-compliance: fix broken timer testsHans Verkuil2-1/+9
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>
2021-08-12cec-compliance: wait up to 10s for Inactive Source replyHans Verkuil1-1/+1
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>
2021-08-11configure.ac: drop printf for GIT_COMMIT_DATEHans Verkuil1-1/+1
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>
2021-08-11cec-compliance: improve testLostMsgs testHans Verkuil1-58/+135
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>
2021-08-04v4l2-ctl: fix bugs found in streaming_set_cap2outDafna Hirschfeld1-1/+15
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>
2021-08-04v4l2-ctl: print specific error upon failureDafna Hirschfeld1-5/+19
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>
2021-07-28cec-compliance: improve warning about late replyHans Verkuil1-2/+4
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>
2021-07-13cec-compliance: add cec-test-tuner-record-timer.cppHans Verkuil4-1072/+1094
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>
2021-07-13cec-compliance: use send_timer_error for one more testHans Verkuil1-12/+1
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>
2021-07-13cec-follower: refactoring: split up overly long functionsHans Verkuil3-206/+240
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>
2021-07-13cec-follower: emulate programmed timer recordingsDeborah Brouwer4-2/+84
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>
2021-07-13cec: expand Timer Programming testsDeborah Brouwer6-101/+706
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>
2021-07-05ir-ctl: Revert "ir-ctl: print correct transmitter count"Sean Young1-6/+3
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>
2021-07-03ir-ctl: print correct transmitter countSean Young1-3/+6
Signed-off-by: Sean Young <sean@mess.org>
2021-07-01cec: add One Touch Record Standby testsDeborah Brouwer5-1/+87
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>
2021-07-01cec: expand One Touch Record testsDeborah Brouwer7-49/+442
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>
2021-07-01cec-ctl: log signal free time when (show && !verbose)Hans Verkuil1-3/+4
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")
2021-07-01cec-ctl: free signal time -> signal free timeHans Verkuil1-2/+2
Use the same phrase as in the CEC specification. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-06-30test-media: drop vidtv from mc, but warn if MC is disabled for DVBHans Verkuil1-2/+15
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>
2021-06-30test-media: add vidtv to the mc targetHans Verkuil1-3/+4
Also document that vidtv is part of the all and mc targets. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-06-28cec-ctl: report low drive without --verboseHans Verkuil1-33/+43
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>
2021-06-25cec-follower: fix incorrect fallthroughHans Verkuil1-1/+1
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>
2021-06-25cec-follower: use log_addr_type to get local device typeDeborah Brouwer3-5/+6
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>
2021-06-17cec-compliance: remove One Touch Record Status testDeborah Brouwer1-18/+0
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>
2021-06-16keytable: ensure BPF IR decoders use correct section nameSean Young10-35/+50
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>
2021-06-16libcecutil/cec-info.cpp: rename Reserved to BackupHans Verkuil1-2/+2
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>
2021-06-16cec: remove redundant struct cec_msg initializationsDeborah Brouwer7-86/+86
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>
2021-06-15cec: add Deck Control wake-up handling testsDeborah Brouwer2-0/+48
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>
2021-06-12cec-compliance/follower: fix type comparison warningsHans Verkuil2-3/+3
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>
2021-06-12v4l2-compliance: fix g++-7 compile errorHans Verkuil1-5/+9
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>
2021-06-12cec-compliance: remove Deck Status testDeborah Brouwer1-18/+0
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>
2021-06-12cec: add tests for Deck Play messageDeborah Brouwer2-14/+140
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>
2021-06-12cec: add tests for Deck Control messageDeborah Brouwer5-12/+177
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]
2021-06-11v4l2-compliance: fix bad indentationHans Verkuil1-2/+2
Fix bad indentation in checkInput(). Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-06-10contrib/test/test-media: add -setup optionHans Verkuil1-59/+86
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>
2021-06-09v4l2-compliance: improve request testsHans Verkuil3-20/+177
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>
2021-06-08v4l-utils: sync with media_tree masterHans Verkuil2-0/+8
This will update v4l2-controls.h, adding _BITUL support Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-06-08v4l-utils: patch v4l2-controls.hHans Verkuil2-0/+17
Very old kernels do not have the _BITUL define. Test for this. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-06-08cec-ctl: min/max-sleep arguments should be double, not unsignedHans Verkuil1-7/+7
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>
2021-06-07cec-ctl: improve 'Sleep' message in stress testHans Verkuil1-2/+2
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>
2021-06-04cec: add tests for Give Deck Status messageDeborah Brouwer4-35/+81
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>
2021-06-04cec-follower: emulate features for CEC versions < CEC 2.0Deborah Brouwer2-21/+23
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>
2021-06-04cec-compliance: move CDC helper functions to cec-test.cppHans Verkuil3-64/+60
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>

Privacy Policy