Re: [android-porting] What does the setDelay mean in the sensor HAL?

2011-01-12 Thread Chinmay S
Hi, The setdelay() is a hint to the driver from the framework as to how frequently it should report the events. You can implement the following: 1. Pass the value to the driver using the sysfs/ioctls. (preferably SYSFS) 2. Use interrupt-based functionality to updated a array of accel-values in

Re: [android-porting] Touch screen calibration apk

2011-01-12 Thread Chinmay S
Hi, AFAIK, calibration using TSLIB is done before compilation in code (i.e. during building/testing support for the device's touchscreen). The values generated in the file *pointercal* by TSLIB are used to code the static-constants in the file: *frameworks/services/java/com/android/server/InputDe

Re: [android-porting] Re: Touch screen calibration apk

2011-01-18 Thread Chinmay S
Hi Dako, The touchscreen is comparatively stable component. - Its response doesn't vary over time/temp. - Response of individual screens (same model,make) do not differ largely. But, different touchscreen-models differ in their response. Also, what matters is the actual mounting of the touchscree

Re: [android-porting] Re: Touch screen calibration apk

2011-01-18 Thread Chinmay S
Hi, Also, there have been significant changes in how Android handles the touchscreen-events in Gingerbread. If you working on gingerbread, then you might want to have a look at this thread. http://groups.google.com/group/android-porting/browse_thread/thread/08158b8069a01382/8b2aa8d41336b077 Rega

Re: [android-porting] What does the setDelay mean in the sensor HAL?

2011-01-19 Thread Chinmay S
Hi, The HAL need NOT bother about multiple apps running. The HAL's responsibility seem to be just: - controlling the driver (using sysfs-interface), - obtaining the data from driver (via input-events), - performing any callibration/conversion/filtering specific to the device & - passing up the pr

Re: [android-porting] Re: NFC Smart poster and Tag reader

2011-01-19 Thread Chinmay S
Hi All, Here is some info which i have been able to gather on NFC so far. Android platform has NFC support in the framework starting from Gingerbread. Also Hardware support (NFC-chip & antenna) is required for this to work. i.e. so far i know of only one mobile that supports NFC on Android-GB, t

Re: [android-porting] Re: Setting default screen-orientation

2011-01-24 Thread Chinmay S
Hi, The sensors HAL is definitely where you should look to make these changes. It should be a simple matter of swapping the values reported for x and y by the driver. (and/or reversing the signs) to get the 90degree offset in orientation right. The sensor-HAL for froyo being a single-file (Senso

Re: [android-porting] Gyros landscape axle inverted

2011-01-25 Thread Chinmay S
Hi, Looks like you are referring to the auto-rotate feature of android. It is dependent on the accelerometer values. (NOT gyroscope). As it so very often happens, the accelerometer-IC is mounted in different position/orientation on different devices. This introduces the need to remap the axes.

Re: [android-porting] Re: Gyros landscape axle inverted

2011-01-26 Thread Chinmay S
Hi, To quickly build just the *sensors.c*, you can run the *mm* command in the sensors directory. The target executable (sensors..so) in the *out* directory then needs to be pushed onto the device at the path */system/lib/hw/sensors..so* and device rebooted once. But, you will still need the com

Re: [android-porting] Re: Gyros landscape axle inverted

2011-01-26 Thread Chinmay S
Hi, If the file *sensors.rk28board.so* is generated then it indicates that the sensors-HAL exists. The common implementation of the sensor-HAL (before and until FroYo) is using a single sensors.c file. Most of the times it can be found in one of these directories: - android-root/device// - andro

Re: [android-porting] Re: Gyros landscape axle inverted

2011-01-26 Thread Chinmay S
Hi, *Just a note:* The sensor-HAL is NOT part of the default android-source. It is left to the vendor to implement the necessary functionality of the sensor-HAL. The interfaces, which the sensor-HAL needs to implement, are defined in *android-root/hardware/libhardware/include/sensors.h ** *If you

Re: [android-porting] Reverse landscape orientation in Froyo

2011-03-02 Thread Chinmay S
Hi, Looks like the API was added in GB ( no support in FroYo :( ) Will putting ur app in 90 mode & flipping the graphics in you app work? You might want to have a look at this. http://groups.google.com/group/android-developers/browse_thread/thread/3ae9364ee6674c8f regards CVS -- unsubscribe:

Re: [android-porting] Re: Reverse landscape orientation in Froyo

2011-03-03 Thread Chinmay S
Hi, The link just contains confirmation that landscape(270) is NOT supported on Froyo. http://groups.google.com/group/android-developers/browse_thread/thread/3ae9364ee6674c8f By flipping the graphics, i meant the drawables or any rendering you have onscreen can be designed in a flipped manner. So

[android-porting] Re: What does the setDelay mean in the sensor HAL?

2011-03-22 Thread Chinmay S
Hi Chih-Wei The Sensor-HAL is used as a means to abstract the kernel/hardware level details. *sensors_control_open* lies in the control path of sensor HAL. It is called by the sensor-service which runs as part of system_server. * sensors_data_open* lies in the data path of sensor HAL. It is call

Re: [android-porting] libsensors: how to simulate rotation 180

2011-03-22 Thread Chinmay S
Hi Chih-Wei, I have seen android devices which support *auto-rotate* to 0, 90, 270 degrees orientations. But in all the devices i have worked on, i have NOT seen 180. ( These are actual devices with accelerometer h/w in them too. ) As far as i know, Android does NOT support ALL 4 orientations by

Re: [android-porting] Re: What does the setDelay mean in the sensor HAL?

2011-03-22 Thread Chinmay S
Hi, Regarding the multiple instances of .so files getting dynamically-linked to various processes, There might be some doc somewhere which says that. My conclusions were from studying the "framework" code and experimenting and observing the results on a device with my "custom" HAL in place. Here

Re: [android-porting] Re: What does the setDelay mean in the sensor HAL?

2011-03-23 Thread Chinmay S
Hi, As far as i have seen, even thought multiple apps (apks) register for sensor data, ONLY one app at a time will be in the "foreground" i.e. it will be active. So ideally, we should never have two apps competing for events as you observe. Can you please elaborate what your setup is doing. I am

[android-porting] Re: FW: Help needed on Android sensor service/sensor HAL

2011-03-23 Thread Chinmay S
Hi Palanivel, The *open_input()* function in *sensors.cpp* will search for all the input devices and pick the device depending on its name. Look through your *open_input()* function for the name (string) it is comparing with to identify the sensor device. Ensure that this name is unique and no ot

Re: [android-porting] Re: What does the setDelay mean in the sensor HAL?

2011-03-24 Thread Chinmay S
Hi, As far as i know, Android FroYo doesn't support 180-degree rotation by default. It can go as far as 0, 90, 270. (portrait, landscape, reverse-landscape) But no reverse portrait. This looks to be a quirk in WindowManager (not sensors). Sensors are able to detect all 4 orientations and report

Re: [android-porting] How does the reboot into recovery mode work?

2011-03-30 Thread Chinmay S
Hi Bjarke, When the kernel reboots into recovery-mode, its a warm-reset. (NOT a cold-reset where contents of ALL registers are lost.) Before warm-reboot, the kernel sets a particular register to a specify value (the value in this register is retained even after a warm-reset.) The bootloader just

Re: [android-porting] Re: How does the reboot into recovery mode work?

2011-04-01 Thread Chinmay S
Hi Bjarke, You are on the right track. But unfortunately pointing out "one-place" or "one-file" is not possible right now, as we do not know the device/architecture you are working on. Things are further complicated by the fact that we do not know which bootloader you are going to use on your de