Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cec] Add settings for configuring button repeats #11222

Merged
merged 3 commits into from Feb 10, 2018

Conversation

popcornmix
Copy link
Member

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:

  • Remote button press delay before repeating (ms)
  • Remote button press repeat rate (ms)
  • Remote button press release time (ms)

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the Code guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the CONTRIBUTING document
  • I have added tests to cover my change
  • All new and existing tests passed

@popcornmix
Copy link
Member Author

Ping @opdenkamp

@wrxtasy
Copy link
Contributor

wrxtasy commented Feb 5, 2017

I've actually back ported this PR into AMLogic LibreELEC 8.0 Krypton that has LibCEC 4 support and results are noticeable improvements in CEC remote response times. 👍

@jenkins4kodi jenkins4kodi added the Rebase needed PR that does not apply/merge cleanly to current base branch label Nov 19, 2017
@jenkins4kodi jenkins4kodi removed the Rebase needed PR that does not apply/merge cleanly to current base branch label Nov 20, 2017
@Rechi
Copy link
Member

Rechi commented Jan 29, 2018

@popcornmix @opdenkamp ping

@popcornmix
Copy link
Member Author

I believe this is ready to go from my side.

@Rechi Rechi added Type: Improvement non-breaking change which improves existing functionality Component: Input v18 Leia labels Jan 30, 2018
@MartijnKaijser MartijnKaijser merged commit 48a6fc0 into xbmc:master Feb 10, 2018
@Rechi Rechi added this to the L 18.0-alpha1 milestone Feb 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Input Type: Improvement non-breaking change which improves existing functionality v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants