OSDN Git Service

android-x86/frameworks-av.git
7 years agoCamera: Remove RAW boost value override logic
Emilian Peev [Mon, 10 Apr 2017 11:02:42 +0000 (12:02 +0100)]
Camera: Remove RAW boost value override logic

RAW boost value will be inserted by HIDL wrapper. The logic
needs to move there.

Bug: 34392075
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java
Change-Id: I7d4321d728eba11b5ec1345536bb669d70f3cffc

7 years agoCamera: Remove AE pre-capture trigger cancel override
Emilian Peev [Fri, 7 Apr 2017 14:48:49 +0000 (15:48 +0100)]
Camera: Remove AE pre-capture trigger cancel override

Bug: 34392075
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/StillCaptureTest.java
-m testAePrecaptureTriggerCancelJpegCapture
Change-Id: I0e632c83fb3ae0e4df26fe35bf1ef8441c1f20fa

7 years agoCamera: Make device related code version agnostic
Emilian Peev [Thu, 6 Apr 2017 15:55:14 +0000 (16:55 +0100)]
Camera: Make device related code version agnostic

Camera device related code should be agnostic w.r.t.
device version as much as possible. Specifically the
following requirements must hold true:
- Since support for devices 3.0&3.1 is deprecated
"ANDROID_QUIRKS_USE_PARTIAL_RESULT" is no longer considered.
- "ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS" is always
used instead of the deprecated "ANDROID_SCALER_AVAILABLE_JPEG_SIZES".
- Buffer manager for camera streams is used for dynamic buffer
allocation.
- "flush" is always used instead of waiting for buffers to drain.
- Similar to "flush" stream "tearDown" is always available.
- Dead code handling buffer registration is removed.

Bug: 34392075
Test: Manual using camera application
Change-Id: If1b215f785ba61c6991fdf163d4eb18733690471

7 years agoMerge "VolumeShaper: Clean up constructors" into oc-dev
Andy Hung [Tue, 25 Apr 2017 17:03:14 +0000 (17:03 +0000)]
Merge "VolumeShaper: Clean up constructors" into oc-dev

7 years agoMerge "VolumeShaper: improve logging and dumpsys" into oc-dev
Andy Hung [Tue, 25 Apr 2017 16:23:15 +0000 (16:23 +0000)]
Merge "VolumeShaper: improve logging and dumpsys" into oc-dev

7 years agoSuppress 'radio' processes to media.metrics
Ray Essick [Mon, 24 Apr 2017 22:52:54 +0000 (15:52 -0700)]
Suppress 'radio' processes to media.metrics

We suppress calls from radio processes (including the basic phone
process) to the media.metrics service. This had started happening
for a particular video telephony application that ran within phone
instead of as some separate app with its own user id.

We do this here to speed up when a radio process learns that it
can not log to media.metrics. The existing sepolicy restrictions
remain in place as a fallback. The use case that prompted this
was having issues with the 5-second timeout before we learned that
radio wasn't allowed access to the media.metrics process.

Bug: 37552329
Test: observe 'dumpsys media.metrics' and logcat
Change-Id: I1824aa35860bb91dd796856453c1897ec21b496c

7 years agoMerge "MediaPlayer: enable more logs for extractor failure." into oc-dev
TreeHugger Robot [Tue, 25 Apr 2017 00:24:00 +0000 (00:24 +0000)]
Merge "MediaPlayer: enable more logs for extractor failure." into oc-dev

7 years agoMerge "camera: Update for enableZsl values in template" into oc-dev
TreeHugger Robot [Mon, 24 Apr 2017 22:36:50 +0000 (22:36 +0000)]
Merge "camera: Update for enableZsl values in template" into oc-dev

7 years agoMediaPlayer: enable more logs for extractor failure.
Wei Jia [Thu, 20 Apr 2017 23:40:06 +0000 (16:40 -0700)]
MediaPlayer: enable more logs for extractor failure.

Test: compiles
Bug: 37273297
Change-Id: I53c6393e0c306c64ec4aa81c45e5ff6e8de233d8

7 years agoVolumeShaper: Clean up constructors
Andy Hung [Thu, 20 Apr 2017 21:23:41 +0000 (14:23 -0700)]
VolumeShaper: Clean up constructors

Explicit only for single argument constructors

Test: instrumented ducking, CTS
Bug: 37536598
Change-Id: I78776f500513a40c8daf7af78cbaec4b153e9ea2

7 years agoVolumeShaper: improve logging and dumpsys
Andy Hung [Thu, 20 Apr 2017 21:06:17 +0000 (14:06 -0700)]
VolumeShaper: improve logging and dumpsys

Test: CTS and dumpsys
Bug: 37536598
Change-Id: I9a838a8605defde3aaf42a872e48f01425df0f0e

