[cec] Add settings for configuring button repeats #11222
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add settings for configuring CEC button repeats
Motivation and Context
CEC remotes repeat at the rate the TV vendor chooses. This may be just a couple of times a second.
This is slow compared to other kodi controllers (lirc, keyboard, game controller) and makes kodi seem laggy.
I have added some changes that are now present in libCEC 4 that allow the CEC repeat messages to be ignored and replaced with messages more like a keyboard generates. The controls are:
CEC is a poorly implemented standard, and behaviour between different vendors is not consistent which makes these settings necessary. A CEC source may:
Send pressed on press and released on release.
Send pressed on press and periodically and released on release.
Send pressed on press and periodically and nothing on release.
The "release" setting can allow a timeout to be set to assume button is released after, for sources in the third category. This is not ideal as it means the release lags by the amount set. If the periodic repeat rate is high, then the release time can be set lower to reduce the lag.
If the repeat delay is left at 0 (the default) then the behaviour is unchanged.
Typically just changing the repeat delay to, say 150ms will enable this feature and scrolling becomes much quicker. The other options only need adjusting in a minority of cases where source doesn't behave as desired.
How Has This Been Tested?
Has been present in Raspberry Pi builds for over a year.
Screenshots (if appropriate):
Types of change
Checklist: