OSDN Git Service

android-x86/frameworks-av.git
10 years agoMerge "Workaround slow AudioTrack destruction" into klp-dev
Glenn Kasten [Thu, 19 Sep 2013 16:28:23 +0000 (16:28 +0000)]
Merge "Workaround slow AudioTrack destruction" into klp-dev

10 years agoaudioflniger: fix leaked audiosession references
Eric Laurent [Thu, 19 Sep 2013 01:47:13 +0000 (18:47 -0700)]
audioflniger: fix leaked audiosession references

acquireAudioSessionId() should not create session references
if the caller is not listed in the known notification clients.
It happens when the MediaPlayer or AudioTrack is created by the
mediaserver on behalf of a client (e.g CameraService). In this case
releaseAudioSessionId() can be called from a different pid and
the session reference will not be removed.
Also we will not be able to remove the reference if the client
process dies.

Bug: 10606426.
Change-Id: Ibb5e27518daeb484a2e66302e4c6221cbaca5b70

10 years agoWorkaround slow AudioTrack destruction
Glenn Kasten [Wed, 18 Sep 2013 21:15:42 +0000 (14:15 -0700)]
Workaround slow AudioTrack destruction

Bug: 10809586
Change-Id: I5f30d4deb1233e8ade8967568e40684ef680c395

10 years agomore support for audio effect offload
Eric Laurent [Fri, 13 Sep 2013 00:37:00 +0000 (17:37 -0700)]
more support for audio effect offload

Offloading of audio effects is now enabled for offloaded
output threads. If an effect not supporting offload is enabled,
the AudioTrack is invalidated so that it can be recreated in PCM
mode.

Fix some issues in effect proxy related to handling of effect
commands to offloaded and non offloaded effects.

Also fixed a bug on capture index in software Visualizer effect.

Bug: 8174034.

Change-Id: Ib23d3c2d5a652361b0aaec7faee09102f2b18fce

10 years agoMerge "Partial fix for SoundPool not terminating" into klp-dev
Glenn Kasten [Wed, 18 Sep 2013 17:56:05 +0000 (17:56 +0000)]
Merge "Partial fix for SoundPool not terminating" into klp-dev

10 years agoPartial fix for SoundPool not terminating
Glenn Kasten [Wed, 18 Sep 2013 17:33:39 +0000 (10:33 -0700)]
Partial fix for SoundPool not terminating

SoundPool was waiting for EVENT_UNDERRUN only to indicate end of clip.  In
J, AudioTrack delivered both EVENT_UNDERRUN followed by EVENT_BUFFER_END.
However, as of K, AudioTrack is only delivering EVENT_BUFFER_END (this
lack of EVENT_UNDERRUN is another bug which still needs to be fixed).
The workaround is to also respond to EVENT_BUFFER_END in SoundPool.

Bug: 10787103
Change-Id: Id68a23bddd6dd9df6c49c55138197260d71ca468

10 years agoMerge "Use changed MediaCodec.PARAMETER_KEY_VIDEO_BITRATE value" into klp-dev
Lajos Molnar [Wed, 18 Sep 2013 17:31:18 +0000 (17:31 +0000)]
Merge "Use changed MediaCodec.PARAMETER_KEY_VIDEO_BITRATE value" into klp-dev

10 years agoUse changed MediaCodec.PARAMETER_KEY_VIDEO_BITRATE value
Lajos Molnar [Wed, 18 Sep 2013 02:07:40 +0000 (19:07 -0700)]
Use changed MediaCodec.PARAMETER_KEY_VIDEO_BITRATE value

Change-Id: I157bcafbf705865e66c81517b1eab10c3daa039e
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10461617

10 years agoLoudnessEnhancer audio effect implementation
Jean-Michel Trivi [Tue, 10 Sep 2013 16:15:18 +0000 (09:15 -0700)]
LoudnessEnhancer audio effect implementation

Implementation based on DRC effect, controlled by a
 target gain.
 The target gain is used to amplify the signal at
 the input of the DRC, and to compute the knee
 of the DRC.

Bug 8413913

Change-Id: I386d64793a9fa3f7218e053d6f0a99f6836c02bd

10 years agoMerge "Fix underruns when fast track denied due to SRC" into klp-dev
Glenn Kasten [Tue, 17 Sep 2013 22:03:00 +0000 (22:03 +0000)]
Merge "Fix underruns when fast track denied due to SRC" into klp-dev

10 years agoFix underruns when fast track denied due to SRC
Glenn Kasten [Tue, 17 Sep 2013 01:07:38 +0000 (18:07 -0700)]
Fix underruns when fast track denied due to SRC

OpenSL ES requests a fast track.  If sample rate conversion is needed,
the request is denied by server, and a larger client buffer is used
to handle the higher latency of a normal track.  However the client
notification period was calculated based on buffer being divided into
2 sub-buffers.  That resulted in the notification period being too long.
The server pulls chunks that are smaller than half the total buffer.
So now the client uses 3 sub-buffers when there is SRC.

Also removed the 'defer wake' optimization because it was incorrect.
This optimization attempted to reduce the number of wakeups of client,
when server releaseBuffer knows that another releaseBuffer will be
following.  But there is no way for the first releaseBuffer to predict
how soon the second releaseBuffer will occur.  In some cases it was
a long time, and the client underran.  So now the client is woken up
immediately if the total number of available frames to client is >=
the minimum number the client wants to see (the notification period).

Also fix bug where minimum frame count was not being used in the
calculation of notification period.

Bug: 10342804
Change-Id: I3c246f4e7bc3684a344f2cf08268dc082e338e2a

10 years agoMerge "Fix hang" into klp-dev
Marco Nelissen [Mon, 16 Sep 2013 22:57:17 +0000 (22:57 +0000)]
Merge "Fix hang" into klp-dev

10 years agoMerge "Camera3: Always set a trigger ID for an active trigger" into klp-dev
Eino-Ville Talvala [Mon, 16 Sep 2013 22:45:56 +0000 (22:45 +0000)]
Merge "Camera3: Always set a trigger ID for an active trigger" into klp-dev

10 years agoFix hang
Marco Nelissen [Mon, 16 Sep 2013 20:30:01 +0000 (13:30 -0700)]
Fix hang

Specify that the surface is controlled by the app, to avoid a hang.
b/10531761

Change-Id: Idccc2c73aa3d368d8e7fbdc071ce36e2382efea4

10 years agoMerge "Camera: setCallBackWindow only if callback surface is used" into klp-dev
Zhijun He [Mon, 16 Sep 2013 18:23:35 +0000 (18:23 +0000)]
Merge "Camera: setCallBackWindow only if callback surface is used" into klp-dev

10 years agoMerge "Add FLAG_CAN_SEEK_BACKWARD and FLAG_CAN_SEEK_FORWARD see flags" into klp-dev
Chong Zhang [Mon, 16 Sep 2013 18:14:01 +0000 (18:14 +0000)]
Merge "Add FLAG_CAN_SEEK_BACKWARD and FLAG_CAN_SEEK_FORWARD see flags" into klp-dev

10 years agoCamera3: Always set a trigger ID for an active trigger
Eino-Ville Talvala [Fri, 13 Sep 2013 18:39:24 +0000 (11:39 -0700)]
Camera3: Always set a trigger ID for an active trigger

This is to work around HAL implementations that expect to see an
ID for every trigger.

Use a dummy trigger ID of 1, since 0 has special meaning for older
HALs.

Bug: 10720617
Change-Id: I9cb1b8dbcb113cb9e737e5adb04032fd61a54c12

10 years agoCamera: setCallBackWindow only if callback surface is used
Zhijun He [Mon, 16 Sep 2013 04:06:10 +0000 (21:06 -0700)]
Camera: setCallBackWindow only if callback surface is used

Calling setCallBackWindow without checking the previewCallbackSurface could make
the stream to be deleted during callback stream operation, which is bad because
the preview is still active and the delete fails.

Bug: 10730496
Change-Id: I8addac25e5aa7901bf200d730c749bee2c088090

10 years agoCamera: Don't overwrite the error status
Zhijun He [Sat, 14 Sep 2013 00:59:59 +0000 (17:59 -0700)]
Camera: Don't overwrite the error status

Bug: 10749544
Change-Id: I6096effde03e18ee1b8c63cf3b36dce0344054c5

10 years agoMerge "Fix SoundPool.play() looping" into klp-dev
Glenn Kasten [Sat, 14 Sep 2013 00:08:55 +0000 (00:08 +0000)]
Merge "Fix SoundPool.play() looping" into klp-dev

10 years agoMerge "audioflinger: fix ro.audio.silent in offload mode" into klp-dev
Eric Laurent [Sat, 14 Sep 2013 00:07:28 +0000 (00:07 +0000)]
Merge "audioflinger: fix ro.audio.silent in offload mode" into klp-dev

10 years agoaudioflinger: fix ro.audio.silent in offload mode
Eric Laurent [Sat, 14 Sep 2013 00:00:08 +0000 (17:00 -0700)]
audioflinger: fix ro.audio.silent in offload mode

Change-Id: I5a1a79000d53146689b0a198cc5419c36509703f

10 years agoMerge "Camera: Limit supported preview sizes" into klp-dev
Zhijun He [Fri, 13 Sep 2013 23:04:17 +0000 (23:04 +0000)]
Merge "Camera: Limit supported preview sizes" into klp-dev

10 years agoCamera: Limit supported preview sizes
Zhijun He [Thu, 12 Sep 2013 05:58:17 +0000 (22:58 -0700)]
Camera: Limit supported preview sizes

The ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES can provide sizes as large
as jpeg sizes, which could cause potential issues when trying to do
full size still capture and full size preview. This is not supported
by many devices due to hardware limitation. This change limits the
preview (as well video) size to no more than 1080p.

Bug: 10625115
Change-Id: I9467ab843553ec06e8249b4a17c0ecf4c6d6f04e

10 years agoaudioflinger: longer offload thread standby delay
Eric Laurent [Wed, 4 Sep 2013 16:42:59 +0000 (09:42 -0700)]
audioflinger: longer offload thread standby delay

- Increase offloaded output thread standby delay to 1 second
to allow transition between tracks with going to stanby
if reusing the same audio track (gapless)

- Make sure pause/flush/resume sequence is sent to the HAL
in the right order

- Fix format display in track dump

Bug: 8174034.
Change-Id: I43ef6f8fdbf7427e4eff6cc2d0665d7d1463ea8a

10 years agoMerge "Fix MediaDrm cts tests" into klp-dev
Jeff Tinker [Thu, 12 Sep 2013 21:58:15 +0000 (21:58 +0000)]
Merge "Fix MediaDrm cts tests" into klp-dev

10 years agoMerge "ACodec: fix flush/resume for decoder-output-meta-data mode" into klp-dev
Lajos Molnar [Thu, 12 Sep 2013 21:16:57 +0000 (21:16 +0000)]
Merge "ACodec: fix flush/resume for decoder-output-meta-data mode" into klp-dev

10 years agoACodec: fix flush/resume for decoder-output-meta-data mode
Lajos Molnar [Thu, 12 Sep 2013 16:12:54 +0000 (09:12 -0700)]
ACodec: fix flush/resume for decoder-output-meta-data mode

When in decoder-output-meta-data mode, ACodec does not hold onto
buffers, but they are either with the native window, or with the
component/client.  However, for flushing we did not release the
discarded buffers back to native window (this makes sense because
they will be resubmitted shortly.)  This logic can be handled by
the normal resubmission.

Change-Id: Ic472b386422251515ef12f426e187f208f14decc
Signed-off-by: Lajos Molnar <lajos@google.com>
Bug: 10621959
Bug: 10192533

10 years agoMerge "Fix AudioTrack shared memory leak" into klp-dev
Glenn Kasten [Thu, 12 Sep 2013 15:13:44 +0000 (15:13 +0000)]
Merge "Fix AudioTrack shared memory leak" into klp-dev

10 years agoFix MediaDrm cts tests
Jeff Tinker [Thu, 12 Sep 2013 01:40:44 +0000 (18:40 -0700)]
Fix MediaDrm cts tests

Moving the build of the mock MediaDrm plugin back to
frameworks/av since it can't be installed by cts.

b/10668350

Change-Id: Id662bdb0775389b458f86a299392217f2d959422

10 years agoAdd FLAG_CAN_SEEK_BACKWARD and FLAG_CAN_SEEK_FORWARD see flags
Chong Zhang [Wed, 11 Sep 2013 19:52:43 +0000 (12:52 -0700)]
Add FLAG_CAN_SEEK_BACKWARD and FLAG_CAN_SEEK_FORWARD see flags

Also update seek flag in NuPlayerDriver, otherwise MediaPlayer will
get wrong flags.

Bug: 10676387

Change-Id: Ice30f27a9a04e37b4718d26228a407fea8d9e4fc

10 years agoMerge "audioflinger: add HOTWORD audio source." into klp-dev
Eric Laurent [Thu, 12 Sep 2013 00:15:15 +0000 (00:15 +0000)]
Merge "audioflinger: add HOTWORD audio source." into klp-dev

10 years agoPass subtitle track properties to getTrackInfo
Chong Zhang [Fri, 6 Sep 2013 22:34:50 +0000 (15:34 -0700)]
Pass subtitle track properties to getTrackInfo

Bug: 10326117

Change-Id: I15fcc49ad02e26d7cc92e82ee670bafca62a09a7

10 years agoFix SoundPool.play() looping
Glenn Kasten [Wed, 11 Sep 2013 21:35:16 +0000 (14:35 -0700)]
Fix SoundPool.play() looping

This is done by configuring SoundPool for shared memory and fast track.
Previously SoundPool used a streaming track, and looping in streaming
mode relied on the ability to loop the most recently enqueued data.
That 'feature' was lost in the new implementation of streaming, so we're
now switching from streaming mode to shared memory mode.  Shared memory
mode had always been desired, but was blocked by bug 2801375 which is fixed now.

Bug: 10171337
Change-Id: I2a938e3ffafa2a74d5210b4198b50db20ad5da0e

10 years agoFix AudioTrack shared memory leak
Glenn Kasten [Wed, 11 Sep 2013 16:14:16 +0000 (09:14 -0700)]
Fix AudioTrack shared memory leak

Bug: 2801375
Change-Id: I50e15164fe310f69ea019dca5b49171a02bc6992

10 years agoaudioflinger: add HOTWORD audio source.
Eric Laurent [Mon, 9 Sep 2013 16:08:44 +0000 (09:08 -0700)]
audioflinger: add HOTWORD audio source.

