OSDN Git Service

android-x86/frameworks-av.git
7 years agoaudiopolicy: Two session can not offload concurrently
Kevin Rocard [Mon, 6 Mar 2017 22:18:23 +0000 (14:18 -0800)]
audiopolicy: Two session can not offload concurrently

Previously the patch I98a8913d6faf5092a1e43a0bdd0f1ce1482221a9
forbade two tracks from different application to be offloaded
concurrently.

Concurrent offload is only needed for back to back playback...
Detect this use case by checking the session id instead of the
PID.

Test: call & play music & assistant
Test: run new CTS testConcurentPlayAudio
Bug: 35841692
Change-Id: I2c09c54adedf12644205bef115f1a2e16b05de91
Signed-off-by: Kevin Rocard <krocard@google.com>
7 years agoMerge "Camera: Close acquire fences on failed buffers" into oc-dev
TreeHugger Robot [Fri, 12 May 2017 11:49:57 +0000 (11:49 +0000)]
Merge "Camera: Close acquire fences on failed buffers" into oc-dev

7 years agoMerge "Camera: Re-enumarate new providers" into oc-dev
TreeHugger Robot [Fri, 12 May 2017 11:49:42 +0000 (11:49 +0000)]
Merge "Camera: Re-enumarate new providers" into oc-dev

7 years agoMerge "media: Write maker and model information into recorded videos." into oc-dev
TreeHugger Robot [Fri, 12 May 2017 08:00:39 +0000 (08:00 +0000)]
Merge "media: Write maker and model information into recorded videos." into oc-dev

7 years agoOmx: Fix codec instance leak if Observer dies
Praveen Chavan [Tue, 9 May 2017 07:52:09 +0000 (00:52 -0700)]
Omx: Fix codec instance leak if Observer dies

If Observer dies, {instance, observer} book-keeping may be
cleaned up. In such case avoid only unlinking the death-notifier,
but proceed with instance cleanup

Test: Manual use of Camera, Photos, Play Movies and YouTube.
Test: Small CtsMediaTestCases

Bug: 38149818
Change-Id: I412953b55827c93730353a95560b865fb18b5f0f

7 years agoMerge "DO NOT MERGE Bring Metrics summarizers over from master" into oc-dev
TreeHugger Robot [Thu, 11 May 2017 21:02:02 +0000 (21:02 +0000)]
Merge "DO NOT MERGE Bring Metrics summarizers over from master" into oc-dev

7 years agoMerge "stagefright: put battery update under a separate lock" into oc-dev
TreeHugger Robot [Thu, 11 May 2017 20:54:17 +0000 (20:54 +0000)]
Merge "stagefright: put battery update under a separate lock" into oc-dev

7 years agostagefright: put battery update under a separate lock
Chong Zhang [Thu, 11 May 2017 18:44:56 +0000 (11:44 -0700)]
stagefright: put battery update under a separate lock

Battery update doesn't need to lock the main lock for
mediaplayerservice. Battery update sometimes is called
from lower level componenet (eg. StagefrightRecorder),
locking the main lock here has potential to deadlock.

Puting the battery update in a separate class so that
it's clear this is not to be mixed with the rest of
the mediaplayerservice states.

bug: 38230347
Change-Id: Idf5f26f2b07ad6303775763ce283dad0679843d5

7 years agomedia: Write maker and model information into recorded videos.
Hangyu Kuang [Tue, 11 Apr 2017 20:17:45 +0000 (13:17 -0700)]
media: Write maker and model information into recorded videos.

Bug: 34745604
Test: Camera recording and use isoviewer to look at the metadata
Change-Id: Idb556a0ec38d8a6a797c71b68c46979504d2cb4a

7 years agoCamera: Close acquire fences on failed buffers
Emilian Peev [Thu, 11 May 2017 16:23:41 +0000 (17:23 +0100)]
Camera: Close acquire fences on failed buffers

Buffers that didn't get a chance to be processed
might still hold valid acquire fences. Check and
close those if necessary.

Bug: 38229510
Test: Manual using application
Change-Id: I8e823a655cc30ed966e277ace090e96c64ba1c8c

7 years agoMerge "aaudio: validate audio data format" into oc-dev
Phil Burk [Thu, 11 May 2017 16:47:04 +0000 (16:47 +0000)]
Merge "aaudio:  validate audio data format" into oc-dev

7 years agoaaudio: validate audio data format
Phil Burk [Fri, 5 May 2017 00:16:13 +0000 (17:16 -0700)]
aaudio:  validate audio data format

