OSK use the common OSK app-id so allow that too.
Fixes: 4ba029d ("schema: Allow Stevia OSK to override the globla feedback level")
Signed-off-by: Guido Günther <agx@sigxcpu.org>
While we have "button-{pressed,released}" events there's often the
desire to control sound for key presses of e.g. on screen keyboards too.
Add separate events for that.
This allows us to e.g. add a particular sound for OSK key presses and
OSKs can send this with an `important` hint so they're also usable
in silent mode.
Closes: https://gitlab.freedesktop.org/agx/feedbackd/-/issues/85
Signed-off-by: Guido Günther <agx@sigxcpu.org>
While we have "button-{pressed,released}" events there's often the
desire to control sound for key presses of e.g. on screen keyboards too.
Add a separate event for that.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
The Nokia N900 and Motorola Droid 4 use obsolete naming for LEDs, as indicated
in include/dt-bindings/leds/common.h in the Linux kernel. Since the obsolete
naming is still in wide use, support them in feedbackd until it is eventually
removed in the kernel.
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
As noted in include/dt-bindings/leds/common.h in the Linux kernel, the Nokia
N900 has leds that use legacy naming. Until this naming scheme is removed from
the kernel, support it through the use of an additional FEEDBACKD_LED_COLOR
udev property, which must be set to the color corresponding to the LED.
Signed-off-by: Sicelo A. Mhlongo <absicsz@gmail.com>
The only non generic thing is that we pick up the sound
scheme from GNOME when available but we'd happily extend
that to other DEs.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Update the rule for the "platform-vibrator" entry to be like all the other rules, matching by
ATTRS{name} instead of ENV{ID_PATH}. Since it was matching for both gpio-vibrator and pwm-vibrator,
add entries for both.
Tested on Fairphone 2 which uses the gpio-vibrator driver.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Originally raised in cellbroadcast, but applies here as well
(because cbd yoinked large parts of meson.build!)
Signed-off-by: Evangelos Ribeiro Tzaras <devrtz@fortysixandtwo.eu>
When determining the value for the rumble we assigned the result to the
value in the array thus potentially overwriting the value from the theme.
This goes unnoticed as long as we don't lower the global `max_strength`
below the magnitude. But when we e.g. set the `max_strength` to
zero the device will fail to rumble when we increase `max_strength`
later on again.
Steps to reproduce:
- Use an event that used `VibraRumble`, e.g. `button-press`
in the oneplus,fajita device theme
- `fbcli -E button-pressed` -> works
- set haptic feedback to 0%:
`gsettings set org.sigxcpu.feedbackd max-haptic-strength 0.0`
- set it back to 100%:
`gsettings set org.sigxcpu.feedbackd max-haptic-strength 1.0`
- `fbcli -E button-pressed` -> no feedback
Signed-off-by: Guido Günther <agx@sigxcpu.org>
This makes sure we e.g. prefer multicolor leds over single color ones
and those that can be on insuspend (qcom) over those that can't.
We can extend this to allow to set the priority via udev/hwdb in the
future.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
While in theory we could have themes with only freq = 0 values we
currently assume there can be patterns.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
We assume that multicolor LEDs are RGB so reject those that don't
have three components.
E.g. the Framework Laptop exposes a power button LED as multicolor
that only has a white component. This way it gets treated as single color LED.
Signed-off-by: Guido Günther <agx@sigxcpu.org>