[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2516866.vuYhMxLoTh@dek-x230>
Date: Thu, 25 Jun 2020 23:57:05 -0400
From: David Korth <gerbilsoft@...bilsoft.com>
To: David Rheinsberg <david.rheinsberg@...il.com>
Cc: Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
"open list:HID CORE LAYER" <linux-input@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] HID: wiimote: Initialize the controller LEDs with a device ID value
On Thursday, June 25, 2020 3:09:46 AM EDT David Rheinsberg wrote:
> Hi
>
> On Thu, 25 Jun 2020 at 00:09, David Korth <gerbilsoft@...bilsoft.com> wrote:
> > I've been manually setting the player IDs on Wii controllers when running
> > multiplayer games by writing to the /sys/class/leds/ directory. Having the
> > hid-wiimote driver do this itself significantly reduces setup time.
>
> What do you mean with "reduces setup time significantly"? Why would it
> take that long to set the LEDs?
>
> Thanks
> David
The LED setup in this case is done entirely manually by me writing to the
individual files in /sys/class/leds/. This has to be done when the controllers
are connected initially, and if a controller has to be reconnected for some
reason (e.g. it runs out of batteries). I don't know of any userspace tools
that would make this easier to automate, except maybe a shell script, and I'd
probably still need to run it manually.
Both the Sixaxis and Xpad drivers appear to implement something similar, so
perhaps a higher-level "player number" mechanism that works with all
controllers would be worth looking into. This could in theory be done with a
userspace daemon too (or a udev hook).
As it is right now, I still think implementing it in the wiimote driver is the
best method to keep it consistent with the rest of the drivers without having
to install additional userspace tools.
Thanks
Powered by blists - more mailing lists