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
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>
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
Call the MmapStreamInterface from AudioFlinger instead of the FakeHAL.
Fix sending timestamps from the thread.
Add shared mode in service.
Bug: 35260844
Bug: 33398120
Test: CTS test_aaudio.cpp
Change-Id: I44c7e4ecae4ce205611b6b73a72e0ae8a5b243e5
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 7f6b40d78b)
Do not trigger the callback for recording events when the patch
handle is NONE, the patch handle will be updated for the
recording session later.
When stopping recording, only stop the record thread if the
track is not active, not if it's not the first one.
Test: cts-tradefed run cts-dev -m CtsMediaTestCases -t android.media.cts.AudioRecordingConfigurationTest
Bug: 36569938
Change-Id: I1b7445ef4115d6337ba7b926f7e6b068361926a7
Appending to a source with valid vendor id from a metadata without
vendor id should be supported.
Bug: 37198452
Test: CameraProviderManagerTest.MultipleVendorTagTest
Change-Id: Ic0b160216386fcfe1aa57b7e4a363b405459b3d0
Bug: 36481537
Test: logcat does not show "Waiting for service media.log"
Change-Id: Ia69b679d3b1f1dd292237c63855ff650566df133
(cherry picked from commit 04b96fc3a6)
-- Update pre-compiled xml files due to a misalignment with
EDD files from previous bug fixes.
-- Add support for AUDIO_USAGE_ASSISTANT in engineconfigurable.
-- Fix UsbDevice select for strategy accessibility.
Volume cannot be changed when play music via UsbHeadset.
Strategy accessibility selects Speaker instead of UsbHeadset
This corrects the device selected by accessibility strategy.
-- Fix Sonification respectful with A2DP devices issue. No
notification sound is heard on BT A2DP devices. This
corrects the applicable list of audio output devices in
case of Sonification Respectful strategy.
Bug: 37157254
Test: built angler with CAP enabled
Change-Id: Ie6b401d28d3211846bb2b5345509d80f31440708
Signed-off-by: David Brageul <david.brageul@intel.com>
Signed-off-by: Mohamed LAHMADI <mohamedx.lahmadi@intel.com>
Include mFrameCount in shared memory corrupt error log.
Fix typo in log for primary audio interface.
Include the new server frame count in logs for fast tracks.
Always log when fast is successful for output tracks, as it helpful
(was already there for input).
Cleanup dumpsys for threads.
Bug: 37153050
Test: builds OK, and logs contain more information
Change-Id: I2b5b4d700e8eb7c261a3125fb03ddc00bf08537e
(cherry picked from commit 1bfe09a0b1)
Changes for the new HAL structure have brought about a build time
circular dependency between libmedia and libmediadrm. This set of
changes the media metrics code into its own library and arranges
for the relevant consumers of the media metrics code to link
to this new library (where they had previously picked it up by
including libmedia).
Bug: 36990807
Test: build, boot.
Change-Id: I81768eecca88d5e59e6e6e547f29308a94e30c7b
Different vendors could have different vendor tags.
A global vendor tag cache will store all available
vendor tag descriptors from different providers.
The cache will then be shared with each camera client.
Camera metadata will use specific vendor ids stored
in the metadata buffer to identify the correct vendor
tag provider.
Bug: 34275821
Test: adb shell /data/nativetest/cameraservice_test/cameraservice_test
--gtest_filter=CameraProviderManagerTest.MultipleVendorTagTest
Complete Camera/Camera2 CTS tests
Change-Id: I2262128f21a0167504f018230624e2a89786c467
Mark immediate zoom as not supported in case the camera has
maximum digial zoom close to 1. This will avoid corner
cases wehere we can have 'NUM_ZOOM_STEPS' all equal to 1.
Bug: 33093106
Test: Complete CameraTest CTS package
runtest -x cts/tests/camera/src/android/hardware/cts/
Change-Id: I039276385de74192375f36b1504dd89cb8ae0c52
AE/AWB lock availability is present in the camera static metadata.
Check whether they are supported before advertising them in Camera
Parameters.
Bug: 33091727
Test: Complete CameraTest CTS
runtest -x cts/tests/camera/src/android/hardware/cts/
Change-Id: I9a8cc8ffcc28b6b476904c3c011ab0ec65b162c9
To cleanup caches of obsolete buffers.
This CL addressed the input stream bit, the output
stream hook will be a followup CL.
Also cleanup some dead API in CameraDeviceBase.h
Test: fix CTS ReprocessCaptureTest
Bug: 34461678
Change-Id: I801cd81c29becaa45630ed0a5c2dab8df1278a6a
Make it possible for clients to clear the internal inflight queue
as part of error result notifications. For this to work all pending
buffers must be returned previously with the exception of the
result metadata.
Bug: 35652756
Test: Complete Camera/Camera2 CTS without any regressions.
Change-Id: I9d8a6b63364fd254311cda2f8c836b99ee05cacb
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: 34274385
Change-Id: I5251fea337f33460d1f0db174cedc465822f2a47
Otherwise some bits aren't where they're supposed to be.
Also stop using HW_CAMERA_ZSL; we need to only set HW_CAMERA_READ, and it's
confusing to set a producer flag on the consumer usage side.
Test: Camera CTS passes
Bug: 35215313
Change-Id: I23e6e60bf875fe9d8f2d7a1f805d2ef854c16b97
We are ready for devices to begin migrating to a 64-bit Media DRM
Server. However, not all devices are ready to make this jump yet. A
device needs to have all of its DRM Plugins ready to run as 64-bit
before it can do this. This includes having 64-bit hardware
integrations.
So that devices can turn on 64-bit support as they get ready, I am
adding flags that can be set in a device's device.mk file. There are two
parts:
* ENABLE_MEDIADRM_64 enables building the mediadrmserver as 64-bit.
* Setting drm.64bit.enabled=true in PRODUCT_PROPERTY_OVERRIDES switches
mediadrmserver to searching for DRM Plugins in the 64-bit directory.
Test: Validated that turning on these flags enables a 64-bit
mediadrmserver that loads 64-bit DRM Plugins from the lib64
directory (after setting DISABLE_TREBLE_DRM to true to load this
code as opposed to the Legacy DRM Plugin HAL)
Bug: 36076017
Change-Id: I141cfd57ff75b40c8b0cb40a5bf1439a1ab5b766
Remove binder call to MediaServer for reading files.
Test: Photos, Play Music, Play Movies, Youtube
Bug: 29125703
Change-Id: Id6abf592bf6d70b81158f6038b1982f0a537b9b9
Method 'indexOfKey' will return 'NAME_NOT_FOUND' error
status in case it doesn't find any values matching the
given key. Checking for anything other than this error
code could lead to instabilities.
Bug: 35925482
Test: Manual using application
Change-Id: Ie72eb29776b27a6d485f6e42ee7e62c62795ca9e
(cherry picked from commit 4219c290e5)
Add missing rules for USB headset devices in routing, volume and effects
management.
Test: playback and catpure regression tests.
Change-Id: I42cd157f483deba2371a05d332cd11dceb2b2fa3
Do not guard against mismatching usage flag and data space for
IMPLEMENTATION_DEFINED formats, so that different formats can share
the same stream if HAL support is available.
Test: Camera CTS
Bug: 33777818
Change-Id: I62a1f458c06ae417c9a2c407d433319a1158fdcc
Test: Camera, Photos, YouTube, and Play Movies apps.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Bug: 35328855
Change-Id: I0f36683b531fc645835a94e449996e5b44d0a3de
With Camera HAL sending empty metadata for HFR batching, service
shouldn't check matching timestamp for empty metadata.
Test: Manually test high speed recording
Bug: 35775704
Change-Id: I68f3c16ea9a91f15c70e406540764b02cb6951e1
Also, merge android.hardware.media.omx@1.0-impl into libstagefright_omx.
Test: With CtsMediaTestCases.apk installed,
adb shell am instrument -e size small -w
'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Test: Manual use of Camera, Photos, Play Movies and YouTube apps.
Test: Manual use of screen mirroring.
Bug: 33854657
Change-Id: Ie927bcafd86dc7e9509bb8b76bb3b51f9a423cc7
- Register and handle camera provider deaths
- Check for transport errors on all provider calls
- Clean up provider callback locking
Test: No camera CTS regressions
Bug: 35096594
Bug: 35441122
Change-Id: I08117f38f5201368a28093debdbcae67a68a4e7
There is only one function declared in that header file, and it is
mono_blend, so a more specific filename may be easier to understand.
Test: compiles OK
Change-Id: Ie2aec6c706b1822581b34d3702818b8200a1db8a
For High Speed Recording, only send the shutter and result for the last
request in the batch, and count on the application process to derive
other results in the batch.
This reduces the binder transaction between the two processes, and saves
power.
Test: Manually test high speed recording with GCA, and CTS
Bug: 35775704
Change-Id: I3e1b4c1db3d1d1044400d825e2affa4461362b39
When Camera2Client uses Camera3Device, it operates with lazy stream
configuration (in which streams are configured only once a capture
request is going to actually be sent). In this path, the operating
mode may never get set to a valid mode, and thus always fail
stream configuration.
Ensure that all paths calling into configureStreamsLocked set the
appropriate operating mode.
Test: Actually no camera CTS regressions this time, honest!
Bug: 34853980
Change-Id: I6e1855206f6d76cca5ff8348555b26bd7b868843
Instead of a true/false switch for high-speed mode, use an integer
enum instead and define the two existing modes, plus the start
of a vendor mode space.
For all non-high-speed modes, use the normal configuration path,
but pass the operating mode to the HAL.
Test: New CTS test passes
Bug: 34853980
Change-Id: I9dc2b2a2164e9779f079a30e936c4117bcf96efe
Whitelist recvmsg so that mediaextractor and mediacodec can get an
output fd from tombstoned.
Bug: http://b/35858739
Test: debuggerd -b `pidof media.codec`
Change-Id: I2126da6c77bde739ae37c48b1a13dcefc6482a64
- All the required SoundTrigger models of a module client
are not getting unloaded and removed as part of detach.
- mModels.size() is evaluated for every iteration which
gives current size of vector which results in exit of
loop without checking for all models in case elements
are removed in loop.
removeItemsAt would modify the vector indices for each
iteration and this would result in skipping access of
some models.
- Iterate from end of models to check and unload.
Bug: 35910617
Test: mmm frameworks/av/services/soundtrigger/
Author: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Change-Id: I72415e53d2e6f366f8ba6e6eeb0cd8323364a231
Some interactions between camera service and hwservicemanager require
multiple threads to execute without deadlocks, such as calling
getService() from within an onRegistered() callback.
Increase thread count to 3 to accomodate.
Also switch the order of listener registration and legacy provider
addition back to what it was originally.
Test: No deadlock when camera service is restarted
Bug: 35096594
Change-Id: I6def961d5765958fef284c0a1820e903abc851ef
- Merge notifyRequestedSurfaces into getBufferLocked, so that during
getBufferLocked, the stream splitter gets to know which outputs the
current request is on.
- Reserve buffer slot in the output queue during getBufferLocked instead
of during onFrameAvailable. So if there is no slot/buffer available, no
new request is sent to HAL. This aligns with current cameraservice logic.
Do not hold the lock while calling attachBuffer to output queue because
it could block for a slow consumer.
- Instead of setting the consumer buffer count of input buffer queue to
maximum of all shared outputs, set it to sum of them. By doing this,
In the case of a slow consumer, other consumers sharing the same stream
won't be impacted.
- Handle the case where onBufferReleased not being fired for buffer
replaced by attachBuffer/queueBuffer.
- Add function to check the return value of onFrameAvailable so that
when output is abandoned, the error code is propagated back to
queueBuffer.
Test: Camera CTS, and CTS with StreamSplitter enabled for all
implementation defined use cases.
Bug: 33777818
Change-Id: I863f501d5283bbe70c71e66b4d37d690484b90fa
Previously, vendor customization to seccomp policy was combined
with the platform's policy at build time. In order to remove
frameworks dependencies on the device folder, this policy
combination is being moved to runtime.
For mediacodec and mediaextractor, platform seccomp policy specified
in the frameworks will be loaded from /system/etc/seccomp_policy.
Optional vendor customizations must reside in
/vendor/etc/seccomp_policy. If the vendor policy exists, it will be
concatenated to the end of the platform policy and loaded, otherwise
just the platform policy will be loaded.
Bug: 34723744
Test: Dragon, Marlin, Muskie build and boot.
Test: Watch videos on youtube no seccomp violations observed.
Test: For both mediacodec and mediaextractor verify
"cat proc/<pid>/status | grep Seccomp" == Seccomp: 2
Change-Id: I08b79b207785df69add31e4662e2c33fa28b4f4d
The macros __force, __bitwise, __user are related to a kernel tool called
sparse to find kernel bugs. These macros are always defined as nothing
in the current uapi kernel header files, so these don't need to be here.
Change-Id: I37ab48123a85b3f9b8f67920e9d56cf518b32597
Test: Builds without warningers/errors.
Also clean up some other dependencies.
Test: Manual testing with Camera, YouTube and Play Movies apps.
Bug: 35445903
Change-Id: I28562b5fbcc7054cf45c4ec2530bbe2ab4b5645f
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds
Bug: 33844934
Change-Id: I22817cae1d5ce023db6e8b935ebff65e0abdf026
The current sequence of registering for provider notifications
and trying to add a legacy provider could introduce a race
condition leading to a deadlock. The "onRegistration" callback
will try to acquire "mInterfaceMutex" which is still held during
the execution of "addProvider" for legacy. However "addProvider"
could get suspended waiting on the HIDL provider interface. If this
happens and the same thread that unblocks the service query tries
to notify the provider manager, then we will end up in a deadlock.
To avoid this, the initialization sequence can be modified a bit.
First add the legacy provider and then register for notifications.
Bug: 35096594
Test: Manual using stop/start of cameraserver
Change-Id: Ia381ae6bf567525cabd3f51246a192ddac37b7f8
Treblization requires to locate partner-specific configs in its own
partition. So the audio policy xml config file could be located in
/odm/etc or /vendor/etc.
This CL is to support those locations for the config.
Test: building succeeded and tested on sailfish.
Bug: 35369237
Change-Id: Ie59db630456f7690bbeca08017bea8b174651394
A lot of media makefiles didn’t specify libui or
libgui but included headers from these libraries
directly.
It works because these headers are on the global
include path. With this change, though, rect.h
is not anymore (albeit exported from libui).
Test: built and booted device
Bug: 35164655
Change-Id: I72e8f0b7bd25c6a67eedc17afe52c4c484a147fe
Removed typedefs like aaudio_sample_rate_t
Removed use of handles. Just pass back opaque pointers.
Simplified gettersi in Stream.
Removed getters from Builder.
Update libaaudio.map.txt
Test: CTS test_aaudio.cpp
Change-Id: I63eaec3e5a8ecc516cfc1f950f4b4f54df1bd518
Signed-off-by: Phil Burk <philburk@google.com>
The return value of SetUpMinijail is not being checked.
media.codec and media.extractor should not run without Seccomp if
there's a policy.
Bug: 34723744
Test: media.codec, media.extractor start, have Seccomp.
Test: cat /proc/`pgrep .codec`/status | grep Seccomp
Seccomp: 2
Test: cat /proc/`pgrep .extractor`/status | grep Seccomp
Seccomp: 2
Change-Id: I30c59d3193b3ebc8beace221741889afa2bbc8ae
1. Toggling between Treble and non-Treble OMX will now be controlled by
two properties: "persist.hal.binderization" and
"persist.media.treble_omx". (Before this CL, this was controlled by
"debug.treble_omx".)
- If persist.media.treble_omx is not set, it will assume a default value
of -1.
- If persist.media.treble_omx is -1, persist.hal.binderization will be
used to determine whether OMX will be created as a Treble or non-Treble
service.
- If persist.media.treble_omx is 1, OMX will be created as a Treble
service.
- If persist.media.treble_omx has any other value, OMX will be created
as a non-Treble service.
- persist.media.treble_omx can be changed without rebooting, but it will
only take effect after media.codec and mediaserver processes are killed.
2. Remove all dependencies on non-Treble service. This was not done for
MediaCodec, MediaPlayerService::Client, MediaRecorderClient, stagefright
command, and omx_tests command. OMXClient and media.codec process will
now pick the right version of OMX based on properties mentioned above.
Before this CL, media.codec would always present the non-Treble version
of OMX regardless of the flag.
3. Provide workarounds for some HIDL issues.
- A sequence of nested binder and hwbinder calls require many threads to
handle. (b/35283480) The workaround is to increase the number of threads
in the thread pool of media.codec process.
- android.hidl.base@1.0::IBase::unlinkToDeath takes a strong pointer
instead of a weak pointer. (b/35233970) This causes an infinite
recursion in the destructor of ServiceDeathNotifier in
MediaPlayerService::Client and MediaRecorderClient. The workaround moves
calls to unlinkToDeath() outside of the destructor.
Test: Recorded and played videos with Camera app. Ran stagefright and
omx_tests commands.
Bug: 31399200
Change-Id: Id1940ed982838e10bf10fe8ed5b7bb912a5a2d3a
Also avoids issues with FastMixer and BT suspend.
Test: BT with Play Movies
Bug: 34335167
Bug: 35166960
Bug: 35384619
Change-Id: Ie1bfaf2d09b7cfe6b86a1d26fc1d5fdabf82c020
This reverts commit e3b713d4b7.
Bug: 35151407
Bug: 35041785
Test: verified with Play Movies on fugu
Change-Id: I7bb2be082cc97e7993aa14f1550b3935ad3661c8
That way we can modify this code in one place to take a list of seccomp
policy files.
This CL removes around 70 lines by unifying identical code. No change
in behavior.
Bug: 34723744
Test: media.codec, media.extractor start, have Seccomp.
Test: cat /proc/`pgrep .codec`/status | grep Seccomp
Seccomp: 2
Test: cat /proc/`pgrep .extractor`/status | grep Seccomp
Seccomp: 2
Change-Id: Ia8be7b9c3d6163804d2a45954f8d03315ae32e7a
The VolumeShaper is used to apply a volume
envelope to an AudioTrack or a MediaPlayer.
Test: CTS
Bug: 30920125
Bug: 31015569
Change-Id: I42e2f13bd6879299dc780e60d143c2d465483a44
If the application calls finalizeOutputConfiguration without adding new
surface, as long as there is at least one surface in the
OutputConfiguration, do not throw exception.
Add logic to not allow finalizeOutputConfigurations twice on a
particular stream.
Test: testDeferredSurfaces cts and GoogleCameraApp manual test.
Bug: 35137641
Change-Id: I96061231e9b884e73c92520e7f2c021db32fa731
Make sure AudioRecord clients are invalidated synchronously
when closing an input stream instead of when the capture thread
exits.
Fix AudioPolicyManager::getInputForDevice() logic to make sure that
not only the first opened input encountered is considered when looking
for a compatible input to reuse for concurrent capture.
Bug: 22702906
Test: run CTS test
Change-Id: I7f69609d4ee70a37ab06753ff970b12df17d885b
HALs are prohibited from using framework binder, and there is
no equivalent scheduling policy service in hwbinder. Thus, in order
to match priorities of FastCapture / Mixer threads with their
counterparts in the HAL, it is needed to request the priority boost
from audioflinger on behalf of the HAL.
Test done to verify the priority was correctly set.
Bug: 34131400
Change-Id: If8b6b031c0fcba771fae901a5b8e7da89b3a1570
Test: check priority match between audioflinger's and hal's threads
If two application are playing a compatible offload stream at the same
time.
Eg: two games playing MP3. At least one not taking the audio
focus.
The audio policy was offloading both stream resulting in audio glitches
and one stream being dropped.
Concurrent offload streams is intended to be a transitioning state when
an application wants back to back playbacks.
It should not be allowed for two different applications to stream at the
same time.
Test: Play mp3 while mp3 is already offloaded.
Bug: 34012147
Change-Id: I98a8913d6faf5092a1e43a0bdd0f1ce1482221a9
Signed-off-by: Kevin Rocard <krocard@google.com>
This is needed so that an app can request a larger buffer.
Also fix a bug related to passing configuration data to the service.
Test: test_aaudio.cpp
Change-Id: Idd3066c84f6bac76a5d545b12081bc311025a6c3
Signed-off-by: Phil Burk <philburk@google.com>
To work around an issue where future dlopen()
of libraries depending on libhidltransport works
correctly.
Bug: 35041785
Test: secure video playback works again
Change-Id: I6e01dae16761044e5c89dad593aeca946c96b7bd
We shouldn't skip the device metadata dump when the camera is not
in use.
Test: adb shell dumpsys media.camera works
Bug: 35125905
Change-Id: I26e2a612efa55b3289adb160c90d3fbc95bb4085
CTS test case 'testCameraManagerInvalidDevice' will try
to query the static characteristics of invalid devices.
The supported camera API will also get checked as
part of the current call flow. A camera device access
exception will be thrown which is not expected. The
correct exception should be "IllegalArgumentException".
BUG: 35095452
Test: run cts -m Camera -t
android.hardware.camera2.cts.CameraManagerTest#testCameraManagerInvalidDevice
-d -o --abi armeabi-v7a --disable-reboot
Change-Id:I055deea116d5f3a69ed1a47b00d820be88a87232
Identified by static analysis as a potential problem.
Test: mmma frameworks/av/services/soundtrigger
Change-Id: If24519faeec260c3d357b369d53d0f68689bdf8a
Use both oom score and process state for client eviction.
The score will have higher priority over the process state.
This should resolve the state ambiguity when PiP clients
try to connect to exclusive camera resources while
foreground clients are running.
BUG: 34701266
Test: Manual testing, complete CTS Camera package
Change-Id: Ic775b011a20e50f9c0c1c0a4bc1cf7ca75410740
Currently this path relies entirely on the deprecated bi-directional
streams. This needs to be re-worked and the functionality should
only use input&ouput streams. In this case the dedicated
'Camera3ZslStream' module becomes mostly obsolete. Some of the logic
for buffer comparison will still be needed and can be moved to ZSL
processor entirely.
The processor module will now use two streams, one input stream and
one ZSL output stream, which will produce the queue data. Both of
them will be configured to use the supported sensor array size and
private format. Scaling from the sensor resolution to the final user
requested size will happen during the re-process pass once image
capture gets triggered.
BUG: 34131351
Test: Manual via TestingCamera, 'CameraTest' API1 test cases
Change-Id: I7c87b7e7f89815e01a7cb5ce39d9c561c58562df
Eliminate ENABLE_TREBLE since it is obsolete.
Switching back to legacy DRM is still possible
by building with DISABLE_TREBLE_DRM=true
Change-Id: I6b921050dff6162112c60df21549fc93bc46e379
All of the edits were done using scripts in media/liboboe/scripts.
The conversion is done using SED, which is called from
convert_oboe_aaudio.sh
The conversion can be reverted when debugging using revert_all_aaudio.sh
The string substitutions are in oboe_to_aaudio.sed
Bug: 34749573
Test: cts/tests/tests/nativemedia/aaudio
Change-Id: Ia10b34472a90df2652b87607c99156e9084e57aa
Signed-off-by: Phil Burk <philburk@google.com>
For output streams, increment frame count and update timestamp when a
filled buffer is queued to the output buffer queue.
For input streams, increment frame count and update timestamp when a
buffer is acquired from the input buffer queue.
Test: Manual inspection of adb shell dumpsys media.camera while
running DevCamera
Change-Id: I8dc1d134baf5ad467e169f3ba6ffe0d1486df9dc
Get camera service dump working again in the Treble path, and clean
up the formatting a bit
- Switch to dprintf instead of write() for most dump calls
- Add clearer headers for each section
- Add static metadata details to CameraProviderManager dump
Test: adb shell dumpsys media.camera with Treble both enabled and disabled
Bug: 32991422
Change-Id: Ie1d431b68649777bfe84fbb1be0687dd02e671af
getDeviceVersion(), for whatever reason, also optionally returns the
facing of the specified camera device. The latter part was left
out of the Treble path implementation, resulting in incorrect
display orientation calculations higher up the chain.
Also add checks for invalid facings returned by getDeviceVersion so
that error logs will point this out next time.
Test: Manual inspection: API1-based applications do not have upside-
down preview. API1 CTS passes.
Bug: 34816614
Change-Id: Ice4c644e504f59e7df9be6636d9e6a3b38c52d4b
To enable the Treble version of IOmx in mediacodec process, use "setprop
debug.treble_omx 1".
Test: Compiles
Bug: 31399200
Change-Id: I0935dc7943e25067f5d8e75264cf2b088498a862
Pass application package name to createPlugin and createDrmPlugin.
The application packagename will be used as part of a unique
identifier for drm plugin.
Test: Play Movies.
Test: ANDROID_BUILD_TOP= ./android-gts/tools/gts-tradefed run gts -m
GtsMediaTestCases --test
com.google.android.media.gts.WidevineH264PlaybackTests#testL1With480P60
Verify the application's packagename is reachable in the drm plugin's
debug log.
bug: 27101531
Change-Id: I84fb09b591a7af63f6e20004e910112a4ce6ebac
eliminate the size of a fixed length buffer for a potentially very
long record. Code was safe in that it didn't allow an overflow, but
we really wanted the information that was being truncated.
also some cleanup on parameters for "dumpsys media.metrics":
time units for "-since" and include a -help.
Bug: 34792286 34793404
Test: invoke dumpsys with assorted parameters to see output
Change-Id: If960afd52a509f277910e62c13d4ba60f9ed7e34
On camera service startup, use the HIDL provider codepath unless the
system property "camera.disable_treble" is set to true.
The system property is needed until the HALv1 implementation is
complete and the emulator can switch over, as well as for devices not
yet tested in passthrough mode.
Whether passthrough or separate-process HAL is used depends on the
services and libraries available on each device.
Test: Camera CTS on angler, bullhead, sailfish, ryu. HFR performance
test on sailfish. Basic operation of camera app.
Bug: 32991422
Change-Id: I3dd580cbcddd0df2e6b1e422920aa84270286e0a
Add AUDIO_SOURCE_VOICE_RECOGNITION to the list of use
cases allowed for concurrent capture. As AUDIO_SOURCE_HOTWORD is
enabled for concurrent capture it makes sense to enable a client
to transition to voice recognition after the hotword has been detected
in a concurrent capture situation.
Also fixed some concurrent capture scenarii
Bug: 22702906
Test: build and check "OK Google" detection
Change-Id: Ic6dd41372fe74122395764beca7ca9a65197464b
This change adds DrmHal & CryptoHal classes that connect to the Treble
HAL interfaces for drm. These classes mirror the existing Drm and
Crypto classes that connect to the DrmPlugin and CryptoPlugin
interfaces. Having both allows mediadrmserver to run in either mode
while the HAL is stabilized.
The shared memory interfaces between mediaserver's ACodecBufferChannel
and ICrypto had to be reworked to use the Treble HALs. Specifically,
the shared memory path for returning decrypted buffers in the
non-secure case had to become separate instead of piggy-backing on the
source shared memory buffer. A separate shared memory destination
buffer is now allocated on the buffer channel. An abstraction for a
decrypt destination buffer was also introduced to clarify ICrypto's
decrypt method.
Tests: Playback using Play Movies and ExoPlayer works on angler
with and without the treble hal enabled.
bug: 32815560
Change-Id: I5a3dc84f99902eb8cf8eabab9ad074d307744950
The mediacodec process will attempt to load one or
more HIDL HALs. Code for retrieving a handle to HAL
services recently changed to include retrieving and
parsing a manifest from the device; this parsing code
causes the _llseek system call to be executed, which
was previously not allowed.
Since mediacodec already has lseek, adding _llseek
here should be safe.
Bug: 34692351
Test: media.codec no longer crashes
Change-Id: I7f0b173522a8e88395f54c7d2630270509f7799c
For Async buffer queue, if a pending buffer is overwritten by an
incoming buffer, onBufferReleased callback isn't called. But the stream
splitter depends on the onBufferReleased to return buffer to input.
Fix the problem by checking the bufferReplaced flag in
QueueBufferOutput.
Test: Camera CTS
Bug: 33777818
Change-Id: I270c7bae7873797ae9b050782828b5a124d3eff9
- Refactor the OutputConfiguration to contain isDeferred and isShared
flag, and not contain NULL surface.
- Unify the handling of deferred surface and shared surface.
Test: Camera CTS, and manual testing of GoogleCamera use cases
Bug: 33777818
Change-Id: I5dd3472f0f2133699b0e9fbdd8ba456956222746
reflect the change from "media.analytics" to "media.metrics" in
what service names we use; bring the metrics service main code into the
service directory (vs an additional shared library).
Removed references to tentative binder functions that the service
won't be offering, at least not in the near future.
Bug: 34615027
Test: build, boot, new services run, clients talking to said services.
Change-Id: If17772a8f03c05b142e8d5779830d198710210c1
- Ensure OMX handle is freed even if binder death notification comes
first.
- Add DeathRecipient in ResourceManagerService so that it could
handle dead clients properly.
Fix: 28824626
Fix: 34252788
Test: adb shell am instrument -e size small -w 'android.media.cts/android.support.test.runner.AndroidJUnitRunner'
Change-Id: Ifc441a2771b5674749ff65a4520177dda115b292
1. Treat both reply size being 0 and reply buffer being NULL
as an indication that the reply isn't needed.
2. Synchronize both input and output effect chain buffers,
and avoid excessive copies when the input buffer is the same as
the output buffer.
3. Improve effect chain debug dump by showing both
"external" and "allocated" pointers for effect audio data buffers.
Bug: 34368451
Change-Id: I56aba6908408b5fce3f15c8d29138555101e8720
Test: volume controls works when both Bass Boost and EQ effects enabled
This CL whitelists the mremap() syscall for the seccomp filter for
mediacodec. We need to do this for CFI, which uses mremap
internally.
Bug: 30227045
Test: m -j40 and the device boots and works.
Change-Id: I3b95798b4c8653bd95fb1b3d54060d4a12adc5bd
* changes:
Camera: wait for remote camera provider
Camera: setup vendor tag in binderized mode
Camera: treble: close acquire_fence
Camera: pass bufferId to HIDL interface
This builds a standalone service that is easy to test.
Bug: 33269952
Test: test_oboe_api
Change-Id: I1890b1b974e728c2c0c15e24aa02121c2774bd56
Signed-off-by: Phil Burk <philburk@google.com>