• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Accessories Gamepad vibration support

AbhiKag

Lurker
The EventHub code uses an inotify interface watching /dev/input/eventXX. This code will look for a registered evdev node for each input device and collect capabilities (via ioctl) when a new device is added.
Certain gamepad drivers have the following flow (which is not recommend, but...):
  1. Set some capabilities
  2. Register device with input core (and subsequently, evdev handler)
  3. Set FF capability
The kernel evdev handler creates a corresponding /dev/input/eventXX node during step 2; invoking the EventHub inotify code. This may lead to a race condition, where, EventHub may collect device capabilities before the FF capability is set by the driver.

This may result in Inputflinger reporting no vibration support even if the driver/gamepad actually supports it!

Is this a genuine issue? Is there a way around this?
 
Back
Top Bottom