Commit Graph

528 Commits

Author SHA1 Message Date
Dianne Hackborn
7b92d7ec36 Debugging for issue #2228381 android.view.InflateException
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
2009-11-20 14:26:42 -08:00
Mathias Agopian
60f5d3694b backout a workaround that is not needed anymore
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.
2009-11-19 15:52:28 -08:00
Mathias Agopian
713795a2e0 fix [2269022] The raw picture displayed post shutter seems to have low-resolution
Make sure to always enable linear filtering in LayerBuffer. This change doesn't affect
devices using overlays.
2009-11-19 14:46:26 -08:00
Mathias Agopian
9e911efc10 fix [2262591] Junk on screen in ERD46
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().
2009-11-16 14:55:36 -08:00
Mathias Agopian
dcaf29af10 addresses several bugs: 2206097, 2166583, 2261119, 2216759
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.
2009-11-13 18:54:14 -08:00
Mathias Agopian
963abad79a fix some aspects of [2258746] native crash in launcher2
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.
2009-11-13 15:26:29 -08:00
Android (Google) Code Review
0b9285e707 Merge change Iad79689a into eclair
* changes:
  Improvements for issue 2197683:	English IME key-press latency is noticeably higher on passion than sholes
2009-11-12 22:53:28 -08:00
Rebecca Schultz Zavin
c0c1092183 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.

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-11-12 16:31:12 -08:00
Android (Google) Code Review
ad55651fe7 Merge change I31c52bef into eclair
* changes:
  Revert change incorrectly submitted as part of change #32153.
2009-11-12 13:37:30 -08:00
Mathias Agopian
bbc21b01cf fix [2143798] Need to figure out how to do video on Passion w/ GPU
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.
2009-11-11 16:44:43 -08:00
Eric Laurent
0e49d35fa4 Improvements for issue 2197683: English IME key-press latency is noticeably 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.
2009-11-11 12:13:27 -08:00
Eric Laurent
7b57085a73 AudioFlinger: delete Track object when createTrack() fails due to lack of tracks in AudioMixer.
This problem was encountered as a side effect of issue 2245298.
2009-11-09 04:45:39 -08:00
Android (Google) Code Review
5dc4fb0849 Merge change Ifb9d6df3 into eclair
* changes:
  More log for issue 2242381.
2009-11-08 22:58:34 -08:00
Christopher Tate
07d69893e1 Reset binder service threads' cgroup/priority after command completion
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
2009-11-08 14:29:02 -08:00
Eric Laurent
ee47d43ed3 More log for issue 2242381.
Added more log in system dump for AudioFlinger and AudioPolicyService to help debug issue 2242381 and other issues where the audio driver hangs.
2009-11-07 01:18:20 -08:00
Evan Millar
6dfe8f1ffa Revert jparks code from IPCThreadState. 2009-11-06 11:25:23 -08:00
Romain Guy
092fa4beaf Revert change incorrectly submitted as part of change #32153.
Change-Id: I31c52beff03c0d038a257fc151eff3b8da60eddc
2009-11-05 15:49:22 -08:00
Romain Guy
471afca7fc Prevent crash in Home when using widgets whose ids collide with Home's
resources.

Bug #2228943.

Approved by mcleron, triaged by ryanpc.

Change-Id: Idf40f3b09502ae5d0d3b9a6a72c265a2de2ffca2
2009-11-05 15:40:35 -08:00
Jason Parks
b5c4135333 When a thread is about to be put back onto the thread pool ensure that it is in the foreground cgroup. 2009-11-04 14:25:26 -08:00
Android (Google) Code Review
f19995856d Merge change If2fdad3b into eclair
* changes:
  Add a warning when we leave threads in the binder thread pool in the background scheduling group.
2009-11-03 16:29:22 -05:00
Jason Parks
dcd3958c50 Add a warning when we leave threads in the binder thread pool in the background scheduling group. 2009-11-03 13:10:15 -08:00
Eric Laurent
7f698b4c5c Log for issue 2203561.
Implemented AudioPolicyService dump().
Added detailed dump for AudioPolicyManageriGeneric when AudioPolicyService is dumped.
2009-11-03 09:33:35 -08:00
Android (Google) Code Review
368ad53c54 Merge change I36d0184e into eclair
* changes:
  fix[2228133] pixelflinger ignores the "vertical stride" leading to artifacts when playing back video
