ffmemless: Plugin for ff-memless vibra backend

Vibra plugin for kernel ff-memless type of force feedback event
device backend. Features include:
- effect setup from ffmemless.ini
- system level effect settings override from feedback.ini
- fall-back default effect in case of missing effect data
- configuration of policy from data/event.d/*.ini files by
  setting "ffmemless.effect" for each event which requires vibra
- play / pause / stop according to configured policy
- profile aware for "vibrating.alert.enabled" flag (no vibra
  playback if not enabled)
- replaces immvibe plugin as default "media.vibra" resource

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: Add basic effects for all events

Added new effects NGF_LONG, NGF_STRONG, and NGF_CLOCK
for ffmemless plugin.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: Documented valid values for effect parameters

Wrote documentation comments to ffmemless.ini about the valid
parameter ranges and default values for ffmemless effects.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: added effects for all required events

Added a basic setup of vibra effects for all events that had also
immvibe effects defined. The effects were tested on N9.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: document rumble default magnitude

Added missing comment for rumble _MAGNITUDE. The default value
for it is taken from NGF_DEFAULT_RMAGNITUDE in case the parameter
is not defined for an effect.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: Change hardcoded direction values to macro constants

There are macro constants available for direction variable in
the ffmemless library part. Take those to use instead of hard-
coded values.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: fix ffm_get_int_value return value on NULL

In case the given key is not found in props , default to min
value instead of 0 as there is no guarantee that 0 is on
the valid range of values.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
profile: Add comment about fallback profile usage.
resource: change functionality.

Resource plugin looks for media.* properties in request proplist.
1) if no media.* is found in proplist, default for ENABLED for all
sinks.
2) if media.foo is found in proplist, default for DISABLED for all
sinks, and enable only those specifically enabled in proplist.
ffmemless: Add debug for ffm_get_int_value

Added a debug trace for ffm_get_int_value to more easily
detect oddities in parameters.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: Add effect repeat support

Added effect repeat support to ffmemless plugin. The plugin detects if
sound.repeat is TRUE and plays the effect INT32MAX times (effectively
infinitely for user). There is also new settings parameter
"_REPEAT" to create single shot effects that consist of multiple
vibrations.

This patch fixes also a issue with the plugin not reporting
the end of playback on single shot effects.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: Add specific effect for SMS

Added new effect for SMS that utilizes the REPEAT functionality.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: Document system settings file usage

Added comments to ffmemless ini about the system level settings
file usage.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
ffmemless: Tune STRONG, BATTERYLOW and CLOCK effect parametes

Tuned the effect parameters a bit to make them nicer. Made
battery_low use also the lately added repeat functionality.

Signed-off-by: Kalle Jokiniemi <kalle.jokiniemi@jollamobile.com>
Merge branch 'dev' of https://github.com/jusa/ngfd