7 years agoMerge "Allow fstatfs64 syscall for mediacodec/extractor" into oc-dev
TreeHugger Robot [Mon, 24 Apr 2017 21:15:21 +0000 (21:15 +0000)]
Merge "Allow fstatfs64 syscall for mediacodec/extractor" into oc-dev

7 years agoAllow fstatfs64 syscall for mediacodec/extractor
Dimitry Ivanov [Mon, 24 Apr 2017 18:34:58 +0000 (11:34 -0700)]
Allow fstatfs64 syscall for mediacodec/extractor

This syscall is used by the linker to detect files located on tmpfs

Bug: http://b/37245203
Bug: http://b/37590327
Test: boot an angler and check that mediacodec does not crash
Change-Id: I7147063db7d6b8ec39a25d39b60e8e6882addf6e

7 years agoMerge "Camera: Clear available callback buffers during recording stop" into oc-dev
TreeHugger Robot [Mon, 24 Apr 2017 11:38:28 +0000 (11:38 +0000)]
Merge "Camera: Clear available callback buffers during recording stop" into oc-dev

7 years agoMerge "NuPlayerDecoder: check mCodec before dereferencing it." into oc-dev
TreeHugger Robot [Fri, 21 Apr 2017 23:00:47 +0000 (23:00 +0000)]
Merge "NuPlayerDecoder: check mCodec before dereferencing it." into oc-dev

7 years agoMerge "audioflinger: fix mmap stream volume" into oc-dev
TreeHugger Robot [Fri, 21 Apr 2017 18:50:55 +0000 (18:50 +0000)]
Merge "audioflinger: fix mmap stream volume" into oc-dev

7 years agoMerge "Match AHardwareBuffer format name change" into oc-dev
TreeHugger Robot [Fri, 21 Apr 2017 18:38:19 +0000 (18:38 +0000)]
Merge "Match AHardwareBuffer format name change" into oc-dev

7 years agoNuPlayerDecoder: check mCodec before dereferencing it.
Wei Jia [Fri, 21 Apr 2017 18:24:45 +0000 (11:24 -0700)]
NuPlayerDecoder: check mCodec before dereferencing it.

Test: media cts tests
Bug: 37538141
Change-Id: Ib95fd4786242d6742f3bdc7aab28f79d43e8da81

7 years agoCamera: Clear available callback buffers during recording stop
Emilian Peev [Wed, 5 Apr 2017 10:20:09 +0000 (11:20 +0100)]
Camera: Clear available callback buffers during recording stop

Make sure we don't keep any stale available callback buffer
references after recording stops. This can lead to resource
leaks.

Bug: 36478361
Test: Complete Camera/Camera2 CTS tests
Change-Id: I9f72b784ba3ae1cf9f9b16064a13b7ba8a1d0394

7 years agoMerge "aaudio: fix SHARED MMAP mode in server plus other bugs" into oc-dev
TreeHugger Robot [Fri, 21 Apr 2017 15:15:49 +0000 (15:15 +0000)]
Merge "aaudio: fix SHARED MMAP mode in server plus other bugs" into oc-dev

7 years agoMerge "Modular DRM for MediaPlayer/SampleAES" into oc-dev
Hassan Shojania [Fri, 21 Apr 2017 14:48:55 +0000 (14:48 +0000)]
Merge "Modular DRM for MediaPlayer/SampleAES" into oc-dev

7 years agoMerge "Make IGraphicBufferSource::setTimeLapseConfig take fps" into oc-dev
TreeHugger Robot [Fri, 21 Apr 2017 09:58:42 +0000 (09:58 +0000)]
Merge "Make IGraphicBufferSource::setTimeLapseConfig take fps" into oc-dev

7 years agoMerge "Camera: Ignore buffer handle 'int' section" into oc-dev
TreeHugger Robot [Fri, 21 Apr 2017 09:28:55 +0000 (09:28 +0000)]
Merge "Camera: Ignore buffer handle 'int' section" into oc-dev

7 years agoaaudio: fix SHARED MMAP mode in server plus other bugs
Phil Burk [Thu, 13 Apr 2017 23:05:07 +0000 (16:05 -0700)]
aaudio: fix SHARED MMAP mode in server plus other bugs

Fixed some buffer miscalculations, and some NPEs in the close() code.
Added debugging and some general cleanup.
Fixed data conversion.
Fixed start/pause/flush in server.
Added reference counting in server for endpoints.
Programs can now be ran more than once.
General code cleanup.
Reconnect with service if server dies.
Move stop() logic into server for better synchronization.
Add sleep to prevent race condition when closing an MMAP stream.

