OSDN Git Service

android-x86/frameworks-native.git
11 years agoupdate SF binder protocol to support setting display attributes
Mathias Agopian [Wed, 25 Jul 2012 03:43:54 +0000 (20:43 -0700)]
update SF binder protocol to support setting display attributes

no change of functionality -- the old behavior is implemented
on top of this new protocol.
this new protocol will allow, eventually, to pass informations
about displays and layer stacks.

Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc

11 years agoSurfaceFlinger cleanup
Mathias Agopian [Tue, 24 Jul 2012 06:11:29 +0000 (23:11 -0700)]
SurfaceFlinger cleanup

mostly refactored SurfaceFlinger.h, but also removed dead code.
cleaned-up a few includes as well.

Change-Id: Ib15f4ffe567912b61ee98aa076c6a283b72811b5

11 years agoFixed bug in opengl es binding generation
Thomas Tafertshofer [Mon, 23 Jul 2012 23:52:32 +0000 (16:52 -0700)]
Fixed bug in opengl es binding generation

This fixes the glgen code generation for methods
which have a buffer arg that can be NULL.

Bug: 6845189
Change-Id: I5fb745b806601e5665f97bfd15fd865cd9c241ed

11 years agoMerge "glgen stubs to fix bad methods in gles20 bindings"
Mathias Agopian [Mon, 23 Jul 2012 23:25:43 +0000 (16:25 -0700)]
Merge "glgen stubs to fix bad methods in gles20 bindings"

11 years agoMerge "Update the EGL_ANDROID_fence_sync spec."
Jamie Gennis [Mon, 23 Jul 2012 23:21:58 +0000 (16:21 -0700)]
Merge "Update the EGL_ANDROID_fence_sync spec."

11 years agoUpdate the EGL_ANDROID_fence_sync spec.
Jamie Gennis [Fri, 20 Jul 2012 18:55:07 +0000 (11:55 -0700)]
Update the EGL_ANDROID_fence_sync spec.

Change-Id: I26589e51c2023aed4da8a25a098b01804200ddc2

11 years agoIncrement iterator on early-out too
Jesse Hall [Mon, 23 Jul 2012 20:11:19 +0000 (13:11 -0700)]
Increment iterator on early-out too

Bug: 6860046
Change-Id: I82f9e4062cb58d5479c9d8dc5f2f0770a1dcc605

11 years agoMerge "Handle empty HWC layer list when composing"
Jesse Hall [Sun, 22 Jul 2012 01:51:20 +0000 (18:51 -0700)]
Merge "Handle empty HWC layer list when composing"

12 years agoHandle empty HWC layer list when composing
Jesse Hall [Thu, 19 Jul 2012 23:44:38 +0000 (16:44 -0700)]
Handle empty HWC layer list when composing

Bug: 6777877
Change-Id: I71e9b948d04dda33d45cfa986d9c7e28328cf749

12 years agoMerge "Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible."
Nick Pelly [Fri, 20 Jul 2012 16:46:14 +0000 (09:46 -0700)]
Merge "Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible."

12 years agoglgen stubs to fix bad methods in gles20 bindings
Thomas Tafertshofer [Thu, 19 Jul 2012 23:50:08 +0000 (16:50 -0700)]
glgen stubs to fix bad methods in gles20 bindings

this adds correct versions of the broken GLES20 methods
glGetShaderSource, glGetActiveAttrib and glGetActiveUniform.
the old broken methods are still there and need to be @hide later.

Bug: 6006380
Change-Id: Ide74242ada54b85459b459ae4f20cd26a23c7610

12 years agoAdd elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.
Nick Pelly [Thu, 19 Jul 2012 16:17:24 +0000 (09:17 -0700)]
Add elapsedRealtimeNano(), and use CLOCK_BOOTTIME where possible.

Change-Id: I4231c8ca32663e6e2cb5b7c126d091f837373807

12 years agofactor EGL/GL and surface creation out of DisplayHardware
Mathias Agopian [Thu, 12 Jul 2012 21:25:33 +0000 (14:25 -0700)]
factor EGL/GL and surface creation out of DisplayHardware

Change-Id: Icd85a6a4caad06f056578008af3e21666fa8b1f4

12 years agomVisibleLayersSortedByZ is now maintained per display
Mathias Agopian [Wed, 11 Jul 2012 20:48:17 +0000 (13:48 -0700)]
mVisibleLayersSortedByZ is now maintained per display

