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

RPi, Generic: backport proposed patch to reduce IR latency #2623

Merged
merged 1 commit into from May 4, 2018

Conversation

@HiassofT
Copy link
Member

commented Mar 28, 2018

See https://www.spinics.net/lists/linux-media/msg131010.html

The current IR decoding is much too slow. Many IR protocols rely on
a trailing space for decoding (e.g. rc-6 needs to know when the bits
end). The trailing space is generated by the IR timeout, and if this
is longer than required, keys can be perceived as sticky and slugish.

The other issue the keyup timer. IR has no concept of a keyup message,
this is implied by the absence of IR. So, minimising the timeout for
this further improves the handling.

With these patches in place, using IR with the builtin decoders is much
improved and feels very snappy.

@MilhouseVH

This comment has been minimized.

Copy link
Contributor

commented Apr 2, 2018

This is in my nightly test builds since 28 March, and no problems reported so far.

On my NUC with Harmony One/RC6 remote these commits are working just fine.

@HiassofT

This comment has been minimized.

Copy link
Member Author

commented Apr 16, 2018

I've updated the backports with v2 of the patch series (see here https://www.spinics.net/lists/linux-media/msg131804.html) plus 2 additional fixes for the mce_kbd decoder (see here https://www.spinics.net/lists/linux-media/msg132145.html)

Changes since v1:

  • configurable timeout on mceusb receivers, should make these more snappy as well
  • fixes for MCE keyboard decoder
@HiassofT

This comment has been minimized.

Copy link
Member Author

commented Apr 18, 2018

Issues with mceusb receiver should hopefully be fixed now with upstream patch,

I've added back the mceusb commit plus a backport of the fix from here: https://patchwork.linuxtv.org/patch/48782/

@HiassofT

This comment has been minimized.

Copy link
Member Author

commented Apr 21, 2018

I've added a patch that should prevent a race between the keyup timer and incoming scancodes which can lead to bogus key up+down events while a button is pressed

@HiassofT HiassofT force-pushed the HiassofT:le9-ir-latency branch from 47bd2ad to 9362a39 Apr 21, 2018

@HiassofT

This comment has been minimized.

Copy link
Member Author

commented Apr 21, 2018

I've dropped today's change, my initial analysis was not correct and it probably doesn't fix the issue reported on the forum

@HiassofT

This comment has been minimized.

Copy link
Member Author

commented Apr 22, 2018

I've added backports of the IR_dprintk()->dev_dbg() changes in upstream 4.17-rc, together with dynamic debug this should allow us to diagnose the mceusb issue reported on the forum

@HiassofT

This comment has been minimized.

Copy link
Member Author

commented Apr 23, 2018

I added a commit that allows tweaking of 2 IR settings while testing things.

@HiassofT

This comment has been minimized.

Copy link
Member Author

commented Apr 25, 2018

I've dropped the 2 recently added debugging changes (2 milhouse builds with these are enough) and only added back the missing backport change to ir-lirc-codec.

This should be fine now, so I'd say wait a couple more days if issues are reported, then I'll squash it and we can merge

RPi, Generic: backport IR latency patch and mce_kbd/mceusb fixes
See https://www.spinics.net/lists/linux-media/msg131804.html
https://patchwork.linuxtv.org/patch/48681/
https://patchwork.linuxtv.org/patch/48680/
https://patchwork.linuxtv.org/patch/48782/

The current IR decoding is much too slow. Many IR protocols rely on
a trailing space for decoding (e.g. rc-6 needs to know when the bits
end). The trailing space is generated by the IR timeout, and if this
is longer than required, buttons can feel slow to respond.

The other issue is the keyup timer. IR has no concept of a keyup message,
this is implied by the absence of IR. So, minimising the timeout for
this makes buttons less "sticky"; the are released much quicker.

With these patches in place, using IR with the builtin decoders is much
improved and feels very snappy.

Signed-off-by: Matthias Reichl <hias@horus.com>

@HiassofT HiassofT force-pushed the HiassofT:le9-ir-latency branch from f77e19a to e131c14 May 4, 2018

@HiassofT

This comment has been minimized.

Copy link
Member Author

commented May 4, 2018

rebased and squashed

The patches have been applied to the upstream media tree and no issues have been reported in the last week. So this should be good to go in

@CvH
CvH approved these changes May 4, 2018

@CvH CvH merged commit 8463ee0 into LibreELEC:master May 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.