aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-08-15final fixescec-johanJohan Fjeldtvedt2-5/+11
In cec-follower we keep track of whether messages that we have replied Feature Abort to, are re-sent within 200ms. This only applies to directly addressed messages, since those are the only ones we can reply FA to. In cec-compliance, we should treat a message as unrecognized if we received Undetermined as a Feature Abort reason. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-15cec-follower/compliance: fix makefile rules for generated headersHans Verkuil2-1/+5
The dependencies were not correct. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-15cec-follower: replace raw opcodes with namesJohan Fjeldtvedt4-3/+38
Use the name of the opcode instead of just the number when referring to opcodes in various info/warn/fail messages. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-15cec-compliance: replace raw opcodes with namesJohan Fjeldtvedt3-3/+31
Use the name of the opcode instead of just the number when referring to opcodes in various info/warn/fail messages. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-14cec-compliance: create table for CEC opcodesHans Verkuil4-3/+35
Create a cec-table.h that maps message opcodes to strings. There are two tables: one for the regular CEC messages and one for the CDC opcodes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12cec-follower: add cec-log.h to .gitignoreHans Verkuil1-0/+1
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12cec-compliance: add test for invalid operand in SAD requestJohan Fjeldtvedt1-0/+25
Check that the device actually replies with Invalid operand when an invalid System Audio Descriptor is requested. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12cec-compliance: check that ARC reports are recognizedJohan Fjeldtvedt1-2/+4
When we send Report ARC Initiated/Terminated back to the remote device, we should check that they are recognized. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12cec-compliance: add missing test for Report Power StatusJohan Fjeldtvedt1-2/+18
This checks whether Report Power Status is supported. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12cec-compliance: add new test result for refused messagesJohan Fjeldtvedt5-5/+140
This adds a new return value, REFUSED, for when a message is replied to with Feature Abort [Refused]. When this is the case, the test is marked as OK (Refused), which should be interpreted as "the feature is supported, but cannot be activated/used at this time." Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12cec-compliance: fix return reason when feature abortedJohan Fjeldtvedt3-7/+59
When Feature Abort (but recognized opcode) we currently warn, but we should also return PRESUMED_OK as the abort reason. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12cec-compliance: fix wrong abort reasonJohan Fjeldtvedt1-5/+5
We should treat "Unable to determine" as not supported, not "Refused". Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12cec-compliance: post test check should print failures alwaysJohan Fjeldtvedt1-2/+2
The post test check (for recognized/unrecognized opcodes consistency) should use fail instead of info to print the opcodes that are found to be inconsistantly handled. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-12add test for CDC discoveryJohan Fjeldtvedt5-0/+193
This adds a test for basic CDC discovery. The CDC_HEC_Discover message is broadcasted, and the bus is then monitored for incoming state reports. The follower responds to Discover messages and reports back that it does not support HEC. Functions are also added for getting string descriptions of various HEC state parameters. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-10cec-follower: clean up output layoutJohan Fjeldtvedt2-2/+2
This makes it easier to separate device info messages / state changes from the arriving messages when in verbose mode. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-10add test for Timer Programming featureJohan Fjeldtvedt2-3/+253
This adds basic tests for the messages in the Timer Programming feature. cec-follower is extended to recognize these messages and reply when receiving set- or clear timer requests. Comments are added with further suggestions. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-10add comments to new testsJohan Fjeldtvedt3-6/+71
The new tests for the remaining features are basic and should be expanded on later. This adds some comments about that and some TODO suggestions for the most obvious improvements. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-10cec-compliance: improve feature abort handlingJohan Fjeldtvedt3-71/+106
Currently, Feature Abort is treated as "not supported", but really that should only be the case when the abort reason is Unrecognized opcode or Refused. Otherwise, the message in question is known to the device, but the device can for some reason not handle it. This replaces many instances of checking cec_msg_status_is_abort with the unrecognized_op function introduced previously. The transmit_timeout function also now checks the reply and prints a warning if it is Feature Abort with another reason than Unrecognized opcode or Refused. Currently some tests will continue if Feature Abort (with other reasons) is received, but they will warn when this happens. This could be improved, but requires closer looks at every test. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-08add test for One Touch Record featureJohan Fjeldtvedt6-0/+116
This adds basic tests for the One Touch Record feature, and extends cec-follower to recognize the involved messages and reply where appropriate. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com>
2016-08-08cec-funcs.h: add reply argument for Record On/OffHans Verkuil1-2/+5
A reply parameter is added to the cec_msg_record_on/off functions in cec-funcs.h. The standard mandates that Record Status shall be replied to Record On, and it may be replied to Record Off. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-08-08add test for Tuner Control featureJohan Fjeldtvedt4-1/+263
This adds basic tests for the messages involved in the Tuner Control feature. cec-follower is extended to recognize those messages, and to respond to Give Tuner Device Status. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22add test for Deck Control featureJohan Fjeldtvedt6-0/+115
This adds rudimentary subtests for the various messages in the Deck Control feature. The follower is extended with minimal support. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22add test for Device Menu Control featureJohan Fjeldtvedt4-1/+65
This adds simple subtests for the Device Menu Control feature, and extends the follower to accept the relevant messages. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-compliance: keep track of recognized and unrecognized opcodesJohan Fjeldtvedt3-4/+83
Whenever we transmit something, we categorize the opcode as either recognized (we got back a reply if that was expected, or a feature abort with different reason than [Unrecognized opcode], or we got no reply when not expecting any). We also cateogrize opcodes based on manually received Feature Aborts. The [Abort Message] operand is used in this case. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22add test for Audio Rate ControlJohan Fjeldtvedt7-6/+74
This adds a new test for the Audio Rate Control, with a subtest for the Set Audio Rate message. The follower is extended to accept this message if its own Set Audio Rate bit is set, otherwise it Feature Aborts. Device features are now probed for during the topolgy scan, since those are needed by multiple tests. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-ctl: show the topology based on the physical addressesHans Verkuil1-2/+65
The --show-topology never actually showed the topology. Add that. Note that there is no support yet for detecting physical addresses for unregistered devices. So switches won't show up. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-ctl: add menu language and power status to the remote device infoHans Verkuil1-1/+39
Attempt to query the menu language and power status. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-follower: fix newline issuesHans Verkuil1-4/+5
Fix several newline issues (too many or too few). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-compliance: newline fixesHans Verkuil1-4/+4
Fix several newline issues (too many, too few). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-compliance: check power status before running testsJohan Fjeldtvedt4-23/+36
Probing the power status is now added to the topology discovery, and ensuring that the device is on is now done before starting the test run instead of as a subtest. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-compliance: ARC Rx terminate test is OK if reply was receivedJohan Fjeldtvedt1-5/+4
This cleans up the ARC Rx terminate test and makes it return 0 when OK and PRESUMED_OK when no reply was received back after sending the request. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-ctl: add check for --feat- and --rc- optionsHans Verkuil1-17/+23
These options can only be used in combination with selecting a device type (e.g. --tv). Also rearrange the usage message a bit to keep the device type options before these --rc and --feat options. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-compliance: split off the adapter tests, rename filesHans Verkuil6-884/+929
The CEC adapter tests became too large, split them off into a separate file. Also rename all the test files cec-test-<foo>.cpp. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-follower/cec-compliance: fix feat2s maskHans Verkuil2-2/+2
The feature byte was ANDed with 0x3e instead of 0x7e. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-compliance: improve device features testHans Verkuil1-3/+3
The last byte of the features was 0 in the original test. Because of that decision I missed a cec framework bug. Make sure the last byte isn't 0. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-22cec-ctl: implement featuresHans Verkuil1-2/+132
Add options to fill in the RC and Device Features. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-21cec-compliance: check that the DUT is powered onJohan Fjeldtvedt2-4/+20
A new subtest is added which checks the reported power status. If not in interactive mode, we assume that the device is on if the device doesn't support Give Device Power Status. In interactive mode we ask the user. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-21cec-compliance: extract common power status check codeJohan Fjeldtvedt1-42/+41
The common code for interactively asking the user to change power state and checking for the correct state is extracted into a new function. The logic is altered slightly: - The question is printed once, before the loop - It is checked for whether the device supports power status reporting at all. If it is, we will have to assume that the user did what was asked. TODO: return error code instead of bool to make the calling test know about this? - Not being able to retrieve the power status is accepted, and the user can try again instead of the test failing. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-21cec-follower: warn when aborted message is re-sent too quicklyJohan Fjeldtvedt2-0/+15
If a feature aborted message (with reason other than Unrecognized opcode), the initiator is recommended to wait at least 200 ms before retrying. We print a warning once if this happens. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-21cec-follower: warn if unrecognized message is re-sentJohan Fjeldtvedt2-1/+17
An initiator shall not send the same message again if it was feature aborted with Unrecognized opcode. Warn if this happens. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-21cec-compliance: fix expected LA masksJohan Fjeldtvedt1-2/+2
Some LA masks were not updated when they went from being used to decide which subtests to run for a device, to indicate which devices are expected to support the subtest instead. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-21cec-compliance: ARC Tx terminate test is OK if reply was receivedJohan Fjeldtvedt1-2/+4
The test result should be OK (Presumed) only if waiting for a reply to Terminate ARC timed out. If we do get a reply, we know it is OK. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-21cec-follower: update outdated comment.Hans Verkuil1-1/+1
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-21cec-follower: keep track of connected devicesJohan Fjeldtvedt3-4/+60
This keeps track of the devices the follower has seen by storing a timestamp for the last interaction with the device. If more than 15s pass since the last timestamp, it is polled to determine if it still there. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-19cec-follower: add periodical checks for RC press timeoutJohan Fjeldtvedt2-7/+34
This adds a timeout to the select call in the receive loop, so that things can periodically be performed. A check for timing out waiting for User Control Release is added. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-19cec-compliance: send release after presses in SAC testsJohan Fjeldtvedt1-45/+51
Send User Control Released following each User Control Pressed. Since we want to send the release right (or shortly) after the press, we need to manually receive the messages to see if a Report Audio Status was received. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-18cec-compliance: wake up is not unexpected for TVsJohan Fjeldtvedt1-1/+1
The subtest address mask was not updated after making one general wake up test. Fixed that. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-18cec-compliance: power status fixesHans Verkuil2-31/+83
- move one-touch-play and routing-control tests to the end: all power-related tests should be done last. - "No wakeup on Active Source" is OK for all device types, not just TV. - fix two incorrect wait_changing_power_status return code checks: the power status must remain the same, so it is an error if it changes. - add additional code to actually wait for the power status to stabilize before starting the tests. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-18cec-follower: check timing of RC messagesJohan Fjeldtvedt2-0/+195
This adds some checks for the Remote Control Passthrough messages, to give information and warnings about the behavior of the DUT. Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
2016-07-18cec-follower: add options for selectively printing informationJohan Fjeldtvedt3-32/+57
Two new options --show-msgs and --show-state are added. Received messages are only printed if --show-msgs is given as an option. Information from the emulated device (such as state changes or other notifications) is only printed if --show-state is given. Both are enabled when --verbose is given. v2: rename --show-device-info to --show-state Signed-off-by: Johan Fjeldtvedt <jaffe1@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Privacy Policy