1280 Commits

Author SHA1 Message Date
Mathias Agopian
c93ae7519c am 1e381015: am 88bcc1c6: Merge "fix a bug where queueBuffer() would fail after the SharedbufferStack is resized" into kraken 2010-05-17 18:59:40 -07:00
Mathias Agopian
662be102ee improve SharedBufferStack test
Change-Id: I32683bfe0916918757280db89113595867acd5a7
2010-05-17 18:56:10 -07:00
Mathias Agopian
be6c8fc4d5 fix a bug where queueBuffer() would fail after the SharedbufferStack is resized
Change-Id: I12bf13a62018ce1349bab7be0b0cad7fad13fee8
2010-05-17 18:54:19 -07:00
Mathias Agopian
5e9987560f am d4a5ea29: am 2b2529f2: Merge "fix some bugs in SharedBufferStack::resize" into kraken 2010-05-17 17:35:21 -07:00
Jason Sams
c378dab087 Remove excess logging.
Change-Id: Ib4af6428c5fd87c3891f41eca6ca43d84f0edc97
2010-05-17 17:28:12 -07:00
Mathias Agopian
cd30f4f849 fix some bugs in SharedBufferStack::resize
added buffers should now be labeled properly.

Change-Id: I28aa753fbe89ab89134e7753575319478934c7fa
2010-05-17 17:27:26 -07:00
Jason Sams
1de0b87168 Remove more pieces of setRoot. Add pointer to allocation lookup for scripts.
Change-Id: I2c3075d2056f02bb834bfad403dc72da991f3156
2010-05-17 14:55:34 -07:00
Eric Laurent
38a9544825 am f62b6ff9: am eb8f850d: Fix issue 2553359: Pandora does not work well with Passion deskdock / Cardock. 2010-05-17 09:22:01 -07:00
Wu-cheng Li
e1d07bded7 am 8dc80423: am ae7ca4c3: Fix build error. 2010-05-17 09:21:13 -07:00
Wu-cheng Li
c3848824f8 am a3b5ff07: am e339c5ed: Add camera focus distances API. 2010-05-17 09:21:03 -07:00
Mathias Agopian
2a466809df am 2ff19fa9: am 4606d5dd: Merge "fix uninitialized variable in DisplayHardware" into kraken 2010-05-17 09:20:49 -07:00
Eric Laurent
eb8f850d0b Fix issue 2553359: Pandora does not work well with Passion deskdock / Cardock.
The problem is due to a too big difference between the buffer size used at the hardware interface and at the A2DP interface.
When no resampling occurs we don't notice problems but the timing is very tight. As soon as resampling is activated, the AudioTrack underruns.
This is because the AudioTrack buffers are not resized when moving the AudioTrack from hardware to A2DP output.
The AudioTrack buffers are calculated based on a hardware output buffer size of 3072 bytes. Which is much less than the A2DP output buffer size (10240).

The solution consists in creating new tracks with new buffers in AudioFlinger when the A2DP output is opened
instead of just transfering active tracks from hardware output mixer thread to the new A2DP output mixer thread.
To avoid synchronization issues between mixer threads and client processes, this is done by invalidating tracks
by setting a flag in their control block and having AudioTrack release the handle on this track (IAudioTrack)
and create a new IAudioTrack when this flag is detected next time obtainBuffer() or start() is executed.

AudioFlinger modifications:
- invalidate the tracks when setStreamOutput() is called
- make sure that notifications of output opening/closing and change of stream type to output mapping are sent synchronously to client process.
This is necessary so that AudioSystem has the new stream to output mapping when the AudioTrack detects the invalidate flag in the client process.
Previously their were sent when the corresponding thread loop was executed.

AudioTrack modifications:
- move frame count calculation and verification from set() to createTrack() so that is is updated every time a new IAudioTrack is created.
- detect track invalidate flag in obtainBuffer() and start() and create a new IAudioTrack.

AudioTrackShared modifications
- group all flags (out, flowControlFlag, forceReady...) into a single bit filed to save space.

Change-Id: I9ac26b6192230627d35084e1449640caaf7d56ee
2010-05-17 02:23:47 -07:00
Wu-cheng Li
ae7ca4c32c Fix build error.
Original name INFINITY conflicts with the macro in math.h.

Change-Id: I9845ed84fca17813dd971239a902cc1e0bad1e3e
2010-05-15 13:06:19 +08:00
Wu-cheng Li
e339c5edbe Add camera focus distances API.
Applications can use this API to estimate the distance
between the subject and the camera.