2009-11-02 21:26:54 -05:00
Mathias Agopian
6fee064809 fix[2228133] pixelflinger ignores the "vertical stride" leading to artifacts when playing back video
we lost the concept of vertical stride when moving video playback to EGLImage.
Here we bring it back in a somewhat hacky-way that will work only for the
softgl/mdp backend.
2009-11-02 17:48:33 -08:00
Dima Zavin
d7f53e1945 libbinder: MemoryHeapPmem: honor the NO_CACHING flag when creating a client heap
Change-Id: Ia7beb800f5a24beaa4b7f3032b486d4ed1991b23
Signed-off-by: Dima Zavin <dima@android.com>
2009-11-02 16:36:45 -08:00
Android (Google) Code Review
1bd16a1511 Merge change Ibaef6141 into eclair
* changes:
  libbinder: add a NO_CACHING flag to MemoryHeapBase
2009-11-02 17:55:43 -05:00
Eric Laurent
134aa9c942 Fix issue 197683: English IME key-press latency is noticeably higher on passion than sholes. Part 2.
Reduce sleep time in AudioFlinger mixer thread when no data has been written to output to speed up startup time when  exiting standby.

The rest of the modifications for this issues is in kernel driver:
 commit 0dbb0ee136ed8de757df1ae26d84556c1751deae for buffer size modification from 8192 to 4800 bytes.
Another kernel improvement that is not submitted yes will reduce delay when audio output is exiting standby.
2009-11-02 00:13:56 -08:00
Iliyan Malchev
0db1a8931b libbinder: add a NO_CACHING flag to MemoryHeapBase
The NO_CACHING flag translates to opening a memory region with O_SYNC.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2009-10-30 18:35:47 -07:00
Android (Google) Code Review
fa4c9b8af8 Merge change Id8b28e4f into eclair
* changes:
  fix [2225964] Android runtime restarted in surfaceflinger/BlurFilter.cpp
2009-10-30 17:54:16 -04:00
Android (Google) Code Review
bd5a0027f4 Merge change I56779290 into eclair
* changes:
  fix[2222341] Soft reset while going back from camcorder settings
2009-10-30 17:54:10 -04:00
Android (Google) Code Review
b4d8fbb1a7 Merge change If007a2fa into eclair
* changes:
  return proper error code from eglCreateImageKHR
2009-10-30 17:54:03 -04:00
Mathias Agopian
863e5fdde8 fix[2222341] Soft reset while going back from camcorder settings
add a way to convert a mapped "pushbuffer" buffer to a gralloc handle
which then can be safely used by surfaceflinger, without including
gralloc_priv.h
2009-10-30 14:48:50 -07:00
Andy McFadden
550a11455a DO NOT MERGE: Another gcc 4.0.3 workaround.
Temporarily make a function public that doesn't need to be.  When
host gcc-4.0.3 is gone from the build servers we can undo this.

(Cherry-picked from eclair-mr2.)
2009-10-30 10:24:06 -07:00
Mathias Agopian
8889a8183c fix [2225964] Android runtime restarted in surfaceflinger/BlurFilter.cpp
crash was due to an unintialized variable, which caused the wrong bluring
format to be used and caused a memory overrrun.
2009-10-29 20:24:44 -07:00
Mathias Agopian
df2d929405 return proper error code from eglCreateImageKHR 2009-10-29 16:45:41 -07:00
Mathias Agopian
54ba51dff2 fix [2143798] Need to figure out how to do video
Use EGLImageKHR instead of copybit directly.
    We now have the basis to use streaming YUV textures (well, in fact
    we already are). When/if we use the GPU instead of the MDP we'll
    need to make sure it supports the appropriate YUV format.

    Also make sure we compile if EGL_ANDROID_image_native_buffer is not supported
2009-10-27 13:13:29 -07:00
Android (Google) Code Review
730ab0bc3b Merge change Icf10db28 into eclair
* changes:
  Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
