From: Michal MalĂ˝ Date: Fri, 2 Oct 2015 22:58:02 +0000 (+0200) Subject: Emulate FF_PERIODIC through FF_RUMBLE X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=9f27c49a5c5d0e53983a70c6d15aecc26b20dfa6;p=KLGD_FF_plugin.git Emulate FF_PERIODIC through FF_RUMBLE --- diff --git a/plugin/klgd_ff_plugin.c b/plugin/klgd_ff_plugin.c index 8a29bb1..076b1b0 100644 --- a/plugin/klgd_ff_plugin.c +++ b/plugin/klgd_ff_plugin.c @@ -1664,7 +1664,13 @@ int ffpl_init_plugin(struct klgd_plugin **plugin, struct input_dev *dev, const s /** Emulate periodic through rumble */ if (test_bit(FF_RUMBLE, dev->ffbit) && !test_bit(FF_PERIODIC, dev->ffbit)) { printk(KERN_NOTICE "KLGDFF: Emulating FF_PERIODIC through FF_RUMBLE\n"); + /* Fake full support of periodic effects*/ input_set_capability(dev, EV_FF, FF_PERIODIC); + input_set_capability(dev, EV_FF, FF_SINE); + input_set_capability(dev, EV_FF, FF_SQUARE); + input_set_capability(dev, EV_FF, FF_SAW_UP); + input_set_capability(dev, EV_FF, FF_SAW_DOWN); + input_set_capability(dev, EV_FF, FF_TRIANGLE); priv->memless_periodic_emul = true; } diff --git a/testmod/klgdff.c b/testmod/klgdff.c index c2e03d2..edd43aa 100644 --- a/testmod/klgdff.c +++ b/testmod/klgdff.c @@ -380,13 +380,13 @@ static int __init klgdff_init(void) gain = 0xFFFF; input_set_capability(dev, EV_FF, FF_CONSTANT); - //input_set_capability(dev, EV_FF, FF_RUMBLE); - input_set_capability(dev, EV_FF, FF_PERIODIC); + input_set_capability(dev, EV_FF, FF_RUMBLE); + /*input_set_capability(dev, EV_FF, FF_PERIODIC); input_set_capability(dev, EV_FF, FF_SINE); input_set_capability(dev, EV_FF, FF_SQUARE); input_set_capability(dev, EV_FF, FF_SAW_UP); input_set_capability(dev, EV_FF, FF_SAW_DOWN); - input_set_capability(dev, EV_FF, FF_TRIANGLE); + input_set_capability(dev, EV_FF, FF_TRIANGLE);*/ input_set_capability(dev, EV_FF, FF_RAMP); input_set_capability(dev, EV_FF, FF_SPRING);