HOTWORD is a special capture audio source that uses
the same audio tuning as VOICE_RECOGNITION but allows an
active capture to be preempted.

Bug: 10640877.

Change-Id: Iea09a11cbcdbacc8d434e5230e7559dcd1b44ac0

10 years agoMerge "Make sure the encoder instance is safely release()'d before its" into klp-dev
Andreas Huber [Tue, 10 Sep 2013 19:10:50 +0000 (19:10 +0000)]
Merge "Make sure the encoder instance is safely release()'d before its" into klp-dev

10 years agoMediaMuxer: Hook up setLocation method
Zhijun He [Mon, 9 Sep 2013 22:48:58 +0000 (15:48 -0700)]
MediaMuxer: Hook up setLocation method

This method is needed when mediamuxer is used for camera video recording.

Bug: 10594784
Change-Id: I9bd006a07e5e2ac7019849e3f4f7cf7b8356d669

10 years agoMerge "camera3: Dump latest request sent with dumpsys" into klp-dev
Igor Murashkin [Mon, 9 Sep 2013 23:07:23 +0000 (23:07 +0000)]
Merge "camera3: Dump latest request sent with dumpsys" into klp-dev

10 years agoMerge "audioflinger: no effects on offloaded tracks" into klp-dev
Eric Laurent [Mon, 9 Sep 2013 20:19:47 +0000 (20:19 +0000)]
Merge "audioflinger: no effects on offloaded tracks" into klp-dev

10 years agoaudioflinger: no effects on offloaded tracks
Eric Laurent [Sat, 31 Aug 2013 19:59:48 +0000 (12:59 -0700)]
audioflinger: no effects on offloaded tracks

Invalidate offloaded tracks when an effect is enabled
so that the track is recreated in PCM mode and the effect
can be applied.
This is temporary until effect offloading is implemented.

Bug: 8174034.

Change-Id: I77b8b54a10db6cb8334be76d863ea7e720eaad09

10 years agoCamera: Correct stream id types
Zhijun He [Fri, 6 Sep 2013 22:00:01 +0000 (15:00 -0700)]
Camera: Correct stream id types

Bug: 10604704
Change-Id: I223ac5d200eb6439c08955fb7ad586592099fbae

10 years agocamera3: Dump latest request sent with dumpsys
Igor Murashkin [Fri, 6 Sep 2013 23:55:14 +0000 (16:55 -0700)]
camera3: Dump latest request sent with dumpsys

Bug: 10606535
Change-Id: I0dd5ca3e09f45701659ab9ebd3b51939a2f6e6ba

10 years agoCamera: Send VIDEO_SNAPSHOT intent for video snapshot case
Zhijun He [Fri, 6 Sep 2013 18:46:01 +0000 (11:46 -0700)]
Camera: Send VIDEO_SNAPSHOT intent for video snapshot case

Bug: 9924539
Change-Id: Ief39eff79c31f2c2aa5df2fe1a0f04c4afc74690

10 years agoMake sure the encoder instance is safely release()'d before its
Andreas Huber [Fri, 6 Sep 2013 19:03:26 +0000 (12:03 -0700)]
Make sure the encoder instance is safely release()'d before its

reference count drops to 0.

Change-Id: I6601226e2754f17e964125cacf02dc02cfbf6231
related-to-bug: 10150263

10 years agoaudioflinger: remove async write race conditions
Eric Laurent [Fri, 6 Sep 2013 01:09:19 +0000 (18:09 -0700)]
audioflinger: remove async write race conditions

Remove possible race conditions between async callback
thread and offload thread when clearing and setting the
draining and write blocked flags.

Bug: 8174034.
Change-Id: I7af10491f39dc0e7d7414862a9d8e763daa2e2b7

10 years agoEffect Offload Proxy for effects offload
jpadmana [Tue, 4 Jun 2013 10:33:29 +0000 (16:03 +0530)]
Effect Offload Proxy for effects offload

Effect Proxy abstracts the sub effects to the upper layers.
It has the following functionalities:
- creation and release of sub effects
- routing the effect commands and process to the appropriate sub effect

Bug: 8174034.

Change-Id: I22d8136636048e7fe8f8807cbc6e348ffa200a22
Signed-off-by: jpadmana <rpadmanaban.jayashree@gmail.com>
10 years agoMerge "Effects Factory changes for effects offload" into klp-dev
Eric Laurent [Fri, 6 Sep 2013 17:34:56 +0000 (17:34 +0000)]
Merge "Effects Factory changes for effects offload" into klp-dev

10 years agoEffects Factory changes for effects offload
jpadmana [Tue, 4 Jun 2013 10:38:29 +0000 (16:08 +0530)]
Effects Factory changes for effects offload

audio_effects.conf - commented changes to illustrate the
addition of Proxy and sub effects to the conf file

Added an effectFactoryApi - EffectGetSubEffects for querying the
sub effect descriptors from the factory. This api is used by the Proxy
to get the sub effects

Added functions and data structures in factory code for
loading the sub effects