Bug: 33398120
Test: two write_sine_callback.cpp can be run simultaneously
Change-Id: Ibb006215a498868c222228d675ff961d7e0bf514
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoaudioflinger: fix mmap stream volume
Eric Laurent [Thu, 20 Apr 2017 01:10:41 +0000 (18:10 -0700)]
audioflinger: fix mmap stream volume

Fix bad casting from MmapPlaybackThread to VolumeInterface causing
volume commands to be lost by audio flinger for MMAP threads.

Bug: 37518243
Test: Verify volume is received by the audio HAL on MMAP streams
      Verify no regression for other stream types.

Change-Id: I584ae868245358b2edefecc46a5249092f8be229

7 years agoMake IGraphicBufferSource::setTimeLapseConfig take fps
Pawin Vongmasa [Thu, 20 Apr 2017 12:12:55 +0000 (05:12 -0700)]
Make IGraphicBufferSource::setTimeLapseConfig take fps

Test: Manual use of Camera, Movies, Photos and YouTube apps.

Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'

Bug: 37302530
Change-Id: Id0d4f7fed57349a2f5484f6b6264981471e8f022

7 years agoAdd future support for IGraphicBufferSource::getStopTimeOffsetUs
Pawin Vongmasa [Thu, 6 Apr 2017 22:56:34 +0000 (15:56 -0700)]
Add future support for IGraphicBufferSource::getStopTimeOffsetUs

Test: Compiles
Bug: 35925528
Change-Id: I31368939d2f13811b9e8b3e5911b91b14148c167

7 years agoModular DRM for MediaPlayer/SampleAES
Hassan Shojania [Wed, 19 Apr 2017 21:29:42 +0000 (14:29 -0700)]
Modular DRM for MediaPlayer/SampleAES

Bug: 34559906
Test: CTS Tests + playback in Chrome

Change-Id: Iaa275c4cfe6d15f02774ff4cc8a2cb5e7d1012e1

7 years agoCamera: Ignore buffer handle 'int' section
Emilian Peev [Thu, 20 Apr 2017 09:58:51 +0000 (10:58 +0100)]
Camera: Ignore buffer handle 'int' section

Bufer handle hashing and comparison currently uses the buffer
'Int' section along with the Fd section. However the values there
can dynamically change after the buffer gets allocated which will
introduce side-effects in the buffer id map.

Bug: 37257356
Test: Complete Camera/Camera2 CTS
Change-Id: I2cf09ced69f155285dae67b3a2502e6b87f7d9cc

7 years agoMerge "Revise capture interval calculation in StagefrightRecorder" into oc-dev
TreeHugger Robot [Thu, 20 Apr 2017 00:50:47 +0000 (00:50 +0000)]
Merge "Revise capture interval calculation in StagefrightRecorder" into oc-dev

7 years agoMerge "aaudio: disable EXCLUSIVE mode" into oc-dev
Phil Burk [Thu, 20 Apr 2017 00:19:12 +0000 (00:19 +0000)]
Merge "aaudio: disable EXCLUSIVE mode" into oc-dev

7 years agoaaudio: disable EXCLUSIVE mode
Phil Burk [Thu, 20 Apr 2017 00:14:27 +0000 (17:14 -0700)]
aaudio: disable EXCLUSIVE mode

It does not work because of SELinux restrictions.

Bug: 37167970
Test: we are disabling a feature because it does not work
Change-Id: If97ae72bde50dbc7808eb0768de25e6fbb388429
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMerge "aaudio: remove old createThread API" into oc-dev
Phil Burk [Wed, 19 Apr 2017 23:46:00 +0000 (23:46 +0000)]
Merge "aaudio: remove old createThread API" into oc-dev

7 years agoMerge "aaudio: remove AAUDIO_FORMAT_PCM_I8_24 and I32" into oc-dev
Phil Burk [Wed, 19 Apr 2017 23:16:51 +0000 (23:16 +0000)]
Merge "aaudio: remove AAUDIO_FORMAT_PCM_I8_24 and I32" into oc-dev

7 years agoMatch AHardwareBuffer format name change
Jesse Hall [Wed, 19 Apr 2017 22:50:05 +0000 (15:50 -0700)]
Match AHardwareBuffer format name change

Bug: 37515907
Test: make checkbuild
Change-Id: I1cb9ee3eefcb7594a875d64c0f90861ecc6d4626

7 years agoRevise capture interval calculation in StagefrightRecorder
Wonsik Kim [Fri, 14 Apr 2017 19:12:02 +0000 (12:12 -0700)]
Revise capture interval calculation in StagefrightRecorder

Bug: 37302530
Test: cts-tradefed run cts-dev --module CtsMediaTestCases --test android.media.cts.MediaRecorderTest
Change-Id: Idfb4aea475a40f928380835db9e6f304fe435377

