Commit Graph

492 Commits

Author SHA1 Message Date
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
Mathias Agopian
a4b740ed89 fix [2168528] enable glTexImage2D code path in SF for software-only buffers 2009-10-06 17:24:26 -07:00
Mathias Agopian
b26af23744 fix [2168531] have software-only gralloc buffer side-step the HAL 2009-10-06 17:00:25 -07:00
Mathias Agopian
3330b20303 fix [2167050] glTexImage2D code path buggy in SurfaceFlinger
When EGLImage extension is not available, SurfaceFlinger will fallback to using
glTexImage2D and glTexSubImage2D instead, which requires 50% more memory and an
extra copy. However this code path has never been exercised and had some bugs
which this patch fix.

Mainly the scale factor wasn't computed right when falling back on glDrawElements.
We also fallback to this mode of operation if a buffer doesn't have the adequate
usage bits for EGLImage usage.

This changes only code that is currently not executed. Some refactoring was needed to
keep the change clean. This doesn't change anything functionaly.
2009-10-06 17:00:25 -07:00
Wu-cheng Li
e6a550d02f Add zoom functions and sendCommand.
b2060030
2009-10-06 13:25:10 -07:00
Mathias Agopian
0b3ad46a26 Attempt to fix [2152536] ANR in browser
The ANR is caused by SurfaceFlinger waiting for buffers of a removed surface to become availlable.
When it is removed from the current list, a Surface is marked as NO_INIT, which causes SF to return
immediately in the above case. For some reason, the surface here wasn't marked as NO_INIT.

This change makes the code more robust by always (irregadless or errors) setting the NO_INIT status
in all code paths where a surface is removed from the list.

Additionaly added more information in the logs, should this happen again.
2009-10-02 18:12:30 -07:00
Christopher Tate
e7e1009636 Turn off most of the backup-related debug logging
The core logging in BackupManagerService and in the Google backup transport are
still enabled at this point.

Change-Id: I10abfa565bbd1097dd3631051b6aca163e4af33a
2009-09-30 17:07:37 -07:00
Android (Google) Code Review
2b2888c356 Merge change Ibe2085be into eclair
* changes:
  Fix issue 2153835: AudioFlinger: setParameters() can remain stuck if output thread is terminated.
2009-09-30 19:19:36 -04:00
Mathias Agopian
448f015966 attempt to work around [2155085, 2150246] stuck in closeTransaction() 2009-09-30 15:15:07 -07:00
Eric Laurent
2d70c80a7f Fix issue 2153835: AudioFlinger: setParameters() can remain stuck if output thread is terminated.
Wait for the parameter set completed condition with a time out in ThreadBase::setParameters().
Also lock AudioFlinger mutex before accessing thread list in AudioFlinger::setParameters() and keep a strong reference
on the thread being used in case it is exited while processing the request.
2009-09-30 14:48:20 -07:00
Android (Google) Code Review
68624f2aa5 Merge changes I8851617a,Ie1b6f244,I70cab912,Ibd23e30d into eclair
* changes:
  fix [2152247] Windows sometimes drawn scaled up.
  invalidate the surface when the physical changes
  introduce the notion of the requested size in the Layer state
  remove unused code
2009-09-30 17:27:18 -04:00
Android (Google) Code Review
75ed8b360a Merge change I45094a34 into eclair
* changes:
  remove dead code
2009-09-30 17:12:01 -04:00
Mathias Agopian
df3e0b934f fix [2152247] Windows sometimes drawn scaled up. 2009-09-30 14:07:22 -07:00
Mathias Agopian
6656dbc812 invalidate the surface when the physical changes 2009-09-30 12:48:47 -07:00
Dave Sparks
8a95a45fd9 Reduce the log spew from AudioFlinger due to a certain device that can't meet latency timing. Bug 2142215. 2009-09-30 03:09:03 -07:00
Mathias Agopian
7e4a587f60 introduce the notion of the requested size in the Layer state 2009-09-29 22:44:28 -07:00
Mathias Agopian
ba6be54876 remove unused code 2009-09-29 22:32:36 -07:00
Mathias Agopian
85ec55f8f5 remove dead code 2009-09-29 15:26:42 -07:00
Wu-cheng Li
eb16a09f59 Change FLASH_MODE_VIDEO_LIGHT to FLASH_MODE_TORCH. 2009-09-28 13:51:59 -07:00
Mathias Agopian
8a77baaa11 don't emit GL commands when sf is in freeze mode
We were emitting GL commands, calling composition complete and releasing clients
without ever calling eglSwapBuffers(), which is completely wrong on non-direct
renders. This could cause transient drawing artifacts when unfreezing the
screen (upon orientaion change for instance) and could also block the clients
for ever as they are waiting for their previous buffer to be rendered.
2009-09-27 22:47:32 -07:00
Android (Google) Code Review
ff5054c81e Merge change 27375 into eclair
* changes:
  Allways dump the list of allocated buffers when an allocation fails.
