From: Frank Praznik <frank.praznik@gmail.com>
To: simon@mungewell.org, Frank Praznik <frank.praznik@oh.rr.com>
Cc: HID CORE LAYER <linux-input@vger.kernel.org>,
Jiri Kosina <jkosina@suse.cz>
Subject: Re: [PATCH v4 7/7] HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs
Date: Fri, 04 Apr 2014 14:37:48 -0400 [thread overview]
Message-ID: <533EFBFC.1000105@gmail.com> (raw)
In-Reply-To: <9eabb4ae4fb93b4c51816953fc453e4f.squirrel@mungewell.org>
On 4/4/2014 12:11, simon@mungewell.org wrote:
> Why not make the triggers/etc apply across the board, so it doesn't matter
> which led the command is sent to - it's just registered/copied to the
> first (red?) led data[].
Unfortunately, it's not that simple. There is no API for setting
triggers from within the module and from looking at the code for these
triggers, some set the hardware blink rate which will blink the whole
light bar and some just use their own software timers and send
brightness commands which will only effect the LED they are set on which
results in unpredictable behavior depending on how the trigger is
implemented.
These software-only triggers are why I'm thinking it would be good to
have an extra global control for controlling the whole light bar
synchronously. Even if you set all the LEDs to the same software
trigger the colors may not flash in sync if the trigger starts a
separate timer for each LED and in some cases the trigger may mangle the
user defined brightness settings (ie. the heartbeat trigger doesn't read
the current brightness and just uses the maximum).
With an extra global switch, you can set the desired brightness levels
for each color, then just use the global control to set the on/off state
and get consistent blink behavior even if the trigger uses software
timers or doesn't care about the user's brightness settings. Plus, if
for some reason you do want to flash individual colors, setting the
blink rate of an individual color will always blink only that color
instead of potentially blinking the whole light bar if the trigger tries
to set the hardware blink rate.
I think it will be more functional, more predictable and less confusing.
>
>>> 3rd Party Intec - Was unable to get any controlled blinking.
>> It sounds like this controller just doesn't implement all of the
>> behavior of the official controller. I'm not sure how to fix it if it's
>> not obeying the instructions in valid output reports and I don't have
>> one to test personally. Do the lights flash properly when the
>> controller is used with a PS3?
> I presume that they just reversed engineered what they thought to be
> correct, I don't have a Playstation so can't confirm for certain.
>
> In my testing from a year ago or so, I could make the blink work via
> sending data with python. The script can be found here:
> http://www.spinics.net/lists/linux-input/msg28271.html
>
> Note: "Which LED to enable(LED1..4 << 1, 0x20=none)"
>
> Cheers,
> Simon
>
I'll take a look, but without having that particular controller all I
can do is take a shot in the dark.
next prev parent reply other threads:[~2014-04-04 18:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 16:31 [PATCH v4 0/7] HID: sony: More Sony controller fixes and improvements Frank Praznik
2014-04-02 16:31 ` [PATCH v4 1/7] HID: sony: Fix cancel_work_sync mismerge Frank Praznik
2014-04-03 12:24 ` Jiri Kosina
2014-04-02 16:31 ` [PATCH v4 2/7] HID: sony: Use inliners for work queue initialization and cancellation Frank Praznik
2014-04-02 16:31 ` [PATCH v4 3/7] HID: sony: Use a struct for the Sixaxis output report Frank Praznik
2014-04-02 16:31 ` [PATCH v4 4/7] HID: sony: Convert startup and shutdown functions to use a uniform parameter type Frank Praznik
2014-04-02 16:31 ` [PATCH v4 5/7] HID: sony: Use the controller Bluetooth MAC address as the unique value in the battery name string Frank Praznik
2014-04-02 16:31 ` [PATCH v4 6/7] HID: sony: Initialize the controller LEDs with a device ID value Frank Praznik
2014-04-02 16:31 ` [PATCH v4 7/7] HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs Frank Praznik
2014-04-04 5:55 ` simon
[not found] ` <533EBE48.5010100@oh.rr.com>
2014-04-04 16:11 ` simon
2014-04-04 18:37 ` Frank Praznik [this message]
2014-04-04 21:13 ` simon
2014-04-04 23:41 ` Frank Praznik
2014-04-09 5:51 ` simon
2014-04-09 17:41 ` Frank Praznik
2014-04-02 22:36 ` [PATCH v4 0/7] HID: sony: More Sony controller fixes and improvements Jiri Kosina
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533EFBFC.1000105@gmail.com \
--to=frank.praznik@gmail.com \
--cc=frank.praznik@oh.rr.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=simon@mungewell.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).