summaryrefslogtreecommitdiff
path: root/media/aidl/android
AgeCommit message (Collapse)Author
2023-05-06Add toString to ST recog event types Atneya Nair
Generate toString for better logging. Bug: 281139493 Fixes: 281338538 Test: Compiles Test: soundtrigger middleware dumpsys Change-Id: Icd66c2874d2702d44bb8acc90fb5944dccebba47
2023-05-05Merge changes from topic "hds_identity" into udc-dev Atneya Nair
* changes: Remove voiceinteraction identity fabrication Plumb trusted config through soundtrigger stack
2023-05-03Plumb trusted config through soundtrigger stack Atneya Nair
Add a new argument for attaching a session for a trusted middleman. In this case, the soundtrigger stack will not attribute data delivery ops when calling back, since the trusted middleman will handle this attribution instead. Primarily used for HotwordDetectionService, which only delivers data and attributes ops onDetected. Bug: 272147641 Fixes: 278626527 Test: atest SoundTriggerManagerTest Test: atest AlwaysOnHotwordDetectorTest Test: Manual verification hotword, now playing functionality Change-Id: If0ade4a816d0972de1647d275f23e3fdb773f279
2023-05-03Add recognition session tokens Atneya Nair
A recognition event can race with a start/stop/start in quick succession. Attributing the event to the incorrect startReco leads to state mismatch between lower/upper layers. - Associate each startRecognition with an IBinder token at the STModule layer - Invalidate the token field on downwards stop calls, and drop callbacks when no session is active - Add the token as a field to framework recognition event, so async clients can drop stale events - Additionally, add protection against a startRecognition while the lock is dropped in stopRecognition - Call new startReco version in STService, and drop callbacks for stale sessions - Drop wtf on stale callback in the HAL enforcer, since we handle it gracefully at a higher layer Bug: 236826280 Fixes: 275080257 Test: SoundTriggerManagerTest# testStartTriggerStopRecognitionRace_doesNotFail Test: CtsVoiceInteractionTestCases Test: FrameworksVoiceInteractionTests Test: Smoke tests Change-Id: I8a613b5f6821636e545309c09e6dfbb67626ea2b
2023-05-02Add capture timestamp field to AIDL recognition event Nicholas Ambur
- Add RecognitionEventSys to encapsulate HAL AIDL type plus framework extras Bug: 265852186 Test: atest CtsVoiceInteractionHostTestCases Test: atest FrameworksVoiceInteractionTests Change-Id: Idd3dc44b89ea7cc8692ed5d9e6b7f4bb753a9eb6
2023-04-01Merge "Add triggerOnResourceAvailable to fake STHAL" into udc-dev Atneya Nair
2023-03-31Add triggerOnResourceAvailable to fake STHAL Atneya Nair
Exposing this functionality directly affords additional flexibility to the test instrumentation Test: atest AlwaysOnHotwordDetectorTest#isCorrectOnFailureReceived_onResumeFailed Fixes: 276474853 Change-Id: I585c721966731327fe4b99a064edfb779cd28be7
2023-03-30Merge "SoundTrigger OWNERS cleanup" am: 3445c76d33 am: a5b8acd19e am: 8d4f0e3ada Atneya Nair
Manual merge-fix to remove now deleted files. Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2510575 Change-Id: I2a2e98640da817cbea66c25b4c29040da4a9988e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-03-27SoundTrigger OWNERS cleanup Atneya Nair
- Move SoundTrigger owners to reference authoritative file - Add SoundTrigger ownership to top level services/voiceinteraction directory to simplify maintenance. Test: Compiles Fixes: 275435310 Change-Id: I3fc8e98ef017f93f7208dc2fb5073beda6dcfb18
2023-03-26Implement fake STHAL Atneya Nair
- Add injection attach method to middleware service - Add Fake Hal factory, which observes framework detach, client attach and detach, above the STHAL - Implement a same-proc ST3 HAL, which allows for observation and injection via a ISoundTriggerInjection - Override default restart runnable, death listener behavior to adapt for same-proc HAL - Implement SoundTriggerInjection, which facades over injection client attach/premption with a persistent injection interface. - Add observation methods to ISoundTriggerHal and implementors to deliver to the injection instance Test: Compiles Bug: 271197938 Change-Id: I11561672bd3b4dc28d4fd158346dfa8560d97351
2023-03-23Add AIDL interfaces for fake STHAL Atneya Nair
- Define injection interfaces, and sub-interfaces generated by the fake STHAL receiving particular events. - Use injection interfaces as session objects to handle async-ness. Test: AIDL files compile Fixes: 271197938 Change-Id: Ic169550c82881b3ca69562bc22c2a97aabd0c4f9
2023-01-23SoundTrigger owner cleanup Atneya Nair
Test: None Change-Id: I56dd9e39b8a6d443aac13d1da4864480cb8b335e
2022-10-14Move media vintf aidl_interface to system/hardware/interfaces Jeongik Cha
These interfaces are marked as vintf, so it should be used from both system and vendor. So system/hardware/interfaces is proper place over frameworks/base Test: m Bug: 249177028 Change-Id: I75d6cedd2b5d621d9e3831b3e59faf1d2387de74
2022-10-03audio: Provide boxed types for remaining primitive types Mikhail Naganov
Add Boolean, Byte, Double, Float, Long parcelables that wrap the corresponding primitive type. This is similar to the already existing Int type. Boxed types can be made @nullable, passed as 'inout' parameters, etc. Bug: 205884982 Test: m Change-Id: I0328f0b3a37835bf1f320fc35156c078a42ca067
2022-09-06Add AudioAttributes and AudioFlag for use in HAL interface for engine ↵ Lorena Torres-Huerta
configuration. This requires a version bump to android.media.audio.common.types. cc_defaults and java_defaults are used in order to avoid explicitly updating version references in several Android.bp files when we do future version bumps. Test: m Merged-In: I481d4b4e7b4f1302d508ab6eb2c7ed4336a8f801 Change-Id: I481d4b4e7b4f1302d508ab6eb2c7ed4336a8f801 (cherry picked from commit 6088f4b7bb3d3f569328b7c332dd7bce0dcedbed)
2022-08-19audio: Clarify comments on AudioPortMixExt fields Mikhail Naganov
Specify that '0' means 'unlimited' for AudioPortMixExt.maxOpenStreamCount, and 'all opened streams' for maxActiveStreamCount. Bug: 205884982 Test: N/A Merged-In: Ia212fef049778a85046e3333faa0ddf8fe167c1f Change-Id: Ia212fef049778a85046e3333faa0ddf8fe167c1f (cherry picked from commit 52ca76ed07d48f1d9b884a7082dd7481e35eb5c8)
2022-08-18Mark 'session' field in audio HAL AIDL as unused. Mikhail Naganov
The 'session' field is only used by the framework (if at all), so it being moved to the HAL AIDL to the system-specific part. Also update the comment on AudioPort. Bug: 205884982 Test: m Merged-In: Ia214c343bbf08c7944ea5ebf6140a92821941b46 Change-Id: Ia214c343bbf08c7944ea5ebf6140a92821941b46 (cherry picked from commit 8abc0314a7e6c6b6569d5e2a21e17c3040101d32)
2022-01-24Merge "audio: add Bluetooth LE Audio broadcast device" Eric Laurent
2022-01-21audio: add spatializer output flag Eric Laurent
Add output flag SPATIALIZER indicating an output mix port dedicated to spatial audio. Bug: 210803914 Test: manual spatial audio tests Change-Id: Ia60d3b7aaeef911eb1af0d0a47a54a83cd2c8418
2022-01-20audio: add Bluetooth LE Audio broadcast device Eric Laurent
Add audio device type definition for a Bluetooth LE audio broadcast group. Bug: 150670922 Test: make. Change-Id: I8b2c7966ab6d1f3c637a043c4c802b8433ba697b
2022-01-19audio: add Ultrasound input source and content_type Carter Hsu
The Ultrasound is added as the SystemAPI Bug: 200256985 Test: atest AudioAttributesTest Signed-off-by: Carter Hsu <carterhsu@google.com> Change-Id: I1a0146c32faeba3a60a4a7bdf997d985bbb12251
2021-12-15Merge "Add 'flags' to device port extended info" TreeHugger Robot
2021-12-14Add 'flags' to device port extended info Mikhail Naganov
Audio device port flags describe options applicable to device ports only. Bug: 205884982 Test: m also with VTS for WIP Audio AIDL HAL Change-Id: I57b9634b3862bfde023cad890ce2234ab57dd65d
2021-12-06Update AudioPort <-> configs mapping Mikhail Naganov
It is considered that in general there is a 1:N relationship between an AudioPort and AudioPortConfigs. The 'AudioPort.activeConfig' field could only support a 1:1 relationship, thus it got removed. Instead, an 'AudioPortConfig.portId' field added to reference the ID of the AudioPort to which this config is linked to. Bug: 205884982 Test: m Change-Id: I8ac76abaf8194c8c98deff15b2b5d3c828b9669c
2021-11-15audio: add call redirection audio modes Eric Laurent
Add two audio modes corresponding to a call redirection scenario: - AudioManager.MODE_CALL_REDIRECT: PSTN call redirection - AudioManager.MODE_COMMUNICATION_REDIRECT: VoIP call redirection When in call redirect mode, call audio uplink and downlink are not routed to regular audio sinks (e.g. earpiece) or sources (e.g. built in mic) but disconnected. A privileged app can use system APIs to inject and extract call audio and redirect the call to another device. All other media use cases operate as if no call was active. Bug: 189472651 Test: make Change-Id: I3b1a616a72b1f7c97e0e5bf7c9f76c40a28876f1
2021-10-21audio: Add missing fields from APM XSD schema to structs Mikhail Naganov
Since APM XML configuration is being replaced with data provided by the HAL, add data fields used to be in the APM XSD schema to HAL structures. Summary of changes: - Audio*Flags enum types moved to HAL types because flags are specified for mixPorts in the APM config; - AudioGainSys.useForVolume -> AudioGain; - added AudioPort.flags because they are specified in the APM config for mixPorts; since AudioIoFlags is a union, it will be used for determining the mix port role; - added AudioPortMixExt.max{Open|Active}Count; - added AudioPortMixExt.recommendedMuteDurationMs; - AudioPortConfigSys.flags -> AudioPortConfig this is for symmetry with AudioPort; - added AudioPortDeviceExt which encapsulates device and encodedFormats information for device ports. Bug: 198812639 Test: atest audiofoundation_parcelable_test Change-Id: Id5fd537b11e43e85b3caa93b2cb3bc7f482a3199
2021-10-18Support back-to-back soundtrigger recognitions Ytai Ben-Tsvi
This change allows the HAL driver, at its discretion, indicate that recognition is still active after a success event. This is achieved by an additional flag added to the event. The behavior to support this case has already been in place, for the sake of supporting a FORCED event. This change just generalizes this behavior to be able to cover SUCCESS as well. For b/w compat, when the status is FORCED, we override the new flag with 'true', indicating that recognition is still active. We do not allow the flag to be set for status codes other than FORCED or SUCCESS. Test: atest FrameworksServicesTests:{SoundTriggerMiddlewareImplTest,SoundHw2CompatTest} Test: Manual verification of sound trigger operation by invoking the assistant and now playing multiple times. Bug: 186031938 Change-Id: Ie4edf82607c72ccb0b8d90a828b04c93153ec8f3
2021-09-30Add AudioPort* to android.media.audio.common Mikhail Naganov
a.m.a.c adds a version of AudioPort and AudioPortConfig structs which are similar to Audio HIDL HAL V7, and the types they depend on. Bug: 198812639 Test: m Change-Id: I40f15fd8e9adbcea7268f2645d2dfc2c4d704e9b
2021-09-28Add AudioGain* to android.media.audio.common Mikhail Naganov
a.m.a.c adds AudioGain* types which are similar to the ones from Audio HIDL HAL V7. Bug: 198812639 Test: m Change-Id: I6471d3a85fea81e45357f5d7e4363313bd36f7c7
2021-09-28Add AudioProfile to android.media.audio.common Mikhail Naganov
a.m.a.c adds a version of AudioProfile struct which is similar to Audio HIDL HAL V7. Bug: 198812639 Test: m Change-Id: Ibb4beb21f6c7975eb0400956bca10111f186280c
2021-09-22Run aidl-format on media/aidl/android/media/audio/common Mikhail Naganov
Bug: 198812639 Test: m Change-Id: If687409694da06c7608404b29f75779e3037b10b
2021-09-22Merge "Updates to AudioDevice" TreeHugger Robot
2021-09-21Updates to AudioDevice Mikhail Naganov
1. Align the syntax for vendor extensions with HAL V7. 2. Remove "analog/digital dock" connection types, instead use a "dock" in/out device. Bug: 198812639 Test: m Change-Id: I288999896ba7ab352510167c5d0b0a53723689c9
2021-09-20Move AudioMMapPolicy* from android.media to a.m.audio.common SAIDL jiabin
Bug: 193275465 Test: make Change-Id: Ic0f5c1d82011d6372b69cf3e99c971c1efd6465b
2021-09-17Add stuctured audio device address type: AudioDeviceAddress Mikhail Naganov
This type is similar to `DeviceAddress` from Audio HAL V7. Bug: 198812639 Test: m Change-Id: I9d36ab43290bb471aad042dade91a2b5e8f96c4f
2021-09-17Move AudioDevice* from android.media -> a.m.audio.common SAIDL Mikhail Naganov
Also add missing "@hide" on a few interfaces Bug: 198812639 Test: m Change-Id: Ie5205571e17300008a1c80ef4dbe50c0a248ba6b
2021-09-07Move more types from android.media -> a.m.audio.common SAIDL Mikhail Naganov
Move types that are known to be used by audio HALs (those listed in h/i/audio/common/7.0/types.hal): - AudioContentType - AudioEncapsulationMetadataType - AudioEncapsulationType - AudioMode - AudioSource (renamed from AudioSourceType to match the name of MediaRecorder.AudioSource) - AudioUuid Bug: 198812639 Test: m Change-Id: I3331d7e3d76db50f5b3c4db57891a20e4f935ad8
2021-09-03Merge "AudioFormatDescription: remove docs about encapsulation" TreeHugger Robot
2021-09-02AudioFormatDescription: remove docs about encapsulation Mikhail Naganov
Initially there was an idea to use MIME-compatible '+' syntax for specifying both the encapsulated format and the format of encapsulation, e.g. 'audio/x-iec61937+audio/ac3'. However, it seems to create too many caveats when comparing type values and converting to/from legacy and SDK types. Thus, it's better to store the encapsulation information in a separate type 'AudioEncapsulationType'. Bug: 198000804 Test: m Change-Id: Ieb50ce6b895e54df7d38e865bc9ae1f14a17789e
2021-09-02aidl-format android.media.audio.common.types AIDLs Mikhail Naganov
Apply default format for consistency. Test: m Change-Id: I7fbcd16ef87c5016621757fa308d3905cb64c16e
2021-08-31Move in common audio types into audio.media.audio.common Mikhail Naganov
The following types added or updated: - AudioConfig - AudioConfigBase - AudioEncapsulationMode - AudioOffloadInfo - AudioStreamType - AudioUsage Added comments to AIDL files to match the SDK definitions. Updated conversion code to/from legacy. Unified error handling. Bug: 188932434 Test: atest AidlConversionUnitTests Test: atest SoundHw2CompatTest Test: atest SoundTriggerMiddlewareImplTest Change-Id: I9299eec684410940216695799dfe67b175918671
2021-08-24Move common audio AIDL types to audio.media.audio.common Mikhail Naganov
The following types are being moved from 'android.media': - AudioChannelLayout - AudioFormatDescription - AudioFormatType - PcmType AudioChannelLayout replaces legacy-based AudioChannelMask type. AudioFormatDescription replaces legacy-based AudioFormat type. Updated conversion functions. Bug: 188932434 Test: atest AidlConversionUnitTests Test: atest SoundHw2CompatTest Test: atest SoundTriggerMiddlewareImplTest Change-Id: Id002177f6b7f651389b59b0f476e6e2d28be4592
2021-03-30Add equals() / toString() to media parcelables Ytai Ben-Tsvi
This annotation adds equals() / toString() to generated Java code, which is useful for testing and diagnostics. Change-Id: I15a65d18d92035e9edbfb465f7a1ba53369530fb
2021-03-30Extract capture session out of RecognitionEvent Ytai Ben-Tsvi
This field is not used by the HAL and is specific to the framework. Extracting it to a separate argument, so the struct can be reused by the HAL. Test: Manual testing of OKG/Now Playing Test: atest SoundTriggerMiddlewareImplTest Change-Id: I468d124ad6516c49906d5244618204ad91e57368
2021-03-30Extract stable AIDL modules Ytai Ben-Tsvi
These types are intended to be shared with HAL interfaces and are moved to a more generic directory/namespace and a stable build target. There is no semantic change here. Test: m Change-Id: I4cedbab7e87d4895994ce8d26bd7e89f059a0103
2021-03-12Merge "Add attributionTag to audio-recordings" into sc-dev am: d63065cb6f Nate Myren
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13537125 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I1b880886f44a13d573c5f08d0ae1a0b32f46b36c
2021-03-11Add attributionTag to audio-recordings Philip P. Moltmann
... by switching from packageName/uid/pid to the Identity class. This allows up to track which parts of the app trigger audio-recordings. Test: atest CtsAppOpsTestCases CtsNativeMediaAAudioTestCases Fixes: 160150145 Change-Id: I0913a336a862e4a1cb38b9d967cfbdc490513ab0
2021-03-05Adopt "resourcesAvailable" naming instead of "tryAgain" Ytai Ben-Tsvi
Test: Compiles Bug: 178722883 Change-Id: I13c983ae34d33f616677280eb856c17fb5c69ed8
2021-03-05Support load preemption in SoundTriggerMiddleware Ytai Ben-Tsvi
This change add support for HAL-based model preemption in SoundTriggerMiddleware and gets rid of the notion of service availability. Test: atest SoundTriggerMiddlewareImplTest SoundHw2CompatTest Manual verification of basic soundtrigger flows. Bug: 178722883 Change-Id: I8bc5949844bb8754335a98b09935ade651cb7903
2021-03-01Support sound models with no data Ytai Ben-Tsvi
This change allows using SoundModels with null or empty data. Test: Manual testing of soundtrigger use-cases. Testing of null-/empty-data models using SoundTriggerTestService and mocked HAL. Fixes: 181103994 Change-Id: I00b3c4e343a81e9f4f4580becf1128fd3ba60b14