7 years agoMerge "Reduce memory usage by some extractors." into oc-dev
Andy Hung [Wed, 19 Apr 2017 20:34:11 +0000 (20:34 +0000)]
Merge "Reduce memory usage by some extractors." into oc-dev

7 years agoMerge "MediaCas: move clear key plugin to /system/lib" into oc-dev
Chong Zhang [Wed, 19 Apr 2017 18:56:25 +0000 (18:56 +0000)]
Merge "MediaCas: move clear key plugin to /system/lib" into oc-dev

7 years agoMerge "Add libeffects to CleanSteps.mk" into oc-dev
Yifan Hong [Wed, 19 Apr 2017 18:25:18 +0000 (18:25 +0000)]
Merge "Add libeffects to CleanSteps.mk" into oc-dev

7 years agoMerge "MediaBufferGroup: Fix MediaBufferGroup signal" into oc-dev
Andy Hung [Wed, 19 Apr 2017 16:28:37 +0000 (16:28 +0000)]
Merge "MediaBufferGroup: Fix MediaBufferGroup signal" into oc-dev

7 years agoaaudio: remove old createThread API
Phil Burk [Wed, 19 Apr 2017 05:46:21 +0000 (22:46 -0700)]
aaudio: remove old createThread API

This was replaced by the callback API.

Bug: 36489240
Test: the code was removed and cannot be tested
Change-Id: Ieb5cee80d1123221d02146c8c9342c4e0d649575
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoaaudio: remove AAUDIO_FORMAT_PCM_I8_24 and I32
Phil Burk [Wed, 19 Apr 2017 02:50:28 +0000 (19:50 -0700)]
aaudio: remove AAUDIO_FORMAT_PCM_I8_24 and I32

They were not supported and we may not support them.

Bug: 30210002
Test: test_aaudio.cpp
Change-Id: Ib8a5d416b93df87e4b73e03789eacf0fd3f77f8e
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMerge "stagefright: fix log spam" into oc-dev
TreeHugger Robot [Wed, 19 Apr 2017 00:41:21 +0000 (00:41 +0000)]
Merge "stagefright: fix log spam" into oc-dev

7 years agoMerge "Camera: allow shifted camera metadata for some interface" into oc-dev
Yin-Chia Yeh [Wed, 19 Apr 2017 00:12:23 +0000 (00:12 +0000)]
Merge "Camera: allow shifted camera metadata for some interface" into oc-dev

7 years agoMerge "Camera: use framework VideoNativeHandleMetadata header" into oc-dev
Yin-Chia Yeh [Wed, 19 Apr 2017 00:12:02 +0000 (00:12 +0000)]
Merge "Camera: use framework VideoNativeHandleMetadata header" into oc-dev

7 years agocamera: Update for enableZsl values in template
Chien-Yu Chen [Tue, 18 Apr 2017 22:22:02 +0000 (15:22 -0700)]
camera: Update for enableZsl values in template

For apps targeting SDK versions O and newer, the value of enableZsl
may be true in still capture template. the value of enableZsl is
always false for other templates.

For apps targeting SDK versions older than O, the value of enableZsl
is always flase.

Test: make
Bug: 34983527
Change-Id: I06b2a18254a78bd6505e9b6e6addc09ebf0f925f

7 years agoMediaCas: move clear key plugin to /system/lib
Chong Zhang [Tue, 18 Apr 2017 22:01:37 +0000 (15:01 -0700)]
MediaCas: move clear key plugin to /system/lib

Non-treble process can no longer load .so from /vendor/lib.
Move the clear key plugin to /system/lib until MediaCas is converted
to treble.

bug: 37476803
Change-Id: I563b4576aeada5470355e7e168fa2c73997004d7

7 years agoMerge "audio policy: disable concurrent capture" into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 23:00:34 +0000 (23:00 +0000)]
Merge "audio policy: disable concurrent capture" into oc-dev

7 years agostagefright: fix log spam
Yin-Chia Yeh [Tue, 18 Apr 2017 22:52:55 +0000 (15:52 -0700)]
stagefright: fix log spam

Bug: 37110143
Change-Id: I82d147c966980716df5eb5c05cf8cb71387f0862

7 years agoAdd libeffects to CleanSteps.mk
Yifan Hong [Tue, 18 Apr 2017 22:05:15 +0000 (15:05 -0700)]
Add libeffects to CleanSteps.mk

Test: make
Bug: 33241851
Change-Id: Icf288506a166ead3e49ace9ba90e124ce4ede4ff

7 years agoCamera: allow shifted camera metadata for some interface
Yin-Chia Yeh [Tue, 18 Apr 2017 22:01:15 +0000 (15:01 -0700)]
Camera: allow shifted camera metadata for some interface

Allow shifted metadata when the buffer is allocated by
hwbinder (which might allocate buffers to 4 bytes boundary
on 32-bits CPU)