Also lots of minor cleanup
Fix underscores in some headers
Refactor getTimestamp()

Bug: 34127069
Bug: 38227780
Test: CTS test_aaudio.cpp
Change-Id: I6fdb50eb00a41688df871018ced91d5f5f055f8a
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoCamera: Re-enumarate new providers
Emilian Peev [Thu, 4 May 2017 15:35:48 +0000 (16:35 +0100)]
Camera: Re-enumarate new providers

Camera service should enumarate newly added
camera providers.

Bug: 37592461
Test: Manual using camera application
Change-Id: I4c886b99127d23148c70ce1e1e773cb8393d91b4

7 years agoMerge "VolumeShaper: Fixes for updated Cts test" into oc-dev
Andy Hung [Thu, 11 May 2017 04:24:04 +0000 (04:24 +0000)]
Merge "VolumeShaper: Fixes for updated Cts test" into oc-dev

7 years agoMerge "Fix -Wextra warnings in frameworks/av/include" into oc-dev
Andy Hung [Thu, 11 May 2017 04:04:31 +0000 (04:04 +0000)]
Merge "Fix -Wextra warnings in frameworks/av/include" into oc-dev

7 years agoMerge "ligbaaudio: Fix pause, flush and getXRunCount for input streams." into oc-dev
TreeHugger Robot [Thu, 11 May 2017 00:50:17 +0000 (00:50 +0000)]
Merge "ligbaaudio: Fix pause, flush and getXRunCount for input streams." into oc-dev

7 years agoMerge "aaudio: plug some resource leaks" into oc-dev
TreeHugger Robot [Wed, 10 May 2017 23:14:53 +0000 (23:14 +0000)]
Merge "aaudio: plug some resource leaks" into oc-dev

7 years agoVolumeShaper: Fixes for updated Cts test
Andy Hung [Sat, 6 May 2017 00:33:32 +0000 (17:33 -0700)]
VolumeShaper: Fixes for updated Cts test

1) Limit number of VolumeShapers that can be created.
   a) 16 system VolumeShapers
   b) 16 application/client VolumeShapers
2) Return proper volume before VolumeShaper is started.
3) Consistent xOffset definition used internally:
   a) this is now always the position on the volumeshaper curve
      which can go backwards if in REVERSE.
   b) normalized time is always forward going and is scaled
      to 0.f and 1.f depending on progress relative to
      the curve's duration.
4) Fix replace method.
5) Add comments.

Test: Use updated CTS VolumeShaperTest
Bug: 37536598
Change-Id: I837ab2a481adc0abbd3f1338bfe2cb79831b11fa

7 years agoligbaaudio: Fix pause, flush and getXRunCount for input streams.
Phil Burk [Mon, 8 May 2017 23:36:41 +0000 (16:36 -0700)]
ligbaaudio: Fix pause, flush and getXRunCount for input streams.

Bug: 37941092
Bug: 37943598
Test: input_monitor_callback.cpp

Change-Id: Ifc2ea526e4722063e03956bd5f0747adc49ba6ee
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMerge "Add null check in setSidebandStream" into oc-dev
TreeHugger Robot [Wed, 10 May 2017 03:15:06 +0000 (03:15 +0000)]
Merge "Add null check in setSidebandStream" into oc-dev

7 years agoMerge "nuplayer: Do not notify EOS when paused" into oc-dev
TreeHugger Robot [Wed, 10 May 2017 01:57:14 +0000 (01:57 +0000)]
Merge "nuplayer: Do not notify EOS when paused" into oc-dev

7 years agoMerge "stagefright: provide consumer usage hint to consumers that request it" into...
TreeHugger Robot [Tue, 9 May 2017 23:36:09 +0000 (23:36 +0000)]
Merge "stagefright: provide consumer usage hint to consumers that request it" into oc-dev

7 years agoMerge "stagefright: do not reconnect surface for tunneled playback" into oc-dev
TreeHugger Robot [Tue, 9 May 2017 23:17:48 +0000 (23:17 +0000)]
Merge "stagefright: do not reconnect surface for tunneled playback" into oc-dev

7 years agonuplayer: Do not notify EOS when paused
Haynes Mathew George [Mon, 13 Jun 2016 18:23:22 +0000 (11:23 -0700)]
nuplayer: Do not notify EOS when paused

Playback switches to next clip if a paused clip is seeked to EOS.
This happens as onDrainAudioQueue is allowed to fill buffer
when paused. During drain, EOS is notified even during paused state
and playback switches to next clip.

Avoid notifying EOS when paused.

authored-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Test: run mediaplayer
Bug: 38022556
Change-Id: I8261219615f4ce726e03d02b0cb3e71889a711d0
(cherry picked from commit b99e3649f468015f5156e71d02b11c2e2c236c58)

7 years agoAdd null check in setSidebandStream
Robert Shih [Tue, 9 May 2017 21:29:26 +0000 (14:29 -0700)]
Add null check in setSidebandStream

Bug: 38172844
Change-Id: I5d9a6b4c84b4c4cf9f5c9b1634a9cd35797c09b2

7 years agostagefright: lock mLock in codecBufferFilled
Chong Zhang [Tue, 9 May 2017 02:57:28 +0000 (19:57 -0700)]
stagefright: lock mLock in codecBufferFilled

The locking is to protect mOriginalTimeUs, adding to which is done
in emptyBuffer under mLock.

bug: 38111548
Change-Id: If7853e3fe50c68279ee5d74373b53bc34bd56cfd

7 years agoMerge "camera: Clarify ZSL supports" into oc-dev
TreeHugger Robot [Mon, 8 May 2017 22:28:29 +0000 (22:28 +0000)]
Merge "camera: Clarify ZSL supports" into oc-dev

7 years agoMerge "ACodec: transition to UNINITIALIZED after force release" into oc-dev
TreeHugger Robot [Mon, 8 May 2017 21:45:35 +0000 (21:45 +0000)]
Merge "ACodec: transition to UNINITIALIZED after force release" into oc-dev

7 years agostagefright: do not reconnect surface for tunneled playback
Lajos Molnar [Thu, 27 Oct 2016 00:32:21 +0000 (17:32 -0700)]
stagefright: do not reconnect surface for tunneled playback

Bug: 30608808
Change-Id: I9a6bb1660b6d0c030fda36de52dfad6fa398f2e2
(cherry picked from commit 2b85160ca0b468a11ee60e80d78747bb433c365c)
(cherry picked from commit 348cc8d612b507e6e09a7fbe3d3066f34f998017)

7 years agostagefright: provide consumer usage hint to consumers that request it
David Yeh [Wed, 16 Sep 2015 13:47:48 +0000 (21:47 +0800)]
stagefright: provide consumer usage hint to consumers that request it

Test: manual

Bug: 23471732
Change-Id: I41f7f0201d3676adf29b0a2ae017107b4675b07f
(cherry picked from commit c0a0e4c2261c6bcf5cb37297b8cf949c9c51a5c8)
(cherry picked from commit 3c665512fc867481bfbaa164fe817c83b1062112)
(cherry picked from commit d3d5eb6b63c79a990866fbd46fc06e8dd138f8b9)

7 years agoFix -Wextra warnings in frameworks/av/include
Colin Cross [Tue, 2 May 2017 17:32:56 +0000 (10:32 -0700)]
Fix -Wextra warnings in frameworks/av/include

hardware/qcom/display includes frameworks/av/include headers
while compiling with -Wextra.  Fix warnings that were hidden
by -isystem.

Bug: 31751828
Test: lunch bullhead-userdebug && m -j checkbuild
Change-Id: Ib1ee7165882ff3cc1d85c123815604079483f725

7 years agoMerge "Fix wait time for audio threads in suspend mode" into oc-dev
TreeHugger Robot [Fri, 5 May 2017 00:23:52 +0000 (00:23 +0000)]
Merge "Fix wait time for audio threads in suspend mode" into oc-dev

7 years agoaaudio: plug some resource leaks
Phil Burk [Wed, 3 May 2017 18:36:50 +0000 (11:36 -0700)]
aaudio: plug some resource leaks

Close some file descriptors for shared memory that were not getting closed.

Bug: 37947848
Test: see bug for test procedure
Change-Id: Icdc13188b0a49d08b67babff0852c3a4eda8fd2b
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMerge "aaudio: add setPerformanceMode()" into oc-dev
Phil Burk [Fri, 5 May 2017 00:08:44 +0000 (00:08 +0000)]
Merge "aaudio: add setPerformanceMode()" into oc-dev

7 years agoMerge "audioflinger: Do not report underruns for stopped or paused tracks" into oc-dev
TreeHugger Robot [Thu, 4 May 2017 22:55:12 +0000 (22:55 +0000)]
Merge "audioflinger: Do not report underruns for stopped or paused tracks" into oc-dev

7 years agoFix wait time for audio threads in suspend mode
rago [Wed, 3 May 2017 01:31:48 +0000 (18:31 -0700)]
Fix wait time for audio threads in suspend mode

Better estimation of wait time in suspended audio threads.

Bug: 34772697

Test: phone calls with BT headset.
Change-Id: Icf99c0671def810b57332a321e4de4680697715b

7 years agoaaudio: add setPerformanceMode()
Phil Burk [Mon, 1 May 2017 22:05:52 +0000 (15:05 -0700)]
aaudio: add setPerformanceMode()

The performance mode affects the latency and the implementation of the
data path.

MMAP is still disabled for now.

Bug: 37867485
Test: write_sine.cpp
Change-Id: I9bf5d5d13d1047d5ace69bd5ebdce7b6d65c14e7
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoaudioflinger: Do not report underruns for stopped or paused tracks
Mikhail Naganov [Wed, 3 May 2017 23:50:56 +0000 (16:50 -0700)]
audioflinger: Do not report underruns for stopped or paused tracks

PlaybackThread::Track is missing checks for the track state
when reporting underruns. These checks present on other instances
when tallyUnderrunFrames is being called.

This eliminates fake underrun reportings when playing
multichannel tracks via deep buffer.

Bug: 36181621
Test: play multichannel track and check underrun count at the end
Change-Id: Ieff338b33807e66df91234d85b782ee383fe95b9

7 years agoMerge "Camera: Cleanup 'CameraModule' dependend code" into oc-dev
TreeHugger Robot [Thu, 4 May 2017 07:30:54 +0000 (07:30 +0000)]
Merge "Camera: Cleanup 'CameraModule' dependend code" into oc-dev

7 years agoMerge "audio policy: always provide a valid device address when opening a stream...
TreeHugger Robot [Thu, 4 May 2017 01:02:29 +0000 (01:02 +0000)]
Merge "audio policy: always provide a valid device address when opening a stream" into oc-dev

7 years agoMerge "aaudio: Fix getFramesWritten() for callback mode." into oc-dev
Phil Burk [Wed, 3 May 2017 22:24:21 +0000 (22:24 +0000)]
Merge "aaudio: Fix getFramesWritten() for callback mode." into oc-dev

7 years agoDO NOT MERGE Bring Metrics summarizers over from master
Ray Essick [Tue, 2 May 2017 22:59:47 +0000 (15:59 -0700)]
DO NOT MERGE Bring Metrics summarizers over from master

Bring media metrics 'summarizer' construct across from master so
that we can use it in oc-dev.
This is the functionality described in b/36736083, along
with a bug fix (b/37276863).
Simple CP didn't work because of some header file movement.

the do-not-merge is because this is already in master as a couple
of separate commits and we don't want any auto-merger complaints.
(The Merged-in line documents the commit into master)

Bug: 37915543
Test: read 'dumpsys media.metrics -summary' output
Merged-in: I325c2d2b25720d384bcc75b73c97e5b3d8fa9731
Change-Id: I8d1c29c066f6289863e99379e4bd5989af5688ea

7 years agoaudio policy: always provide a valid device address when opening a stream
Eric Laurent [Wed, 3 May 2017 18:15:43 +0000 (11:15 -0700)]
audio policy: always provide a valid device address when opening a stream

Treble audio HAL mandates that a valid device address is passed when
opening an output or input stream and teh device type requires and
address.

Bug: 37905534
Test: USB capture at various sampling rates. Audio playback and capture regression
Change-Id: I12f2128120b1bbe8530e8c2428e3e2cba1ba1535

7 years agocamera: Clarify ZSL supports
Chien-Yu Chen [Wed, 3 May 2017 19:29:39 +0000 (12:29 -0700)]
camera: Clarify ZSL supports

For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG
template.

Test: make
Bug: 34689167
Change-Id: I5d793da299e3a6f01d3cac17a1ea2267274730f3

7 years agoACodec: transition to UNINITIALIZED after force release
Wonsik Kim [Wed, 3 May 2017 00:24:47 +0000 (17:24 -0700)]
ACodec: transition to UNINITIALIZED after force release

Bug: 37857940
Test: AuptTV
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: I583f955839d440aad96cf4bbccad05ed9e291700

7 years agoFix apps using Adobe AIR.
Elliott Hughes [Fri, 24 Mar 2017 00:19:43 +0000 (17:19 -0700)]
Fix apps using Adobe AIR.

Apps that use Adobe AIR are all broken because the symbol
_ZN7android9OMXClient7connectEv disappeared. If we use overloading
for OMXClient::connect rather than a default parameter, that gives
us another release to reach out to the app authors.

