Skip to content
Commit dad74e18 authored by Daniel J. Ogorchock's avatar Daniel J. Ogorchock Committed by Jiri Kosina
Browse files

HID: nintendo: prevent needless queueing of the rumble worker



This patch adds a check for if the rumble queue ringbuffer is empty
prior to queuing the rumble workqueue. If the current rumble setting is
using a non-zero amplitude though, it will queue the worker anyway. This
is because the controller will automatically disable the rumble effect
if it isn't "refreshed".

This change improves bluetooth communication reliability with the
controller, since it reduces the amount of traffic.

Note that we still send a few periodic zero packets to avoid scenarios
where the controller fails to process the zero amplitude packet. Without
sending a few to be sure, the rumble could get stuck on until the
controller times out.

Signed-off-by: default avatarDaniel J. Ogorchock <djogorchock@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent e93363f7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment