Enable clang thread safety analysis. Convert comments on TS
into directives. Fix missing lock acquisitions. Add missing
default initializers for the fields of UidPolicy and
SensorPrivacyPolicy
Also remove unused fields mpAudioPolicyDev and mpAudioPolicy
from AudioPolicyService.
TODO: Consider protecting pointers to command threads,
APM instance and the client, and system usages with a separate
lock.
Bug: 70398235
Bug: 155336464
Test: make, flash, and test audio on device
execute "adb shell cmd media.audio_policy" commands
Change-Id: I47b132c8b5c977812fad5c89fa57882a37779c18
Merged-In: I47b132c8b5c977812fad5c89fa57882a37779c18
use stoul instead of stol as the data being converted is unsigned.
Bug: 155138755
Test: VtsHalMediaC2V1_0TargetComponentTest
Change-Id: I5d7079538b5707c68454fa453667744758c9122a
Add missing "Added in API level 29 annotation" to
AAUDIO_INPUT_PRESET_VOICE_PERFORMANCE input preset.
Bug: 138776432
Test: make
Change-Id: I2362ebd1520c95e81dfe8ea43105ea7b39cc04eb
Fix areAllDevicesSupported() where HwModules.getDeviceDescriptor()
must be called with matchAddress == true: if the caller does not want to
distinguish on address it can leave the address field empty in the
AudioDeviceTypeAddr passed which has the same effect as using
matchAddress == false.
Also fix places where device_distinguishes_on_address() was improperly
used in place of audio_is_remote_submix_device().
Bug: 155224229
Test: build and launch car emulator
Test: AudioHostTest
Test: AudioServiceHostTest
Test: audiopolicy_tests
Test: manual mirroring and car projection tests
Change-Id: I74295de95bcd82e7fa439c396ae32749b9c70c05
Ensure the count can't cause an overflow in bytes to be read.
Test: atest CtsCameraTestCases; also add bad face count data from camera
service and manually verify the error logs appear when running
android.hardware.cts.CameraTest#testFaceDetection.
Bug: 150156131
Change-Id: Ic78ec0ccf67ef8665f80f69aabbb1ae71dd609cd
After refactoring audio device type, the output devices will only be set
when create/release audio patch. In that case, the output devices are
empty when creating the thread. If the "ro.audio.silent" is set, it will
make master muted if the output devices are empty. To fix the issue, do
not check silent mode when the output devices are empty, but check
silent mode when output devices are updated.
Test: atest AudioHostTest with setting "ro.audio.silent"
Bug: 154037767
Change-Id: I6cb219353e541ba99ba9acebd6ce853128d963d3
At async release, set to stub surface to free up the current surface.
Bug: 129008570
Test: atest CtsMediaTestCases -- --module-arg CtsMediaTestCases:size:small
Test: manual app test
Change-Id: I2d90bd37b2be5324199410e1f776afb9cb19d662
Old assert was for debugging. No longer needed.
Caused a CTS failure in MediaMetrics logging.
Bug: 155188361
Test: atest CtsNativeMediaAAudioTestCases
Test: adb shell dumpsys media.metrics
Change-Id: I592937d6a0683faf6835d3f0d5a982d02f59e7a9
In addition, a little build tweak for the test.
Bug: 146168540
Test: atest ccodec_unit_test:RawGraphicOutputBuffersTest
Change-Id: Ia1a0969e87ca1729bb38cf5cf1c7ec8df3029bc7
when underrun duration is over 3 sec, overflow happens
for multiplication of nsec=sec*1000000000. Use correct format transform
to solve it.
Bug: 135075416
Test: run MTBF test
Change-Id: I0a09ca41f2fad055ce0cfa18f936131b7a630f52
Add support for direct outputs with RENDER audio policy mixes.
A mix of type render can be registered even if no corresponding
output is opened to reach targeted device provided a direct output
profile exist for this device.
Also:
- Fix setUidDeviceAffinities(): was not closing direct outputs
opened by checkOutputsForDevice() and was not re-evaluating routes
- Fix removeUidDeviceAffinities(): was not re-evaluating routes
- Implement consistent sanity checks on selected devices in
setUidDeviceAffinities(), setUserIdDeviceAffinities() and
setPreferredDeviceForStrategy().
- Fix onNewAudioModulesAvailableInt(): attached devices reachable only
via direct outputs were not loaded.
Bug: 130296239
Test: AudioHostTest
Test: AudioServiceHostTest
Test: audiopolicy_tests
Test: manual test: Auto projection over USB, screen mirroring
Change-Id: I54470b61b4bc7e041e3a295764d368c5ded21268
The output of the hook can viewed using the command:
> adb shell lshal debug android.hardware.drm@1.3::IDrmFactory/clearkey
The hook can be used to emit debug info from the ClearKey hidl process.
Currently only emit the total number of open sessions.
Bug: 153663446
Test: adb shell lshal debug \
android.hardware.drm@1.3::IDrmFactory/clearkey
Change-Id: Ie5918acbfbbb5cfc2a9bc5e138ab0320f3c6a558
And also to AudioRecord.
Then log the callerName using MediaMetrics from the destructor.
This can be used to tell whether AAudio or OpenSL ES
or Java created the object.
Bug: 154543374
Test: adb shell dumpsys media.metrics --clear
Test: Run an app that uses audio.
Test: adb shell dumpsys media.metrics
Test: Look for "callerName" in the dump.
Change-Id: I000346e72f581d2e40ef4fd0410b579d2a1224e2
PD# GH-245
Problem:
vp8 play do not smooth
Solution:
modify for add vendor soft decoder
for vp8 decoder
Bug: 149354182
Test: U212
Change-Id: I91c6ba90f7d3edc28d6164ec8cd2a57195d0a7a7
Signed-off-by: Jian Wang <jian.wang@amlogic.com>
Log events from service.
Log start, stop, disconnect and other events.
Log underruns and bufferSize.
Bug: 154543374
Test: adb shell dumpsys media.metrics --clear
Test: run an app that uses MMAP, like OboeTester
Test: adb shell dumpsys media.metrics
Test: Expect to see lots of "audio.stream" events.
Change-Id: I690e5226b695d53d038d644f4438c759e08f9fbb