Change-Id: Idcdb77eba1a3f99b3e4b2150128a82acaffcd2a8

12 years agoMerge "OpenGL bindings fix for methods with iobuffer args"
Mathias Agopian [Thu, 19 Jul 2012 01:31:41 +0000 (18:31 -0700)]
Merge "OpenGL bindings fix for methods with iobuffer args"

12 years agoMerge "Remove @hide from the generated EGL 1.4 API"
Mathias Agopian [Thu, 19 Jul 2012 01:30:45 +0000 (18:30 -0700)]
Merge "Remove @hide from the generated EGL 1.4 API"

12 years agoMerge "Remove unused layer flags."
Jeff Brown [Mon, 16 Jul 2012 23:18:23 +0000 (16:18 -0700)]
Merge "Remove unused layer flags."

12 years agoRemove unused layer flags.
Jeff Brown [Mon, 16 Jul 2012 23:05:50 +0000 (16:05 -0700)]
Remove unused layer flags.

Change-Id: Ia85365f18770a9a2c0a0e30ae56b6c2226d41be6

12 years agoMerge "surfaceflinger: call into hardware composer to blank screen"
Colin Cross [Mon, 16 Jul 2012 22:58:28 +0000 (15:58 -0700)]
Merge "surfaceflinger: call into hardware composer to blank screen"

12 years agoMerge "Remove freeze(), unfreeze() and setFreezeTint()."
Jeff Brown [Mon, 16 Jul 2012 22:53:12 +0000 (15:53 -0700)]
Merge "Remove freeze(), unfreeze() and setFreezeTint()."

12 years agoMerge "Remove freezeDisplay(), which is no-op."
Jeff Brown [Mon, 16 Jul 2012 22:53:07 +0000 (15:53 -0700)]
Merge "Remove freezeDisplay(), which is no-op."

12 years agoRemove freeze(), unfreeze() and setFreezeTint().
Jeff Brown [Mon, 16 Jul 2012 22:38:18 +0000 (15:38 -0700)]
Remove freeze(), unfreeze() and setFreezeTint().

This is all dead code.

Change-Id: I646673aac793a6ec45021c370a2450f0ea4fbcce

12 years agoRemove freezeDisplay(), which is no-op.
Jeff Brown [Mon, 16 Jul 2012 21:58:11 +0000 (14:58 -0700)]
Remove freezeDisplay(), which is no-op.

Change-Id: I2b70249a1545636fd6d98b58057b22f9529cad21

12 years agoam 647336c7: am e0daeb39: Fixed sample video corrupted in MediaCodec mode.
Edwin Wong [Sat, 14 Jul 2012 00:54:30 +0000 (17:54 -0700)]
am 647336c7: am e0daeb39: Fixed sample video corrupted in MediaCodec mode.

* commit '647336c76e8da68fb44ca52ec14a8a2c6d5735bb':
  Fixed sample video corrupted in MediaCodec mode.

12 years agoRemove @hide from the generated EGL 1.4 API
Thomas Tafertshofer [Thu, 12 Jul 2012 22:54:56 +0000 (15:54 -0700)]
Remove @hide from the generated EGL 1.4 API

Change-Id: Ia5707533fcf1186ef648b8a4e25987f5e7e7dea3

12 years agosurfaceflinger: call into hardware composer to blank screen
Colin Cross [Fri, 13 Jul 2012 00:56:34 +0000 (17:56 -0700)]
surfaceflinger: call into hardware composer to blank screen

Call into the new HWC blank operation to blank or unblank the screen.
Legacy systems may have already blanked the screen via early suspend,
and can choose to not implement the blank operation in their hardware
composer implementation.

Change-Id: Ib403c8c0e36367a2cfef3e1d124872fcfeb9e7cb

12 years agoam e0daeb39: Fixed sample video corrupted in MediaCodec mode.
Edwin Wong [Fri, 13 Jul 2012 22:12:23 +0000 (15:12 -0700)]
am e0daeb39: Fixed sample video corrupted in MediaCodec mode.

* commit 'e0daeb3933e034f037630715e4cd2ecb3880498b':
  Fixed sample video corrupted in MediaCodec mode.

12 years agoFixed sample video corrupted in MediaCodec mode.
Edwin Wong [Wed, 11 Jul 2012 02:57:26 +0000 (19:57 -0700)]
Fixed sample video corrupted in MediaCodec mode.