gSubEffectList - has the Proxies and their corresponding sub effects

- addSubEffect() - reads a sub effect node and adds to the gSubEffectList
- findSubEffect() - searches through the gSubEffectList to find a SubEffect

Bug: 8174034.

Change-Id: I25b0c62b2ad523a52337128b51469e628209ea3e
Signed-off-by: jpadmana <rpadmanaban.jayashree@gmail.com>
10 years agoMerge "Better workaround for slow decoders." into klp-dev
Marco Nelissen [Fri, 6 Sep 2013 16:58:25 +0000 (16:58 +0000)]
Merge "Better workaround for slow decoders." into klp-dev

10 years agoMerge "camera: Fix race condition between setParameters() and stopPreview()." into...
Ruben Brunk [Fri, 6 Sep 2013 01:21:52 +0000 (01:21 +0000)]
Merge "camera: Fix race condition between setParameters() and stopPreview()." into klp-dev

10 years agocamera: Fix race condition between setParameters() and stopPreview().
Ruben Brunk [Thu, 5 Sep 2013 01:18:26 +0000 (18:18 -0700)]
camera: Fix race condition between setParameters() and stopPreview().

Bug: 10414772
Change-Id: I928cb3935afb101da8a7931f88c27dccdb03b4a9

10 years agoMerge "Start 'am' with exec()" into klp-dev
Andy McFadden [Thu, 5 Sep 2013 17:00:15 +0000 (17:00 +0000)]
Merge "Start 'am' with exec()" into klp-dev

10 years agoStart 'am' with exec()
Andy McFadden [Wed, 4 Sep 2013 22:54:07 +0000 (15:54 -0700)]
Start 'am' with exec()

We were using system() to run 'am broadcast'.  Switch to
fork()+exec().

Bug 10606037

Change-Id: Ifae1a2b4f1914f015d09f2cac8cd0b1896d87a84

10 years agoBetter workaround for slow decoders.
Marco Nelissen [Wed, 4 Sep 2013 22:00:07 +0000 (15:00 -0700)]
Better workaround for slow decoders.

This is more in the spirit of the original code. Now it checks
whether a codec instantiated by name is a video codec, and enables
the extra looper if so.

b/10528409

Change-Id: Ia253c04c1283d4ecf66f213ef4bf523279ad7cca

10 years agoMerge "wifi-display: do not use HDCP's encryptNative method if its unsupported" into...
Chong Zhang [Wed, 4 Sep 2013 22:08:00 +0000 (22:08 +0000)]
Merge "wifi-display: do not use HDCP's encryptNative method if its unsupported" into klp-dev

10 years agoMerge "Fix CameraService error flag when running HAL1 with API2." into klp-dev
Ruben Brunk [Wed, 4 Sep 2013 21:48:14 +0000 (21:48 +0000)]
Merge "Fix CameraService error flag when running HAL1 with API2." into klp-dev

10 years agoFix CameraService error flag when running HAL1 with API2.
Ruben Brunk [Mon, 19 Aug 2013 22:21:19 +0000 (15:21 -0700)]
Fix CameraService error flag when running HAL1 with API2.

Bug: 10620944

Change-Id: I44c0d09a3d313ae8f724fbe61fa5f36cf5b38b6d

10 years agoMerge " Fixed timestamp handling in ESQueue Access Unit parser. This fixes bug...
Rachad [Wed, 4 Sep 2013 16:21:35 +0000 (16:21 +0000)]
Merge "  Fixed timestamp handling in ESQueue Access Unit parser.   This fixes bug b/10294801" into klp-dev

10 years agoMerge "Work around decoder slowness" into klp-dev
Marco Nelissen [Wed, 4 Sep 2013 01:35:40 +0000 (01:35 +0000)]
Merge "Work around decoder slowness" into klp-dev

10 years agowifi-display: do not use HDCP's encryptNative method if its unsupported
Chong Zhang [Tue, 3 Sep 2013 21:35:37 +0000 (14:35 -0700)]
wifi-display: do not use HDCP's encryptNative method if its unsupported

Bug: 10609422
Change-Id: I005f1d04a4191b1503b5f3e895a98b8d6560c402

10 years agoWork around decoder slowness
Marco Nelissen [Tue, 3 Sep 2013 22:29:33 +0000 (15:29 -0700)]
Work around decoder slowness

b/10528409

Change-Id: Ifcaf0488d63e87676b1e9382437943138deb76a6

10 years agoFix miscellanous AudioTrack::getTimestamp() bugs
Glenn Kasten [Fri, 30 Aug 2013 20:28:22 +0000 (13:28 -0700)]
Fix miscellanous AudioTrack::getTimestamp() bugs

Check that get_presentation_position is non-NULL before calling.

AudioTrack::getTimestamp not implemented for fast tracks.

Fix typo in Track::getTimestamp().

Fix bugs in AudioTrack::getTimestamp after stop:
 - getTimestamp while stopped is not allowed.
 - stop, start, getTimestamp now returns the correct value.

Change-Id: Ie8d9dc1f28d8927634e04175a68b147ffc2ea8eb

10 years agoImplement MonoPipe::getTimestamp
Glenn Kasten [Thu, 29 Aug 2013 21:40:55 +0000 (14:40 -0700)]
Implement MonoPipe::getTimestamp

using SingleStateQueue observer

Change-Id: I7b1928b087f1e676c7b291df6cefa7707301662c

10 years agoFastMixer computes presentation timestamps for fast tracks
Glenn Kasten [Fri, 23 Aug 2013 16:26:31 +0000 (09:26 -0700)]
FastMixer computes presentation timestamps for fast tracks

and forwards them to each track's ExtendedAudioBufferProvider::onTimestamp().

Change-Id: I06fb9586bb7e20d5c0289abdc8cac6cd3fd2f6e8

10 years agoAdd ExtendedAudioBufferProvider::framesReleased and onTimestamp
Glenn Kasten [Fri, 23 Aug 2013 17:54:07 +0000 (10:54 -0700)]
Add ExtendedAudioBufferProvider::framesReleased and onTimestamp

and implement them in SourceAudioBufferProvider using the associated NBAIO_Source,
and in Track using the associated AudioTrackServerProxy.

Change-Id: I60dc4adba63fc1dc452ff16caf347e4a7c8242c2

10 years agoAdd NBAIO_Source::onTimestamp()
Glenn Kasten [Mon, 26 Aug 2013 17:29:28 +0000 (10:29 -0700)]
Add NBAIO_Source::onTimestamp()

with dummy default implementation, and implement in MonoPipeReader.
onTimestamp is meant to be called by the corresponding sink when it has
a new timestamp available.

Change-Id: I8a90d24d1061e4a592ce5bd8ee1c9fce6bdd8a84

10 years agoInstantiate SingleStateQueue<AudioTimestamp>
Glenn Kasten [Fri, 23 Aug 2013 17:54:35 +0000 (10:54 -0700)]
Instantiate SingleStateQueue<AudioTimestamp>

as typedef AudioTimestampSingleStateQueue and use it in MonoPipe.

Change-Id: Idaebb362bd9d0a81a7ed83792ab9369dc37c0e74

10 years agoMerge "Add NBAIO_Sink::getTimestamp()" into klp-dev
Glenn Kasten [Tue, 3 Sep 2013 22:08:53 +0000 (22:08 +0000)]
Merge "Add NBAIO_Sink::getTimestamp()" into klp-dev

10 years agoMerge "AAC encoder: handle missing object types" into klp-dev
Jean-Michel Trivi [Tue, 3 Sep 2013 21:43:48 +0000 (21:43 +0000)]
Merge "AAC encoder: handle missing object types" into klp-dev

10 years agoCamera2/3: Increase precapture start timeout
Eino-Ville Talvala [Tue, 3 Sep 2013 20:29:28 +0000 (13:29 -0700)]
Camera2/3: Increase precapture start timeout

Currently, we only wait 200 ms for the HAL to switch to the precapture
state.  This is insufficient at low preview frame rates (dark
conditions, ~10 fps), where a 3-request-deep HAL pipeline will take
300 ms to produce a precapture trigger output. In those cases, we
would prematurely skip the precapture sequence, causing bad quality
pictures.

Since this is a fallback timeout to prevent deadlock in case of a bad
HAL or framework implementation, increase the timeout to 1 second. Has
no impact on correctly-working implementations

Bug: 10430191
Change-Id: I08e99f8e7f3beb8f15dcee32632cdebfe3dca8b3

10 years agoAdd NBAIO_Sink::getTimestamp()
Glenn Kasten [Fri, 23 Aug 2013 20:51:43 +0000 (13:51 -0700)]
Add NBAIO_Sink::getTimestamp()

with a real implementation in AudioStreamOutSink
for dummy implementation initially in MonoPipe.

Use in AudioFlinger::PlaybackThread::threadLoop_write()
to keep the input to the timestamp latch up-to-date.

Change-Id: I10ef277991b63bb43d55d6f3df75116ef32246cd

10 years agoRevert "Enhancement for OnInfo callback on DRM Framework"
Jeff Tinker [Fri, 30 Aug 2013 23:05:00 +0000 (23:05 +0000)]
Revert "Enhancement for OnInfo callback on DRM Framework"

This reverts commit 5ff7836da0220b3097f36c8a5e82111816ebca62.

Fixes Fatal signal 6 (SIGABRT)" when playing or downloading a video
bug: 10542864

Change-Id: I7f81a41c3acdbeb571a514b3f65e7ba37d403cca

10 years agoMerge "Revert "Fix decoder EOS handling"" into klp-dev
Eric Laurent [Sat, 31 Aug 2013 17:14:04 +0000 (17:14 +0000)]
Merge "Revert "Fix decoder EOS handling"" into klp-dev

10 years agoRevert "Fix decoder EOS handling"
Eric Laurent [Sat, 31 Aug 2013 02:22:29 +0000 (19:22 -0700)]
Revert "Fix decoder EOS handling"

This reverts commit 9da36a6c8df70a5c8179ac78fab33cfbb5078cb2.

Bug: 10571297.
Change-Id: I76f20fe34872ea54fce626077462fb86c8c3f02e

10 years ago Fixed timestamp handling in ESQueue Access Unit parser.
Rachad [Fri, 30 Aug 2013 22:52:00 +0000 (15:52 -0700)]
  Fixed timestamp handling in ESQueue Access Unit parser.
  This fixes bug b/10294801

Change-Id: Ie96d36e2ff6fdee0c949a85da3602ab04b34bf6e

10 years agoaudioflinger: offloaded tracks flush/pause order
Eric Laurent [Fri, 30 Aug 2013 22:12:37 +0000 (15:12 -0700)]
audioflinger: offloaded tracks flush/pause order

Make sure that a flush received after a pause is forwarded
to the HAL after the pause.

Change-Id: Ib3221f70c59f8b3dbbac20b23104f6b779b75be0

10 years agoMerge "camera: Fix deadlock when sending callbacks during disconnect" into klp-dev
Igor Murashkin [Fri, 30 Aug 2013 18:32:13 +0000 (18:32 +0000)]
Merge "camera: Fix deadlock when sending callbacks during disconnect" into klp-dev

10 years agoMerge "Fix decoder EOS handling" into klp-dev
Marco Nelissen [Fri, 30 Aug 2013 17:56:11 +0000 (17:56 +0000)]
Merge "Fix decoder EOS handling" into klp-dev

10 years agoFix decoder EOS handling
Marco Nelissen [Thu, 29 Aug 2013 16:31:26 +0000 (09:31 -0700)]
Fix decoder EOS handling

Conceptually it should be the same whether EOS is signalled on the last
buffer holding data, or an empty buffer that follows. Make it so that
this actually behaves the same for mp3, AAC and Vorbis.

b/8747869

Change-Id: Idece8ef45689a3ffaf70fb45d19862d7b93b2f92

10 years agoMerge "Camera3: Be busy as soon as work arrives." into klp-dev
Eino-Ville Talvala [Fri, 30 Aug 2013 01:48:14 +0000 (01:48 +0000)]
Merge "Camera3: Be busy as soon as work arrives." into klp-dev

10 years agocamera: Fix deadlock when sending callbacks during disconnect
Igor Murashkin [Fri, 30 Aug 2013 00:43:01 +0000 (17:43 -0700)]
camera: Fix deadlock when sending callbacks during disconnect

Bug: 10552448
Change-Id: Ie93ba744ae6705aa657f980ae8e08ec624feeb39

10 years agoMerge "Implement Track::getTimestamp()" into klp-dev
Glenn Kasten [Fri, 30 Aug 2013 00:05:03 +0000 (00:05 +0000)]
Merge "Implement Track::getTimestamp()" into klp-dev

10 years agoMerge "Add AudioFlinger::PlaybackThread::Track::getTimestamp()" into klp-dev
Glenn Kasten [Fri, 30 Aug 2013 00:04:50 +0000 (00:04 +0000)]
Merge "Add AudioFlinger::PlaybackThread::Track::getTimestamp()" into klp-dev

10 years agoMerge "Add IAudioTrack::getTimestamp()" into klp-dev
Glenn Kasten [Fri, 30 Aug 2013 00:04:37 +0000 (00:04 +0000)]
Merge "Add IAudioTrack::getTimestamp()" into klp-dev

10 years agoMerge "New AudioTrack C++ API for audio timestamps" into klp-dev
Glenn Kasten [Thu, 29 Aug 2013 23:47:34 +0000 (23:47 +0000)]
Merge "New AudioTrack C++ API for audio timestamps" into klp-dev

10 years agoMerge "AudioPlayer: timestamp fixes for compress offload" into klp-dev
Eric Laurent [Thu, 29 Aug 2013 23:29:35 +0000 (23:29 +0000)]
Merge "AudioPlayer: timestamp fixes for compress offload" into klp-dev

10 years agoAAC encoder: handle missing object types
Jean-Michel Trivi [Thu, 29 Aug 2013 22:51:31 +0000 (15:51 -0700)]
AAC encoder: handle missing object types

The audio object type for parametric stereo and lowdelay was not passed
   to the FDK AAC encoder.

Bug 9428126

Change-Id: Ic32822afff8b1da6a2d80c1b65d514f24059fb29

10 years agoMerge "AudioTrack: fix write retries for compressed audio" into klp-dev
Eric Laurent [Thu, 29 Aug 2013 22:17:58 +0000 (22:17 +0000)]
Merge "AudioTrack: fix write retries for compressed audio" into klp-dev

10 years agoMerge "Add time limit to screenrecord" into klp-dev
Andy McFadden [Thu, 29 Aug 2013 21:41:16 +0000 (21:41 +0000)]
Merge "Add time limit to screenrecord" into klp-dev

10 years agoMerge "Notify the media scanner" into klp-dev
Andy McFadden [Thu, 29 Aug 2013 21:41:07 +0000 (21:41 +0000)]
Merge "Notify the media scanner" into klp-dev

10 years agoAudioTrack: fix write retries for compressed audio
Eric Laurent [Thu, 29 Aug 2013 21:35:05 +0000 (14:35 -0700)]
AudioTrack: fix write retries for compressed audio

When the amount of frames that can be written to the buffer
is less than requested, AudioTrack::processAudioBuffer() estimates
the time needed to free the missing amount of frames and asks the
callback thread to sleep.
This behavior is not possible for compressed audio and should not
be enabled for offloaded tracks.

Change-Id: I5b657283cfba06254c9ac0ea9b447467cce7eb61

10 years agoAudioPlayer: timestamp fixes for compress offload
Haynes Mathew George [Mon, 5 Aug 2013 18:00:37 +0000 (11:00 -0700)]
AudioPlayer: timestamp fixes for compress offload

Use realtime queried from AudioTrack as the only time for compress
offload playback.

Change-Id: I314447637715c4864690c94173260165369146cb

10 years agoCamera3: Be busy as soon as work arrives.
Eino-Ville Talvala [Thu, 29 Aug 2013 19:46:18 +0000 (12:46 -0700)]
Camera3: Be busy as soon as work arrives.

RequestThread's internal busy flag (mPaused) was not being immediately
set when new work was submitted to it. This allowed for a race
condition where a capture() followed by an immediate
waitUntilDrained() would immediately return from the wait.

Set the mPaused flag to false immediately in capture() and
setStreamingRequest() to avoid this, instead of waiting until the end
of the next RequestThread iteration.

Bug: 10531739
Change-Id: I54a79fe5361d527ec717f41ad805e9b319a48cd8

10 years agoMerge "Set PREPARING flag after setDataSource_l()" into klp-dev
Chong Zhang [Thu, 29 Aug 2013 18:58:07 +0000 (18:58 +0000)]
Merge "Set PREPARING flag after setDataSource_l()" into klp-dev

10 years agoMerge "fix MediaDrm.isCryptoSchemeSupported(uuid)" into klp-dev
Jeff Tinker [Thu, 29 Aug 2013 18:18:06 +0000 (18:18 +0000)]
Merge "fix MediaDrm.isCryptoSchemeSupported(uuid)" into klp-dev

10 years agoImplement Track::getTimestamp()
Glenn Kasten [Fri, 23 Aug 2013 20:53:56 +0000 (13:53 -0700)]
Implement Track::getTimestamp()

using a new timestamp latch in PlaybackThread, and
AudioTrackServerProxy::framesReleased() which returns mServer.

Change-Id: I1ebfba968c773faaab95648c272fd3ebd74718d6

10 years agoAdd AudioFlinger::PlaybackThread::Track::getTimestamp()
Glenn Kasten [Mon, 26 Aug 2013 16:36:23 +0000 (09:36 -0700)]
Add AudioFlinger::PlaybackThread::Track::getTimestamp()

with a dummy implementation initially,
and use it in AudioFlinger::TrackHandle::getTimestamp()

Change-Id: I2da88fc52a135a7f0d9fd9538986e919dc8ccd3b

10 years agoAdd IAudioTrack::getTimestamp()
Glenn Kasten [Thu, 29 Aug 2013 16:01:02 +0000 (09:01 -0700)]
Add IAudioTrack::getTimestamp()

with dummy implementation in AudioFlinger::TrackHandle, and
implement AudioTrack::getTimestamp() using IAudioTrack.

Also document invariant that mAudioTrack and control block are always
non-0 after successful initialization.

Change-Id: I9861d1454cff7decf795d5d5898ac7999a9f3b7e

10 years agoNew AudioTrack C++ API for audio timestamps
Glenn Kasten [Fri, 19 Jul 2013 23:33:58 +0000 (16:33 -0700)]
New AudioTrack C++ API for audio timestamps

This new API is intended to replace latency(), especially for A/V sync.
The application will receive periodic timestamp notifications.  The period
is unspecified, but will likely be more frequent after a pause or stop,
set position, underrun, display on/off change, route change, or when audio
framework notices drift.  It will be up to the higher level application
(e.g.  Stagefright) to reconstruct a clock that updates more frequently.

The current latency() method doesn't indicate when latency changes
due to screen on/off state, route changes, etc.

Includes squahsed change-Id: I2082f8752040be0c234b1a6f1be2e269abf2ce7c
 Dummy implementation of AudioTrack:getTimestamp()
 Rename AudioTrack::Timestamp to AudioTimestamp.
 Renaming and pulling up to a higher level allows more modules to use it.

Change-Id: Ibf7f6a207c3f8d8697f25ede2cd5200697fadb86
(cherry picked from commit dd69eb893867634fd169c03204a6ad7c74b351e7)