Test: compile, GCA working
Bug: 37095012
Change-Id: I404b73ac3b460f5ff03cb64001c24f7a05b91396

7 years agoReduce memory usage by some extractors.
yuedl1 [Mon, 13 Mar 2017 10:07:26 +0000 (18:07 +0800)]
Reduce memory usage by some extractors.

Occurs for some extractors that use shared memory without MediaBufferObserver.
Check with high resolution MKV.

Play a mkv file continuously and check file descriptor count.
adb shell lsof | grep mediae | wc
adb shell lsof | grep medias | wc

Test: Photos with mkv.
Bug: 36359517
Change-Id: I8719b628406a838ee091499347b219a8a4736a25
Signed-off-by: yuedl1 <yuedl1@lenovo.com>
7 years agoMerge "Camera: Make finalizeOutputConfigurations more resilient" into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 20:31:25 +0000 (20:31 +0000)]
Merge "Camera: Make finalizeOutputConfigurations more resilient" into oc-dev

7 years agoMerge "Use option to flush the entire buffer on -EOVERFLOW" into oc-dev
Glenn Kasten [Tue, 18 Apr 2017 20:10:10 +0000 (20:10 +0000)]
Merge "Use option to flush the entire buffer on -EOVERFLOW" into oc-dev

7 years agoCamera: Make finalizeOutputConfigurations more resilient
Shuzhen Wang [Thu, 13 Apr 2017 22:18:36 +0000 (15:18 -0700)]
Camera: Make finalizeOutputConfigurations more resilient

There could be race in application where finalizeOutputconfigurations
doesn't include any new surface. Do not fail in this case.

Test: CameraStressTest#testBackCameraSwitchPreview
Bug: 36811459
Bug: 35137641
Change-Id: Ic185e6d8bfcb8af5b81a33fbbd2fd4e49cc647ce

7 years agoMerge "Fix libmedia includes." into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 13:06:59 +0000 (13:06 +0000)]
Merge "Fix libmedia includes." into oc-dev

7 years agoMerge "Add libeffects_headers." into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 13:06:59 +0000 (13:06 +0000)]
Merge "Add libeffects_headers." into oc-dev

7 years agoMerge "Add libaudioclient_headers" into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 13:06:59 +0000 (13:06 +0000)]
Merge "Add libaudioclient_headers" into oc-dev

7 years agoMerge "libmedia_helper: vendor_available" into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 05:35:43 +0000 (05:35 +0000)]
Merge "libmedia_helper: vendor_available" into oc-dev

7 years agoMerge "stagefright: Rework GraphicBufferSource - step 1" into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 05:27:22 +0000 (05:27 +0000)]
Merge "stagefright: Rework GraphicBufferSource - step 1" into oc-dev

7 years agoAdd libeffects_headers.
Steven Moreland [Mon, 17 Apr 2017 22:42:49 +0000 (15:42 -0700)]
Add libeffects_headers.

Also had to fix the location and symlink of them.

Test: works with BOARD_VNDK_VERSION := current
Bug: 33241851
Change-Id: Idcfe1eaaf7be10a183b69bafa07f035ab9ca1e4e

7 years agoMerge "libeffects: move to vendor" into oc-dev
TreeHugger Robot [Tue, 18 Apr 2017 04:01:12 +0000 (04:01 +0000)]
Merge "libeffects: move to vendor" into oc-dev

7 years agoFix libmedia includes.
Steven Moreland [Mon, 17 Apr 2017 22:55:59 +0000 (15:55 -0700)]
Fix libmedia includes.

Test: works with BOARD_VNDK_VERSION := current
Bug: 33241851
Change-Id: Idb6319563dfe83807d32ee54eb2fe66346c9f54a

7 years agoAdd libaudioclient_headers
Steven Moreland [Mon, 17 Apr 2017 21:30:39 +0000 (14:30 -0700)]
Add libaudioclient_headers

Test: works with BOARD_VNDK_VERSION := current
Bug: 33241851
Change-Id: I31cf7e7cd89fe6e71d4e52f7682990146a12b2fb

7 years agolibmedia_helper: vendor_available
Steven Moreland [Tue, 18 Apr 2017 00:44:48 +0000 (17:44 -0700)]
libmedia_helper: vendor_available

By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 36426473
Bug: 36079834
Test: m -j libmedia_helper
Test: attempt to compile with BOARD_VNDK_VERSION := current
Change-Id: I21fc594e8e1bf62d73c7b993b6a734c2fa24175f

7 years agoCamera: use framework VideoNativeHandleMetadata header
Yin-Chia Yeh [Tue, 18 Apr 2017 00:37:03 +0000 (17:37 -0700)]
Camera: use framework VideoNativeHandleMetadata header

