aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
16 hourscec-compliance: improve warning about late replyHEADmasterHans 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>
2021-06-04cec-compliance: move audio helper functions to cec-test-audio.cppHans Verkuil3-199/+199
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>
2021-06-04v4l-utils: sync with media_tree/masterHans Verkuil3-23/+25
Update headers from latest media_tree/master kernel. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-05-28cec-compliance: skip warning if audio_out_delay is 1Hans Verkuil1-1/+1
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>
2021-05-27v4l2-ctl: add new control typesHans Verkuil1-0/+18
Correctly detect and log hdr10, mpeg2 and vp8 control types. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-05-27v4l-utils: sync with upstream media_tree masterHans Verkuil11-71/+1618
Update to the latest kernel media headers. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-05-27v4l2-compliance: V4L2_PIX_FMT_VP8_FRAME is for stateless decoderHans Verkuil1-0/+1
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>
2021-05-27cec-compliance: hardcode audio_out_delay to 1 if not setHans Verkuil1-0/+2
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>
2021-05-27v4l-utils: add missing fallthroughRosen Penev1-1/+2
Found with -Wimplicit-fallthrough Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-05-27v4l-utils: add missing staticRosen Penev6-6/+6
Found by -Wmissing-prototypes Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2021-05-26mass constexpr conversionsRosen Penev22-74/+74
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>
2021-05-26cec-compliance: improve error messageHans Verkuil1-1/+1
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>
2021-05-21cec-compliance: use the actual audio_out_delay valueHans Verkuil1-0/+5
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>
2021-05-21cec-compliance: clarify a warningHans Verkuil1-3/+4
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>

Privacy Policy