From: Pavel Machek <pavel@ucw.cz>
To: Frank Praznik <frank.praznik@oh.rr.com>
Cc: linux-input@vger.kernel.org, jkosina@suse.cz
Subject: Re: [PATCH 2/5] hid: sony: Add support for the Sony Motion Controller
Date: Tue, 5 May 2015 23:47:36 +0200 [thread overview]
Message-ID: <20150505214736.GA16332@amd> (raw)
In-Reply-To: <20150505213606.GB15218@amd>
Hi!
> Not sure how this is expected to work. I tried: (and did not get any
> vibrations).
Hmm. Seems I tried wrong device. But no vibrations with the right
device, either:
root@duo:/sys/class/leds/0003:054C:03D5.0002:global# echo 4 | fftest
/dev/input/event8
Force feedback test program.
HOLD FIRMLY YOUR WHEEL OR JOYSTICK TO PREVENT DAMAGES
Device /dev/input/event8 opened
Features:
* Absolute axes: X, Y, Z, RZ, Misc ,
[27 00 00 00 00 FF FF 7F ]
* Relative axes:
[00 00 ]
* Force feedback effects types: Periodic, Rumble, Gain,
Force feedback periodic effects: Square, Triangle,
Sine,
[00 00 00 00 00 00 00 00 00 00 03 07 01 00 00 00
]
* Number of simultaneous effects: 16
Setting master gain to 75% ... OK
Uploading effect #0 (Periodic sinusoidal) ... OK (id 0)
Uploading effect #1 (Constant) ... Error: Invalid argument
Uploading effect #2 (Spring) ... Error: Invalid argument
Uploading effect #3 (Damper) ... Error: Invalid argument
Uploading effect #4 (Strong rumble, with heavy motor) ... OK (id 1)
Uploading effect #5 (Weak rumble, with light motor) ... OK (id 2)
Enter effect number, -1 to exit
Now Playing: Strong Rumble
Enter effect number, -1 to exit
Read error
Stopping effects
root@duo:/sys/class/leds/0003:054C:03D5.0002:global#
If it has just one motor, should it say so in the description? Not
advertising both heavy and light motor.
If I do this, I can control vibrations using the "red" led. Value of
70 is lowest that produces anything...
Best regards,
Pavel
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 46e4ceb..de02a35 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1751,6 +1751,8 @@ static void motion_state_worker(struct work_struct *work)
#ifdef CONFIG_SONY_FF
report->rumble = max(sc->right, sc->left);
+ report->rumble = report->r;
+ printk("Rumble: %d\n", report->r);
#endif
hid_hw_output_report(hdev, (__u8 *)report,
@@ -1770,7 +1772,7 @@ static int sony_allocate_output_report(struct sony_sc *sc)
sc->output_report_dmabuf = kmalloc(DS4_REPORT_0x05_SIZE,
GFP_KERNEL);
else if (sc->quirks & MOTION_CONTROLLER)
- kmalloc(sizeof(struct motion_output_report_02),
+ sc->output_report_dmabuf = kmalloc(sizeof(struct motion_output_report_02),
GFP_KERNEL);
else
return 0;
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2015-05-05 21:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 2:34 [PATCH 0/5] Support for the Sony Motion Controller and other cleanups Frank Praznik
2015-05-05 2:34 ` [PATCH 1/5] hid: sony: Add the product ID for the Sony Motion Controller Frank Praznik
2015-05-05 2:34 ` [PATCH 2/5] hid: sony: Add support " Frank Praznik
2015-05-05 21:16 ` Pavel Machek
2015-05-05 21:24 ` Pavel Machek
2015-05-05 21:36 ` Pavel Machek
2015-05-05 21:47 ` Pavel Machek [this message]
2015-05-05 21:55 ` Pavel Machek
2015-05-05 23:37 ` Frank Praznik
2015-05-06 9:31 ` Pavel Machek
2015-05-05 23:28 ` Frank Praznik
2015-05-05 2:34 ` [PATCH 3/5] hid: sony: Correct Sony device ordering Frank Praznik
2015-05-05 2:34 ` [PATCH 4/5] hid: sony: Simplify LED initialization and eliminate redundant copies when updating LED states Frank Praznik
2015-05-05 2:34 ` [PATCH 5/5] hid: sony: Correct a typo in a HID descriptor comment and explain the odd Sixaxis axis mapping Frank Praznik
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=20150505214736.GA16332@amd \
--to=pavel@ucw.cz \
--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).