Test: build
Bug: 35625849
Change-Id: I8e95677267646f897abdf94881ef335635461c0a

7 years agoUse option to flush the entire buffer on -EOVERFLOW
Glenn Kasten [Mon, 17 Apr 2017 23:40:46 +0000 (16:40 -0700)]
Use option to flush the entire buffer on -EOVERFLOW

This was the previous behavior prior to project system/media commit
fc3d70736e4c24cbdc8c91076013c01e487fd4d5.
The new behavior introduced by that commit is to preserve as much of the
buffer as possible.  But that introduced a regression in applications with
so many overflows that they can't recover.  So now the flush is optional.
In the case of PipeReader, we do need the flush.

Test: at bug
Bug: 36725187
Change-Id: I25609c7a656a05228fb4e7d4082b2857f4195a34

7 years agostagefright: Rework GraphicBufferSource - step 1
Lajos Molnar [Thu, 6 Apr 2017 21:27:17 +0000 (14:27 -0700)]
stagefright: Rework GraphicBufferSource - step 1

- Abstract buffer reference counting so that it does not intimately
assume a BufferQueue. Move releasing acquired buffers into a
callback as this is BQ specific. Having vectors for slots is also
BQ specific.

Use shared, copiable objects to manage buffers and their lifecycles:

CachedBuffer: a cached buffer in a slot

AcquiredBuffer: a buffer acquired from the producer that will
need to be released (and will get released when all copies of
this object go out of scope)

VideoBuffer: an acquired buffer with metadata

- Rename variables to be more descriptive.

- Move associated methods and variables closer together.

- Document methods and some of the operations of GraphicBufferSource.

Bug: 37110143
Change-Id: Iea5e7a376eba2bdd41624a7ddbe1d94c3d0e7b68

7 years agoCamera: Use slowJpeg if JPEG minimum duration is less than preview fps
Shuzhen Wang [Fri, 31 Mar 2017 21:37:36 +0000 (14:37 -0700)]
Camera: Use slowJpeg if JPEG minimum duration is less than preview fps

If the minimum duration of JPEG is less than the frame duration derived
from maximum fps, enable slowJpeg mode so that JPEG doesn't slow down
preview.

Cap the default max fps to 30 so that the switch between different
sensor modes can be minimized while still allowing the app to go higher
than 30fps.

Test: Camera1 CTS
Bug: 36692074
Change-Id: If4d367ac587c0f4d3620ca2d25063c5a12ebfceb

7 years agoMerge "omx: Removed dead files." into oc-dev
TreeHugger Robot [Mon, 17 Apr 2017 20:03:40 +0000 (20:03 +0000)]
Merge "omx: Removed dead files." into oc-dev

7 years agoMerge "audio policy: fix global effect attachment" into oc-dev
Eric Laurent [Mon, 17 Apr 2017 15:42:49 +0000 (15:42 +0000)]
Merge "audio policy: fix global effect attachment" into oc-dev

7 years agoMediaBufferGroup: Fix MediaBufferGroup signal
Andy Hung [Fri, 7 Apr 2017 21:13:54 +0000 (14:13 -0700)]
MediaBufferGroup: Fix MediaBufferGroup signal

Test: Photos, Camera Record
Bug: 35612467
Change-Id: Id2e30f2f8b67b207835ae6add65b9d03dfcaf2e9

7 years agoMerge "Fix zero length packet handling" into oc-dev
TreeHugger Robot [Sat, 15 Apr 2017 22:20:06 +0000 (22:20 +0000)]
Merge "Fix zero length packet handling" into oc-dev

7 years agoFix zero length packet handling
Jerry Zhang [Fri, 14 Apr 2017 22:26:53 +0000 (15:26 -0700)]
Fix zero length packet handling

Ensure that a zero length packet is properly sent
/ received when handling data that is a multiple of the
endpoint size.

This fixes an issue where files whose size is a multiple
of the endpoint size would hang during transfer.

Bug: 37175601
Test: check successful file transfer.
Change-Id: Iaf3cea18422234d65b59f5961ef9fb3f3ee2049a

7 years agoMerge "libaudiohal: Fix broken "legacy audio HAL" build" into oc-dev
TreeHugger Robot [Sat, 15 Apr 2017 00:33:00 +0000 (00:33 +0000)]
Merge "libaudiohal: Fix broken "legacy audio HAL" build" into oc-dev

7 years agoMerge "Use fmq for camera capture result." into oc-dev
TreeHugger Robot [Fri, 14 Apr 2017 23:42:53 +0000 (23:42 +0000)]
Merge "Use fmq for camera capture result." into oc-dev

7 years agolibaudiohal: Fix broken "legacy audio HAL" build
Mikhail Naganov [Fri, 14 Apr 2017 22:17:45 +0000 (15:17 -0700)]
libaudiohal: Fix broken "legacy audio HAL" build

