OSDN Git Service

android-x86/frameworks-av.git
12 years agoavcenc: Clarify the ifdefs surrounding inline assembly
Martin Storsjo [Fri, 13 Apr 2012 11:23:26 +0000 (14:23 +0300)]
avcenc: Clarify the ifdefs surrounding inline assembly

Previously, the code was structured like this:

#if defined(__GNUC__) && defined(__arm__)
    /* Generic C implementation */
#elif defined(__CC_ARM)
    /* RVCT version */
#elif defined(__GNUC__) && defined(__arm__)
    /* GCC arm assembly version */
#endif

This had two implications - the gcc arm version never was used
in practice, and the code required -D__arm__ to build at all for
other architectures.

The inline assembly constraints are buggy (requires changes so as
to not crash), and if fixed, the optimizations still aren't faster
than the generic C code on modern gcc versions. Therefore, just
ignore them and use the generic C code.

Due to the peculiar code block ordering and preprocessor conditions,
the generic C code is what has been used before anyway, but it
did require -D__arm__ to build, which can cause problems if building
for other architectures, if the system headers have ifdefs for this
define. This change makes it build without that define.

Change-Id: Ib3fcf5651ee720310b7dff10fd04279b5f90759c

12 years agoReconcile with jb-release
The Android Open Source Project [Tue, 3 Jul 2012 19:11:47 +0000 (12:11 -0700)]
Reconcile with jb-release

