
On Fri, Apr 15, 2011 at 1:27 PM, Clemens Ladisch clemens@ladisch.de wrote:
Shreshtha wrote:
Vibrator hardware is connected to D-Class amplifier of Audio block.
Does this mean that you have to generate the vibration waveform as sound data and write it to the sound device? This would be rather unwieldy in kernel space. (Just accessing a mixer control would be possible.)
[Shreshtha] Yes that is also a use case. But I require just to enable the
vibrator for x msec and turn it off. This is for haptic feedback. Please suggest how to "just accessing a mixer control" from kernel?
But as you described that accessing from out side the sound subsystem is prohibited in Kernel.
It's not prohibited, it's just not the way the API was designed.
[Shreshtha] So I feel even if I use the ALSA API (or OSS emulation) in
timed_output vibrator and manage to turn on the vibrator, that will not be accepted by kernel community.
So only way remains is to access the sound card from user space using ALSA
lib APIs and replace current usage of sysfs for haptic feedback. Please suggest if it is right direction.
Is the sysfs API a _required_ Android API, or would Android allow you to write a user space driver?
[Shreshtha] I found this one way of implementation seen on other devices.
There can be other, and now I feel I require one.
Regards, Clemens