Restore accidenally removed #include directive

Bug: 33241851
Test: build with USE_LEGACY_LOCAL_AUDIO_HAL=true
Change-Id: I191233f533cea11eb95bc72eb06a9ce12dcc19d0

7 years agoMerge "mediacodec: route all libbinder traffic to /dev/vndbinder" into oc-dev
TreeHugger Robot [Fri, 14 Apr 2017 20:43:02 +0000 (20:43 +0000)]
Merge "mediacodec: route all libbinder traffic to /dev/vndbinder" into oc-dev

7 years agoUse fmq for camera capture result.
Yifan Hong [Wed, 12 Apr 2017 23:30:31 +0000 (16:30 -0700)]
Use fmq for camera capture result.

Test: camera works.

Bug: 35788245 [Treble] Pass camera metadata using shared memory

Change-Id: I344212cfd80f6df4e5aec01ec3f12f1ee9bb71c8

7 years agoMerge "Add libmedia_headers library." into oc-dev
TreeHugger Robot [Fri, 14 Apr 2017 19:32:13 +0000 (19:32 +0000)]
Merge "Add libmedia_headers library." into oc-dev

7 years agomediacodec: route all libbinder traffic to /dev/vndbinder
Iliyan Malchev [Wed, 12 Apr 2017 03:19:36 +0000 (20:19 -0700)]
mediacodec: route all libbinder traffic to /dev/vndbinder

This CL provides additional sandboxing to ensure that the ban on using
/dev/binder to communicate between system and vendor is enforced (even
if SE policy might otherwise permit it.)  This is done only on
full-Treble devices.

b/36604251 OMX HAL (aka mediacodec) uses Binder and even exposes a
   Binder service

Test: marlin

Change-Id: I344f5eb9d8719beec02207be65caca78336afff5
Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years agoMerge "libaudiohal: Remove dependencies on libeffects and libhardware" into oc-dev
TreeHugger Robot [Fri, 14 Apr 2017 18:28:17 +0000 (18:28 +0000)]
Merge "libaudiohal: Remove dependencies on libeffects and libhardware" into oc-dev

7 years agolibaudiohal: Remove dependencies on libeffects and libhardware
Mikhail Naganov [Fri, 14 Apr 2017 16:21:50 +0000 (09:21 -0700)]
libaudiohal: Remove dependencies on libeffects and libhardware

These dependencies are only needed when building with
USE_LEGACY_LOCAL_AUDIO_HAL=true.

Test: adb shell lsof | grep libeffects
Bug: 33241851
Change-Id: I9c5eaf52d02c2101c55ea420780d0eb435d6493a

7 years agosoundtrigger: Use "default" instance name for HAL service
Mikhail Naganov [Thu, 13 Apr 2017 18:00:06 +0000 (11:00 -0700)]
soundtrigger: Use "default" instance name for HAL service

"default" implies using "primary" legacy device module.
This doesn't change anything for binderized mode, because
the server was only registering itself as "sound_trigger.primary",
so it was the only possibility anyways.

Usage of "stub" (debugging) module is still possible
if audioflinger and corresponding services are built with
USE_LEGACY_LOCAL_AUDIO_HAL=true (added makefile check to ensure
that).

Test: "Ok Google" from screen off state on sailfish
Bug: 36570720
Change-Id: Ibef7fb312ce593d71255cfac71ba4e8f1dd28666

7 years agoMerge "AAudio: Fix Doxygen problems with undefined symbols" into oc-dev
Glenn Kasten [Fri, 14 Apr 2017 14:54:54 +0000 (14:54 +0000)]
Merge "AAudio: Fix Doxygen problems with undefined symbols" into oc-dev

7 years agoomx: Removed dead files.
Steven Moreland [Fri, 14 Apr 2017 13:36:14 +0000 (06:36 -0700)]
omx: Removed dead files.

Test: pass
Bug: 33241851
Change-Id: I6cd2aac88861295ddf2243738f643639c7e82000

7 years agoAdd libmedia_headers library.
Steven Moreland [Fri, 14 Apr 2017 11:12:13 +0000 (04:12 -0700)]
Add libmedia_headers library.

Bug: 33241851
Test: build with BOARD_VNDK_VERSION := current
Change-Id: I6239b58890cabae69f27daf14aa2fb19d8bffe5d

7 years agoMerge "Use fmq for camera capture request." into oc-dev
Yifan Hong [Fri, 14 Apr 2017 02:10:15 +0000 (02:10 +0000)]
Merge "Use fmq for camera capture request." into oc-dev

7 years agolibeffects: move to vendor
Steven Moreland [Fri, 14 Apr 2017 00:55:29 +0000 (17:55 -0700)]
libeffects: move to vendor