Change-Id: Ibe11a83199f3db1ba6266a1a9e11c7fc24ceb554
related-to-bug: 6732061

12 years agoOpenGL bindings fix for methods with iobuffer args
Thomas Tafertshofer [Thu, 12 Jul 2012 18:16:20 +0000 (11:16 -0700)]
OpenGL bindings fix for methods with iobuffer args

This changes generation of the OpenGL bindings to prevent
crashes of methods with more then one nio buffer argument.

Bug: 6772416
Change-Id: I4eff25c2f568dea78a6ffd3e95ff4620ab4b3b7d

12 years agoMerge "one more step towards multiple display support"
Mathias Agopian [Thu, 12 Jul 2012 00:19:00 +0000 (17:19 -0700)]
Merge "one more step towards multiple display support"

12 years agoMerge "improve glgen tool to support EGL1.4"
Mathias Agopian [Wed, 11 Jul 2012 23:07:39 +0000 (16:07 -0700)]
Merge "improve glgen tool to support EGL1.4"

12 years agoimprove glgen tool to support EGL1.4
Thomas Tafertshofer [Fri, 15 Jun 2012 23:22:43 +0000 (16:22 -0700)]
improve glgen tool to support EGL1.4

- added EGL1.4 bindings generation
- fixed bugs in GLES bindings

Bug: 6709865
Change-Id: I04ac63f652e1968a51eb833f47e00336ea449980

12 years agoone more step towards multiple display support
Mathias Agopian [Fri, 29 Jun 2012 21:12:52 +0000 (14:12 -0700)]
one more step towards multiple display support

- remove dependency on cached state in validateVisibility
- get rid of mVertices and mTransformedBounds
- get rid of validateVisibility
- get rid of unlockPageFlip
- handleTransaction now returns a dirty region
- computevisibileregion now uses window-manager space

12 years agoFix check for fence merge success
Jesse Hall [Tue, 3 Jul 2012 20:41:54 +0000 (13:41 -0700)]
Fix check for fence merge success

Change-Id: I9b16526ebfe4ffabf7c4372cca9b192ce046aa21

12 years agoOnly set acquire fences on overlay layers
Jesse Hall [Mon, 2 Jul 2012 23:49:28 +0000 (16:49 -0700)]
Only set acquire fences on overlay layers

Change-Id: I08e8173f83580de5a4e43a0ba5ea03e5ec6e8782

12 years agoPass fence to HWC on first use of buffer
Jesse Hall [Fri, 29 Jun 2012 22:21:18 +0000 (15:21 -0700)]
Pass fence to HWC on first use of buffer

Also do a CPU-wait on the fence before using it for GL composition.

Change-Id: I0f645a42a44803276cae11b904e5a26d65871562

12 years agoReturn fence from acquireBuffer
Jesse Hall [Thu, 28 Jun 2012 21:27:53 +0000 (14:27 -0700)]
Return fence from acquireBuffer

Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666

12 years agoPass fences with buffers from SurfaceTextureClient
Jesse Hall [Thu, 28 Jun 2012 19:52:05 +0000 (12:52 -0700)]
Pass fences with buffers from SurfaceTextureClient

Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3

12 years agoMerge "Clarify aborted updateTexImage use of fences"
Jesse Hall [Fri, 29 Jun 2012 16:54:25 +0000 (09:54 -0700)]
Merge "Clarify aborted updateTexImage use of fences"

12 years agoMerge "Return fence to client in dequeuBuffer"
Jesse Hall [Fri, 29 Jun 2012 16:54:08 +0000 (09:54 -0700)]
Merge "Return fence to client in dequeuBuffer"

12 years agoadd a way to enable debugging sensors at runtime
Mathias Agopian [Fri, 29 Jun 2012 02:46:54 +0000 (19:46 -0700)]
add a way to enable debugging sensors at runtime

if debug.sensors is true, extra debugging
sensors are enabled and HAL provided sensor fusion
is disabled

Change-Id: I9b093424edb8c5363d1337237cdf6abe4ab266f9

12 years agoimprove sensor fusion
Mathias Agopian [Fri, 29 Jun 2012 01:21:43 +0000 (18:21 -0700)]
improve sensor fusion

we now use a better quaternion propagation equation
this is especially beneficial for lower gyroscope rates

