With the above PR and the below configuration, I finally have working alarms (plus it vibrates)!
/usr/share/ngfd/plugins.d/50-ffmemless.ini
[ffmemless]
system_effects_env = NGF_FFMEMLESS_SETTINGS
supported_effects = touch;touch_weak;touch_strong;release;release_weak;release_strong;drag_start;drag_fail;drag_boundary_drag_end;short;strong;long;notice;message;attention;alarm;ringtone
touch_TYPE = periodic
touch_WAVEFORM = custom
touch_CUSTOM = 2
touch_MAGNITUDE = 24000
short_TYPE = periodic
short_WAVEFORM = custom
short_CUSTOM = 5
short_MAGNITUDE = 24000
strong_TYPE = periodic
strong_WAVEFORM = custom
strong_CUSTOM = 5
strong_MAGNITUDE = 65535
long_TYPE = periodic
long_WAVEFORM = custom
long_CUSTOM = 5 # Heavy click
long_DURATION = 850
long_PERIOD = 150
long_MAGNITUDE = 24575
long_ATTACK = 0
long_ALEVEL = 0
long_FADE = 180
long_FLEVEL = 0
notice_TYPE = periodic
notice_WAVEFORM = custom
notice_CUSTOM = 5
notice_DURATION = 100
notice_REPEAT = 2
notice_DELAY = 500
notice_PERIOD = 0
notice_MAGNITUDE = 24575
notice_OFFSET = 0
notice_PHASE = 0
notice_DIRECTION = forward
notice_ATTACK = 0
notice_ALEVEL = 0
notice_FADE = 5
notice_FLEVEL = 0
message_TYPE = periodic
message_WAVEFORM = custom
message_CUSTOM = 1
message_DURATION = 240
message_REPEAT = 2
message_DELAY = 140
message_PERIOD = 50
message_MAGNITUDE = 27000
message_OFFSET = 0
message_PHASE = 0
message_DIRECTION = forward
message_ATTACK = 0
message_ALEVEL = 0
message_FADE = 80
message_FLEVEL = 0
attention_TYPE = periodic
attention_WAVEFORM = custom
attention_CUSTOM = 2
attention_DURATION = 100
attention_REPEAT = 3
attention_DELAY = 100
attention_PERIOD = 0
attention_MAGNITUDE = 37000
attention_OFFSET = 0
attention_PHASE = 0
attention_DIRECTION = forward
attention_ATTACK = 0
attention_ALEVEL = 0
attention_FADE = 5
attention_FLEVEL = 0
alarm_TYPE = constant
alarm_WAVEFORM = custom
alarm_CUSTOM = 1
alarm_LEVEL = 32767
alarm_DURATION = 4000
alarm_ATTACK = 1000
alarm_ALEVEL = 0
alarm_FADE = 400
alarm_FLEVEL = 0
ringtone_TYPE = constant
ringtone_WAVEFORM = custom
ringtone_CUSTOM = 1
ringtone_LEVEL = 32767
ringtone_DURATION = 24000
ringtone_REPEAT = 200
ringtone_DELAY = 400
ringtone_DIRECTION = forward
ringtone_ATTACK = 500
ringtone_ALEVEL = 2560
ringtone_FADE = 300
ringtone_FLEVEL = 4096
touch_weak_TYPE = periodic
touch_weak_WAVEFORM = custom
touch_weak_CUSTOM = 2
touch_weak_MAGNITUDE = 24000
touch_strong_TYPE = periodic
touch_strong_WAVEFORM = custom
touch_strong_CUSTOM = 5
touch_strong_MAGNITUDE = 24000
Some things like vibration on the keyboard are broken though as this configuration is for another driver, not targeting the qti-haptics one used by the Xperia.
Relevant journalctl -xe part (unsupported effects showcase)
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect -26256 is NOT supported
Xperia5 invoker[6314]: WARNING: Effect failed, id 1
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect -18992 is NOT supported
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 invoker[6314]: WARNING: Effect failed, id 2
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect 11296 is NOT supported
Xperia5 invoker[6314]: WARNING: Effect failed, id 3
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect -19136 is NOT supported
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 invoker[6314]: WARNING: Effect failed, id 4
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect 11872 is NOT supported
Xperia5 invoker[6314]: WARNING: Effect failed, id 5
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect 8416 is NOT supported
Xperia5 invoker[6314]: WARNING: Effect failed, id 6
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect 8560 is NOT supported
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 invoker[6314]: WARNING: Effect failed, id 7
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect 8704 is NOT supported
Xperia5 invoker[6314]: WARNING: Effect failed, id 8
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect 8560 is NOT supported
Xperia5 invoker[6314]: WARNING: Effect failed, id 9
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect 8416 is NOT supported
Xperia5 invoker[6314]: WARNING: Effect failed, id 10
Xperia5 ngfd[8682]: Vibra upload effect: Invalid argument
Xperia5 ngfd[8682]: Vibra erase effect: Invalid argument
Xperia5 kernel: qcom,haptics c440000.qcom,spmi:qcom,pm8150b@3:qcom,haptics@c000: predefined effect 11872 is NOT supported
Will add an edit tomorrow to see if ringtones work as well.
EDIT: can confirm that ringtones (with vibration) work; after digging a little deeper it seems that the configuration is actually correct for the current vibrator driver as the “effect” ID entries from the DTS match with the ones of the DRV260X driver. Keyboard/pulley vibrations work now as well without #define CACHE_EFFECTS
.