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
Factor out common analytics code from audio specifics.
Allow for saving and clearing analytics state if audioserver crashes.
Test: atest mediametrics_tests
Test: instrumented check on audioserver restart
Bug: 138583596
Change-Id: I1073f3ef95f44a383a7f14b0c2ea6f978a84ee24
AUDIO_SOURCE_DEFAULT is translated to AUDIO_SOURCE_MIC in
AudioPolicyManager. That means AUDIO_SOURCE_DEFAULT should behave
as same as AUDIO_SOURCE_MIC.
In this commit, argument for addInputEffects() is translated for
avoid different behavior between AUDIO_SOURCE_DEFAULT and
AUDIO_SOURCE_MIC.
This means same preprocessing effects are applied for both Sources.
Bug: 137898521
Test: Add pre-processing effect for AUDIO_SOURCE_MIC then check if
it works for AUDIO_SOURCE_DEFAULT as well
Change-Id: I3df1bcc7309dc535a721113cc4465b20733b4058
Merged-In: I3df1bcc7309dc535a721113cc4465b20733b4058
DIRECT and OFFLOAD Audio threads use the mixer when using SW effects.
This requires them to use the default sample rate.
Test: vendor specific, see bug
Bug: 147209612
Merged-In: I553fe43695d64160dd64808e18299699a4047225
Change-Id: I553fe43695d64160dd64808e18299699a4047225
DIRECT and OFFLOAD Audio threads use the mixer when using SW effects.
This requires them to use the default sample rate.
Test: vendor specific, see bug
Bug: 147209612
Change-Id: I553fe43695d64160dd64808e18299699a4047225
AUDIO_SOURCE_DEFAULT is translated to AUDIO_SOURCE_MIC in
AudioPolicyManager. That means AUDIO_SOURCE_DEFAULT should behave
as same as AUDIO_SOURCE_MIC.
In this commit, argument for addInputEffects() is translated for
avoid different behavior between AUDIO_SOURCE_DEFAULT and
AUDIO_SOURCE_MIC.
This means same preprocessing effects are applied for both Sources.
Bug: 137898521
Test: Add pre-processing effect for AUDIO_SOURCE_MIC then check if
it works for AUDIO_SOURCE_DEFAULT as well
Change-Id: I3df1bcc7309dc535a721113cc4465b20733b4058
If ENFORCED_AUDIBLE is set for a stream, it should output
to Speaker and not select output device(s) for VOICE_CALL.
Bug: 147209610
Change-Id: I9553efd677979351ed6f7191079da84dac2a7ed1
`realloc` doesn't deallocate `param` if it fails. Since the loop ends in
a `free`, we just need to avoid overwriting `param` until after the
check.
Caught by the static analyzer:
frameworks/av/services/audioflinger/Effects.cpp:1868:9: warning:
Potential leak of memory pointed to by 'param'
[clang-analyzer-unix.Malloc]
Bug: None
Test: TreeHugger
Change-Id: I58fe4319927b3ea99989e1fb1dc2dabe89c72ef8
For the formats compatible with IEC61937 encapsulation, assume
that the record thread input from MSD is IEC61937 framed (for
proportional buffer sizing). Add the
AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO flag so downstream HAL can
distinguish between raw and IEC61937 framed streams.
Test: manual test on BCM TV device
Change-Id: I8f09f936ccce63985df4ad00433299b063769419
This is a helper which assists logging on exit of a method.
Test: atest mediametrics_tests
Bug: 138583596
Change-Id: I73c0e7e469dc9fd1b29934ef308f9d2f15146bec
Integrate dynamic depth processing as part of
the camera service library.
Dynamic linking is no longer required as legacy
devices with small system partitions are not
supported.
Bug: 132449311
Test:
atest
cts/tests/camera/src/android/hardware/camera2/cts/StillCaptureTest.java#testDynamicDepthCapture
atest
cts/tests/camera/src/android/hardware/camera2/cts/ImageReaderTest.java#testDynamicDepth
atest
cts/tests/camera/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java#testDepthOutputCharacteristics
cameraservice_test --gtest_filter=DepthProcessorTest.*
Change-Id: Ie8befc5c0635e3e08c7ad8cac7b056cdf5aa3548
ZoomRatioMapper's member variables are const after construction. As a
result, we don't need mutex to protect updateCaptureRequest and
updateCaptureResult calls.
Also fixed missing zoom ratio mapping initialization for physical
sub-camera.
Test: testZoomRatio CTS
Bug: 130025314
Change-Id: Ibe2ff7cffb13178dcf70fc9e2eb044184e58bcf2
Update codec quality setting at the time of:
- Input pending frame creation if there is no inflight encoding.
- Any pending input frame is done processing.
Note that since there is no way for camera framework to synchronize
quality setting per-frame when encoder runs in surface mode, the update
of quality is on best-effort basis.
Test: vendor testing, and camera CTS
Bug: 140506016
Change-Id: I58ddc9302b1507428ccf42f4c77c6624f1c600ba
The uninitialized audio_config_t has a .frame_count which is typically
not used by HALs for this calculation. However, in the case where the
HAL does use this, it can be any 32-bit value.
At best the HAL treats this as invalid or ignores it, but at worst the HAL
casts to uint32_t and causes the caller to request a ridiculous amount of
memory, leading to the process being killed with SIGABRT.
Fix: 146119742
Bug: 144245613
Bug: 144245318
Bug: 144000030
Test: atest AudioRecord_BufferSizeTest
Change-Id: I41714cb2058a6fe7a6a9f55b1fd7c8d862d69351
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: Iebcd89bfa38de3c10b79f878462ba2af347ad332
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: Iebcd89bfa38de3c10b79f878462ba2af347ad332
Fix missing initialization of EffectBase::mSuspend
introduced by commit 41709559.
Bug: 136294538
Test: make
Change-Id: I20de7712ff3701649c78da4e6172e58af3f1f625
When closing input/output, it is not needed to unregister effects.
The effects will be automatically unregistered when the audio session id
is released. If the effects are unregistered when closing input/output
and the audio session id is not released, audio policy manager will lose
the visibility of the effects. In that case, it will fail to move the
effects to new I/O when a track with the same audio session id is
attached to a new I/O.
Bug: 145197421
Test: repo steps from the bug
Change-Id: I1bee3a3ee79692c863aa3977df62346ac9dc8946
- Add NDK API spec for the new zoom API
The new zoom API combines optical and digital zoom, and supports both
zoom-out and zoom-in with more precision.
- Add new NDK API to specify separate zoom ratio ranges for different
bokeh modes.
- Add ZoomRatioMapper in camera service to convert between
control.zoomRation to and from scaler.cropRegion.
Test: Camera CTS/ITS/CtsVerifier/ZoomRatioTest
Bug: 130025314
Change-Id: I4c7d867f840b5720bc73bb0485e8a9a93d2276b5
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
As we described "libavservices_minijail" in Andorid.bp, we don't need
to keep "libavservices_minijail_vendor" as a workaround, but may make
"libavservices_minijail" vendor_available and remove
"libavservices_minijail_vendor".
We will keep "libavservices_minijail_vendor" until we replace
"libavservices_minijail_vendor" to "libavservices_minijail" from all
vendor modules.
"libavservices_minijail_vendor" will be removed once the vendor
modules are cleaned up.
Bug: 146313710
Bug: 145580164
Test: build and boot
Change-Id: Iffb16c10ddc93e645d5839ac8aa320353e46d224
This patch avoids pseudo LCM buffer calculation oversized buffer
causing posix_memalign error in cases of large play/record frame
counts (such as 24596) for PassthruPatchRecord patches.
Test: MSD to Primary audio patch with play/record frame counts
of 24596.
Change-Id: I3a2f3795330e99984388b01033d8e7c1685d01f2
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
Signed-off-by: Baekgyeong Kim <baek.kim@samsung.com>
This change:
- Removes the old ISoundTriggerHw service and removes its code.
- Connects AudioPolicyManager to the new service via AIDL RPC (using
a new utility, BinderProxy).
Change-Id: I00366e2c5f252708e903b2311816d9eceb132a05
Bug: 142070343
This reverts commit c0abc6239e.
Reason for revert: broken build on target cf_x86_phone-userdebug_coverage
Change-Id: Ic6808bfd31bedfa85b7d7a120e4c6f6273678f73
FileDescriptor type in AIDL was translated into const unique_fd& in C++.
Now, it is unique_fd, i.e. passed by value, to make it easier to keep it
beyond the scope of the call.
Bug: 144943748
Test: m
Change-Id: Ic6b1a4cba71c0fedb206b5ca3fb65b9944bbd69f
add support for model parameter control APIs with THRESHOLD_FACTOR
as the first supported parameter
Bug: 141929369
Test: Tested manually with test app and confirmed with GTS test
gts-tradefed run gts-dev -m GtsAssistIntentTestCases
Change-Id: I613dfe7486b4b4b695c79bda515b9f07fe750a70
Functions called by RequestThread::threadLoop must not hold
mInterfaceMutex since the following deadlock scenario may occur:
T1: disconnect() -> holds mInterfaceMutex and waits for RequestThread to
exit
T2: RequestThread::threadLoop()->reconfigureCamera (or any other function) that waits on
mInterfaceMutex
leading to a deadlock
Bug: 143513518
Test: GCA
Test: CTS
Change-Id: I4bd856e5263934a54cd7087a01d35cfe10936196
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Add audio usage for call assistant use cases.
Used by apps playing over call uplink path for call
screening or other in call assitant features.
Add corresponding routing strategy in audio policy manager.
The strategy reuses volume group "PATCH" as volume is fixed
for call uplink audio.
Bug: 135213843
Test: make
Change-Id: Iad34c058e96fa5c969e825d3ddb0a82a60accc76
This is in preparation of the addition of audio effects attached to a
specific audio device that will not be attached to a particular
ThreadBase or Effectchain.
Create an clean callback interface used by the EffectModule to interact
with the rest of the audio framework. This callback must be implemented
by the EffectModule parent (e.g an EfffectChain).
Als refactor EffectHandle enabled(), disable() and disconnect methods()
to avoid dealing with the ThreadBase directly.
Bug: 136294538
Test: make
Change-Id: I9160f88f7fbb0447b5e679260bf0401d3af591d2
This flag used to be framework only. To simplify constants
management it's better to have it defined at all layers.
Currently it is only used for MSD module but potentially
can be used for HDMI inputs.
Bug: 141273649
Test: use AOSP MSD on Pixel
atest VtsHalAudioV6_0TargetTest
Change-Id: I19f6fdb2772878c93e41b635dc6adae83a9fecb0
Audio policy engine supports receiving a preferred device to use
for a given strategy (Engine superclass). Use of the preferred
device intervenes at the level of the each engine implementation,
here in the default engine in getDevicesForProductStrategy() method
so it is saved in the routing cache, and respects existing routing
priorities.
Refactor the loops for call and output rerouting into a new
updateCallAndOutputRouting() method.
Bug: 144440677
Test: atest AudioServiceHostTest#testPreferredDeviceRouting
Change-Id: Ic4c690e1b0d8020c4335979e40e14e6df5887879
Merged-In: Ic4c690e1b0d8020c4335979e40e14e6df5887879