2009-09-27 21:47:29 -04:00
Mathias Agopian
737e786acf Allways dump the list of allocated buffers when an allocation fails.
Hopefully this will help us understand cases of failures such as [2148405]
2009-09-27 18:44:09 -07:00
Doug Zongker
a4f58892d4 fix "pacakge" typo in error log message 2009-09-27 17:03:12 -07:00
Wu-cheng Li
cc6ce203be Add camera parameter key constants and documentation. 2009-09-25 14:23:56 -07:00
Mathias Agopian
95a666b0e0 minor SurfaceFlinger code cleanup and remove unnecessary tests 2009-09-24 14:57:26 -07:00
Christopher Tate
6e472890ef Clear the device's data from the transport when backup is disabled
Turning off backup in the Settings UI constitutes an opt-out of the whole
mechanism.  For privacy reasons we instruct the backend to wipe all of the data
belonging to this device when the user does this.  If the attempt fails it is
rescheduled in the future based on the transport's requestBackupTime()
suggestion.  If network connectivity changes prompt the transport to indicate a
backup pass is appropriate "now," any pending init operation is processed before
the backup schedule is resumed.

The broadcasts used internally to the backup manager are now fully protected;
third party apps can neither send nor receive them.

(Also a minor logging change; don't log 'appropriate' EOF encountered during
parsing of a backup data stream.)
2009-09-24 11:19:04 -07:00
Mathias Agopian
401c257fba turn dithering off if it's not needed 2009-09-23 19:16:27 -07:00
Mathias Agopian
a2fe0a234b fix [2142193] disable GL_LINEAR when not needed 2009-09-23 18:55:02 -07:00
Mathias Agopian
8c0a3d75c8 fix [2133214] STOPSHIP: revert I4a06bb4f: workaround for [2113743] Sholes: frozen then runtime restart going to list view
Revert "workaround for [2113743] Sholes: frozen then runtime restart going to list view"

This reverts commit 4a06bb4f3355b0ef2b76aa883704da9d154c44ae.
2009-09-23 16:59:57 -07:00
Mathias Agopian
dd3423c624 fix [2132563] stuck in boot animation (framebuffer_device_open: Failed to create flip chain) 2009-09-23 15:49:32 -07:00
Android (Google) Code Review
953eb137bc Merge change 26623 into eclair
* changes:
  fbDev wasn't initialized of hw_get_module failed, but was then used anyway.
2009-09-23 15:02:49 -04:00
Marco Nelissen
a455793a8d fbDev wasn't initialized of hw_get_module failed, but was then used anyway. 2009-09-23 10:56:51 -07:00
Eric Laurent
aef692f50f Fix issue 2116700: Ringer screwy while connected over Bluetooth.
There was a regression introduced in AudioFlinger by change 24114 for suspended output:
The suspended output was not reading and mixing audio tracks.
When the phone is ringing, the A2DP output is suspended if the SCO headset and A2DP headset are the same. As the ringtone is played over the duplicated output, the fact that the A2DP output was not reading data was causing the hardware output to be stalled from time to time.
2009-09-22 00:35:48 -07:00
Andy McFadden
2944a2b360 Work around gcc 4.0.3 bug.
This appears to fix the sim-eng build on the gDapper build machines.

Basic problem is that LayerBuffer::OverlaySource has a constructor that
calls SurfaceFlinger.signalEvent().  SurfaceFlinger lists LayerBuffer
as a friend, but that's not enough to convince gcc that the embedded
OverlaySource class is also a friend.  I don't see a way to make them
friendly, so I marked signalEvent() as public.
2009-09-21 14:33:20 -07:00
Android (Google) Code Review
a69a8eeb20 Merge change 26081 into eclair
* changes:
  workaround for [2113743] Sholes: frozen then runtime restart going to list view
2009-09-20 20:12:30 -04:00
Mathias Agopian
1f0ffc46fd workaround for [2113743] Sholes: frozen then runtime restart going to list view 2009-09-20 17:08:45 -07:00
Dianne Hackborn
cfbb735f84 Fix issue #1862317: Browser does not appear to honor anchors (#es) in links
Also a little improved debugging output of bad resource identifiers.

Change-Id: I054064ef22855608ffd722e4ccf12ce57d1992b2
2009-09-20 12:40:03 -07:00