From: simon@mungewell.org
Cc: HID CORE LAYER <linux-input@vger.kernel.org>,
Jiri Kosina <jkosina@suse.cz>,
Frank Praznik <frank.praznik@oh.rr.com>
Subject: Re: [PATCH v4 7/7] HID: sony: Add blink support to the Sixaxis and DualShock 4 LEDs
Date: Wed, 9 Apr 2014 01:51:23 -0400 [thread overview]
Message-ID: <5ab597fe6a7cc937a8d41df6df7adc47.squirrel@mungewell.org> (raw)
In-Reply-To: <533EBE48.5010100@oh.rr.com>
[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]
Unfortunately I was unable to find the 'led chaining' code I mentioned. I
guess it has been lost to the sands of time....
>> 3rd Party Intec - Was unable to get any controlled blinking. As
>> previously
>> mentioned all leds flash (automatic, as if first plugged in) whenever
>> all
>> leds are turned off.
>> I can control all leds in a static on/off mode, but can't set any
>> blinking/timer behaviour
>
> 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 was able to patch the code so that I could turn all LEDs off my Intec
controller, see attached. Tested this against the Intec and the SixAxis.
I was not able to make the LEDs flash in a controlled fashion, so you
might be right about the controller not working properly - although my
comments in python script suggests I did have something going.... must be
missing a snippet of info.
I also found that on the SixAxis, when I reported that I had to set 1st
LED off before I could set it on.... this only applies when the controller
was off and then plugged into USB. At this point the LEDs are slow
flashing, and the 'brightness' reports as 1 (driver code only writes to
device if value is changed).
If the device was already on (LEDs flashing) then only the 1st LED is set
on plug in, and I can turn LEDs off/on straight away.
Cheers,
Simon
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-HID-hid-sony-allow-3rd-party-INTEC-controller-to-tur.patch --]
[-- Type: text/x-patch; name="0001-HID-hid-sony-allow-3rd-party-INTEC-controller-to-tur.patch", Size: 1122 bytes --]
>From a0597309d26ddecb5d4662d9e3bcb4d2689b7ed5 Mon Sep 17 00:00:00 2001
From: Simon Wood <simon@mungewell.org>
Date: Tue, 8 Apr 2014 21:39:59 -0600
Subject: [PATCH] HID: hid-sony - allow 3rd party INTEC controller to turn off
all leds
Without this patch the 3rd party INTEC (PS3) controller will blink all
leds when user turns them off, it appears to require an extra flag set.
Signed-off-by: Simon Wood <simon@mungewell.org>
---
drivers/hid/hid-sony.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index aa5ece5..45cb8b6 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1423,6 +1423,10 @@ static void sixaxis_state_worker(struct work_struct *work)
report.data.leds_bitmap |= sc->led_state[2] << 3;
report.data.leds_bitmap |= sc->led_state[3] << 4;
+ /* Set flag for all leds off, required for 3rd party INTEC controller */
+ if ((report.data.leds_bitmap & 0x1E) == 0)
+ report.data.leds_bitmap |= 0x20;
+
/*
* The LEDs in the report are indexed in reverse order to their
* corresponding light on the controller.
--
1.8.1.2
next prev parent reply other threads:[~2014-04-09 5:51 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
2014-04-04 21:13 ` simon
2014-04-04 23:41 ` Frank Praznik
2014-04-09 5:51 ` simon [this message]
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=5ab597fe6a7cc937a8d41df6df7adc47.squirrel@mungewell.org \
--to=simon@mungewell.org \
--cc=frank.praznik@oh.rr.com \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.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).