This code has null checks with intervening unconditional dereferences of
the potentially-null variable.
It's not clear that `mOutput` can ever be null to begin with. If it can
be, we have a few dereferences to guard. :)
Caught by the static analyzer:
frameworks/av/services/audioflinger/Threads.cpp:2671:19: warning: Called
C++ object pointer is null [clang-analyzer-core.CallAndMessage]
frameworks/av/services/audioflinger/Threads.cpp:2852:9: warning: Called
C++ object pointer is null [clang-analyzer-core.CallAndMessage]
Bug: None
Test: TreeHugger
Change-Id: I456581204718390088998a1fe2514dff63f6578f
The logic in IOProfile::devicesSupportEncodedFormats()
was only checking if the first device in the list of supported devices
was supporting currently selected A2DP encoding format.
But if more than one devices match the queried types, we need to check
all devices in case one of them supports the selected encoding format.
Bug: 147789166
Test: repro steps in the bug.
Change-Id: I704c5c6278eed524f15e7b73cec68a24f04d3a8c
Add meteric to show the difference between drm
playback of protected vs unprotected content.
We log onQueueInputBuffer errors.
Bug: 138862395
Test: adb shell dumpsys media.metrics | grep -i InputBuffer
Change-Id: I26aae706267956b6f944955877347747e573e3c8
Methods like reconfigureCamera called by the RequestThread internally
call methods which might expect to have mInterfaceLock locked
(eg: configureStreamsLocked).
Also, function calls which expect to be serialized w.r.t
reconfigureCamera can cause reported camera status to be inconsistent
w.r.t the expected status.
For example the following situation might occur
through CameraTest.java#testVideoSnapshot :
For certain video sizes that would fail to configure the camera
startRecordingL
camera reconfiguration is triggered -> reconfigureCamera() starts
waitUntilDrained -> gets interleaved with reconfigureCamera()
reconfigureCamera() completes
Here the status of the camera device is active instead of CONFIGURED.
updateRecording
createStream() called expects the camera to not be in an ACTIVE
state since updateProcessorStream cannot handle stream
configuration failure gracefully when the device is streaming.
However since waitUntilDrained did not complete after
reconfigureCamera the camera status is STATUS_ACTIVE.
As a result, we should hold mInterfaceMutex while
calling these methods. To avoid deadlocks (b/143513518), we can have the thread
calling disconnect, relinquish mInterfaceMutex right before it starts
waiting on RequestThread to exit. It can re-acquire it when
RequestThread finishes.
Bug: 147313521
Test: atest CameraTest.java#testVideoSnapshot on pixel2 passes
Test: camera CTS
Test: GCA (sanity)
Change-Id: I384f62bc9936d9691dfe9c13ff743e3d07f2ed55
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Make the list of keys in allowedKey to match the
statsd_handlers[] in iface_statsd.cpp for dumpsys
to display mediadrm and Widevine metrics.
Bug: 149246413
Test: adb shell dumpsys media.metrics | grep -i drm
Test: adb shell dumpsys media.metrics | grep -i widevine
Change-Id: I7811eb3a4228a906bb3dbc615ce42d1947082a07
This change fixes the CTS failure in AudioPlaybackCaptureTest caused
by ag/10111312 and ag/10111311.
It contains the following fixes/changes:
- Mix match for playback capture of USAGE_VOICE_COMMUNICATION now
also respects a new flag (AudioMix's mVoiceCommunicationCaptureAllowed)
which is set by AudioService only if the caller explicitly asked
to capture USAGE_VOICE_COMMUNICATION and have the
CAPTURE_VOICE_COMMUNICATION_OUTPUT.
- A permission check on the native side in case
mVoiceCommunicationCaptureAllowed is set.
- Code cleanup, mainly in AudioPolicy.h and AudioPolicy.cpp.
This change is accompanied by ag/10242955 on the Java side.
Bug: 148559127
Test: manual
Test: atest PlaybackCaptureTest (with the version prior to ag/10220852)
Test: atest com.google.android.gts.audio.AudioHostTest
Change-Id: I8ae6249f4da1de35e962c838d91f690eb906570e
In case of using Device Port Gain to control the volume, the logic
of setVolumeIndexForAttributes for device type check has been bypassed.
However, in case of unmuting, the volume will be applied to all streams
with requested device then will be set for AUDIO_DEVICE_OUT_DEFAULT_FOR_VOLUME
which is a convention used in case of no volume for device has been set
previously.
As this logic is bypassed, in case of HwGain, the final gain applied will
be the one for AUDIO_DEVICE_OUT_DEFAULT_FOR_VOLUME, which may be completely
different from the gain of current device.
This CL fixes this by factorizing the device check logic for both SW/HW gains.
Test: build & play music & Vol - until mute then volume +. No gap expected.
Change-Id: I24c57df84496e404c05c92f08f907131ef79cf3a
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
When a volume curve is not found for a volume group
associated to a system strategy, use AUDIO_STREAM_PATCH
instead of AUDIO_STREAM_MUSIC as default config.
Bug:148588565
Test: play music and check volume
Change-Id: Ib3fb2a1b7b5f3118bf16a3cc9d8e578fa0431645
Merged-In: Ib3fb2a1b7b5f3118bf16a3cc9d8e578fa0431645
This CL fixes regression introduced in aosp/1213724
The regression happened when offloaded music is played, volume
is reduced, next song is requested then the volume is switching
to full scale.
It is linked to a "ghost volume source" without stream types that
is considered as a music stream before volume is set in AudioFlinger.
The music volume was overwritten by this volume source.
This CL fixes only the ghost volume source by preventing to add twice
the internal volumes sources linked to AUDIO_STREAM_PATCH and
AUDIO_STREAM_REROUTING.
The clean fix consists in aligning AudioFlinger on volume sources
rather than stream types.
Bug: 148588565
Test: plays offloaded music, reduce volume to min.
Then press next song.
No volume gap expected.
Change-Id: I0bb3b5ca1f13ba23351bcd658acf8d7f52555929
Merged-In: I0bb3b5ca1f13ba23351bcd658acf8d7f52555929
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
The assistant new stream CL has broken the strategies without
stream types. The attributes are not populated anymore preventing
to retrieve the volume group from attributes.
Bug: 136121584
Test: run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioProductStrategyTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupChangeHandlerTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testPermissionsForVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateProductStrategies
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateVolumeGroups
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributesWithInvalidAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testVolumeGroupCallback
Change-Id: I15a14e4cf85e6c4bbf09db24bb33b4b9fb9cab54
Merged-In: I15a14e4cf85e6c4bbf09db24bb33b4b9fb9cab54
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Communicate current audio mode owner UID to native service
when changing audio mode via setPhoneState.
This will be used by call audio capture restriction rules.
Bug: 148368476
Test: manual phone call tests
Change-Id: Icf6f168bb431b5232f6127877c40789c0c537bde
Due to security constraints, platform profilers that do remote stack
unwinding need the target process' cooperation. This is implemented via
a bionic signal handler.
On debug builds, media extractor can end up being targeted by such
system-wide profiling, which can crash the process due to
seccomp/minijail (specifically, due to sendmsg that is used for sending
file descriptors over a unix socket).
Tested: synced updated binary to crosshatch-userdebug, confirmed that
sending signal 36 with si_val 1 doesn't crash mediaextractor.
Bug: 149328505
Change-Id: Idf34e08edf99a82c72146aebeb5e46e5cf5af2f3
The duplicate log allowed suffix ! (e.g. "event!") looked more like
"not equals" so changing from ! to #.
Test: adb shell dumpsys media.metrics
Bug: 138583596
Change-Id: I642334770ed8f5ff0d1f1e187e25eca596603252
Test: Ran the repro program vendor/google_toolbox/user/ytai/SoundTriggerPoc
Test: Manual verification that soundtrigger still works for hotword and music.
Fixes: 136005905
Change-Id: Icdfe5a823ba02eb7bd8c41f0fa503c9922d8f348
(cherry picked from commit ea51ad6e1d)
Merged-In: Icdfe5a823ba02eb7bd8c41f0fa503c9922d8f348
Routing strategy call assistant was added without
associated volume stream and wass reusing AUDIO_STREAM_PATCH.
This is violating the rule that two strategies cannot
share the same volume stream.
Bug:148588565
Test: play music and check volume
Change-Id: Ib3fb2a1b7b5f3118bf16a3cc9d8e578fa0431645
This CL fixes regression introduced in aosp/1213724
The regression happened when offloaded music is played, volume
is reduced, next song is requested then the volume is switching
to full scale.
It is linked to a "ghost volume source" without stream types that
is considered as a music stream before volume is set in AudioFlinger.
The music volume was overwritten by this volume source.
This CL fixes only the ghost volume source by preventing to add twice
the internal volumes sources linked to AUDIO_STREAM_PATCH and
AUDIO_STREAM_REROUTING.
The clean fix consists in aligning AudioFlinger on volume sources
rather than stream types.
Bug: 148588565
Test: plays offloaded music, reduce volume to min.
Then press next song.
No volume gap expected.
Change-Id: I0bb3b5ca1f13ba23351bcd658acf8d7f52555929
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
The assistant new stream CL has broken the strategies without
stream types. The attributes are not populated anymore preventing
to retrieve the volume group from attributes.
Bug: 136121584
Test: run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioProductStrategyTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioVolumeGroupChangeHandlerTest
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testPermissionsForVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateProductStrategies
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testGetAndValidateVolumeGroups
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributesWithInvalidAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testSetGetVolumePerAttributes
run cts-dev -m CtsMediaTestCase --test android.media.cts.AudioManagerTest#testVolumeGroupCallback
Change-Id: I15a14e4cf85e6c4bbf09db24bb33b4b9fb9cab54
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
This is intended to recover from cases when the MIDI extractor gets
stuck in an infinite (or very long) loop.
The extractor code is 3rd party and hard to harden - this gives us
at least an eventual recovery.
Change-Id: I8d2fd85f91d1d2749c5620cf8518583076d2f6d7
Bug: 127313764
Bug: 127313537
Bug: 127313223
Bug: 127312550
Bug: 127310810
Bug: 126380818
Usage mapper will be retrieved from the preferred service if system
properties for mediaswcodec's ION usage are not set.
Test: Define system property "ro.com.android.media.swcodec.ion.heapmask"
and check the log during the startup of mediaswcodec.
Test: Manually log the mapper activity; test if gets invoked from
mediaswcodec and CCodec.
Test: atest CtsMediaTestCases -- \
--module-arg CtsMediaTestCases:size:small
Bug: 144995284
Change-Id: Ied254224b1edd7a42aca4e084c721384efc7db66
This reverts commit 3c713796c2.
Reason for revert: The submitted patch set was not the latest cherry-pick from qt-aml-media-dev.
Exempt-From-Owner-Approval: revert
Change-Id: I3118af50e19bde0411ae7690293ede8033d522b4
Also fixed missing implementation of Camera availability callbacks for
ExtendedAvailabilityCallback.
Test: Camera CTS, and vndk test
Bug: 148146086
Change-Id: I557d6db3900b2346b7bc7e12cd946bc4c2dc4076
Remove extraneous right brace in Time Machine dump.
Do not suppress repeated EVENT properties in the Time Machine.
Use "--" prefix instead of "-" for long dumpsys argv options.
Test: atest mediametrics_tests
Test: adb shell dumpsys media.metrics
Bug: 138583596
Change-Id: I874be909ac08641b14dd12fb2c83de7a276a1796
Current MediaResourceManager assume that the calling process actually use the resource.
In TV Input Framework, the actually user of the resource is different application.
To allow MediaResourceManager to use pid of actual user, we add overridePid method
bug: 139809797
Test: Manual
Change-Id: Ia113ca2387dfbcc092eb150d19b4751448e9f27a
Clients needing to differentiate between system/vendor used to be able
to use isServingCall. However, this was expensive to implement. This
alternative approach instead requires users of this API to use
libbinderthreadstateutils which does a slighty different operation.
Bug: 148692216
Test: atest VtsHalCameraServiceV2_0TargetTest
Test: running AImageReaderVendorTest
Test: try face unlock
Change-Id: I5615f4e8863487d0de8dad2d0529214750897036
Merged-In: I5615f4e8863487d0de8dad2d0529214750897036
Clients needing to differentiate between system/vendor used to be able
to use isServingCall. However, this was expensive to implement. This
alternative approach instead requires users of this API to use
libbinderthreadstateutils which does a slighty different operation.
Bug: 148692216
Test: atest VtsHalCameraServiceV2_0TargetTest
Test: running AImageReaderVendorTest
Test: try face unlock
Change-Id: I5615f4e8863487d0de8dad2d0529214750897036
use @include to bring in the minijail policy information needed so that
we can write out code coverage information on such builds; the included
code coverage policy files is appropriate full/empty based on code
coverage flags.
Bug: 139313557
Bug: 148178774
Bug: 148177815
Test: 'kill -37' on processes in a code-coverage-enabled build
Test: 'kill -37' on processes in a NON code-coverage-enabled build
Change-Id: I9d5880343347ddc586e50f9eafb65e1ff7ba3748
(cherry picked from commit 40d50f3fea)
This reverts commit 4b8d5ce58d.
Bug: 132241823
Reason for revert: Breaks Screen Mirroring during Live caption
Change-Id: I4bf711e5c5e4233fcf58bda5477380b488fde2fa
(cherry picked from commit e0d004fe12)
In order to avoid subsequent tracks using stale kernel timestamps while
computing track timestamps, clear the timestamp info upon flush.
Change-Id: I2b8af33b287aee986871b6415b89f9c53d92f3a6
Notable fixes:
- Rework FrameProcessorBase so it accept and work with
offline sessions.
- Erase internal composite streams from offline stream list.
Bug: 135142453
Test: Camera CTS
Change-Id: I9dbc01e62fa94c1e0bfb84a8ddaa9e39ab4a7e34
unlinkToDeath is no longer required, (this change in behavior is to
avoid leaks) so holding onto the service here (still calling
unlinkToDeath to avoid a log, but may for instance remove all
unlinkToDeath calls in the future).
Bug: 145692765
Test: boot, see linkToDeath maintained
Change-Id: Ib74ab470580643ff61fc684fdd4e16d5e38389af
Hidden stream type (e.g. rerouting/patch) and usages are not
part anymore of engine configuration schema.
This CL programmatically adds the internal system strategies
and volume associated.
Test: atest VtsHalAudioPolicyV1_0TargetTest
Bug: 141989952
Change-Id: I3d182bf374a4bd6ae10e7c408d51f83f6a2ea378
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
-Add remote submix in legacy address as criterion type value
-Add volume curves for all device cat for rerouting/patch streams
-Silent reset input device
Test: build
Bug:
Change-Id: I3578f9a05899f20847c123477451f1eb97ed5cee
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
[AudioPolicy][Engine] Add remote submix in legacy address
Bug:
Test: build
Change-Id: Ic00e892a03c3b6f6ce3748ea1eb02452bf01c23f
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
New assistant stream has been added.
This CL fixes the support of new stream within configurable engine.
Bug:
Test: build
Change-Id: If33aa6ea668655d933d274d9c46447185f75c8d0
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
This CL prevents from regression each time audio-base.h is changed on
enumeration coupled with Parameter Framework structure.
The Structure type file is generated from the audio-base.h. If misaligned,
Settings would not be generated, it won't compile.
This CL also fixes a typo on name as names are now aligned.
Bug:
Test: build
Change-Id: I8fd15a8d2f92908dceb2baf7ca8d35f4a69f7904
Signed-off-by: Francois Gaffie <francois.gaffie@renault.com>
As the dumpsys no longer needs to be parseable by a program
convert to a more human readable form.
1) Make default time REALTIME consistently.
2) Dump time as a human readable string.
3) Remove dumpsys versioning code.
4) Delimiter changes.
Test: atest mediametrics_tests
Test: adb shell dumpsys media.metrics
Bug: 138583596
Change-Id: I6ee7d81a18e0e220b258c722d232c05805118abb
- getConcurrentStreamingCameraIds() :
returns a list of combinations of camera ids that may stream
concurrently.
- isConcurrentSessionConfigurationSupported() :
queries whether camera devices can support the
corresponding given session configurations concurrently.
Bug: 77960042
Test: GCA (sanity)
Test: CTS
Change-Id: Iba237118ccf145695a500a2c406713e416e66011
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
This CL removes duplicated code for patch creation for
-voice call
-system API to create patches.
-system API to start/stop AudioSource
It creates internal methods to create/release Audio Patches.
The benefit of this rework is to have startAudioSource now working
whatever Sw or HW bridging is used.
Test: Voice Call
Bug:
Change-Id: I82738d116abd94f7738fce8ca3a1c3466942060a
Merged-In: I82738d116abd94f7738fce8ca3a1c3466942060a
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
Todo: use new AudioEffect systemAPI
Bug: 136294538
Test: build
Change-Id: I249d9ef112a8a8c7947a099e5937bf0a8b05014c
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
This CL removes duplicated code for patch creation for
-voice call
-system API to create patches.
-system API to start/stop AudioSource
It creates internal methods to create/release Audio Patches.
The benefit of this rework is to have startAudioSource now working
whatever Sw or HW bridging is used.
Test: Voice Call
Bug: 136294538
Change-Id: I82738d116abd94f7738fce8ca3a1c3466942060a
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
When an app sets SCALER_ROTATE_AND_CROP to AUTO, the camera service
needs to select the right ROTATE_AND_CROP mode given the application
UI state at the moment, received from the window manager.
In addition, some of the metadata in the active array coordinate
system needs to be converted to/from the cropped+rotated coordinate
system to ensure roundtripping UI information works as before.
Also ensure that the available rotate and crop metadata field is
always available, with a value of NONE if nothing else.
This commit adds support for doing the coordinate transforms and
overriding AUTO to a concrete value; it does not wire up a connection
to another system service to receive the correct override value, but
does add a command to set the override value for all current camera
clients.
Test: New CTS tests pass, unit tests for RotateAndCropMapper pass
Bug: 134631897
Change-Id: Icc45530e2cfbaf838a1e4d04e4fd2aef8122e8e1
The new provider callback version enables availability callback for
physical camera.
Test: Camera CTS
Bug: 119325027
Change-Id: I22e0b669c3d9891a431e1befc7f1c9f40b826a08
Added new API to audio policy to route audio output streams based on
Android user id. The routing remains similar to uid rules, with only
using USERID_EXCLUDE_USERID to decide on the user id base routing.
Application uid and stream usage routing remain the same with the added
difference that user id will be taken in to consideration if available.
Bug: 139365417
Test: atest
com.google.android.gts.audio.AudioHostTest#testUserIdDeviceAffinity
Test: atest AudioPlaybackCaptureTest
Change-Id: Ib817eb8ae19ed7dea8451e8a8584a20b9b6f5042
Allow audio playback capture for the USAGE_VOICE_COMMUNICATION usage
only for priveliged apps that are granted with the CAPTURE_VOICE_COMMUNICATION_OUTPUT
permission.
Test: atest android.media.cts.AudioPlaybackCaptureTest
Test: Manually
Bug: 124653474
Change-Id: Ib568ca590ea534837c396536f5e31cf60a5caf52
Split close into close and release phases.
Release() will release hardware and service resources.
Close() will delete the stream object.
This allows us to defer the deletion and avoid race conditions.
The CLOSING state is used to indicate that a stream has been released.
Added some test cases to test_various.cpp.
A lone call to close() will automatically call release() so we should
have good code coverage for testing.
Bug: 136288001
Test: adb shell test_various
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: Ia648838f30c521ba101f55259dbcd4594c1263cd
There are some usages of very verbose logging audio device type
collection as unsigned int, which is missed in previous refactoring CLs
since they are not shown up without enabling very verbose log.
Bug: 148110286
Test: make with enabling very verbose log in AF and AP
Change-Id: If31b7e3dd7b094e011cb88dcb4a5d0c3e8d81bd4
Main problem was in AudioFlinger::EffectChain::EffectChain(), where
the thread* argument could possibly have been destroyed before the
creation of the weak pointer
(AudioFlinger::EffectChain::EffectCallback::mThread) around it.
While here, cleaned up a bunch of other pointer-related operations
in order to avoid trafficking in raw pointers to RefBase subclasses.
Bug: 147770363
Change-Id: I508ca94dd38a04e13f1a1c413f548001b961c721
Camera clients must be aware of any configured streams
that can support offline processing mode.
A few corner cases that need to be considered:
- Composite streams can support offline mode only
when all internal streams support it as well.
- Streams that use the internal camera buffer manager
will not have support for offline mode.
- Shared streams are also unsupported in offline mode.
Bug: 135142453
Test: Camera CTS
Change-Id: Idde826a6fb18a8907850e87cfe593de7cb1c5f4a
Various camera notification callbacks need to be
propagated back to client.
Test: Camera CTS
Bug: 135142453
Change-Id: I11a1bc634e4c6f9540d1f7f9c20e4151fdcc5ec6
Composite streams must be able to switch to offline processing
mode. To support them the offline session client must continue
passing all necessary callbacks and events similar to regular
camera clients.
Test: Camera CTS
Bug: 135142453
Change-Id: I498681af16ad072e3df01d0279b4cfe76b48f9ec
This CL updates the parser to support a new attributes in GlobalConfiguration
in order to support dynamic loading of engine.
The given value shall be <<none>|default|configurable>
XSD for HAL v6.0 has been updated accordingly.
Bug: 141989952
Test: build & audio check
Change-Id: I5774597e252261d8369cd7dc3cce9bb7056e1569
Merged-In: I5774597e252261d8369cd7dc3cce9bb7056e1569
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
AudioSystem.setAllowedPolicyCapture is only called from audio service.
In that case, checking if the calling uid is system uid to before taking
action.
Bug: 145115448
Test: dumpsys audio, query active playback configuration
Change-Id: I614ac881ecde6bad13f22f1382de701f314a7ada
Adding system usages to native layer functions including 4 new usages
and setSupportedSystemUsage API
Bug: 141006627
Test: Built, ran, and verified types showed up in dumpsys
Change-Id: I282c6b40ed9256ced5efb59b42da95a8fb0a6398
This CL updates the parser to support a new attributes in GlobalConfiguration
in order to support dynamic loading of engine.
The given value shall be <<none>|default|configurable>
XSD for HAL v6.0 has been updated accordingly.
Bug: 141989952
Test: build & audio check
Change-Id: I5774597e252261d8369cd7dc3cce9bb7056e1569
Signed-off-by: François Gaffie <francois.gaffie@renault.com>
* clang-tidy segmentation fault
Test: make with WITH_TIDY=1 and tidy checks for nightly builds
Bug: 146435095
Change-Id: Id9d5a10ebe73d902098d23c1a74954f82fef0607
1) Include parcel in Parcelable's name.
2) Add TranscodingJobPriority.
3) Change registerClient API to include pid, uid and packageName.
Bug:145233472
Test: Build and run.
Change-Id: Ide40e6de8fb1b6f01bbae4577ef3b14d6136b577
Add management of audio effects applied to a specific input
or output audio device.
A new class DeviceEffectProxy derived from Effectbase is added
to represent an effect attached to a particular audio device type and
address. This proxy manages one or more actual EffectModule instances
automatically added to a playback or capture thread or directly to the
audio HAL when the targeted audio device is used by an audio patch.
A new DeviceEffectManager class is added to manage creation and release
of DeviceEffectProxy instances and monitor creation and release of audio
patches and create or release actual effect instances accordingly.
Bug: 136294538
Test: make
Change-Id: I23b9f9db4459136039c5ee327cf3b1aefa7db5af
Merged-In: I23b9f9db4459136039c5ee327cf3b1aefa7db5af
The pass thru software patch is normally used with the MSD module.
There is no need to establish a peer reference from PatchRecord
because its I/O code only gets executed by PatchTrack
initiative. In fact, this also means PassthroughPatchRecord
can't be stopped synchronously, so the usual software patch tear
down logic in PatchPanel leads to a null pointer dereference
because it races with PatchTrack I/O activity on a separate
thread.
Fix by skipping the sp<> setup / clear logic in PatchPanel
for PassthroughPatchRecord.
Bug: 147599144
Test: force teardown of MSD patch, check logcat for crash
Change-Id: I4a2abc16ad705244767b33ea529e1ace2213d19f
Because one might reference the object twice when
the end of the full expression goes to ;
Test: atest mediametrics_tests
Bug: 138583596
Change-Id: I80ced3af615578d63310acaf70142be900855902
Add support for querying the audio devices used for playback
routing for the given audio attributes.
Take into account registered dynamic policies but disregard
secondary output descriptors as they are used for playback
capture.
Bug: 144440677
Test: atest AudioServiceHostTest
Change-Id: I102c57b432b044dc6b0ead49e0a30d8e9094411d
Introduce a class EffecBase as a parent class of
EffectModule with default implementation for handles management,
basic properties storage and state management.
Bug: 146177259
Test: CTS: AudioEffectTest, EqualizerTest, VisualizerTest,
AudioPreProcessingTest
Test: manual test: Play Music EQ settings, Duo EAC and NS
Change-Id: Id91cef9db6b4f6be0d2e77a8b4afcbdc7234e519
Merged-In: Id91cef9db6b4f6be0d2e77a8b4afcbdc7234e519
Add the possibility to specify a target audio device when
creating an audio effect by passing its audio port handle
to createEffect API.
Bug: 136294538
Test: make
Change-Id: I32a6400278496653b4204175cd8a16d81f9724a0
Merged-In: I32a6400278496653b4204175cd8a16d81f9724a0
Add the possibility to specify a target audio device when
creating an audio effect by passing its type and address to
AudioEffect constructor.
When doing so, the session ID must be AUDIO_SESSION_DEVICE.
Bug: 136294538
Test: make
Change-Id: I2a2eba340d3c2537285c091e9a53f305ff161a2b
Merged-In: I2a2eba340d3c2537285c091e9a53f305ff161a2b
Add specific audio session ID for effects applied to a
particular audio device.
Device specific effects will be attached to a particular audio sink or
source device identified by its unique audio port ID and will all use
this same session ID.
Only one session of this type exists on a given playback or record
thread.
All effects in this session apply to the same device ID and are created/released
when the routing (audio patch) of this thread output or input stream is updated.
Bug: 136294538
Test: make
Change-Id: I4e3a55ed1244b918429dd9e217b6efecc1ec6449
Merged-In: I4e3a55ed1244b918429dd9e217b6efecc1ec6449
Fix MmapStreamInterface::openMmapStream() implementation to return
actual sampling rate, channel mask and format used at the audio HAL
once the stream is opened.
Bug: 76213894
Test: make
Change-Id: I0e497b898d86246bcb1bdde42c3114d43e1f14d0
New stream type: AUDIO_STREAM_ASSISTANT
This is intended to be used by a virtual assistant like
Google Assistant, Bixby, etc.
The audio stream has own volume alias and the volume
does not change by volume changes of other streams.
Bug: 123745215
Test: make
Change-Id: I17ec0480cad4c3507a97454ccb832255adda9897
Merged-In: I17ec0480cad4c3507a97454ccb832255adda9897
Signed-off-by: Baekgyeong Kim <baek.kim@samsung.com>
Add management of audio effects applied to a specific input
or output audio device.
A new class DeviceEffectProxy derived from Effectbase is added
to represent an effect attached to a particular audio device type and
address. This proxy manages one or more actual EffectModule instances
automatically added to a playback or capture thread or directly to the
audio HAL when the targeted audio device is used by an audio patch.
A new DeviceEffectManager class is added to manage creation and release
of DeviceEffectProxy instances and monitor creation and release of audio
patches and create or release actual effect instances accordingly.
Bug: 136294538
Test: make
Change-Id: I23b9f9db4459136039c5ee327cf3b1aefa7db5af