Change-Id: Ifbf273c8a092a8849ca4fe4b9bca30787e924018

12 years agoadd some comments
Mathias Agopian [Thu, 28 Jun 2012 01:51:43 +0000 (18:51 -0700)]
add some comments

Change-Id: Ia2e2c9531715fc2bd5b51c4dc58389e01abfe7e6

12 years agoget rid of GraphicPlane
Mathias Agopian [Thu, 21 Jun 2012 00:51:20 +0000 (17:51 -0700)]
get rid of GraphicPlane

its functionality is now folded into DisplayHardware
there will be more changes in that area.

12 years agoClarify aborted updateTexImage use of fences
Jesse Hall [Thu, 28 Jun 2012 22:06:53 +0000 (15:06 -0700)]
Clarify aborted updateTexImage use of fences

When updateTexImage acquires a buffer but then aborts (due to an error
or the buffer being rejected), it releases the newly-acquired buffer.
It was passing the buffer slot's fences to releaseBuffer, even though
they hadn't been created after the acquire yet. This wasn't a bug,
since the fences would be cleared just after the buffer slot was last
released, but explicitly passing null fences makes this clearer.

Change-Id: I087f2ec3fd02c40f57782c1fca24eb9567e2943d

12 years agoReturn fence to client in dequeuBuffer
Jesse Hall [Mon, 25 Jun 2012 20:54:23 +0000 (13:54 -0700)]
Return fence to client in dequeuBuffer

Change-Id: Ic19750793ad993f0e85391f3cabd743ba565d4c9

12 years agoFirst prototype atttempting to support an external display
Mathias Agopian [Tue, 19 Jun 2012 01:06:45 +0000 (18:06 -0700)]
First prototype atttempting to support an external display

both API and implementation will change, this is just a prototype
intended to show feasability.

SurfaceFlinger is passed an ISurfaceTexture through a new
callback, it is in turn used to create an EGLSurface which
surfaceflinger will draw into in addition to the main screen.

Change-Id: Id0bbb0b854bb7bae44d57246a90b65d4567f9a21

12 years agomove sensorservice from frameworks/base to frameworks/native
Mathias Agopian [Thu, 28 Jun 2012 21:47:54 +0000 (14:47 -0700)]
move sensorservice from frameworks/base to frameworks/native

this commit also imports all of sensorservice history.

Change-Id: Iadffcc92be600c48175b8afadcb15b6648532b3f

12 years agosmall improvement to sensor fusion
Mathias Agopian [Tue, 19 Jun 2012 01:49:08 +0000 (18:49 -0700)]
small improvement to sensor fusion

1) there was a typo when computing the system covariance
a term in dT^3 was ommitted; the impact was was very limited
because of how small this term is.

2) initialize the system covariance matrix with non-zero
values for the gyro-bias part. this improves the initial
bias estimation speed significantly.

3) added comments here and there

Change-Id: I4328c9cca73e089889d5e74b9fda99d7831762dc

12 years agofix a potential buffer overflow in sensorservice
Mathias Agopian [Thu, 31 May 2012 01:08:30 +0000 (18:08 -0700)]
fix a potential buffer overflow in sensorservice

Bug: 6580560
Change-Id: Icf6cafbca09174515a964a7cd69d8cc589ad52de

12 years agoFix a stack corruption in sensorservice
Mathias Agopian [Wed, 30 May 2012 02:46:14 +0000 (19:46 -0700)]
Fix a stack corruption in sensorservice

Bug: 6576732
Change-Id: If0f2fb0d0c35b932fb77cd262e676042145b28f9

12 years agofix a typo causing sensor event to be sorted in reverse chronological order
Mathias Agopian [Fri, 20 Apr 2012 01:18:24 +0000 (18:18 -0700)]
fix a typo causing sensor event to be sorted in reverse chronological order

Change-Id: I041c64616d88ed1abb5efc90ed9eb0d9baeb4832

12 years agousea socketpair instead of a pipe in BitTube
Mathias Agopian [Tue, 3 Apr 2012 01:38:02 +0000 (18:38 -0700)]
usea socketpair instead of a pipe in BitTube

Bug: 6252830
Change-Id: I363cc7e9f73a5b7d8bbccee312c6d8938c84e99a

12 years agoRename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
Steve Block [Fri, 6 Jan 2012 19:20:56 +0000 (19:20 +0000)]
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c

