• Daniel J. Ogorchock's avatar
    HID: nintendo: improve subcommand reliability · 6b5dca2d
    Daniel J. Ogorchock authored
    The controller occasionally doesn't respond to subcommands. It appears
    that it's dropping them. To improve reliability, this patch attempts one
    retry in the case of a synchronous send timeout. In testing, this has
    resolved all timeout failures (most common for LED setting and rumble
    setting subcommands).
    
    The 1 second timeout is excessively long for rumble and LED subcommands,
    so the timeout has been made a param for joycon_hid_send_sync. Most
    subcommands continue to use the 1s timeout, since they can result in
    long response times. Rumble and LED setting subcommands have been
    reduced to 250ms, since response times for them are much quicker (and
    this significantly reduces the observable impact in the case of a retry
    being required).
    Signed-off-by: default avatarDaniel J. Ogorchock <djogorchock@gmail.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    6b5dca2d
hid-nintendo.c 46.7 KB