Bug: http://b/35325668
Bug: http://b/35454864
Bug: http://b/36106661
Bug: http://b/36263763
Bug: http://b/36501801
Bug: http://b/37176992
Test: ran broken apps
Change-Id: Ic310fc0e69be322f007601d23bb4bf82df215036
(cherry picked from commit 9f3f8dd774753c5ed2dfabde65d440182bfaa02e)

7 years agoaaudio: Fix getFramesWritten() for callback mode.
Phil Burk [Fri, 28 Apr 2017 22:17:32 +0000 (15:17 -0700)]
aaudio: Fix getFramesWritten() for callback mode.

Plus other small fixes for CTS and cleanup

Bug: 37910599
Test: test_aaudio.cpp
Change-Id: I65a23daf99e9de857d3ce9fd12e9f11c614e298e
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMerge "aaudio: fix mmap result checking" into oc-dev
Phil Burk [Tue, 2 May 2017 22:55:23 +0000 (22:55 +0000)]
Merge "aaudio: fix mmap result checking" into oc-dev

7 years agoaaudio: fix mmap result checking
Phil Burk [Mon, 1 May 2017 18:34:11 +0000 (11:34 -0700)]
aaudio: fix mmap result checking

Was checking for nullptr not MAP_FAILED

Bug: 33398120
Test: see mmap() docs
Change-Id: I02d178cb0188f8b0d6cd009699dccc7c97952e4b
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMerge "SurfaceUtils: query CONSUMER_IS_PROTECTED" into oc-dev
Jiwen Cai [Tue, 2 May 2017 15:59:21 +0000 (15:59 +0000)]
Merge "SurfaceUtils: query CONSUMER_IS_PROTECTED" into oc-dev

7 years agoMerge "aaudio: set errorCallback user data" into oc-dev
Phil Burk [Tue, 2 May 2017 15:58:32 +0000 (15:58 +0000)]
Merge "aaudio: set errorCallback user data" into oc-dev

7 years agoSurfaceUtils: query CONSUMER_IS_PROTECTED
Jiwen 'Steve' Cai [Sat, 22 Apr 2017 02:00:58 +0000 (19:00 -0700)]
SurfaceUtils: query CONSUMER_IS_PROTECTED

Using NATIVE_WINDOW_CONSUMER_IS_PROTECTED to check whether a native
window can handle protected buffers instead of expecting
GRALLOC_USAGE_PROTECTED as a consumer usage flag.

Bug: 35726763
Test: videoplayer-nodrm-protected.apk and videoplayer-drm-protected.apk
both works.

Change-Id: I67a324161dff22e6efd949f2ab988c2349cd6bcc

7 years agoaaudio: set errorCallback user data
Phil Burk [Tue, 2 May 2017 00:04:46 +0000 (17:04 -0700)]
aaudio: set errorCallback user data

Without this, a nullptr could be passed to the callback instead of
userData.

Bug: 37873111
Test: difficult to test because it requires an error to occur.
Change-Id: I3f262410e0465a8192da2494cadfdb4f8d2188a7
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoCamera service: Don't crash if the camera HAL dies mid-use.
Eino-Ville Talvala [Thu, 27 Apr 2017 19:48:33 +0000 (12:48 -0700)]
Camera service: Don't crash if the camera HAL dies mid-use.

Check for transaction errors in all calls to the HIDL interface;
return DEAD_OBJECT consistently if a transaction error occurs.

Test: Camera CTS does not regress; killing camera HAL does not kill camera service.
Bug: 37748853
Change-Id: Iab3ad08376e164db340f8f29c3cfc7fdf261cc00

7 years agoMerge "GenericSource: close unused file descriptor" into oc-dev
Andy Hung [Mon, 1 May 2017 20:30:25 +0000 (20:30 +0000)]
Merge "GenericSource: close unused file descriptor" into oc-dev

7 years agoMerge "aaudio: apply volume in the MMAP data path" into oc-dev
TreeHugger Robot [Mon, 1 May 2017 20:21:47 +0000 (20:21 +0000)]
Merge "aaudio: apply volume in the MMAP data path" into oc-dev

7 years agoMerge "Minor updates AHardware accessor in AImageReader" into oc-dev
TreeHugger Robot [Mon, 1 May 2017 19:44:20 +0000 (19:44 +0000)]
Merge "Minor updates AHardware accessor in AImageReader" into oc-dev

