From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: linux-input@vger.kernel.org, patches@opensource.cirrus.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: ff-core - Correct magnitude setting for rumble compatibility
Date: Mon, 6 Dec 2021 23:23:19 -0800 [thread overview]
Message-ID: <Ya8L5x7cL5GKmL0y@google.com> (raw)
In-Reply-To: <20211130135039.13726-1-ckeepax@opensource.cirrus.com>
On Tue, Nov 30, 2021 at 01:50:39PM +0000, Charles Keepax wrote:
> When converting a rumble into a periodic effect, for compatibility,
> the magnitude is effectively calculated using:
>
> magnitude = max(strong_rubble / 3 + weak_rubble / 6, 0x7fff);
>
> The rumble magnitudes are both u16 and the resulting magnitude is
> s16. The max is presumably an attempt to limit the result of the
> calculation to the maximum possible magnitude for the s16 result,
> and thus should be a min.
>
> However in the case of strong = weak = 0xffff, the result of the first
> part of the calculation is 0x7fff, meaning that the min would be
> redundant anyway, so simply remove the current max.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Applied, thank you.
--
Dmitry
prev parent reply other threads:[~2021-12-07 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 13:50 [PATCH] Input: ff-core - Correct magnitude setting for rumble compatibility Charles Keepax
2021-12-07 7:23 ` Dmitry Torokhov [this message]
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=Ya8L5x7cL5GKmL0y@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.