Bug: 33241851
Test: equalizer works in google play music
Test: CleanSpec works
Change-Id: I11b54a5f050f914afc234e15f680581d15064c82

7 years agoAAudio: Fix Doxygen problems with undefined symbols
Glenn Kasten [Thu, 13 Apr 2017 16:20:14 +0000 (09:20 -0700)]
AAudio: Fix Doxygen problems with undefined symbols

Test: doxygen reports no problems
Bug: 37304345
Change-Id: Ie995b5d777fe56f16c6622844864d42cc3d32d2c
(cherry picked from commit 3cc2d29b260f06fb8c026b1b746226ed704fc4ca)

7 years agoUse fmq for camera capture request.
Yifan Hong [Tue, 11 Apr 2017 21:44:25 +0000 (14:44 -0700)]
Use fmq for camera capture request.

Test: camera works.
Bug: 35788245 [Treble] Pass camera metadata using shared memory

Change-Id: I58d7f6ef91ff45680840bf61a431a0c071ebbdfb

7 years agoaudio policy: fix global effect attachment
Eric Laurent [Sat, 8 Apr 2017 02:04:42 +0000 (19:04 -0700)]
audio policy: fix global effect attachment

Fix logic for global music effects (e.g Visualizer) attachement to
output streams.
- Consider only outputs with active music sessions first and then all
outputs
- Reevaluate effect attachment systematically on music playback start/stop
and when outputs are opened/closed
- Use the same logic every where.

Bug: 33397379
Test: CTS: AudioEffectTest, VisualizerTest, EqualizerTest, BassBoostTest
      Manual test with music playback with and without Effects in
      offload and non offload mode on speaker, headset, BT A2DP.

Change-Id: Iabc23bc8a24f36b68942b7f32749c535781497b4

7 years agoaaudio: merge contents of AAudioDefinitions.h into AAudio.h
Phil Burk [Wed, 12 Apr 2017 22:44:06 +0000 (15:44 -0700)]
aaudio: merge contents of  AAudioDefinitions.h into AAudio.h

As requested by native API council.

Bug: 30210002
Bug: 33398120
Test: CTS test_aaudio
Change-Id: I5ea7c53d09469221263d84cf6f82082e67c2523b
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMerge changes from topic 'api-review' into oc-dev
TreeHugger Robot [Thu, 13 Apr 2017 06:23:45 +0000 (06:23 +0000)]
Merge changes from topic 'api-review' into oc-dev

* changes:
  MediaCas: combine openSession methods
  MediaCas: changes to address API review comments

7 years agoMerge "Change drm/crypto service names to "default"" into oc-dev
TreeHugger Robot [Thu, 13 Apr 2017 02:25:23 +0000 (02:25 +0000)]
Merge "Change drm/crypto service names to "default"" into oc-dev

7 years agoaudio policy: disable concurrent capture
Eric Laurent [Sat, 8 Apr 2017 00:13:42 +0000 (17:13 -0700)]
audio policy: disable concurrent capture

Disable concurrent capture until the corresponding UI is available.
Restore preemption for HOTWORD audio source.

Bug:36891272
Test: capture regression tests, run CTS AudioRecordTest, run GTS SearchHostTest
Change-Id: I1b6c32c2a76ae0e004e14e46fedd596a8844c0d4

7 years agoMerge "AudioTrack and AudioRecord: getNotificationPeriodInFrames()" into oc-dev
Phil Burk [Thu, 13 Apr 2017 00:55:36 +0000 (00:55 +0000)]
Merge "AudioTrack and AudioRecord: getNotificationPeriodInFrames()" into oc-dev

7 years agoMerge "libaaudio: fix error passing for errorCallback" into oc-dev
Phil Burk [Thu, 13 Apr 2017 00:49:21 +0000 (00:49 +0000)]
Merge "libaaudio: fix error passing for errorCallback" into oc-dev

7 years agoAudioTrack and AudioRecord: getNotificationPeriodInFrames()
Phil Burk [Mon, 27 Mar 2017 22:26:14 +0000 (15:26 -0700)]
AudioTrack and AudioRecord: getNotificationPeriodInFrames()

This is needed for AAudioStream_getFramesPerBurst(),
which is needed for callbacks to work correctly.

Bug: 34716038
Bug: 36489240
Test: CTS test_aaudio.cpp
Change-Id: I0e3f3f18a22bf6da8c288f0d2caec0bff0153f2f
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMerge "libaaudio: implement missing AAudioStream_getFramesPerDataCallback()" into...
Phil Burk [Wed, 12 Apr 2017 22:15:31 +0000 (22:15 +0000)]
Merge "libaaudio: implement missing AAudioStream_getFramesPerDataCallback()" into oc-dev