summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* Fix issue 2323920: Notification & A2DP audio stutter.Eric Laurent2009-12-222-25/+85
| | | | | | | Modified AudioFlinger duplicating output thread so that audio tracks are not mixed until both outputs (A2DP and hardware) have exited standby mode. This avoids to have one output far ahead of the other and audio frames dropped because the compensation mechanism cannot keep up. Also calculate the maximum wait time in OutputTrack::write() based the on smallest frame count of all output threads instead of the frame count of the thread the OutputTrack is connected to. This avoids starving the thread with the smallest frame count by waiting too long on the other thread. Since the frame count was reduced on hardware output to reduce latency the difference between A2DP and hardware outputs frame counts had become problematic. Also increased the number of overflow buffers to cope with bigger timing differences among outputs.
* fix [2269582] [TOP-10][Passion_1506][APT:Camera]Sometimes camera preview ↵Mathias Agopian2009-12-111-0/+1
| | | | | | | | | | | | | screen is truncated after launching and back to home screen by home key repeatedly When a surface is removed from the screen while it holds a "freeze lock", the release of that lock happens in the destructor as a "safety net". However, it doesn't trigger an update at that point. Make sure that "freeze locks" are released from the transaction at the point a surface is removed from the screen (if it's not on screen, it shouldn't prevent the screen to redraw, and therefore cannot hold a freeze lock). The refresh corresponding to that transaction will pick it up as soon as possible.
* fix [2319255] crash in openGL : from the media recorder stress test.Mathias Agopian2009-12-101-1/+8
| | | | | never call eglCreateImageKHR() with a NULL native buffer, which can happen in OOM conditions.
* fix [2315900] Monochrome camera preview screen after launching cameraMathias Agopian2009-12-092-50/+69
| | | | | | | | | | this was introduced by a recent change. when we try to figure out the size of the yuv->rgb temporary buffer, the output resolution has not been computed yet and an invalid buffer size is used. most of the time the allocation fails and the system reverts to "standard" GL will uses onle the Y plane. the allocation of the temporary buffer is moved to onDraw(), the first time it is called, by that time, the window is positioned properly.
* Merge change Id22c0137 into eclairAndroid (Google) Code Review2009-12-095-33/+45
|\ | | | | | | | | * changes: Throttle low priority RS threads by sleeping once per frame to avoid starving other apps.
| * Throttle low priority RS threads by sleeping once per frame to avoid ↵Jason Sams2009-12-095-33/+45
| | | | | | | | starving other apps.
* | improve video performance to minimize the tearing effect seen in 720p moviesMathias Agopian2009-12-081-9/+15
|/ | | | | | | | always rescale videos to their target size using copybit during yuv->rgb conversion. this improves performance of the GPU pass and doesn't require linear filtering to be enabled. Also always use 16-bits buffers. the average processing time for 720p dropped from ~50ms to ~30ms
* Fix issue 2306779: Runtime restart - Init failed at ↵Eric Laurent2009-12-071-12/+4
| | | | | | | | | | android.media.ToneGenerator. The ToneGenerator failed to initialize because no more tracks were available in AudioFlinger mixer. All tracks were used because the duplicating output was failing to free the tracks on audio hardware output mixer when exiting due to a misplaced test on output activity: output tracks where only freed if the duplicating output was active when exiting. The fix consists in freeing the output tracks when the duplicating thread is destroyed without condition.
* Merge change I9cc489a2 into eclairAndroid (Google) Code Review2009-12-072-17/+39
|\ | | | | | | | | * changes: Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
| * Fix issue 2304669: VoiceIME: starting and canceling voice IME yields ↵Eric Laurent2009-12-072-17/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | persistent "error 8" state on future attempts and breaks voice search. Fixed AudioFlinger::openInput() broken in change ddb78e7753be03937ad57ce7c3c842c52bdad65e so that an invalid IO handle (0) is returned in case of failure. Applied the same correction to openOutput(). Modified RecordThread start procedure so that a failure occuring during the first read from audio input stream is detected and causes the record start to fail. Modified RecordThread stop procedure to make sure that audio input stream fd is closed before we exit the stop function. Fixed AudioRecord JAVA and JNI implementation to take status of native AudioRecord::start() into account and not change mRecordingState to RECORDSTATE_RECORDING if start fails.
* | Revert "When using MDP, we needed to use a texture for diming."Dima Zavin2009-12-071-3/+0
|/ | | | This reverts commit bf0c320afbf6bf2441916755ecb443b64afbe73f.
* Merge change Ic73ec39b into eclairAndroid (Google) Code Review2009-12-031-0/+14
|\ | | | | | | | | * changes: DO NOT MERGE. Implement WAR which should prevent the white square bug from appearing on user devices. If we see a 0 texture id during bind for rendering, attempt to re-upload. If this fails log debug info and restart the app.
| * DO NOT MERGE. Implement WAR which should prevent the white square bug from ↵Jason Sams2009-12-031-0/+14
| | | | | | | | appearing on user devices. If we see a 0 texture id during bind for rendering, attempt to re-upload. If this fails log debug info and restart the app.
* | surfaceflinger: remove un-cached buffer hack for SGXErik Gilling2009-12-031-2/+1
|/ | | | Signed-off-by: Erik Gilling <konkers@android.com>
* fix [2291418] Camera preview cannot work in EmulatorMathias Agopian2009-12-021-13/+15
| | | | | | The image buffer used by glTexImage2d() would be uninitialized when no copybit engine can be found. We now always initialize images, since the abscence of copybit is not necessarily fatal.
* Merge change Iac196e17 into eclairAndroid (Google) Code Review2009-12-011-5/+6
|\ | | | | | | | | * changes: Fix issue 2292062: Audio freezes for three seconds when choosing ringtones with a headset connected and music playing.
| * Fix issue 2292062: Audio freezes for three seconds when choosing ringtones ↵Eric Laurent2009-12-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with a headset connected and music playing. The problem comes from a deadlock with AudioPolicyService mutex: When the second ringtone starts, this mutex is locked by AudioPolicyService::startOutput() which in turn calls setParameters() to change the output device. Audioflinger::ThreadBase::setParameters() signals the parameter change to the AudioFlinger mixer thread and waits for a condition indicating that the parameter change has been processed. At the same time, the mixer thread detects that the audio track corresponding to the first ring tone has been killed and calls its destructor. This calls AudioPolicyService::releaseOutput() which tries to lock the AudioPolicyService mutex. If this happens before the mixer thread can process the setParameters() command we are deadlocked. The deadlock ends because setParameters() uses a timeout when waiting for the condition. This regression was introduced by change 33736 fixing issue 2265163. The fix consists in calling AudioPolicyService::releaseOutput() from Track::destroy() instead of from Track destructor: as detroy() is never called from the mixer thread loop (as opposed to the destructor) the deadlock described above cannot occur.
* | fix [2297155] SurfaceFlinger's freeze-timeout doesn't workMathias Agopian2009-12-012-13/+22
|/ | | | | | | | | There was bug in the logic that calculated the relative timeout, the start time was reset each time an event was received, which caused the timeout to never occur if an application was constantly redrawing. Now we always check for a timeout when we come back from the waitEvent() and process the "anti-freeze" if needed, regardless of whether an event was received.
* fixed [2260070] display stopped updatingMathias Agopian2009-11-301-0/+5
| | | | | always check that the visible region isn't empty after all visible regions are recomputed clear he freeze-lock if it is.
* Merge change Ibf0c320a into eclairAndroid (Google) Code Review2009-11-241-0/+3
|\ | | | | | | | | * changes: When using MDP, we needed to use a texture for diming.
| * When using MDP, we needed to use a texture for diming.Mathias Agopian2009-11-231-0/+3
| |
* | Force a crash under conditions where white square bug in all apps is likely ↵Jason Sams2009-11-244-3/+32
|/ | | | to occur.
* Fix ref counting bug that could cause memory leak in allApps.Jason Sams2009-11-231-2/+1
|
* Merge change I49f02be9 into eclairAndroid (Google) Code Review2009-11-212-97/+162
|\ | | | | | | | | * changes: Issue 2265163: Audio still reported routed through earpiece on sholes
| * Issue 2265163: Audio still reported routed through earpiece on sholesEric Laurent2009-11-192-97/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a second attempt to fix the audio routed to earpiece syndrom. The root cause identified this time is the crash of an application having an active AudioTrack playing on the VOICE_CALL stream type. When this happens, the AudioTrack destructor is not called and the audio policy manager is not notified of the track stop. Results a situation where the VOICE_CALL stream is considered as always in use by audio policy manager which makes that audio is routed to earpiece. The fix consists in moving the track start/stop/close notification to audio policiy manager from AudioTrack to AudioFlinger Track objet. The net result is that in the case of a client application crash, the AudioFlinger TrackHandle object (which implements the remote side of the IAudioTrack binder interface) destructor is called which in turn destroys the Track object and we can notify the audio policy manager of the track stop and removal. The same modification is made for AudioRecord although no bug related to record has been reported yet. Also fixed a potential problem if record stop is called while the record thread is exiting.
* | Debugging for issue #2228381 android.view.InflateExceptionDianne Hackborn2009-11-201-6/+14
| | | | | | | | | | | | | | | | | | | | Binary XML file line #37: Error inflating class <unknown> after adding a secondary account Now that I have these debug logs, I want to keep them since they will make debugging these kinds of issues a lot easier in the future. (Note in this case there was no problem in the framework.) Change-Id: If2b0bbeda4706b7c5dc1ba4a5db04b74f40e1543
* | backout a workaround that is not needed anymoreMathias Agopian2009-11-191-1/+0
| | | | | | | | | | we had to add a call to glFinish() before glReadPixels() because of a bug in the GL ES driver of a certain device. This is not needed anymore.
* | Merge change I4c29c948 into eclairAndroid (Google) Code Review2009-11-191-1/+6
|\ \ | | | | | | | | | | | | * changes: fix [2269022] The raw picture displayed post shutter seems to have low-resolution
| * | fix [2269022] The raw picture displayed post shutter seems to have ↵Mathias Agopian2009-11-191-1/+6
| |/ | | | | | | | | | | | | low-resolution Make sure to always enable linear filtering in LayerBuffer. This change doesn't affect devices using overlays.
* | Fix extended logging for object dumping.Jason Sams2009-11-191-12/+6
|/
* Add support for dumping RS objects to aid in debugging of white blocks bug.Jason Sams2009-11-176-0/+42
|
* Merge change I1c0bebbc into eclairAndroid (Google) Code Review2009-11-162-3/+1
|\ | | | | | | | | * changes: fix [2262591] Junk on screen in ERD46
| * fix [2262591] Junk on screen in ERD46Mathias Agopian2009-11-162-3/+1
| | | | | | | | | | | | | | | | since we're using the GPU for composition, don't use a texture for dimming, instead simply use an alpha-blended quad. also workaround what looks like a GL driver bug by calling glFinish() before glReadPixels().
* | Add setPriority to allow wallpapers to run at lower cpu priority than default.Jason Sams2009-11-153-6/+32
|/
* addresses several bugs: 2206097, 2166583, 2261119, 2216759Mathias Agopian2009-11-131-1/+3
| | | | | | | | | | | | | 2206097: Broken suggestions while composing message 2166583: Color artifacts with MDP dithering 2261119: Passion transition animations are rough 2216759: Screen flicker when dropdown list in background window shows or hides This is part of enabling GPU composition instead of using the MDP. This change is dependent on another change in the vendor project. Specifically this change disables the use of EGLImageKHR for s/w buffers for cache coherency reasons. memcpy is used instead.
* fix some aspects of [2258746] native crash in launcher2Mathias Agopian2009-11-131-29/+19
| | | | | | Surface::validate() could sometimes dereference a null pointer before checking it wasn't null. This will prevent the application to crash when given bad parameters or used incorrectly. However, the bug above probably has another cause.
* Merge change Iad79689a into eclairAndroid (Google) Code Review2009-11-122-70/+103
|\ | | | | | | | | * changes: Improvements for issue 2197683: English IME key-press latency is noticeably higher on passion than sholes
| * Improvements for issue 2197683: English IME key-press latency is noticeably ↵Eric Laurent2009-11-112-70/+103
| | | | | | | | | | | | | | | | | | higher on passion than sholes This change goes with a kernel driver change that reduces the audio buffer size from 4800 bytes (~27ms) to 3072 bytes (~17ms). - The AudioFlinger modifcations in change 0bca68cfff161abbc992fec82dc7c88079dd1a36 have been removed: the short sleep period was counter productive when the AudioTrack is using the call back thread as it causes to many preemptions. - AudioFlinger mixer thread now detects long standby exit time and in this case anticipates start by writing 0s as soon as a track is enabled even if not ready for mixing. - AudioTrack::start() is modified to start call back thread before starting the IAudioTrack so that thread startup time is masked by IAudioTrack start and mixer thread wakeup time.
* | Merge change Ia0a40883 into eclairAndroid (Google) Code Review2009-11-121-1/+1
|\ \ | | | | | | | | | | | | * changes: Modify the binder to request 1M - 2 pages instead of 1M. The backing store in the kernel requires a guard page, so 1M allocations fragment memory very badly. Subtracting a couple of pages so that they fit in a power of two allows the kernel to make more efficient use of its virtual address space.
| * | Modify the binder to request 1M - 2 pages instead of 1M. The backing storeRebecca Schultz Zavin2009-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | in the kernel requires a guard page, so 1M allocations fragment memory very badly. Subtracting a couple of pages so that they fit in a power of two allows the kernel to make more efficient use of its virtual address space. Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
* | | Make default vertex program correctly track surface size.Jason Sams2009-11-124-18/+21
| | |
* | | Defer EGL init until the surface changed call comes in. Pass w,h along with ↵Jason Sams2009-11-127-44/+76
|/ / | | | | | | surface for verification of driver state.
* | Merge change I31c52bef into eclairAndroid (Google) Code Review2009-11-121-2/+0
|\ \ | | | | | | | | | | | | * changes: Revert change incorrectly submitted as part of change #32153.
| * | Revert change incorrectly submitted as part of change #32153.Romain Guy2009-11-051-2/+0
| | | | | | | | | | | | Change-Id: I31c52beff03c0d038a257fc151eff3b8da60eddc
* | | fix [2143798] Need to figure out how to do video on Passion w/ GPUMathias Agopian2009-11-112-9/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This builds on the EGLImage solution. We simply use copybit to convert from the YUV frame into an EGLImage created for that purpose and proceed with the regular EGLImage code. We need to do this because "regular" GL doesn't support YUV textures. We could improve upon this by detecting exacly what the GL supports and bypass this extra step if not required, but we'll do this later if needed.
* | | Don't feed the timezone to RenderScript time functions, let the library ↵Romain Guy2009-11-111-55/+18
| |/ |/| | | | | | | | | | | | | figure it out. Bug #2211070. Change-Id: I5975651fd12399fb8dfe283dfdfaa17569738c7b
* | AudioFlinger: delete Track object when createTrack() fails due to lack of ↵Eric Laurent2009-11-091-1/+1
| | | | | | | | | | | | tracks in AudioMixer. This problem was encountered as a side effect of issue 2245298.
* | Merge change Ifb9d6df3 into eclairAndroid (Google) Code Review2009-11-084-17/+120
|\ \ | | | | | | | | | | | | * changes: More log for issue 2242381.
| * | More log for issue 2242381.Eric Laurent2009-11-074-17/+120
| | | | | | | | | | | | Added more log in system dump for AudioFlinger and AudioPolicyService to help debug issue 2242381 and other issues where the audio driver hangs.
* | | Reset binder service threads' cgroup/priority after command completionChristopher Tate2009-11-081-0/+15
|/ / | | | | | | | | | | | | | | | | To prevent buggy command implementations from poisoning binder threads' scheduling class & priority for future command execution, we now reset the cgroup and thread priority to foreground/normal when a binder service thread finishes executing the designated command. Change-Id: Ibc0ab2485751453f6dc96fdb4eb877fd02796e3f