12 years agoRename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
Steve Block [Thu, 5 Jan 2012 23:22:43 +0000 (23:22 +0000)]
Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69

12 years agoRename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE
Steve Block [Wed, 4 Jan 2012 20:05:49 +0000 (20:05 +0000)]
Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea

12 years agoRename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
Steve Block [Tue, 20 Dec 2011 16:23:08 +0000 (16:23 +0000)]
Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298

12 years agohandle EINTR when calling sensor HAL's poll function
Mathias Agopian [Thu, 10 Nov 2011 01:50:15 +0000 (17:50 -0800)]
handle EINTR when calling sensor HAL's poll function

some sensor HALs don't handle EINTR, make sure to catch it in the
sensorservice.

also if we ever encounter an error that we can't handle, we abort
which will restart us (or the whole system process if we're running
in it)

Bug: 5511741
Change-Id: I7051882b06980f778736b53d6cd021a99b5ca8d2

12 years agoSensorService now always clamps the requested rate
Mathias Agopian [Tue, 8 Nov 2011 05:21:47 +0000 (21:21 -0800)]
SensorService now always clamps the requested rate

Requested rate will be clamped to the minimum rate and then
to 1ms. Previously we would return an error if a lower
rate was asked. The SensorManager documentation wording
allows this change.

We do this to get more consistancy between all the sensor
drivers / HALs

Change-Id: I199f76486fb76ccbb11e7280460a03726c767e84

12 years agofix an issue where SensorService could request an invalid sensor delay
Mathias Agopian [Wed, 2 Nov 2011 00:37:49 +0000 (17:37 -0700)]
fix an issue where SensorService could request an invalid sensor delay

When the app requests "fastest", the java layer encodes this as a
delay of 0. SensorService was passing this unchanged to the HAL.
However the HAL is required to reject delays lower that the
advertised lower delay.

Change-Id: I92be77acd3af62ffeb49e4b31e24ddcd203510e2

12 years agoRename SensorChannel to BitTube
Mathias Agopian [Fri, 21 Oct 2011 01:42:02 +0000 (18:42 -0700)]
Rename SensorChannel to BitTube

12 years agoimprove sensorservice dumpsys
Mathias Agopian [Wed, 14 Sep 2011 23:43:34 +0000 (16:43 -0700)]
improve sensorservice dumpsys

Change-Id: I8b53d5cab884c3aca16d95df5fbf288368d52e8b

12 years agoimprove sensorservice_test output
Mathias Agopian [Tue, 13 Sep 2011 05:16:01 +0000 (22:16 -0700)]
improve sensorservice_test output

Change-Id: I6248b6f1f001fedec1bddcddfcd2b381d9bb4bf4

12 years agoFix a few style issues and remove LOG spam
Mathias Agopian [Thu, 25 Aug 2011 01:40:33 +0000 (18:40 -0700)]
Fix a few style issues and remove LOG spam

Change-Id: I6b6f75373f4ac28f98dea6a6f1c2567a6aa02243

12 years agoMore error checks to avoid div by zero.
Michael Johnson [Fri, 19 Aug 2011 18:47:08 +0000 (11:47 -0700)]
More error checks to avoid div by zero.

Change-Id: I18e5b72d02bf5420c14334d3a03f18fa40572d31

12 years agoFix occasional fusion divergence by detecting it and resetting the fusion.
Max Braun [Thu, 18 Aug 2011 01:22:52 +0000 (18:22 -0700)]
Fix occasional fusion divergence by detecting it and resetting the fusion.

Change-Id: I51186e12fb9b2316e3671e3908174f4495df89a0

12 years agohave the sensorsevice test print the delay of the first received event
Mathias Agopian [Tue, 16 Aug 2011 00:10:23 +0000 (17:10 -0700)]
have the sensorsevice test print the delay of the first received event

Change-Id: I89d63122574c3f8790f00512c76d59b463acf18f

12 years agosilence sensorservice when it's dropping events
Mathias Agopian [Thu, 21 Jul 2011 01:51:15 +0000 (18:51 -0700)]
silence sensorservice when it's dropping events

Change-Id: Ib05862e545aa780821aa605e45ab189f530494b7

12 years agosensorservice: be more robust when there are no sensor h/w
Mathias Agopian [Thu, 14 Jul 2011 23:39:46 +0000 (16:39 -0700)]
sensorservice: be more robust when there are no sensor h/w