bug:1955650
Change-Id: Ie6c8ea4971759cab6c9bcdda2c5ceb5925791c27
2010-05-15 12:40:54 +08:00
Mathias Agopian
4606d5dd95 Merge "fix uninitialized variable in DisplayHardware" into kraken 2010-05-14 18:35:34 -07:00
Mathias Agopian
51c66aa4ce fix uninitialized variable in DisplayHardware
this fixes the issue where the display is all messed-up sometimes.

Change-Id: I20be91b5166bfff0c6d353a777351842c9df8e95
2010-05-14 18:33:30 -07:00
Jason Sams
a250f20b02 Merge "Delete legacy setDefine API." 2010-05-14 16:53:05 -07:00
Jason Sams
ec67275e5f Delete legacy setDefine API.
Change-Id: I1bae13533ab9efea3d3b0ebb6a3711343e922f8a
2010-05-14 16:51:22 -07:00
Jason Sams
c3ae11271d Merge "Delete old createFromClass methods. It no longer makes sense to create type info from Java since this cannot be exported to scripts. The new flow is in the opposite direction." 2010-05-14 16:30:50 -07:00
Jason Sams
b42315d37a Delete old createFromClass methods.
It no longer makes sense to create type info from Java since this
cannot be exported to scripts.  The new flow is in the opposite direction.

Change-Id: I9b46e3f57abf84c01326bd9b9b834f3ff0f7c504
2010-05-14 16:29:20 -07:00
Nick Kralevich
71491ab245 Merge "resolved conflicts for merge of cbf26fd3 to master" 2010-05-14 16:11:43 -07:00
Jason Sams
ca4d143146 Merge "Change RS to use the passed surface size rather than EGL size. Its possible that during a resize the EGL information could be stale so caching this is bad. The surface size should always be correct." 2010-05-14 16:00:04 -07:00
Nick Kralevich
963b0cdbaf resolved conflicts for merge of cbf26fd3 to master
Change-Id: I1feb7266c1d5cdebbfb8b8fa0d87d986953a20b6
2010-05-14 15:49:42 -07:00
Jason Sams
f603d21255 Change RS to use the passed surface size rather than EGL size.
Its possible that during a resize the EGL information could be stale so
caching this is bad.  The surface size should always be correct.

Change-Id: Ifd479e1ea70b1cada1a8690c7c82e91aa391b685

Conflicts:

	libs/rs/rsProgramStore.cpp
	libs/rs/rsProgramStore.h
2010-05-14 15:30:29 -07:00
Nick Kralevich
bfb776acf2 Merge "Get rid of warnings when compiled with -Wformat-security" into kraken 2010-05-14 15:28:09 -07:00
The Android Open Source Project
aa8da3dc40 am a8e0f75b: am 7450c02a: am 900b6157: merge from open-source master 2010-05-14 15:15:36 -07:00
The Android Open Source Project
7450c02a35 am 900b6157: merge from open-source master
Merge commit '900b6157f5dee2ed7b2c73cf320b2baf293230ff' into kraken

* commit '900b6157f5dee2ed7b2c73cf320b2baf293230ff':
  Only hold a weak pointer on SurfaceComposerClients
2010-05-14 15:12:17 -07:00
The Android Open Source Project
900b6157f5 merge from open-source master
Change-Id: I0249c6d796b35af9ba08cbccd463a1f5cf779ecd
2010-05-14 15:04:52 -07:00
Chih-Chung Chang
84498a7ab5 am 9c192e44: am 29f5d9b6: Merge "Fix deadlock if the last reference of ICameraClient is removed in ICamera::connect()" into kraken 2010-05-14 12:08:24 -07:00
Chih-Chung Chang
29f5d9b61d Merge "Fix deadlock if the last reference of ICameraClient is removed in ICamera::connect()" into kraken 2010-05-14 12:05:06 -07:00
Eric Laurent
03bb2b9651 am 10fde074: am 9f0810e8: Merge "AudioFlinger: rename variables to clarify reference to track channel count or channel mask" into kraken 2010-05-14 09:42:57 -07:00
Eric Laurent
b0a0147f34 AudioFlinger: rename variables to clarify reference to track channel count or channel mask
Some variables and structure members should be renamed to reflect the fact that they contain the
number of channels in a track (channel count) or the actual channels used by a track (channel mask).
Especially member "channels" of track control block (struct audio_track_cblk_t) is actually the
number of channels (channels count).

Change-Id: I220c8dede9fc00c8a5693389e790073b6ed307b8
2010-05-14 05:45:46 -07:00
Chih-Chung Chang
553447b8ff Fix deadlock if the last reference of ICameraClient is removed in
ICamera::connect()

Change-Id: I34ab3e4f07435c62168175e9bb159022c8fb99f4
2010-05-14 11:34:20 +08:00
Jason Sams
54db59c359 Rename ProgramFragmentStore to ProgramStore.
Change-Id: Ia8ad9ac856944838ced38a2f1e8f07387050bdfd
2010-05-13 18:35:01 -07:00
Nick Kralevich
ce2cbe4c96 Get rid of warnings when compiled with -Wformat-security
Change-Id: I63c3bf786bbe7a0276624e71a4ba80c4a9aaa4bb
2010-05-13 14:46:27 -07:00
Jason Sams
f6860f1979 Merge "Add missing bindProgramRaster to scriptC_lib." 2010-05-13 12:19:28 -07:00
Eric Laurent
6dd5f73e8c am 06a237b0: am ca20104a: Merge "Fix issue 2678048: binder death detection in AudioFlinger is broken." into kraken 2010-05-13 09:19:09 -07:00
Eric Laurent
bd62a9eb6e am 76a95619: am c247328d: Merge "Several fixes in AudioDumpInterface:" into kraken 2010-05-13 09:19:05 -07:00
Eric Laurent
ca20104a3a Merge "Fix issue 2678048: binder death detection in AudioFlinger is broken." into kraken 2010-05-12 23:40:28 -07:00
Eric Laurent
c247328dfd Merge "Several fixes in AudioDumpInterface:" into kraken 2010-05-12 23:21:42 -07:00
Jason Sams
0c677318b5 Add missing bindProgramRaster to scriptC_lib.
Change-Id: I06a7075a94ef907478f986b59ded4ff3e2766585
2010-05-12 18:26:52 -07:00
Mathias Agopian
b81f6c4c3f am 19f64314: am 2f0e6753: Merge "SharedBufferStack now can grow up to 16 buffers." into kraken 2010-05-12 18:04:39 -07:00
Mathias Agopian
55c97878c0 am e0630ae3: am 6a70cb8a: Merge "Refactor some code in surfaceflinger in preparation of upcoming changes" into kraken 2010-05-12 18:04:33 -07:00
Mathias Agopian
74c932d973 am 32286409: am ca64ed6a: Merge "remove the "memcpy" hack" into kraken 2010-05-12 18:04:28 -07:00
Mathias Agopian
2f0e6753d6 Merge "SharedBufferStack now can grow up to 16 buffers." into kraken 2010-05-12 17:36:46 -07:00
Mathias Agopian
6a70cb8a38 Merge "Refactor some code in surfaceflinger in preparation of upcoming changes" into kraken 2010-05-12 17:35:24 -07:00
Mathias Agopian
ca64ed6a81 Merge "remove the "memcpy" hack" into kraken 2010-05-12 17:35:12 -07:00
Mathias Agopian
59751dbf7d SharedBufferStack now can grow up to 16 buffers.
there is a new resize() api, which currently only allows growing.

Change-Id: Ia37b81b73be466d2491ffed7f3a23cd8e113c6fe
2010-05-12 17:28:20 -07:00
Mathias Agopian
9f2c4fd9a1 Refactor some code in surfaceflinger in preparation of upcoming changes
the new TextureMagager class now handle texture creation and upload
as well as EGL image creation and binding to GraphicBuffers. This is
used indirectly by Layer and directly by LayerBuffer

the new BufferManager class handles the set of buffers used for a
Layer (Surface), it abstracts how many buffer there is as well as
the use of EGLimage vs. regular texture ops (glTexImage2D).

Change-Id: I2da1ddcf27758e6731400f6cc4e20bef35c0a39a
2010-05-12 17:26:22 -07:00
Mathias Agopian
aca2ee8a70 remove the "memcpy" hack
this hack was used for gpus that don't support cached buffers
for s/w clients. currently we have no gpu with this issue.
this removes quite a bit of complexity.

Change-Id: I72564669f124f92805030e61983711f61c76b6d9
2010-05-12 15:44:26 -07:00