Re: [PATCH] HID: add new gamepad LED constants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My issue with the LED subsystem is that to my knowledge, the only thing that it currently exposes is an opaque brightness value that has plenty of different meanings depending on what is actually being exposed. It would need to be overhauled to support the usecase at hand, which would be a lot more work than just applying this patch, on top of all the other problems already mentioned with finding and using the sysfs LED interface.

With this change all the gamepad drivers could easily plumb through their device-specific way of exposing player IDs, and a userspace component could easily ensure consistency between logical player IDs and their LEDs.

If such a thing was attempted currently with gamepads that are wired up to LED classes, the userspace component would need to have special knowledge of each driver to be able to know which special brightness value to set to get player N to light up on the controller. This isn't solvable without significantly expanding the interface to the LED subsystem.

Michael, I assume such a userspace component is what you're shooting for with this work?

In SteamOS the individual gamepad drivers are modified to automatically apply player IDs from the joydev device IDs, which in turn are the logical game controller IDs that are exposed by libraries such as SDL to games and as such are reflected through their UI.

This was deemed too ad-hoc to be upstreamable and your patch seems like the right first step towards a cleaner, albeit slightly more complex solution. Trying to leverage the LED system seems a lot more complex, without adding any value to this solution.

Thanks,
 - Pierre-Loup

On 09/15/2014 09:06 PM, Michael Wright wrote:
On Mon, Sep 15, 2014 at 7:00 PM,  <simon@xxxxxxxxxxxxx> wrote:
One problem that exists is that many HID devices don't have an (embedded)
serial number, so identification can be confused if you have more that one
identical device.


That's a pretty serious problem since this is explicitly for multiple
gamepads connected to the same device, which will most likely be all
the same type.


--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux