OSDN Git Service
Phil Burk [Wed, 6 Sep 2017 21:36:11 +0000 (14:36 -0700)]
aaudio: prevent noise upon disconnect
Also clean up the state machine handling in the data callback.
Prevent error callback sometimes being called twice for the same error.
Bug:
63342351
Bug:
63087953
Test: add sleep(2) to write_sine_callback.cpp before the requestStop()
Change-Id: I27737bcb0371052741f50bda9f65c5994ccf6fd9
Phil Burk [Fri, 8 Sep 2017 22:48:36 +0000 (15:48 -0700)]
aaudio: fix return code from getTimestamp()
Should be AAUDIO_ERROR_INVALID_STATE if no timestamp available.
Bug:
65447871
Test: test_timestamps.cpp should only print AAUDIO_ERROR_INVALID_STATE
Change-Id: Id9e211ef8fce078514f4348a434e0c003372369c
TreeHugger Robot [Sat, 9 Sep 2017 03:39:01 +0000 (03:39 +0000)]
Merge "aaudio: fix problems with PlayerBase and ref counting" into oc-mr1-dev
TreeHugger Robot [Sat, 9 Sep 2017 00:02:46 +0000 (00:02 +0000)]
Merge "Handle OMX_IndexParamAudioPortFormat in SoftFlacDecoder" into oc-mr1-dev
Phil Burk [Fri, 8 Sep 2017 04:00:09 +0000 (21:00 -0700)]
aaudio: fix problems with PlayerBase and ref counting
CTS test was crashing because of a multiple inheritance
problem involving PlayerBase.
We now implement separate PlayerBase class that sits between
AudioStream and the system.
Bug:
65450109
Test: CTS nativemedia/aaudio
Change-Id: I424663acc1eeacc9544769991495cb48f4110359
TreeHugger Robot [Fri, 8 Sep 2017 21:48:09 +0000 (21:48 +0000)]
Merge "Camera: fix race in onRepeatingRequestError callback" into oc-mr1-dev
TreeHugger Robot [Fri, 8 Sep 2017 20:23:59 +0000 (20:23 +0000)]
Merge "Add MTP and PTP OS descriptors." into oc-mr1-dev
Chong Zhang [Fri, 8 Sep 2017 20:20:20 +0000 (20:20 +0000)]
Merge "stagefright: explicitly release extractor in StagefrightMetadataRetriever" into oc-mr1-dev
TreeHugger Robot [Fri, 8 Sep 2017 19:28:00 +0000 (19:28 +0000)]
Merge "OMXNodeInstance: use a lock around OMX::freeNode" into oc-mr1-dev
Jerry Zhang [Thu, 31 Aug 2017 18:57:45 +0000 (11:57 -0700)]
Add MTP and PTP OS descriptors.
This adds OS descriptor functionality for
devices that don't use configfs for OS descriptors.
Test: usb sniffer, verify descriptors sent
Bug:
64790536
Change-Id: Iec417606f86fe4d7492273d09d685ab2ec3d03c8
(cherry picked from commit
95ea161b05040412d95b5add98dc882e3be4075c)
Jerry Zhang [Thu, 7 Sep 2017 23:09:59 +0000 (16:09 -0700)]
DO NOT MERGE : Fix file transfer corner case.
For transfers >4G, we don't need to read an empty
packet since it will have been read already.
Test: Transfer
4394598388 byte file
Bug:
65423303
Change-Id: I4b6e742364332db3baaadc0db99885ba720c2afc
Pawin Vongmasa [Fri, 8 Sep 2017 00:21:41 +0000 (17:21 -0700)]
Handle OMX_IndexParamAudioPortFormat in SoftFlacDecoder
Test: make vts -j99 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 \
&& vts-tradefed run commandAndExit vts \
--skip-all-system-status-check --primary-abi-only \
--skip-preconditions --module VtsHalMediaOmxV1_0Test -l INFO
Bug:
65463651
Change-Id: I24cbc5c1a0e109806dde0ad5847e969ec78d1e2e
Chong Zhang [Fri, 8 Sep 2017 00:43:19 +0000 (17:43 -0700)]
stagefright: explicitly release extractor in StagefrightMetadataRetriever
Extractor dtor on media.extractor side happens asynchronously with the
dtor of StagefrightMetadataRetriever. If the extractor calls back into
the DataSource after mediaserver side released the reference to it, the
binder transaction could get stuck.
Adding an explicity release() and call it before StagefrightMetadataRetriever
continues to destruct the DataSource. Only implement it for MPEG4Extractor
to avoid impacting other extractors at this stage.
Also adding some code to aggressively release the extractor and data
source in HeifDecoderImpl to free up memory.
bug:
65463215
Change-Id: I84c442a1e010dd37a976af5453a353e43f672e22
Pawin Vongmasa [Fri, 8 Sep 2017 00:16:51 +0000 (17:16 -0700)]
Prevent crash from unknown mime type
Some devices may have codecs for mime types that are not known to us.
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice
Bug:
65449180
Change-Id: Idc5ed5ac0e26d8bf26f576003d1370222af10c08
TreeHugger Robot [Thu, 7 Sep 2017 22:01:34 +0000 (22:01 +0000)]
Merge "Put media.metrics service into proper group" into oc-mr1-dev
Lajos Molnar [Thu, 7 Sep 2017 02:41:19 +0000 (19:41 -0700)]
OMXNodeInstance: use a lock around OMX::freeNode
This is to avoid a concurrent use after free if other OMX commands
are being executed before the node is marked as deleted.
Bug:
63666573
Change-Id: I7720dd900bfa252f8675e0c56191adbf52aa957e
TreeHugger Robot [Thu, 7 Sep 2017 20:01:37 +0000 (20:01 +0000)]
Merge "Fix failure at AudioTrack_ListenerTest#testAudioTrackCallback" into oc-mr1-dev
Ray Essick [Thu, 7 Sep 2017 19:34:50 +0000 (12:34 -0700)]
Put media.metrics service into proper group
specify a group for the media.metrics service.
the unspecified default is inappropriate.
Bug:
65334712
Test: examination of /proc info for metrics
Change-Id: I0e35a2d676586216bcfee672666803b7fa5eae4d
TreeHugger Robot [Thu, 7 Sep 2017 19:25:10 +0000 (19:25 +0000)]
Merge "Fix package name reporting in MediaDrm metrics." into oc-mr1-dev
TreeHugger Robot [Thu, 7 Sep 2017 18:39:44 +0000 (18:39 +0000)]
Merge "Fix AMediaDrm_queryKeyStatus returns key:key instead key:value pair." into oc-mr1-dev
jiabin [Thu, 7 Sep 2017 01:20:11 +0000 (18:20 -0700)]
Fix failure at AudioTrack_ListenerTest#testAudioTrackCallback
After cold start, running the test will cause failure. The reason is
that with cold start, the buffer is being processed faster than the
position callback.
Calling the callback earlier at the very start will fix this issue.
Bug:
63056426
Test: adb shell am instrument -e class 'android.media.cts.AudioTrack_ListenerTest#testAudioTrackCallback'
-w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: I7416cecb2837fac4a966e832412948c357e7b8dc
Andy Hung [Thu, 7 Sep 2017 16:28:42 +0000 (16:28 +0000)]
Merge "AudioTrack: Fix extended timestamp offset" into oc-mr1-dev
Phil Burk [Thu, 7 Sep 2017 16:07:58 +0000 (16:07 +0000)]
Merge changes from topic "aaudio_timestamps" into oc-mr1-dev
* changes:
aaudio: fix timestamps and underruns
aaudio: prevent retrograde motion in Legacy timestamps
aaudio example: print timestamps during callbacks.
aaudio: test timestamps
TreeHugger Robot [Thu, 7 Sep 2017 15:57:13 +0000 (15:57 +0000)]
Merge "Camera: Avoid stream re-configuration when format gets overridden" into oc-mr1-dev
Adam Stone [Wed, 6 Sep 2017 02:02:06 +0000 (19:02 -0700)]
Fix package name reporting in MediaDrm metrics.
The app package name was not previously reported in drm metrics. This
change reports the app package name as returned from the vendor metrics.
This is part of the fix. The other change will go into another project.
Bug:
64584568
Test: Unit tests, GTS tests, and Google Play.
Change-Id: Iee36d5203364c5f80a8b0fe9d9bbf5c167abefd1
Edwin Wong [Thu, 31 Aug 2017 00:47:20 +0000 (17:47 -0700)]
Fix AMediaDrm_queryKeyStatus returns key:key instead key:value pair.
Implement queryKeyStatus in Clearkey plugin for testing.
Add CTS testQueryKeyStatus in ClearKeySystemTest and
NativeClearKeySystemTest in a separate CL.
Test: CTS - ClearSystemTests
ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m
CtsMediaTestCases --test android.media.cts.ClearKeySystemTest
Test: CTS - NativeClearSystemTests
ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m
CtsMediaTestCases --test android.media.cts.NativeClearKeySystemTest
bug:
64938501
Change-Id: I8371a3b871e90762f1e7c8453dd6002c31f7eb13
Lajos Molnar [Thu, 7 Sep 2017 02:20:48 +0000 (02:20 +0000)]
Merge "Implement IOmxStore" into oc-mr1-dev
Phil Burk [Fri, 1 Sep 2017 00:24:51 +0000 (17:24 -0700)]
aaudio: fix timestamps and underruns
Start the client after we get valid timing data from the server.
That can take a while because of the long cold start times.
The client is synced with the current position of the service.
Now the client can start clean with no underruns.
Bug:
63918065
Test: test_timestamps.cpp
Change-Id: I5d01eb844e4b14cd5477d56ea1dd9e309abc1c52
Phil Burk [Wed, 30 Aug 2017 16:29:48 +0000 (09:29 -0700)]
aaudio: prevent retrograde motion in Legacy timestamps
Use MonotonicCounter for timestamp position.
Bug:
63918065
Test: write_sine_callback.cpp and test_timestamps.cpp
Change-Id: Iea58384e2d96adcfad586e8c522024baaecccb8c
Phil Burk [Tue, 29 Aug 2017 16:04:35 +0000 (09:04 -0700)]
aaudio example: print timestamps during callbacks.
Bug:
63918065
Test: this is a test
Change-Id: Id25dd36764761583986d3ce29f7d82032ec4539f
Andy Hung [Wed, 6 Sep 2017 18:14:57 +0000 (11:14 -0700)]
AudioTrack: Fix extended timestamp offset
The extended timestamp server and kernel location positions
need the proper client side delta offset for native AudioTrack API calls.
The client location position is unaffected along with the legacy timestamp.
Test: test_timestamp, Photos, kill audioserver
Bug:
65386236
Change-Id: Idd71b6a31e0e86a323d0e5e343a2836e34c08673
Phil Burk [Fri, 1 Sep 2017 00:23:18 +0000 (17:23 -0700)]
aaudio: test timestamps
Run for a while, gathering timestamps
then print a report.
Bug:
63918065
Test: this is a test
Change-Id: Ie9ada2d22fc265247a4d6c9645e42cf94caa1c05
Andy Hung [Wed, 6 Sep 2017 16:18:55 +0000 (16:18 +0000)]
Merge "AudioTrack: Limit timestamp time lag after start" into oc-mr1-dev
TreeHugger Robot [Wed, 6 Sep 2017 03:27:36 +0000 (03:27 +0000)]
Merge "Softflac: enumerate port format" into oc-mr1-dev
Yin-Chia Yeh [Wed, 6 Sep 2017 01:15:56 +0000 (18:15 -0700)]
Camera: fix race in onRepeatingRequestError callback
Test: CTS
Bug:
64180296
Change-Id: I620e238bf1f4e7ab72911b6e68c689580fba22f1
TreeHugger Robot [Wed, 6 Sep 2017 00:44:26 +0000 (00:44 +0000)]
Merge "Fix null pointer dereferencing in TWGBP" into oc-mr1-dev
Chris Thornton [Wed, 6 Sep 2017 00:07:32 +0000 (00:07 +0000)]
Merge "If stopAllRecognitions is supported, do not call stopRecognition again." into oc-mr1-dev
Andy Hung [Thu, 17 Aug 2017 17:41:51 +0000 (10:41 -0700)]
AudioTrack: Limit timestamp time lag after start
Test: Photos with long pause and resume
Bug:
63614330
Bug:
63976584
Change-Id: I81ac650c821600fee507c72c3b0c1be60f5e7ab6
TreeHugger Robot [Tue, 5 Sep 2017 23:53:35 +0000 (23:53 +0000)]
Merge "Suppress chatty debug messages" into oc-mr1-dev
Ray Essick [Tue, 5 Sep 2017 21:19:15 +0000 (14:19 -0700)]
Suppress chatty debug messages
ALOGD()->ALOGV() and remove some other debugging.
Bug:
65027506
Test: observed logcat output
Change-Id: If84dc0cb7a80dc59f7b5ae6142b662c2dd64863e
rago [Tue, 5 Sep 2017 19:53:39 +0000 (12:53 -0700)]
Fix Auxiliary Effect Buffer Corruption
Output buffer is shared with temp buffer. Conversion should go low to
high indexes in array to avoid corruption.
Bug:
65375387
Test: Manual testing with SoloTester app.
Change-Id: I1b96e6c625d2b0a857f029e493b5fcb22bf02ece
Phil Burk [Tue, 5 Sep 2017 16:12:15 +0000 (16:12 +0000)]
Merge "audioflinger: pass return code up from startClient" into oc-mr1-dev
Phil Burk [Fri, 1 Sep 2017 17:45:41 +0000 (10:45 -0700)]
audioflinger: pass return code up from startClient
Was ignoring failed start.
Bug:
65262790
Test: see bug
Change-Id: I0b1d19adfd50d2b00d86bb82f278b720fcbacdb1
Ram Mohan [Wed, 30 Aug 2017 08:12:56 +0000 (13:42 +0530)]
Softflac: enumerate port format
Test: make vts -j99 BUILD_GOOGLE_VTS=true TARGET_PRODUCT=aosp_arm64 \
&& vts-tradefed run commandAndExit vts \
--skip-all-system-status-check --primary-abi-only \
--skip-preconditions --module VtsHalMediaOmxV1_0Test -l INFO
Bug:
63796949
Change-Id: If177f834714ab9b4415bc039f9079d5f684aff5d
Pawin Vongmasa [Thu, 27 Jul 2017 09:21:57 +0000 (02:21 -0700)]
Implement IOmxStore
Separate out MediaCodecsXmlParser and implement IOmxStore and IOMXStore.
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice
Test: make cts -j123 && cts-tradefed run cts -m \
CtsMediaTestCases -t android.media.cts.MediaCodecListTest
Bug:
37657124
Merged-In: I8c5a3a8fe6defab4f17c8a49bce57452879193dc
Change-Id: I8c5a3a8fe6defab4f17c8a49bce57452879193dc
TreeHugger Robot [Fri, 1 Sep 2017 22:55:42 +0000 (22:55 +0000)]
Merge "aaudio examples: handle disconnect in write_sine_callback" into oc-mr1-dev
Ray Essick [Fri, 1 Sep 2017 22:33:59 +0000 (22:33 +0000)]
Merge "Improve summarized statistics" into oc-mr1-dev
Ray Essick [Fri, 1 Sep 2017 22:29:10 +0000 (22:29 +0000)]
Merge "track pkgname/version in media.metrics" into oc-mr1-dev
Lajos Molnar [Fri, 1 Sep 2017 20:59:12 +0000 (20:59 +0000)]
Merge "stagefright: disable B-frames" into oc-mr1-dev
Phil Burk [Mon, 10 Jul 2017 18:53:09 +0000 (11:53 -0700)]
aaudio examples: handle disconnect in write_sine_callback
Automatically reopen the stream if we get disconnected.
Add a futex based signaling class so that the error callback can
immediately inform a waiting thread.
This can be used to prevent the system from playing an unpleasant sound
after the stream is disconnected.
Bug:
63342351
Test: plug and unplug headphones while running write_sine_callback
Change-Id: I3ea4fb24106156a29d2f302f3eb614f25f1b758a
Mikhail Naganov [Fri, 1 Sep 2017 17:30:56 +0000 (17:30 +0000)]
Merge "audio effects: Eliminate the cause warning logs about unreleased interface" into oc-mr1-dev
Emilian Peev [Wed, 30 Aug 2017 10:19:38 +0000 (11:19 +0100)]
Camera: Avoid stream re-configuration when format gets overridden
It is allowed and expected some stream formats to get overriden
by the Hal implementation. In such cases the original format should
be stored and made available to device clients.
Bug:
64571102
Test: Camera CTS
Change-Id: Ic1153390e0c4d194475fbda8c8a13323bd7e73c0
Lajos Molnar [Fri, 1 Sep 2017 01:43:51 +0000 (18:43 -0700)]
stagefright: disable B-frames
We cannot guarantee finalizing .mp4 files that contain B-frames,
so disable them.
Bug:
64949961
Change-Id: Ie2672881485576b19daf9f4cf369568410093b9e
Edwin Wong [Thu, 31 Aug 2017 20:51:36 +0000 (20:51 +0000)]
Merge "Fix ClearKey Drm base64 en/decoding to use base64url." into oc-mr1-dev
Ray Essick [Thu, 31 Aug 2017 18:45:05 +0000 (11:45 -0700)]
Improve summarized statistics
better management of how summarized records are managed.
Use differentiated names for the summations to avoid confusion with
individual records. Track values appropriate to calculating
min, max, mean, and standard deviation.
Bug:
65027360
Test: examination of dumpsys media.metrics -summary
Change-Id: I40d93d8a5a7cc2c188546574f59d557088d9c1e3
Ray Essick [Thu, 31 Aug 2017 18:41:19 +0000 (11:41 -0700)]
track pkgname/version in media.metrics
Enhances the media.metrics subsystem to track the pkg name & version
so analysis can move from "error rate has climbed" to "error rate has
climbed within app X".
Changes include fields to hold package name/version, the dump protocol
to emit those fields to upload, and better management of metrics data on
device (time and quantity).
Bug:
65027506
Test: review output of dumpsys media.metrics
Change-Id: Ia55b859d903835c84f7d43883f959dc1cdefb081
Jean-Michel Trivi [Thu, 31 Aug 2017 16:59:20 +0000 (16:59 +0000)]
Merge "APM: invert priority of sonification and enforced routing strategies" into oc-mr1-dev
Mikhail Naganov [Thu, 20 Jul 2017 00:54:29 +0000 (17:54 -0700)]
audio effects: Eliminate the cause warning logs about unreleased interface
The cause of frequent "EffectModule 0xxx destructor called with unreleased
interface" messages was due to not releasing the effects when purging
stale effects.
The cause of "Effect handle 0xxx disconnected after thread destruction"
message was due to late binder call for disconnecting already purged
effect handle.
Also improved logging to communicate uuids of the effects causing
these issues.
Bug:
62267926
Test: no aforementioned warnings in the log when opening the Effects
panel in Play Music
Change-Id: I6ec6f60c46dc704226931fb59a641e4cd74c2fd1
(cherry picked from commit
424c4f5b76a6ed11f2c713b42246a7220cfbb240)
TreeHugger Robot [Thu, 31 Aug 2017 04:10:48 +0000 (04:10 +0000)]
Merge "Set output volume for routing device in startSource()" into oc-mr1-dev
Jean-Michel Trivi [Thu, 31 Aug 2017 01:07:06 +0000 (18:07 -0700)]
APM: invert priority of sonification and enforced routing strategies
On device where the SONIFICATION (alarm, ringtone) strategy is
supported by SPEAKER_SAFE, prevent switching output devices
when the ENFORCED_AUDIBLE (shutter sound) strategy starts
by having SONIFICATION at a higher priority than
ENFORCED_AUDIBLE.
Test: take photos while phone rings
Bug:
64386853
Change-Id: I2f7bb45599bd51b2142611eefb84789a985e8841
Edwin Wong [Thu, 17 Aug 2017 01:56:04 +0000 (18:56 -0700)]
Fix ClearKey Drm base64 en/decoding to use base64url.
ClearKey's base64 en/decoding should use '-' and '_'
instead of '+' and '/' (web safe coding). Add support
for base64url coding in libstagefright foundation library
and update ClearKey plugins.
Test: CTS - ClearSystemTests
ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m
CtsMediaTestCases --test android.media.cts.ClearKeySystemTest
Test: CTS - NativeClearSystemTests
ANDROID_BUILD_droid-cts/tools/cts-tradefed run cts -m
CtsMediaTestCases --test android.media.cts.NativeClearKeySystemTest
Test: libstagefright/foundation/tests/Base64_test
adb shell /data/nativetest64/sf_foundation_test/sf_foundation_test
Test: ClearKeyDrmUnitTest
adb shell LD_LIBRARY_PATH="/vendor/lib/mediadrm"
/data/nativetest/ClearKeyDrmUnitTest/ClearKeyDrmUnitTest
Test: Vts
vts-tradefed run commandAndExit vts -m VtsHalDrmV1_0Target
--primary-abi-only -l VERBOSE
bug:
64388098
Change-Id: Ic08515fd491f15e088600c64603149401c117f4a
Shuhei Miyazaki [Mon, 31 Jul 2017 06:21:28 +0000 (15:21 +0900)]
Set output volume for routing device in startSource()
getNewOutputDevice selects a device by checking active strategy when
startSouce() is called. This behavior sometimes leads to set
unsupported device volume index. For example, BT A2DP resume from combo
output. a2dp output only supports A2DP sound devices. If sonification
stream is played via A2DP and Speaker during music playback, volume
index for speaker is applied as music volume when resume playback until
sonification stream is closed. At this time, A2DP device is selected as
routing device, so volume and routed device does not match.
To avoid this situation, setting volume index from supported device
in startSource().
Bug:
64053820
Test: Check volume after alarm sound finish during music playback via BT.
Change-Id: I71dae2c77d82abc0227ec45fc6c40bfd8f51c8c2
Chris Thornton [Tue, 29 Aug 2017 23:46:37 +0000 (16:46 -0700)]
If stopAllRecognitions is supported, do not call stopRecognition again.
Bug:
65174683
Test: NA
Change-Id: I2c179a64d4f14d0c97bc908ad83c0d964217adfd
TreeHugger Robot [Wed, 30 Aug 2017 10:49:52 +0000 (10:49 +0000)]
Merge "Remove 64bit variant of software codecs" into oc-mr1-dev
Jiyong Park [Tue, 29 Aug 2017 08:16:49 +0000 (17:16 +0900)]
Remove 64bit variant of software codecs
Since mediacodec is a 32-bit process, we don't need the 64bit variant of
the software codecs. This will reduce the system partition usage by
about 11MB (for devices with VNDK) or 5.8MB (for other devices).
Bug:
64193930
Test: no libstagefright_soft_*.so files under /system/lib64/ and
/system/lib64/vndk directories
Test: YouTube, Camcorder recording, Video playback work
Change-Id: I52d4947c673c018ac094b3c84c1652d217611894
Phil Burk [Wed, 23 Aug 2017 19:56:15 +0000 (12:56 -0700)]
aaudio examples: Add deviceId option to examples
Note that this uses the -d option, which used to be for durationSeconds.
We now use the -s option for seconds.
Bug:
64981153
Test: this is a test
Change-Id: I9789a1f520dc93bfb26143582dacb9619650abf7
TreeHugger Robot [Tue, 29 Aug 2017 03:15:28 +0000 (03:15 +0000)]
Merge "audioflinger: fix mmap device selection" into oc-mr1-dev
TreeHugger Robot [Mon, 28 Aug 2017 23:05:31 +0000 (23:05 +0000)]
Merge "aaudio: fix hang in client when audioserver dies" into oc-mr1-dev
Eric Laurent [Mon, 28 Aug 2017 18:12:52 +0000 (11:12 -0700)]
audioflinger: fix mmap device selection
Preserve initial device selection on mmap streams in order to
reuse it when a new client starts on the same stream so that
audiopolicy does not use the default route for the new client.
Bug:
64981153
Test: verify AAudio playback over MMAP with forced device selection to
speaker while headset is connected.
Change-Id: I7c117c3c0f8e7ad08f8e63ea804c19ce21808874
Phil Burk [Mon, 28 Aug 2017 18:45:01 +0000 (11:45 -0700)]
aaudio: fix hang in client when audioserver dies
Fix timeout detection so that callback thread can die.
Prevent AAudioBinderClient singleton from getting deleted,
which caused a subsequent lock on a dead object to hang.
Bug:
64988439
Test: "write_sine -m2 -pl" and "adb shell killall audioserver"
Change-Id: I044bce385b66e69007d1997f051c9d6c042b7871
Yahan Zhou [Mon, 17 Jul 2017 22:32:51 +0000 (15:32 -0700)]
Set minimal AVC encoder level to AVCLevel1
There is a CTS test asking for a AVCLevel1 encoder. Lower the minimal
level to AVCLevel1 in low resolution so that it can pass the test.
BUG:
37101765
Test: run cts -m CtsMediaTestCases -t
android.media.cts.MediaRecorderTest#testProfileAvcBaselineLevel1
Change-Id: Id04d3389be8d6761c6d2040a7bea54a2753a7ee7
(cherry picked from commit
085bdc87edeb5304d9dc604a4d3aa4de67cb6009)
TreeHugger Robot [Fri, 25 Aug 2017 21:20:35 +0000 (21:20 +0000)]
Merge "heif: cache the entire stream if possible to support seek" into oc-mr1-dev
TreeHugger Robot [Fri, 25 Aug 2017 21:09:49 +0000 (21:09 +0000)]
Merge "aaudio: fix returned performanceMode for Legacy" into oc-mr1-dev
Chong Zhang [Wed, 23 Aug 2017 20:51:59 +0000 (13:51 -0700)]
heif: cache the entire stream if possible to support seek
Also, reuse decoding result if decode is called again. Currently
decode only retrieves primary picture, so there is no point to
go to metadata retriever again.
Bug:
64077740
Change-Id: I9243de396957f4d717c386bbaa8692494d624998
Phil Burk [Fri, 25 Aug 2017 05:12:56 +0000 (22:12 -0700)]
aaudio: fix returned performanceMode for Legacy
AAudio was setting the stream to PERFORMANCE_MODE_NONE
if we got the FAST mixer but did not get the RAW flag.
We now consider FAST flag by itself to be LOW_LATENCY.
Bug:
63004643
Test: see bug for repro case using NativeOboe app
Change-Id: Id4643d20926a8e983cd28408f70e176976c02195
TreeHugger Robot [Fri, 25 Aug 2017 14:00:02 +0000 (14:00 +0000)]
Merge "Camera: Handle RESULT_ERROR followed by BUFFER_ERROR" into oc-mr1-dev
Lajos Molnar [Mon, 14 Aug 2017 22:57:57 +0000 (15:57 -0700)]
CodecCapabilities: advertise constrained profiles for decoders
Also, use a SortedVector in builder to prevent duplicates for both
colors and profile/levels.
Bug:
64691727
Change-Id: I7a70f8e39fab9c9c139f3de421b916ada32e3a8b
Lajos Molnar [Mon, 14 Aug 2017 22:57:12 +0000 (15:57 -0700)]
stagefright: read constrained AVC profiles
Bug:
64691727
Change-Id: I98ef0e4abf22cf6a2815856975e0c0cd54173d70
Lajos Molnar [Mon, 14 Aug 2017 22:55:43 +0000 (15:55 -0700)]
stagefright: advertise proper profiles and levels
Advertise only the max level per profile
Advertise constrained AVC profiles
Bug:
64691241
Change-Id: I0456832564f4be6dff55f9f65351adaeabefb24d
TreeHugger Robot [Fri, 25 Aug 2017 00:23:27 +0000 (00:23 +0000)]
Merge "aaudio: fix EXCLUSIVE mode interfering with SHARED" into oc-mr1-dev
Shuzhen Wang [Thu, 24 Aug 2017 22:39:05 +0000 (15:39 -0700)]
Camera: Handle RESULT_ERROR followed by BUFFER_ERROR
In case a result error is followed by a buffer_error for a particular
request, current logic won't be able to remove the pending request from
the inflight queue.
Moving the skipResultMetadata flag into InFlightRequest struct fixes the
issue.
Test: Camera CTS
Bug:
64840907
Change-Id: Iac44e431f9e9fc38684f8509328c777f9cf5f956
Phil Burk [Fri, 4 Aug 2017 16:13:31 +0000 (09:13 -0700)]
aaudio: fix EXCLUSIVE mode interfering with SHARED
The MMAP endpoints were not tracked by the EndpointManager
so it could not broker EXCLUSIVE access. To fix this the MMAP stream
was refactored to use a per-client stream and a per-device endpoint.
Cleanup close() of MMAP stream.
Add AAudioServiceEndpointShared.cpp.
Extract AAudioServiceEndpointMMAP from AAudioServiceStreamMMAP.
Track MMAP endpoints so we can manage EXCLUSIVE and SHARED access.
Bug:
64494572
Bug:
64310586
Test: see bug, use write_sine to play a shared stream and a excl stream
Change-Id: I5053193abfd9b8a69a2f7e1110739d65e2af5d64
Merged-In: I5053193abfd9b8a69a2f7e1110739d65e2af5d64
TreeHugger Robot [Thu, 24 Aug 2017 02:41:37 +0000 (02:41 +0000)]
Merge "MPEG4Writer: Save container metadata during switching file output" into oc-mr1-dev
Chong Zhang [Wed, 23 Aug 2017 20:51:17 +0000 (13:51 -0700)]
heif: fix decoding of image size different from full tiled area
Bug:
64077740
Change-Id: I57ee7e1bc05e320be723d224b9328526543cad25
Hangyu Kuang [Mon, 14 Aug 2017 21:23:07 +0000 (14:23 -0700)]
MPEG4Writer: Save container metadata during switching file output
Bug:
63090931
Test: Slow motion recording to exceed file size limit and check the recorded files.
Change-Id: Iae8f183de6159572b1012fde18fbca0bc3996dd1
TreeHugger Robot [Mon, 21 Aug 2017 05:29:06 +0000 (05:29 +0000)]
Merge "heif: add new format type" into oc-mr1-dev
TreeHugger Robot [Sat, 19 Aug 2017 03:08:08 +0000 (03:08 +0000)]
Merge "SoftVideoDecoderOMXComponent: max-size can be less than size" into oc-mr1-dev
Michael Lane [Fri, 18 Aug 2017 14:56:44 +0000 (14:56 +0000)]
Merge "stagefright: allow secure audio input buffer" into oc-mr1-dev
TreeHugger Robot [Fri, 18 Aug 2017 12:12:05 +0000 (12:12 +0000)]
Merge "Fix the calculation of the number of frames" into oc-mr1-dev
Pawin Vongmasa [Wed, 16 Aug 2017 10:47:16 +0000 (03:47 -0700)]
Fix the calculation of the number of frames
Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice
Bug:
64730503
Change-Id: Ie858a52cf7267b3783f67ca378a8c5efb726495c
Evgenii Stepanov [Wed, 2 Aug 2017 23:36:56 +0000 (16:36 -0700)]
[cfi] Adjust RLIMIT_AS by CFI shadow size.
CFI (control flow integrity) implementation is using a MAP_NORESERVE
allocation of up to 2GB is size. Only a tiny portion of it is backed
by physical memory. Take this into account when setting RLIMIT_AS for
media services.
Test: no immediate effect; CFI shadow increase for 48-bit aarch64 can
be reapplied w/o breaking android boot.
Bug:
64293803
See https://android-review.googlesource.com/#/c/platform/bionic/+/424903/.
(cherry picked from commit
f1b0523625ed27266bee8fcc64a3867e02b9a187)
Change-Id: I3fe72edcdaf908f42a1ffdfde645e34263564990
Wonsik Kim [Wed, 19 Jul 2017 18:41:23 +0000 (11:41 -0700)]
stagefright: allow secure audio input buffer
Bug:
63343701
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: I64cae10d17ec7421ffdc60dd0aa202f6c74f83bf
(cherry picked from commit
f7005138e0d63c79131923ebcab1f9dd9074878b)
Phil Burk [Thu, 17 Aug 2017 15:52:14 +0000 (15:52 +0000)]
Merge "aaudio: prevent memory leak from double configure" into oc-mr1-dev
TreeHugger Robot [Wed, 16 Aug 2017 22:44:09 +0000 (22:44 +0000)]
Merge "soundtrigger: require RECORD_AUDIO permission for DSP hotword" into oc-mr1-dev
Edwin Wong [Wed, 16 Aug 2017 22:22:39 +0000 (22:22 +0000)]
Merge "Support both Clear key plugin UUIDs." into oc-mr1-dev
Dongwon Kang [Wed, 16 Aug 2017 19:44:28 +0000 (19:44 +0000)]
Merge "Check buffer size in useBuffer in software components" into klp-dev am:
c65287a08c am:
5dfd2b5d9f am:
f84e9b9169 am:
0d7d0ab16e am:
5b89f4af6d am:
49903e4e0d am:
395c7417a7 am:
b7d875f570 am:
c0fc9412f8 am:
68f3d037b4 am:
3775c0c2ce am:
29ac52e4e8 am:
d1c36259d8 am:
9c9386918a am:
924b20fa49 am:
654bf4f8e9
am:
2e183b62fe
Change-Id: I1a47c087e9ac373eeac653310e9918eddaace8ab
Dongwon Kang [Wed, 16 Aug 2017 19:40:28 +0000 (19:40 +0000)]
Merge "Check buffer size in useBuffer in software components" into klp-dev am:
c65287a08c am:
5dfd2b5d9f am:
f84e9b9169 am:
0d7d0ab16e am:
5b89f4af6d am:
49903e4e0d am:
395c7417a7 am:
b7d875f570 am:
c0fc9412f8 am:
68f3d037b4 am:
3775c0c2ce am:
29ac52e4e8 am:
d1c36259d8 am:
9c9386918a am:
924b20fa49
am:
654bf4f8e9
Change-Id: I18a3052d9fc3c7dd78277ff239e54ca616ceae0f
Dongwon Kang [Wed, 16 Aug 2017 19:37:26 +0000 (19:37 +0000)]
Merge "Check buffer size in useBuffer in software components" into klp-dev am:
c65287a08c am:
5dfd2b5d9f am:
f84e9b9169 am:
0d7d0ab16e am:
5b89f4af6d am:
49903e4e0d am:
395c7417a7 am:
b7d875f570 am:
c0fc9412f8 am:
68f3d037b4 am:
3775c0c2ce am:
29ac52e4e8 am:
d1c36259d8 am:
9c9386918a
am:
924b20fa49
Change-Id: I2ea0e0a01595908ecc85c06d3cdd5ff82cd03346
Dongwon Kang [Wed, 16 Aug 2017 19:33:25 +0000 (19:33 +0000)]
Merge "Check buffer size in useBuffer in software components" into klp-dev am:
c65287a08c am:
5dfd2b5d9f am:
f84e9b9169 am:
0d7d0ab16e am:
5b89f4af6d am:
49903e4e0d am:
395c7417a7 am:
b7d875f570 am:
c0fc9412f8 am:
68f3d037b4 am:
3775c0c2ce am:
29ac52e4e8 am:
d1c36259d8
am:
9c9386918a
Change-Id: I71801ac3e19e71f6f93800754bd07752af976292
Dongwon Kang [Wed, 16 Aug 2017 19:28:56 +0000 (19:28 +0000)]
Merge "Check buffer size in useBuffer in software components" into klp-dev am:
c65287a08c am:
5dfd2b5d9f am:
f84e9b9169 am:
0d7d0ab16e am:
5b89f4af6d am:
49903e4e0d am:
395c7417a7 am:
b7d875f570 am:
c0fc9412f8 am:
68f3d037b4 am:
3775c0c2ce am:
29ac52e4e8
am:
d1c36259d8
Change-Id: Ia8c09dfc98c5970b5ee8f67873e0ffd2035c9418