7 years agoGenericSource: close unused file descriptor
Andy Hung [Mon, 1 May 2017 16:51:40 +0000 (09:51 -0700)]
GenericSource: close unused file descriptor

Test: dumpsys media.player with photos, ringtone
Bug: 37792834
Change-Id: I04e0f05ea642e3bfe5e6af12bfabea69838716b4

7 years agoaaudio: apply volume in the MMAP data path
Phil Burk [Thu, 20 Apr 2017 20:03:19 +0000 (13:03 -0700)]
aaudio: apply volume in the MMAP data path

The volume scaling is in AudioStreamInternal and not the mixer
because we will need volume scaling in EXCLUSIVE mode too.

Bug: 37518243
Test: play a tone using NativeOboe app then press volume keys
Change-Id: Ibbac9770ea4493f8ade64681be86f109a92803cd
Signed-off-by: Phil Burk <philburk@google.com>
7 years agoMinor updates AHardware accessor in AImageReader
Jiwen 'Steve' Cai [Sat, 22 Apr 2017 00:13:18 +0000 (17:13 -0700)]
Minor updates AHardware accessor in AImageReader

1/ Be more explicit about what usage/format combination is supported.
2/ Get rid of usage1 following the same change in AHardwareBuffer.
3/ No more gralloc1 usage, so don't call android_convertGralloc1To0Usage
anymore.

Bug: 35114769
Bug: 37097572
Test: Ran AImageReaderCts
Change-Id: Ic712d0ac5bd86b2c4c68815125ba9037212dfd65

7 years agoMerge "audiohal: Always load A2DP module locally" into oc-dev
TreeHugger Robot [Sat, 29 Apr 2017 21:06:54 +0000 (21:06 +0000)]
Merge "audiohal: Always load A2DP module locally" into oc-dev

7 years agoMerge "Reporting the player's data source type in media analytics" into oc-dev
Hassan Shojania [Sat, 29 Apr 2017 00:45:46 +0000 (00:45 +0000)]
Merge "Reporting the player's data source type in media analytics" into oc-dev

7 years agoMerge "Prefix ENABLE_MEDIADRM_64 with TARGET_" into oc-dev
TreeHugger Robot [Fri, 28 Apr 2017 23:56:37 +0000 (23:56 +0000)]
Merge "Prefix ENABLE_MEDIADRM_64 with TARGET_" into oc-dev

7 years agoMerge "IMediaExtractor: ensure users to check returned value by getTrack." into oc-dev
TreeHugger Robot [Fri, 28 Apr 2017 23:15:44 +0000 (23:15 +0000)]
Merge "IMediaExtractor: ensure users to check returned value by getTrack." into oc-dev

7 years agoaudiohal: Always load A2DP module locally
Mikhail Naganov [Fri, 28 Apr 2017 01:52:37 +0000 (18:52 -0700)]
audiohal: Always load A2DP module locally

This makes legitimate unix socket interaction between A2DP
module and the Bluetooth stack.

Implemented by allowing both "local" and "hidl" interface
wrappers to co-exist for devices and streams. A "hybrid" device
factory is introduced to create an appropriate implementation
of a device depending on the requested module name.

Bug: 37640821
Test: Play Music over BT headset
Change-Id: I5592961dd5b56840418fb122680979d11a261b6c

7 years agoReporting the player's data source type in media analytics
Hassan Shojania [Wed, 26 Apr 2017 22:10:42 +0000 (15:10 -0700)]
Reporting the player's data source type in media analytics

Bug:  37720861
Test: metrics dumpsys
Change-Id: I44eb7049f10aa4f89c9e7b0de6b47d169129d15d

7 years agoIMediaExtractor: ensure users to check returned value by getTrack.
Wei Jia [Fri, 28 Apr 2017 17:20:07 +0000 (10:20 -0700)]
IMediaExtractor: ensure users to check returned value by getTrack.

Test: fix the crash from the stream in the bug.
Bug: 37777357
Change-Id: Ia99907c396a2074a9419db9b8103a9325b290169

7 years agoMerge "audiohal: Support stateful downmixer effects" into oc-dev
Mikhail Naganov [Fri, 28 Apr 2017 15:29:21 +0000 (15:29 +0000)]
Merge "audiohal: Support stateful downmixer effects" into oc-dev

7 years agoCamera: Cleanup 'CameraModule' dependend code
Emilian Peev [Tue, 11 Apr 2017 13:29:43 +0000 (14:29 +0100)]
Camera: Cleanup 'CameraModule' dependend code

