Sorry, I couldn't get your point of sending notification to userspace.
just describing my understanding, if we are in same page - For example if user touches a phone button, android gets the notification from touch driver and in its reaction it displays the button on screen and also uses sysfs interface (one way of implementation) to make vibrator vibrate (haptic feedback). sysfs open/enable handled by timed_output vibrator driver, which internally can enable/drive some vibrator via GPIO or Audio block etc. Here my case is Audio block and directly accessing Audio block registers is not suggested. So ALSA API inside the kernel which comes to mind. But now I am not sure if that is even possible and recommended.
So proper way I see is to remove sysfs interface and implement the glue layer of android and kernel using ALSA lib API to configure the mixer.
BR Shreshtha
On Fri, Apr 15, 2011 at 2:06 PM, Lu Guanqun guanqun.lu@intel.com wrote:
On Fri, Apr 15, 2011 at 04:27:08PM +0800, Shreshtha wrote:
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.
You might use input subsystem to notify the userspace, just like jack's implementation in sound subsystem.
Regards, Clemens
-- shreshthakumar@gmail.commailto:shreshthakumar@gmail.com
-- guanqun