Bug: 5030108
Change-Id: I45b85b3c492b9268cb0ae44d2e5fc8c708b6e66e

12 years agoRemove the simulator target from all makefiles. Bug: 5010576
Jeff Brown [Tue, 12 Jul 2011 05:12:16 +0000 (22:12 -0700)]
Remove the simulator target from all makefiles. Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8

12 years agoPermissionCache caches permission checks
Mathias Agopian [Mon, 27 Jun 2011 23:05:52 +0000 (16:05 -0700)]
PermissionCache caches permission checks

This is intended to absorb the cost of the IPC
to the permission controller.
Cached permission checks cost about 3us, while
full blown ones are two orders of magnitude slower.

CAVEAT: PermissionCache can only handle system
permissions safely for now, because the cache is
not purged upon global permission changes.

Change-Id: I8b8a5e71e191e3c01e8f792f253c379190eee62e

12 years agocleanup Kalman filter parameters, add/fix comments/units
Mathias Agopian [Mon, 13 Jun 2011 23:00:49 +0000 (16:00 -0700)]
cleanup Kalman filter parameters, add/fix comments/units

Change-Id: Iedcae7164af8f7ea0e048ea7c72d0f35d16d739f

12 years agoimprove orientation sensor with gyro data
Mathias Agopian [Thu, 9 Jun 2011 03:06:50 +0000 (20:06 -0700)]
improve orientation sensor with gyro data

when we do our own sensor fusion, we also export an
improved orientation sensor and hide the HAL sensor.
The fused orientation sensor is much more precise, fast
and smooth.

Change-Id: I0ea843b47ad9d12f6b22cce51f8629852d423126

12 years agouse quaternions instead of MRPs
Mathias Agopian [Sat, 28 May 2011 01:18:13 +0000 (18:18 -0700)]
use quaternions instead of MRPs

also use correct time propagation equation
disable the fused sensors when gyro is not present since
they were unusable in practice.

Change-Id: Iad797425784e67dc6c5690e97c71c583418cc5b5

12 years ago9-axis sensor fusion with Kalman filter
Mathias Agopian [Wed, 18 May 2011 05:54:42 +0000 (22:54 -0700)]
9-axis sensor fusion with Kalman filter

Add support for 9-axis gravity and linear-acceleration sensors
virtual orientation sensor using 9-axis fusion

Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f

12 years agoFix a few issues with sensors reference-counting
Mathias Agopian [Fri, 27 May 2011 23:23:58 +0000 (16:23 -0700)]
Fix a few issues with sensors reference-counting

12 years agoFix a crasher in SensorService
Mathias Agopian [Thu, 19 May 2011 23:21:32 +0000 (16:21 -0700)]
Fix a crasher in SensorService

SensorService main thread wasn't java-enabled. however, in
some situations we end-up calling into the BatteryService from
that thread which causes a crash.

Change-Id: Iffba90e4c4b743dba84d62f1342001a9db31916d

12 years agoframeworks/base: remove LOCAL_PRELINK_MODULE
Iliyan Malchev [Mon, 14 Mar 2011 21:02:13 +0000 (14:02 -0700)]
frameworks/base: remove LOCAL_PRELINK_MODULE

Change-Id: I54dd62ebef47e7690afa5a858f3cad941b135481
Signed-off-by: Iliyan Malchev <malchev@google.com>
12 years agofix [4025681] continuous sensors should not try to send an event as soon as they...
Mathias Agopian [Thu, 10 Mar 2011 23:23:28 +0000 (15:23 -0800)]
fix [4025681] continuous sensors should not try to send an event as soon as they're activated

Make sure to send an event down only for sensors that report a value only on data
change. Other sensors, will naturally send an event when the next event is available.

Bug: 4025681
Change-Id: I6d444deda388b6bc9a33e3371e09d390f1566ec5

12 years agofix [3421350] Killing a game that uses the accelerometer renders the device unable...
Mathias Agopian [Thu, 3 Feb 2011 22:52:47 +0000 (14:52 -0800)]
fix [3421350] Killing a game that uses the accelerometer renders the device unable to sleep

when an app dies, make sure to disable all sensors that process
is connected to, regardless of wether this was the LAST connection
to this sensor.

Change-Id: I9c72b1792eee03815304674d5c2f25b5270e4748