CameraModule is already part of the HIDL wrapper and
is no longer needed in the service code.
Add extra logic in camera provder manager for identifying
camera API1 compatible devices.

Bug: 34392075
Test: Complete Camera CTS
Change-Id: I64a49e9091557c88859872d0c599c5be378db8b5

7 years agoPrefix ENABLE_MEDIADRM_64 with TARGET_
John W. Bruce [Thu, 27 Apr 2017 19:06:44 +0000 (12:06 -0700)]
Prefix ENABLE_MEDIADRM_64 with TARGET_

This build-time flag should be prefixed.

Bug: 37039525
Test: Built OS
Change-Id: I09ab0a1ed672a88db5741102d87973eb9267efb3

7 years agoMerge "Plumb gralloc producer/consumer bits correctly" into oc-dev
Mathias Agopian [Fri, 28 Apr 2017 00:29:28 +0000 (00:29 +0000)]
Merge "Plumb gralloc producer/consumer bits correctly" into oc-dev

7 years agoMerge changes from topic 'device_version_cleanup' into oc-dev
TreeHugger Robot [Thu, 27 Apr 2017 22:28:04 +0000 (22:28 +0000)]
Merge changes from topic 'device_version_cleanup' into oc-dev

* changes:
  Camera: Cleanup 'Camera2Client' device dependend code
  Camera: Remove RAW boost value override logic
  Camera: Remove AE pre-capture trigger cancel override
  Camera: Make device related code version agnostic

7 years agoPlumb gralloc producer/consumer bits correctly
Mathias Agopian [Mon, 24 Apr 2017 21:49:13 +0000 (14:49 -0700)]
Plumb gralloc producer/consumer bits correctly

Bug: 33350696
Test: compile, boot device, cts
Change-Id: Ie05bcac25557a7c570ccadc850adb7c9697e144d

7 years agoaudiohal: Support stateful downmixer effects
Mikhail Naganov [Thu, 27 Apr 2017 00:22:00 +0000 (17:22 -0700)]
audiohal: Support stateful downmixer effects

Fraunhofer's downmixer has additional buffering, this is incompatible
with how DownmixerBufferProvider used to process incomplete buffers.

Now the effects HIDL wrapper delivers frameCount updates in
audiobuffers to the server side. This fixes playback of multichannel
sound streams.

Bug: 36181621
Test: play 5.1 track from Play Music
Change-Id: I3b2cd097d61873c6ba329f1a574235ac88b21cac

7 years agoMerge "audioflinger: improve mmap stream volume" into oc-dev
TreeHugger Robot [Thu, 27 Apr 2017 17:19:55 +0000 (17:19 +0000)]
Merge "audioflinger: improve mmap stream volume" into oc-dev

7 years agoMerge "VolumeShaper: Improve restore" into oc-dev
Andy Hung [Thu, 27 Apr 2017 16:19:39 +0000 (16:19 +0000)]
Merge "VolumeShaper: Improve restore" into oc-dev

7 years agoMerge "Modular DRM for MediaPlayer/Removing mimes report" into oc-dev
Hassan Shojania [Thu, 27 Apr 2017 13:42:17 +0000 (13:42 +0000)]
Merge "Modular DRM for MediaPlayer/Removing mimes report" into oc-dev

7 years agoMake IOmx registration independent of IOmxStore
Pawin Vongmasa [Thu, 27 Apr 2017 04:24:30 +0000 (21:24 -0700)]
Make IOmx registration independent of IOmxStore

This CL allows IOmx to attempt registration even when IOmxStore fails to
register.

Test: Manual use of Camera

Bug: 37657124
Bug: 37726880
Change-Id: I108c507326ee55c17acc524233e70afa5cb5a4f0

7 years agoMerge "stagefright: prevent component to be stuck on error" into oc-dev
TreeHugger Robot [Thu, 27 Apr 2017 00:31:02 +0000 (00:31 +0000)]
Merge "stagefright: prevent component to be stuck on error" into oc-dev

7 years agoMerge "GraphicBufferSource: remove free codec buffers only when submitted to codec...
TreeHugger Robot [Thu, 27 Apr 2017 00:17:06 +0000 (00:17 +0000)]
Merge "GraphicBufferSource: remove free codec buffers only when submitted to codec" into oc-dev

7 years agoMerge "AudioMixer: fix assertion for multichannel playback" into oc-dev
Andy Hung [Wed, 26 Apr 2017 23:29:15 +0000 (23:29 +0000)]
Merge "AudioMixer: fix assertion for multichannel playback" into oc-dev

