A Angela Czubak #
Message details and related content
Hi Benjamin and Peter,
I am refreshing this old thread in order to clarify some things
discussed here :)
I specifically got lost when reading about virtual IDs for effects.
Asking more inline.
On Thu, Apr 18, 2019 at 7:00 AM Benjamin Tissoires
[off-list ref] wrote:On Fri, Apr 12, 2019 at 8:32 PM Sean O'Brien [off-list ref] wrote:quoted
On Fri, Apr 12, 2019 at 12:42 AM Peter Hutterer [off-list ref] wrote:quoted
Ahoi! On Thu, Apr 11, 2019 at 11:24:30AM -0700, Sean O'Brien wrote:quoted
Hi Benjamin and Peter, Thanks for your detailed replies. I'm glad you found it interesting :) On Wed, Apr 10, 2019 at 5:47 PM Peter Hutterer [off-list ref] wrote:quoted
Hey! I just have a few notes on top of what Benjamin said. On Wed, Apr 10, 2019 at 06:51:45PM +0200, Benjamin Tissoires wrote:quoted
Hi Sean, On Wed, Apr 10, 2019 at 1:29 AM Sean O'Brien [off-list ref] wrote:quoted
Hello, I'm currently working on designing an interface for controlling "forcepads"; that is, touchpads with force sensors and haptic actuators. Below is my proposal for the protocol at both the userspace and HID interfaces. I would appreciate any feedback you might have.Thanks a lot for starting this discussion. This is indeed an interesting topic, and I had a lengthy chat with Peter this morning :) First, I'd like to get a small clarification. In the proposal, you are making reference to both the HID side (so the hardware protocol) and the kernel side (the client protocol). I read it that you are trying to build two things: - the HID design proposal, aimed at hardware makers - the kernel behavior on how to use it
Was there some idea up then to implement virtual effect IDs? Right now it seems that the number of possible FF effects is limited to FF_MAX_EFFECTS and that it is the kernel and not the user space that assigns the ID when an effect is uploaded. Or was it more of a suggestion for the future than a requirement regarding the simple haptic feedback implementation?
quoted
quoted
quoted
quoted
quoted
But chromeOS might use different ids and different meaning for them. The first 2 ids first should be reserved for the kernel button left emulation though. Note that given that the effect memory is 'virtual' in the driver, we can use any id and we are not limited to a few numbers of them. An other thing is that we do not need to require WAVEFORM_PRESS and WAVEFORM_RELEASE. If they are set in the haptic device, the kernel can set them for us, but if they are not, userspace can always decide to put one of the other waveforms in ids 0 and 1. We should mention that not defining these two waveforms will induce a state were no haptic feedback will be automatically loaded from the kernel though (userspace will have to do it).True, I guess I would say it's strongly encouraged to include WAVEFORM_PRESS and WAVEFORM_RELEASE for that reason.quoted
quoted
quoted
Autonomous mode --------------- In order to facilitate an operating system which cannot handle force feedback, the forcepad should start up in “autonomous mode”, meaning it acts as a normal touchpad. This means it should perform the press and release haptic feedback autonomously at predefined force thresholds, and send the appropriate BTN_* events.I think that if we were to follow my idea of using effect ids 0 and 1 for release/press, we should mention that the kernel will play the effects stored as these ids.quoted
After verifying that all of the required haptic effects are available through the force feedback protocol, the OS can enable host-controlled mode. This could be done by writing to a sysfs node “host_feedback_enabled”.You don't really want a sysfs file here. Because if the input part
Regards, Angela
quoted
quoted
quoted
quoted
quoted
quoted
[0]: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt [1]: https://www.kernel.org/doc/Documentation/input/ff.txt [2]: https://www.usb.org/sites/default/files/hutrr63b_-_haptics_page_redline_0.pdf [3]: Usage ID 0x30 of HID usage table 0x0D. See chapter 16: https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf [4]: See section 6.2.2.7 of the HID specification: https://www.usb.org/sites/default/files/documents/hid1_11.pdf