2009-10-24 04:32:28 -04:00
Mathias Agopian
57720c384a fix [2211532] improves sholes graphics performance
Instead of using glTex{Sub}Image2D() to refresh the textures, we're using an EGLImageKHR object
backed up by a gralloc buffer. The data is updated using memcpy(). This is faster than
glTex{Sub}Image2D() because the texture is not swizzled. It also uses less memory because
EGLImageKHW is not limited to power-of-two dimensions.
2009-10-23 15:37:28 -07:00
Eric Laurent
63da2b65f9 Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
Added setVoiceVolume() method to AudioSystem, AudioFlinger, IAudioFlinger, AudioPolicyService.
Removed call to AudioHardwareInterface::setVoiceVolume() from AudioFlinger::setStreamVolume().
2009-10-21 12:29:37 -07:00
Mathias Agopian
38a7fa2ae3 fix [2182249] [MR1] valgrind error in surface flinger 2009-10-15 18:08:15 -07:00
Eric Laurent
2115412564 Fix issue 2174002: After rejecting Call when device ringtone is mute and playing music, audio is not transfered to BT device.
Added a workarouond to request the A2DP output standby directly to audio hardware when the sink is suspended as it seems that the suspend request often fails.

Also take into account resume requests received while a suspend request is pending.
2009-10-08 12:03:51 -07:00
Android (Google) Code Review
c3f90813a1 Merge change I46b2df15 into eclair
* changes:
  fix [2164183] sometimes device just wants to stay asleep
2009-10-07 21:09:49 -04:00
Mathias Agopian
d3144beec6 fix [2170283] SurfaceFlinger crashes on OOM.
when running out of memory, a null handle is returned but the error code may not be set.
In that case we need to return NO_MEMORY instead of NO_ERROR, so that the calling code
won't try to dereference the null pointer.
2009-10-07 18:03:35 -07:00
Mathias Agopian
8f2d505216 fix [2164183] sometimes device just wants to stay asleep
When switching rapidily orientation back and forth, surfaces end-up
acquiring the freeze-lock when the first orientation change happens,
but never release it because by the time the 2nd orientation change
comes in, the surface size is back to its original size and
doesn't appear to have resized.

we now always release the freeze-lock when we receive a buffer of the
expected size.
2009-10-07 17:58:29 -07:00
Mathias Agopian
e700501d0e fix [2170319] gmail bulk operation checkbox latency on passion
This also fixes [2152536] ANR in browser

When SF is enqueuing buffers faster than SF dequeues them.
The update flag in SF is not counted and under some situations SF will only
dequeue the first buffer. The state at this point is not technically
corrupted, it's valid, but just delayed by one buffer.

In the case of the Browser ANR, because the last enqueued buffer was delayed
the resizing of the current buffer couldn't happen.

The system would always fall back onto its feet if anything -else- in
tried to draw, because the "late" buffer would be picked up then.
2009-10-07 16:44:10 -07:00
Mathias Agopian
67838bc112 Revert "temporarily disable the use of glTexImage2D for sw buffers on sholes."
This reverts commit c131c5671965b69b0dee3e4afa3b3dd5e3c0c405.

Approved by Hiroshi
2009-10-06 22:23:23 -07:00
Android (Google) Code Review
c87104f17c Merge change I4961c959 into eclair
* changes:
  fix [2152536] ANR in browser
2009-10-06 22:10:17 -04:00
Mathias Agopian
9ec430adae fix [2152536] ANR in browser
A window is created and the browser is about to render into it the
very first time, at that point it does an IPC to SF to request a new
buffer. Meanwhile, the window manager removes that window from the
list and the shared memory block it uses is marked as invalid.
However, at that point, another window is created and is given the
same index (that just go freed), but a different identity and resets
the "invalid" bit in the shared block. When we go back to the buffer
allocation code, we're stuck because the surface we're allocating for
is gone and we don't detect it's invalid because the invalid bit has
been reset.

It is not sufficient to check for the invalid bit, I should
also check that identities match.
2009-10-06 19:00:57 -07:00
Eric Laurent
f5e868baf9 Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).
This change is a complement to the main fix in kernel driver for the same issue (partner change #1250).
It removes clicks sometimes heard after the end of the tones while audio flinger is sending 0s to the audio output stream.
The problem was that the sleep time between two writes was more than the duration of one audio output stream buffer which could cause some underrun.

Also fixed a recent regression in ToneGenerator that made that the end of previous tone was repeated at the beginning of current one under certain timing circumstances when the maximum tone duration was specified.
2009-10-06 18:59:35 -07:00
Mathias Agopian
cfc7010ef8 temporarily disable the use of glTexImage2D for sw buffers on sholes.
we're going to first cut a build without this change.

Approved by Dr. Hiroshi.
2009-10-06 17:59:43 -07:00