12 years agofix [3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running...
Mathias Agopian [Wed, 19 Jan 2011 22:26:25 +0000 (14:26 -0800)]
fix [3369027] Sensor.TYPE_ROTATION_VECTOR is unstable and returns NaNs when running slowly

The cut-off frequency of the lowpass filter was too high
for the sampling rate used by DELAY_NORMAL.

Now we use the same filters used for the gravity vector
(cascaded biquad at 1.5 Hz)

Change-Id: I319dc4f449a3abd553d61b196a9ddcf7782f912d

12 years agofix [3237242] sensormanager sensor active count gets out of sync
Mathias Agopian [Tue, 30 Nov 2010 01:26:51 +0000 (17:26 -0800)]
fix [3237242] sensormanager sensor active count gets out of sync

whether a physical sensor needed to be active or not was managed by
a simpe reference counter; unfortunatelly nothing prevented it to
get out of sync if a sensor was disabled more than once.

sensorservice already maintainted a list of all the "clients"
connected to a physical sensor; we now use that list to determine if
a sensor should be enabled. This can never be "out-of-sync" since
this is the only data structure linking a sensor to a user of that
sensor.

also removed the isEnabled() method, which was never used and
implemented wrongly (since it didn't take into account that a sensor
could be disabled for a client but not of another).

Change-Id: I789affb877728ca957e99f7ba749def37c4db1c7

12 years agoUses 4-th order low-pass for extracting gravity.
Mathias Agopian [Fri, 12 Nov 2010 01:58:51 +0000 (17:58 -0800)]
Uses 4-th order low-pass for extracting gravity.

Most accelerometers have 8-bits accuracy so we beed to
reject 48dB in thestop-band, which requires a 4-th order
filter at the cut-off frequency we're using.

Change-Id: Ic00421d38d751641f86b1f3ad7663e6b44a91198

12 years agoallow rotation-vector to have 4 components
Mathias Agopian [Mon, 22 Nov 2010 23:48:10 +0000 (15:48 -0800)]
allow rotation-vector to have 4 components

- upadte documentation for rotation vector
- update method dealing with rotation vector to deal with 4 components
- virtual rotation-vector sensor reports all four components
- improve SensorManager documentation layout

Whent he 4-th component of the rotation-vector is present, we can save
a square-root when computing the quaternion or rotation matrix from it.

Change-Id: Ia84d278dd5f0909fab1c5ba050f8df2679e2c7c8

12 years agodon't attempt to normalize the rotation vector
Mathias Agopian [Mon, 22 Nov 2010 09:04:09 +0000 (01:04 -0800)]
don't attempt to normalize the rotation vector

indeed, by construction of the rotation matrix, it is
guaranteed to have a length of 1.

moreover, the normalization code was missing a square-root,
fortunatelly, since the length is 1, this didn't cause any
damage (since sqrt(1) = 1).

Change-Id: I9facd668caaf5bb3bfccb139ab872f2bb2066365

12 years agoAdd support for virtual sensors.
Mathias Agopian [Fri, 12 Nov 2010 01:58:51 +0000 (17:58 -0800)]
Add support for virtual sensors.

Rework sensorservice to allow "virtual sensors", that is
sensors that report a synthetized value based on real sensors.

the main change to sensorservice is around managing which real
sensor need to be activated and which rate to use.

The logic for all this has been moved into SensorDevice, which
essentially wraps the sensor HAL but adds two features to it:
- it keeps track of which sensors need to be activated
- it keeps track of what rate needs to be used

For this purpose an "identity" is associated with each real sensor
activation, so we can track them.

On start-up we check for gravity, linear-acceleration and
rotation-vector sensors, if they're not present in the HAL, we
synthetize them in sensor-service.

Change-Id: I841db2c1b37ef127ed571efa21732ecc5adf1800

12 years agoFix a race condition in sensormanager
Mathias Agopian [Mon, 15 Nov 2010 04:55:25 +0000 (20:55 -0800)]
Fix a race condition in sensormanager

the per-connection state assumed the main sensorservice
lock was held during access. This is however not true while
pre-processing the events just before sending them to clients.
Therefore, there was a small window during which this state
could be modified while being used.

we now have an internal lock that protects this state.

Change-Id: I594680f20f09d6a4f1f38f093a1d3f650dcef1be

12 years agorecord the last event received regardless of having clients or not
Mathias Agopian [Thu, 11 Nov 2010 01:50:28 +0000 (17:50 -0800)]
record the last event received regardless of having clients or not

We only recorded the last received event (which is needed when a sensor
is activated on a connection) when there was some connection active.
This should fix an issue where sometimes the light sensor doesn't
return an event whent activated.

we also didn't need to hold the main lock while dispatching events
to clients.

Change-Id: I6c6386c040051ce205e3c0516c678e0603fa45e1

12 years agoimprove sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)
Mathias Agopian [Sat, 6 Nov 2010 02:12:58 +0000 (19:12 -0700)]
improve sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)

the increased maximum rate is needed for proper gyro integration, current gyro
parts can sample at up to 800Hz

Change-Id: Ide75f6d5bc7a0fdafeb2dafd72db39e7afb9e794

12 years agoReplace epoll() with poll() and rename PollLoop to Looper.
Jeff Brown [Tue, 14 Sep 2010 06:17:30 +0000 (23:17 -0700)]
Replace epoll() with poll() and rename PollLoop to Looper.

As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN.  Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports.  That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae

12 years agoReport sensor events to BatteryStats service
Mathias Agopian [Fri, 23 Jul 2010 05:19:43 +0000 (22:19 -0700)]
Report sensor events to BatteryStats service

Change-Id: I9b83aa709887aa658bc474391573f2d45b6c4eb2

12 years agoSensorService handles last known state properly
Mathias Agopian [Fri, 23 Jul 2010 04:24:39 +0000 (21:24 -0700)]
SensorService handles last known state properly

SensorService now correctly sends the last known
state of a sensor as soon as a new connection is made.
This fixes the issue where, for instance, an application
could wait a long time before getting the light or proximity
sensor initial state.

Change-Id: Ic41392f3626e26c4f15746c7e17c7ecd44bbb10b

12 years agofilter sensor event by connection
Mathias Agopian [Thu, 22 Jul 2010 23:18:10 +0000 (16:18 -0700)]
filter sensor event by connection

we now don't send events down to a connection that has not
registered for this event.

Change-Id: I3fe507974d3e99293749bfec2ef871e8a0ee9600

12 years agopropagate sensor event rate properly to the sensor HAL
Mathias Agopian [Wed, 21 Jul 2010 22:59:50 +0000 (15:59 -0700)]
propagate sensor event rate properly to the sensor HAL

Change-Id: I1abe4c0fcce423caab79208353fded4d57398227

12 years agopropagate sensor event rate properly
Mathias Agopian [Wed, 21 Jul 2010 22:59:50 +0000 (15:59 -0700)]
propagate sensor event rate properly

Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc

12 years agoSensorService doesn't crash if correct HAL is not present
Mathias Agopian [Tue, 20 Jul 2010 02:09:10 +0000 (19:09 -0700)]
SensorService doesn't crash if correct HAL is not present

Change-Id: I83700b1a1b43390f5830e1056572bfb16e58e8e4

12 years agoBetter dumpsys logs
Mathias Agopian [Mon, 19 Jul 2010 22:20:39 +0000 (15:20 -0700)]
Better dumpsys logs

Change-Id: Iae65a8547ee5815cc4c3b74d2c9ef17bed7f565d

12 years agoAdded partial support for repporting sensor activity to IBatteryStats
Mathias Agopian [Mon, 19 Jul 2010 22:03:55 +0000 (15:03 -0700)]
Added partial support for repporting sensor activity to IBatteryStats

Change-Id: I2af319d89e49b0f2349ec9d8b0fccac80e9bc047

12 years agonew SensorService
Mathias Agopian [Thu, 15 Jul 2010 06:41:37 +0000 (23:41 -0700)]
new SensorService

remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281

12 years agoUtils: Fix a bug in the linear transformation code.
John Grossman [Wed, 27 Jun 2012 22:34:43 +0000 (15:34 -0700)]
Utils: Fix a bug in the linear transformation code.

Hand merge from ics-aah

> Utils: Fix a bug in the linear transformation code.
>
> Fix a bug where an incorrect result would be computed if you used the
> linear transformation code to do a reverse transformation (from B's
> domain into A's domain) when the scaler fraction was negative.
>
> Change-Id: I8e5f109314d235a177ab41f65d3c4cd08cff78be
> Signed-off-by: John Grossman <johngro@google.com>

Change-Id: Id90e18f685c61c1a89fd91c32adcf01363b3e8f3
Signed-off-by: John Grossman <johngro@google.com>