7 years agostagefright: prevent component to be stuck on error
Wonsik Kim [Tue, 18 Apr 2017 18:56:31 +0000 (11:56 -0700)]
stagefright: prevent component to be stuck on error

Bug: 36818684
Bug: 34983882
Test: Run the command below on Nexus Player overnight:
while true ; do adb shell am instrument -e class 'android.platform.tv.tests.aupt.YouTubeTests'  -w 'android.platform.tv.tests.aupt/android.support.test.aupt.AuptTestRunner' ; done
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: I9663c3d62d97c3f5db0af6c30f39bb59cbc7e3e7

7 years agoMerge "Stub implementation for IOmxStore." into oc-dev
Pawin Vongmasa [Wed, 26 Apr 2017 22:58:29 +0000 (22:58 +0000)]
Merge "Stub implementation for IOmxStore." into oc-dev

7 years agoGraphicBufferSource: remove free codec buffers only when submitted to codec
Lajos Molnar [Wed, 26 Apr 2017 22:19:47 +0000 (15:19 -0700)]
GraphicBufferSource: remove free codec buffers only when submitted to codec

Bug: 37556535
Change-Id: I516c0a2fc6c78e937360a2a5c2a3dcdea1d07370

7 years agoModular DRM for MediaPlayer/Removing mimes report
Hassan Shojania [Thu, 20 Apr 2017 22:25:39 +0000 (15:25 -0700)]
Modular DRM for MediaPlayer/Removing mimes report

Bug: 34559906
Test: GTS Tests
Change-Id: I6877b9ac4ffd36f0ed476c3b4bbb0770da5abaf6

7 years agoVolumeShaper: Improve restore
Andy Hung [Fri, 21 Apr 2017 22:07:45 +0000 (15:07 -0700)]
VolumeShaper: Improve restore

Consider whether VolumeShaper has been started or not when
restoring (position). If the VolumeShaper hasn't been started
we restore in that state.  If it has been started already,
we advance to the end assuming the duration has been played out.

Test: CTS and headset / kill audioserver
Bug: 37536598
Change-Id: I4b55dca6f6a859563fd20bad4c8f67d2c92321c0

7 years agostagefright: don't actually acquire graphic buffer when we don't want to
Lajos Molnar [Wed, 26 Apr 2017 01:08:42 +0000 (18:08 -0700)]
stagefright: don't actually acquire graphic buffer when we don't want to

Bug: 37556535
Change-Id: Ic9d2bddd12c8a750c4d285a1915ac3f4455aceae

7 years agoAudioMixer: fix assertion for multichannel playback
Andy Hung [Tue, 25 Apr 2017 23:47:52 +0000 (16:47 -0700)]
AudioMixer: fix assertion for multichannel playback

Reset mPostDownmixReformatBufferProvider before changing
downmixerBufferProvider.

Test: Play Music with multichannel files
Bug: 27526910
Change-Id: I5803e169cb9da4e7681bc8caf1452e79e5a4d1d5

7 years agoMerge "aaudio: change samplesPerFrame() to channelCount()" into oc-dev
TreeHugger Robot [Tue, 25 Apr 2017 19:42:26 +0000 (19:42 +0000)]
Merge "aaudio: change samplesPerFrame() to channelCount()" into oc-dev

7 years agoCamera: Cleanup 'Camera2Client' device dependend code
Emilian Peev [Mon, 10 Apr 2017 13:45:09 +0000 (14:45 +0100)]
Camera: Cleanup 'Camera2Client' device dependend code

Bug: 34392075
Test: Manual using application.
Change-Id: I365b83c9cfbfe3ddbd9d41f2aa9788490b87b5cf

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 agoaaudio: change samplesPerFrame() to channelCount()
Phil Burk [Tue, 25 Apr 2017 00:04:01 +0000 (17:04 -0700)]
aaudio: change samplesPerFrame() to channelCount()

Both functions provided for now.
Will remove deprecated function in later CL.

Bug: 37646784
Test: write_sine.cpp and write_sine_callback.cpp
Change-Id: I1241aafa206112c526d6ca250ba5209489e1a46e
Signed-off-by: Phil Burk <philburk@google.com>
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 agoStub implementation for IOmxStore.
Pawin Vongmasa [Tue, 25 Apr 2017 12:06:20 +0000 (05:06 -0700)]
Stub implementation for IOmxStore.

Test: Small CtsMediaTestCases

Bug: 37657124
Change-Id: I5728a12d000223231600ab3c3ab4eb044dd1847d

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