Change-Id: I7c52b8e82465f28b32e8ebf6df56c258458f2cd3

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Mon, 2 Jul 2012 19:54:56 +0000 (12:54 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoam 109347d4: audioflinger: fix regression in attachAuxEffect().
Eric Laurent [Mon, 2 Jul 2012 19:43:14 +0000 (12:43 -0700)]
am 109347d4: audioflinger: fix regression in attachAuxEffect().

* commit '109347d421413303eb1678dd9e2aa9d40acf89d2':
  audioflinger: fix regression in attachAuxEffect().

12 years agoaudioflinger: fix regression in attachAuxEffect().
Eric Laurent [Mon, 2 Jul 2012 19:31:03 +0000 (12:31 -0700)]
audioflinger: fix regression in attachAuxEffect().

Commit 717e1286 introduced a regression in PlaybackThread::Track::attachAuxEffect()
when called with an effect ID of 0 to detach the auxiliary effect.

It is normal in this case that AudioFlinger::getEffectThread_l() returns 0.

Bug 6768757.

Change-Id: I7430bd1aad2f68da38f7c3e4794e7ad657bfc6be

12 years agoam 717e1286: audioflinger: fix auxiliary effect attachment
Eric Laurent [Sun, 1 Jul 2012 16:33:59 +0000 (09:33 -0700)]
am 717e1286: audioflinger: fix auxiliary effect attachment

* commit '717e128691f083a9469a1d0e363ac6ecd5c65d58':
  audioflinger: fix auxiliary effect attachment

12 years agoaudioflinger: fix auxiliary effect attachment
Eric Laurent [Fri, 29 Jun 2012 23:36:52 +0000 (16:36 -0700)]
audioflinger: fix auxiliary effect attachment

Auxiliary effects (Reverb) are global effects and as such follow
the default rule which is to attach them to the output thread that
handles music streams by default. This causes a problem when several
threads are eligible to handle music streams as tracks can be attached
to either thread based on criteria unknown when teh effect is created.

The fix consists in moving the auxiliary effect if necessary when an
AudioTrack is attached to it and this track is not on the same
output thread.

Bug 6608561.

Change-Id: Ib32c3cabc731b2046aba728be1771982999c6069

12 years agoReconcile with jb-release
The Android Open Source Project [Mon, 25 Jun 2012 14:57:15 +0000 (07:57 -0700)]
Reconcile with jb-release

Change-Id: I1ce46fa6332f684c76c276117c7b406bdd5e9336

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Sat, 23 Jun 2012 01:21:17 +0000 (18:21 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoam 33e28dd3: Merge "SurfaceMediaSource: keep refs to current buffers" into jb-dev
Jamie Gennis [Fri, 22 Jun 2012 22:20:48 +0000 (15:20 -0700)]
am 33e28dd3: Merge "SurfaceMediaSource: keep refs to current buffers" into jb-dev

* commit '33e28dd3c033641f4db9d1b99c7c88d6d08c61f7':
  SurfaceMediaSource: keep refs to current buffers

12 years agoMerge "SurfaceMediaSource: keep refs to current buffers" into jb-dev
Jamie Gennis [Fri, 22 Jun 2012 22:18:26 +0000 (15:18 -0700)]
Merge "SurfaceMediaSource: keep refs to current buffers" into jb-dev

12 years agoSurfaceMediaSource: keep refs to current buffers
Jamie Gennis [Fri, 22 Jun 2012 21:42:00 +0000 (14:42 -0700)]
SurfaceMediaSource: keep refs to current buffers

This change fixes a bug in SurfaceMediaSource where it would not keep a
reference to all of the Gralloc buffers that the video encoder is currently
using.

Bug: 6655597
Change-Id: Ifd99976cc7ae57ed724bbf2bbcff357a39497391

12 years agoReconcile with jb-release
The Android Open Source Project [Fri, 22 Jun 2012 15:16:51 +0000 (08:16 -0700)]
Reconcile with jb-release

Change-Id: Iea91c1026e7fc3a59815e01e4e4168f875527e7c

12 years agoRevert input buffer count for the SoftAAC* decoders back to 4.
Andreas Huber [Wed, 20 Jun 2012 19:46:38 +0000 (12:46 -0700)]
Revert input buffer count for the SoftAAC* decoders back to 4.

This improves the netflix bandwidth change responsiveness.
With the old count of 32 the audio decoder running at a higher
priority would starve the video decoder for about 1 sec while
draining the input data.

I haven't been able to break any stream playback using MediaCodec
using the lower count, even though I'm sure I had a good reason
to increase it in the first place (see bug 6478823)

Change-Id: I7fd3e71794b0cc1570ea9d27d1d869ab1e1750c4
related-to-bug: 6685031

12 years agoam 39a31135: Revert input buffer count for the SoftAAC* decoders back to 4.
Andreas Huber [Wed, 20 Jun 2012 21:31:30 +0000 (14:31 -0700)]
am 39a31135: Revert input buffer count for the SoftAAC* decoders back to 4.

* commit '39a3113539f9bcc86a8efe562780c23ac8731098':
  Revert input buffer count for the SoftAAC* decoders back to 4.

12 years agoRevert input buffer count for the SoftAAC* decoders back to 4.
Andreas Huber [Wed, 20 Jun 2012 19:46:38 +0000 (12:46 -0700)]
Revert input buffer count for the SoftAAC* decoders back to 4.

This improves the netflix bandwidth change responsiveness.
With the old count of 32 the audio decoder running at a higher
priority would starve the video decoder for about 1 sec while
draining the input data.

I haven't been able to break any stream playback using MediaCodec
using the lower count, even though I'm sure I had a good reason
to increase it in the first place (see bug 6478823)

Change-Id: I7fd3e71794b0cc1570ea9d27d1d869ab1e1750c4
related-to-bug: 6685031

12 years agoReconcile with jb-release
The Android Open Source Project [Tue, 19 Jun 2012 13:13:22 +0000 (06:13 -0700)]
Reconcile with jb-release

Change-Id: Ic4989b359b302c5d72751cdebae3433064770a29

12 years agoam eb15716b: Change definition of warmup period
Glenn Kasten [Mon, 18 Jun 2012 17:32:49 +0000 (10:32 -0700)]
am eb15716b: Change definition of warmup period

* commit 'eb15716b59020f342df62bce5b293f0603b94861':
  Change definition of warmup period

12 years agoam 972af221: FastMixer compensates for SRC jitter in audio HAL
Glenn Kasten [Mon, 18 Jun 2012 17:32:13 +0000 (10:32 -0700)]
am 972af221: FastMixer compensates for SRC jitter in audio HAL

* commit '972af221ae7253e406e0e1ea853e56a3010ed6b1':
  FastMixer compensates for SRC jitter in audio HAL

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Sat, 16 Jun 2012 14:01:55 +0000 (07:01 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoChange definition of warmup period
Glenn Kasten [Wed, 13 Jun 2012 21:59:07 +0000 (14:59 -0700)]
Change definition of warmup period

Previously, warmup was considered done as soon as any write() took
more than 0.5 nominal cycle time.  In practice, this was always the
first write() that turned on power to the output path, and it didn't
accurately account for filling the full kernel buffer queue, or for
buffering in the HAL sample rate conversion.

Now warmup is considered done when a write() _after_ the first write
takes more than 0.5 nominal cycle time.

This will throttle the initial pull rate after coming out of standby.
When combined with another change to throttle the pull rate for
devices with HAL sample rate conversion, it may help reduce some of the
notification glitches.  The only downside is that it will increase the
warmup time a bit.

Bug: 650831766508466607056
Change-Id: I39f324c5195578170a55308e9601d3a1b41db3e0

12 years agoFastMixer compensates for SRC jitter in audio HAL
Glenn Kasten [Thu, 14 Jun 2012 00:14:03 +0000 (17:14 -0700)]
FastMixer compensates for SRC jitter in audio HAL

Force a sleep if audio HAL write() returns too quickly.

Bug: 6661275
Change-Id: Ie810f5a087b89fb24dab229a0e500af1dee53571

12 years agoam fc42e16d: Merge "Fix track selection code in AwesomePlayer" into jb-dev
James Dong [Fri, 15 Jun 2012 17:16:34 +0000 (10:16 -0700)]
am fc42e16d: Merge "Fix track selection code in AwesomePlayer" into jb-dev

* commit 'fc42e16d96b7e1b18b573f40df1319c56f8ab933':
  Fix track selection code in AwesomePlayer

12 years agoMerge "Fix track selection code in AwesomePlayer" into jb-dev
James Dong [Fri, 15 Jun 2012 17:14:04 +0000 (10:14 -0700)]
Merge "Fix track selection code in AwesomePlayer" into jb-dev

12 years agoam 0a14c4ce: Make CPU frequency statistics optional
Glenn Kasten [Fri, 15 Jun 2012 15:23:44 +0000 (08:23 -0700)]
am 0a14c4ce: Make CPU frequency statistics optional

* commit '0a14c4ce1a41bc09eb7855fa531a3af629a69139':
  Make CPU frequency statistics optional

12 years agoFix track selection code in AwesomePlayer
Insun Kang [Fri, 15 Jun 2012 04:02:45 +0000 (13:02 +0900)]
Fix track selection code in AwesomePlayer

Change-Id: I1c5a2f13f562a0ba253a93b4346cbe2c60099ddd
related-to-bug: 6671977

12 years agoMake CPU frequency statistics optional
Glenn Kasten [Wed, 13 Jun 2012 21:58:49 +0000 (14:58 -0700)]
Make CPU frequency statistics optional

Certain CPUs with dynamic cluster swapping and hotplug
don't report CPU frequency accurately.  The file descriptors
used to read the frequency become stale and report bogus data.
So make this feature a build time option for debugging only.
This will also improve performance of the fast mixer loop.

Change-Id: I602f81ec3281a37992769208be08084ed1469e8c

12 years agoam 362ebcbf: DO NOT MERGE Remove log spam for fast track denied
Glenn Kasten [Fri, 15 Jun 2012 00:26:44 +0000 (17:26 -0700)]
am 362ebcbf: DO NOT MERGE Remove log spam for fast track denied

* commit '362ebcbf100f7fccd37551c77e67c4faa7241b63':
  DO NOT MERGE Remove log spam for fast track denied

12 years agoDO NOT MERGE Remove log spam for fast track denied
Glenn Kasten [Thu, 24 May 2012 15:44:00 +0000 (08:44 -0700)]
DO NOT MERGE Remove log spam for fast track denied

Bug: 6531054
Change-Id: Iedf58e810a157aae88b5900da27c81054c437058

12 years agoam 7b4de101: Merge "stagefright: set scaling mode for blank frames" into jb-dev
Jamie Gennis [Thu, 14 Jun 2012 20:10:42 +0000 (13:10 -0700)]
am 7b4de101: Merge "stagefright: set scaling mode for blank frames" into jb-dev

* commit '7b4de10199f3a1803350e9a65baa671874d9c2f1':
  stagefright: set scaling mode for blank frames

12 years agoMerge "stagefright: set scaling mode for blank frames" into jb-dev
Jamie Gennis [Thu, 14 Jun 2012 20:08:08 +0000 (13:08 -0700)]
Merge "stagefright: set scaling mode for blank frames" into jb-dev

12 years agoam 192cbbad: Fix audio track pause.
Eric Laurent [Thu, 14 Jun 2012 19:12:52 +0000 (12:12 -0700)]
am 192cbbad: Fix audio track pause.

* commit '192cbbad773979a6fe3b5a0c223356de4fc3309c':
  Fix audio track pause.

12 years agostagefright: set scaling mode for blank frames
Jamie Gennis [Thu, 14 Jun 2012 02:13:16 +0000 (19:13 -0700)]
stagefright: set scaling mode for blank frames

This change sets the ANativeWindow scaling mode before pushing the blank frames
during decoder tear down.

Bug: 6603254
Change-Id: Ic64011645e2d3671b4a8d302ac7f39e6fd3affcd

12 years agoFix audio track pause.
Eric Laurent [Wed, 13 Jun 2012 15:38:36 +0000 (08:38 -0700)]
Fix audio track pause.

AudioTrack::pause() should signal the control block condition
to release threads waiting for available buffers in obtainBuffer().
Otherwise the behavior relies on the timout on the condition
or the fact that audioflinger will mix a new audio buffer while executing
the pause.

Bug 6653769.

Change-Id: I5f8f73c471fe306070f30b814f32fd4b4dc1d575

12 years agoam 82233b4b: Merge "Better handle invalid duration in Xing/VBRI tags" into jb-dev
Marco Nelissen [Thu, 14 Jun 2012 16:54:09 +0000 (09:54 -0700)]
am 82233b4b: Merge "Better handle invalid duration in Xing/VBRI tags" into jb-dev

* commit '82233b4b5bee06f11618a558ae465abbfdedfd6e':
  Better handle invalid duration in Xing/VBRI tags

12 years agoMerge "Better handle invalid duration in Xing/VBRI tags" into jb-dev
Marco Nelissen [Thu, 14 Jun 2012 16:51:49 +0000 (09:51 -0700)]
Merge "Better handle invalid duration in Xing/VBRI tags" into jb-dev

12 years agoam e6adde40: Merge "Shorten dumpsys media.audio_flinger output" into jb-dev
Glenn Kasten [Thu, 14 Jun 2012 15:43:58 +0000 (08:43 -0700)]
am e6adde40: Merge "Shorten dumpsys media.audio_flinger output" into jb-dev

* commit 'e6adde403480333b613452ae0df442df9da4a5b2':
  Shorten dumpsys media.audio_flinger output

12 years agoam 49dd5cf3: Merge "Log track name on obtain/releaseBuffer warnings" into jb-dev
Glenn Kasten [Thu, 14 Jun 2012 15:43:56 +0000 (08:43 -0700)]
am 49dd5cf3: Merge "Log track name on obtain/releaseBuffer warnings" into jb-dev

* commit '49dd5cf3469cd755321f8ec10013ad4fcfaf723d':
  Log track name on obtain/releaseBuffer warnings

12 years agoMerge "Shorten dumpsys media.audio_flinger output" into jb-dev
Glenn Kasten [Thu, 14 Jun 2012 15:41:54 +0000 (08:41 -0700)]
Merge "Shorten dumpsys media.audio_flinger output" into jb-dev

12 years agoMerge "Log track name on obtain/releaseBuffer warnings" into jb-dev
Glenn Kasten [Thu, 14 Jun 2012 15:41:38 +0000 (08:41 -0700)]
Merge "Log track name on obtain/releaseBuffer warnings" into jb-dev

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Thu, 14 Jun 2012 14:01:45 +0000 (07:01 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoam e20435de: Merge "Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /framewo...
James Dong [Thu, 14 Jun 2012 03:51:33 +0000 (20:51 -0700)]
am e20435de: Merge "Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/" into jb-dev

* commit 'e20435de10f63af812da9d4f801b61a8817733a0':
  Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/

12 years agoMerge "Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/"...
James Dong [Thu, 14 Jun 2012 03:49:34 +0000 (20:49 -0700)]
Merge "Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/" into jb-dev

12 years agoam cac467b3: Merge "Fix one of the potential ANR issues from AwesomePlayer" into...
James Dong [Thu, 14 Jun 2012 00:01:22 +0000 (17:01 -0700)]
am cac467b3: Merge "Fix one of the potential ANR issues from AwesomePlayer" into jb-dev

* commit 'cac467b3af9235229522a134d2c57e4fa605ba2f':
  Fix one of the potential ANR issues from AwesomePlayer

12 years agoMerge "Fix one of the potential ANR issues from AwesomePlayer" into jb-dev
James Dong [Wed, 13 Jun 2012 23:59:15 +0000 (16:59 -0700)]
Merge "Fix one of the potential ANR issues from AwesomePlayer" into jb-dev

12 years agoBetter handle invalid duration in Xing/VBRI tags
Marco Nelissen [Wed, 13 Jun 2012 15:51:00 +0000 (08:51 -0700)]
Better handle invalid duration in Xing/VBRI tags

b/6654637

Change-Id: Ie92eddd84ef5914b77dbadaacd80b4de6cd66e1c

12 years agoAdd NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/
James Dong [Wed, 13 Jun 2012 01:10:35 +0000 (18:10 -0700)]
Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/

Change-Id: I0a3af3e2abdedebd5934f3d941d01c32cfc75e26
related-to-bug: 6647465

12 years agoShorten dumpsys media.audio_flinger output
Glenn Kasten [Wed, 13 Jun 2012 21:59:17 +0000 (14:59 -0700)]
Shorten dumpsys media.audio_flinger output

Don't include in FastMixer if it's not present.
This removes confusing clutter especially for devices
with a separate deep buffer output thread, or for the
duplicating thread and A2DP output thread.

Change-Id: I84933f5555593256f11ba0895ec915c09cf16963

12 years agoLog track name on obtain/releaseBuffer warnings
Glenn Kasten [Thu, 31 May 2012 21:35:01 +0000 (14:35 -0700)]
Log track name on obtain/releaseBuffer warnings

This should help diagnose problems by allowing us to correlate
the logs with the dumpsys media.audio_flinger output.

Change-Id: I8c7c592b4f87d13b0f29c66ce7a2f301a0f063c9

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Wed, 13 Jun 2012 15:37:36 +0000 (08:37 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoFix one of the potential ANR issues from AwesomePlayer
James Dong [Wed, 13 Jun 2012 00:18:37 +0000 (17:18 -0700)]
Fix one of the potential ANR issues from AwesomePlayer

Change-Id: I8ac7bbb5fe219f65bdbdd223538fbac0575e2957
related-to-bug: 6565826

12 years agoam b4ea1ab8: Merge "stagefright: fix AudioRecord callback buffer size" into jb-dev
Eric Laurent [Wed, 13 Jun 2012 01:40:25 +0000 (18:40 -0700)]
am b4ea1ab8: Merge "stagefright: fix AudioRecord callback buffer size" into jb-dev

* commit 'b4ea1ab821d652cb080910d4081f5f1318597a90':
  stagefright: fix AudioRecord callback buffer size

12 years agoMerge "stagefright: fix AudioRecord callback buffer size" into jb-dev
Eric Laurent [Wed, 13 Jun 2012 01:33:47 +0000 (18:33 -0700)]
Merge "stagefright: fix AudioRecord callback buffer size" into jb-dev

12 years agoam 958f463c: Add NOTICE and MODULE_LICENSE_APACHE2 for libstagefright_soft_h264dec...
James Dong [Wed, 13 Jun 2012 01:15:18 +0000 (18:15 -0700)]
am 958f463c: Add NOTICE and MODULE_LICENSE_APACHE2 for libstagefright_soft_h264dec and libstagefright_soft_vpxdec

* commit '958f463c4cddba6437c86d5bfef68167f767ee66':
  Add NOTICE and MODULE_LICENSE_APACHE2 for libstagefright_soft_h264dec and libstagefright_soft_vpxdec

12 years agoAdd NOTICE and MODULE_LICENSE_APACHE2 for libstagefright_soft_h264dec and libstagefri...
James Dong [Wed, 13 Jun 2012 00:40:43 +0000 (17:40 -0700)]
Add NOTICE and MODULE_LICENSE_APACHE2 for libstagefright_soft_h264dec and libstagefright_soft_vpxdec

Change-Id: Id4f1ef8dfc21731846a9862b8d12940a92fe99bb
related-to-bug: 6647465

12 years agostagefright: fix AudioRecord callback buffer size
Eric Laurent [Wed, 13 Jun 2012 00:09:30 +0000 (17:09 -0700)]
stagefright: fix AudioRecord callback buffer size

Make sure that the maximum number of frames passed to
AudioSource by the AudioRecord callback always fits within
the maximum buffer size defined by kMaxBufferSize.

Also make sure that the total AudioRecord buffer size is more
than the minimum required.

Change-Id: I26a1f998e0cf75ac88b02e67ec9d8db3c0cca193

12 years agoam bd961f4c: Merge "Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor" into...
James Dong [Tue, 12 Jun 2012 21:22:57 +0000 (14:22 -0700)]
am bd961f4c: Merge "Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor" into jb-dev

* commit 'bd961f4c4d51c4fcfc4722d02383eb4263ef0ac5':
  Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor

12 years agoMerge "Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor" into jb-dev
James Dong [Tue, 12 Jun 2012 21:20:44 +0000 (14:20 -0700)]
Merge "Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor" into jb-dev

12 years agoAdd NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor
James Dong [Tue, 12 Jun 2012 20:51:12 +0000 (13:51 -0700)]
Add NOTICE and MODULE_LICENSE_APATCH2 to libvideoeditor

Change-Id: I19308c5fb0f39f8e696092186f4386e3dad06894
related-to-bug: 6647465

12 years agoam 10cf121f: Merge "Update make file" into jb-dev
Dave Burke [Tue, 12 Jun 2012 19:46:17 +0000 (12:46 -0700)]
am 10cf121f: Merge "Update make file" into jb-dev

* commit '10cf121f7285e23c37264dab3bad7cffefd754b1':
  Update make file

12 years agoam b7706712: Merge "Fix gapless for deep buffers" into jb-dev
Marco Nelissen [Tue, 12 Jun 2012 19:44:45 +0000 (12:44 -0700)]
am b7706712: Merge "Fix gapless for deep buffers" into jb-dev

* commit 'b7706712938c55706c87724af7f6d2f2156b8d1b':
  Fix gapless for deep buffers

12 years agoam 58c8db6b: Merge "Fix gapless playback" into jb-dev
Marco Nelissen [Tue, 12 Jun 2012 19:43:05 +0000 (12:43 -0700)]
am 58c8db6b: Merge "Fix gapless playback" into jb-dev

* commit '58c8db6b7667db7a3bdb9b4bdd973091a5b0202f':
  Fix gapless playback

12 years agoam 8a61dc02: Merge "Revert "Added some informational log messages to track down ANR...
James Dong [Tue, 12 Jun 2012 19:42:11 +0000 (12:42 -0700)]
am 8a61dc02: Merge "Revert "Added some informational log messages to track down ANR related issues"" into jb-dev

* commit '8a61dc02dbbc325dee51f2e9c9f0bbc238759ec5':
  Revert "Added some informational log messages to track down ANR related issues"

12 years agoam c15d6657: Add audio watchdog thread
Glenn Kasten [Tue, 12 Jun 2012 19:41:14 +0000 (12:41 -0700)]
am c15d6657: Add audio watchdog thread

* commit 'c15d6657a17d7cef91f800f40d11760e2e7340af':
  Add audio watchdog thread

12 years agoMerge "Update make file" into jb-dev
Dave Burke [Tue, 12 Jun 2012 19:23:20 +0000 (12:23 -0700)]
Merge "Update make file" into jb-dev

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Tue, 12 Jun 2012 18:21:43 +0000 (11:21 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoUpdate make file
Dave Burke [Tue, 12 Jun 2012 17:41:14 +0000 (10:41 -0700)]
Update make file

Change-Id: I7dbd128245f584df2689457df0dd12ce888cf8ef

12 years agoMerge "Fix gapless for deep buffers" into jb-dev
Marco Nelissen [Tue, 12 Jun 2012 14:52:30 +0000 (07:52 -0700)]
Merge "Fix gapless for deep buffers" into jb-dev

12 years agoFix gapless for deep buffers
Marco Nelissen [Tue, 12 Jun 2012 00:00:59 +0000 (17:00 -0700)]
Fix gapless for deep buffers

Forward current flags to next output.
b/6645676

Change-Id: I584f7a67472d99cbd6bc38f3fe84763331d115d1

12 years agoMerge "Fix gapless playback" into jb-dev
Marco Nelissen [Mon, 11 Jun 2012 23:04:56 +0000 (16:04 -0700)]
Merge "Fix gapless playback" into jb-dev

12 years agoFix gapless playback
Marco Nelissen [Mon, 11 Jun 2012 21:52:53 +0000 (14:52 -0700)]
Fix gapless playback

On some devices the actual framecount per buffer of an AudioTrack
will be different than what was requested, which prevented the
track from being reused. Now we create a new AudioTrack with the
requested parameters, and then compare it to the track we already
have. If they match, we throw away the new track and reuse the
existing one.
b/6644559

Change-Id: Id3e8c4460436f52e59b98ecaeb01c94f02877c1d

12 years agostagefright aacenc: Move system headers before local headers
Martin Storsjo [Wed, 23 May 2012 12:01:54 +0000 (15:01 +0300)]
stagefright aacenc: Move system headers before local headers

This avoids issues with the encoder's own definition of __inline,
which conflicts with headers brought in by string.h in glibc.

Change-Id: I9e3fbf8d892529940ea67a46e67a9abe71d9c5fa

12 years agoMerge "Revert "Added some informational log messages to track down ANR related issues...
James Dong [Mon, 11 Jun 2012 20:35:06 +0000 (13:35 -0700)]
Merge "Revert "Added some informational log messages to track down ANR related issues"" into jb-dev

12 years agoAdd audio watchdog thread
Glenn Kasten [Wed, 30 May 2012 21:52:57 +0000 (14:52 -0700)]
Add audio watchdog thread

Change-Id: I4ed62087bd6554179abb8258d2da606050e762c0

12 years agoRevert "Added some informational log messages to track down ANR related issues"
James Dong [Mon, 11 Jun 2012 17:49:55 +0000 (10:49 -0700)]
Revert "Added some informational log messages to track down ANR related issues"

This reverts commit c558fa89016ba9583049b84dc57e66a913cabde8.

related-to-bug: 6565826

12 years agoReconcile with jb-release
The Android Open Source Project [Mon, 11 Jun 2012 16:20:56 +0000 (09:20 -0700)]
Reconcile with jb-release

Change-Id: Id132825de97a186047a6189a92abde9f5c087a5a

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Mon, 11 Jun 2012 14:01:48 +0000 (07:01 -0700)]
merge in jb-release history after reset to jb-dev

12 years agostagefright aacenc: Add parentheses in expression with mixed && and ||
Martin Storsjo [Thu, 12 Jan 2012 12:45:41 +0000 (14:45 +0200)]
stagefright aacenc: Add parentheses in expression with mixed && and ||

This doesn't maintain the exact behaviour, but seems closer to
what the original author probably intended.

This avoids a warning.

Change-Id: I191292faa0a25f715f2b7d46ec770827e2ac0b7b

12 years agoam b7acdfb8: Merge "Fix green or corrupted video frames in the exported movies" into...
James Dong [Fri, 8 Jun 2012 19:40:18 +0000 (12:40 -0700)]
am b7acdfb8: Merge "Fix green or corrupted video frames in the exported movies" into jb-dev

* commit 'b7acdfb8068bf408ed859dfdd441b4a8722eb12a':
  Fix green or corrupted video frames in the exported movies

12 years agoMerge "Fix green or corrupted video frames in the exported movies" into jb-dev
James Dong [Fri, 8 Jun 2012 19:37:50 +0000 (12:37 -0700)]
Merge "Fix green or corrupted video frames in the exported movies" into jb-dev

12 years agoReduce underruns in screen off, esp. with EQ
Glenn Kasten [Thu, 7 Jun 2012 17:17:54 +0000 (10:17 -0700)]
Reduce underruns in screen off, esp. with EQ

Add MonoPipe APIs to specify setpoint.
Use screen state to configure pipe setpoint.
Fix a long-standing bug where pipe sleep time was excessive,
  which interacted poorly with governor and low clock frequencies.
  Now it deducts the elapsed time since last write(),
  which was significant when there was EQ and low clock frequency.

Bug: 6618373
Change-Id: I6f3b0072c2244aeb033ef0795ad164491a164ff5

12 years agoam 28ed2f93: Reduce underruns in screen off, esp. with EQ
Glenn Kasten [Fri, 8 Jun 2012 17:28:45 +0000 (10:28 -0700)]
am 28ed2f93: Reduce underruns in screen off, esp. with EQ

* commit '28ed2f93324988767b5658eba7c1fa781a275183':
  Reduce underruns in screen off, esp. with EQ

12 years agoReduce underruns in screen off, esp. with EQ
Glenn Kasten [Thu, 7 Jun 2012 17:17:54 +0000 (10:17 -0700)]
Reduce underruns in screen off, esp. with EQ

Add MonoPipe APIs to specify setpoint.
Use screen state to configure pipe setpoint.
Fix a long-standing bug where pipe sleep time was excessive,
  which interacted poorly with governor and low clock frequencies.
  Now it deducts the elapsed time since last write(),
  which was significant when there was EQ and low clock frequency.

Bug: 6618373
Change-Id: I6f3b0072c2244aeb033ef0795ad164491a164ff5

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Fri, 8 Jun 2012 15:19:13 +0000 (08:19 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoFix green or corrupted video frames in the exported movies
James Dong [Tue, 5 Jun 2012 02:07:28 +0000 (19:07 -0700)]
Fix green or corrupted video frames in the exported movies

At least two use cases are affected: trimming and transition clip generation.

If the starting time of the transition or the trimming position is not the same as
that of any existing video frame, the video frame right before the transition
starting position or the trimming position must be encoded as the the first video
frame for the transtion or the trimmed video, and it is encoded as a key frame.
This frame was not saved without the patch.

In the transcoding phrase, since we could not find such a frame, the existing
code did not return an error, and incorrectly used some other frame to serve
as the reference key frame for the remaining video frames of the transition or
the trimmed video. As a result, we may see corrupted or green video frames in
the exported movies.

The fix is to always save the frame right before the trimming position or
the transition starting time, so that a key frame will always be encoded, and
the right reference frame is used for remaining video frames. In addition,
checks are added to prevent from future mistakes to use incorrect reference frames.

Patch was originally contributed by teng.hong@nxp.com

Change-Id: I182784d4c1786224445224634edab3338bf2278f
related-to-bug: 5713461

12 years agoam a4f7e0e9: audioflinger: fix duplicating thread standby
Eric Laurent [Fri, 8 Jun 2012 00:43:35 +0000 (17:43 -0700)]
am a4f7e0e9: audioflinger: fix duplicating thread standby

* commit 'a4f7e0e9a0e92a063f1b3a08988cf46e2cf1fa94':
  audioflinger: fix duplicating thread standby

12 years agoaudioflinger: fix duplicating thread standby
Eric Laurent [Fri, 8 Jun 2012 00:16:09 +0000 (17:16 -0700)]
audioflinger: fix duplicating thread standby

The code that waits for a track presentation to be complete
before disabling it caused a regression for duplicating threads.
Because of the way output tracks activity is managed, the number
of frames output by the duplicating thread would never
reach the target set for a track to be considered presented.
The track would not be removed from active list and the thread would
not go to standby and keep its wakelock held.

Bug 6606922.

Change-Id: I4b46b420ac4cbf79a86b6791ae6589d407b01c92

12 years agoam e35a55fb: Merge "Take latency and current time into account for visualization...
Marco Nelissen [Thu, 7 Jun 2012 18:10:59 +0000 (11:10 -0700)]
am e35a55fb: Merge "Take latency and current time into account for visualization" into jb-dev

* commit 'e35a55fbdff5a695ee35ff43f1466a62fb75662b':
  Take latency and current time into account for visualization

12 years agoMerge "Take latency and current time into account for visualization" into jb-dev
Marco Nelissen [Thu, 7 Jun 2012 18:08:15 +0000 (11:08 -0700)]
Merge "Take latency and current time into account for visualization" into jb-dev

12 years agoam 9a0d82df: audioflinger: modify fast mixer overrun management
Eric Laurent [Thu, 7 Jun 2012 16:21:05 +0000 (09:21 -0700)]
am 9a0d82df: audioflinger: modify fast mixer overrun management

* commit '9a0d82df8fd681257bc5b29fb5e6c65fcc7cef5a':
  audioflinger: modify fast mixer overrun management

12 years agoTake latency and current time into account for visualization
Marco Nelissen [Wed, 6 Jun 2012 16:52:31 +0000 (09:52 -0700)]
Take latency and current time into account for visualization

Buffer more data, and return the data that is currently being
output from the audio output, to ensure that visualizations are
smooth and responsive even when the audio output has a large
latency and/or large buffers.
b/6522728

Change-Id: I401637f01be7600b3c594a55c869036c13b206c0

12 years agoReconcile with jb-release
The Android Open Source Project [Thu, 7 Jun 2012 14:49:04 +0000 (07:49 -0700)]
Reconcile with jb-release

Change-Id: I08692b2be6cd851d6dcfc1a56113837cb2cc219e

12 years agoaudioflinger: modify fast mixer overrun management
Eric Laurent [Wed, 6 Jun 2012 01:12:11 +0000 (18:12 -0700)]
audioflinger: modify fast mixer overrun management

Do not force sleep when an overrun occurs. This was for non
blocking audio HAL and is unused.
Keep statistics on overruns.

Bug 6605215.

Change-Id: I295455d4562201aa3814c88bdd6e52c9226712af

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Wed, 6 Jun 2012 14:01:38 +0000 (07:01 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoam 67c0a58e: audioflinger: various fixes on direct output
Eric Laurent [Tue, 5 Jun 2012 20:33:29 +0000 (13:33 -0700)]
am 67c0a58e: audioflinger: various fixes on direct output

* commit '67c0a58e05f4c19d4a6f01fe6f06267d57b49305':
  audioflinger: various fixes on direct output

12 years agoaudioflinger: various fixes on direct output
Eric Laurent [Wed, 2 May 2012 02:31:12 +0000 (19:31 -0700)]
audioflinger: various fixes on direct output

Various fixes in direct output playback thread implementation:
- threadLoop_write() was broken for playback threads that do not
use a pipe sink.
- output buffer size calculation was hard coded for stereo.
- removed software volume that was implemented for PCM stereo
format only: the audio HAL has to implement volume if needed
for direct outputs.

Change-Id: If211b4489be9af395435707b8cf0388cce1347b2

12 years agomerge in jb-release history after reset to jb-dev
The Android Automerger [Tue, 5 Jun 2012 13:52:23 +0000 (06:52 -0700)]
merge in jb-release history after reset to jb-dev

12 years agoam ab9071b8: audioflinger: fix active sleep time calculation.
Eric Laurent [Tue, 5 Jun 2012 01:33:16 +0000 (18:33 -0700)]
am ab9071b8: audioflinger: fix active sleep time calculation.

* commit 'ab9071b8d1b375418eb797c9a790da71de644344':
  audioflinger: fix active sleep time calculation.

12 years agoaudioflinger: fix active sleep time calculation.
Eric Laurent [Mon, 4 Jun 2012 20:45:29 +0000 (13:45 -0700)]
audioflinger: fix active sleep time calculation.

When an audioTrack underruns, the audioflinger mixer thread
sleeps for a certain time to give the app a chance to recover.
This time is based on the reported audio HAL latency.
Some audio HALs implementing deep buffering have a variable
latency and this creates a problem if the sleep time is cached
when the output stream is opened and not updated afterwards.

This change derives the active sleep time from the mix buffer
framecount instead of the latency. This is more conservative
but works for variable latency.

Bug 6588525.

Change-Id: Ia892fc290fe06f836565c3ae15f7a2ce026c88c6

12 years agoam 39993085: State queue dump
Glenn Kasten [Mon, 4 Jun 2012 19:52:19 +0000 (12:52 -0700)]
am 39993085: State queue dump

* commit '399930859a75d806ce0ef124ac22025ae4ef0549':
  State queue dump