Skip to content
Snippets Groups Projects
  1. May 07, 2023
    • Atneya Nair's avatar
      Add toString to ST recog event types · 34a070a6
      Atneya Nair authored
      Generate toString for better logging.
      
      Bug: 281139493
      Fixes: 281338538
      Test: Compiles
      Test: soundtrigger middleware dumpsys
      Change-Id: Icd66c2874d2702d44bb8acc90fb5944dccebba47
      34a070a6
  2. May 04, 2023
    • Atneya Nair's avatar
      Plumb trusted config through soundtrigger stack · 31316ca7
      Atneya Nair authored
      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
      31316ca7
  3. May 03, 2023
    • Atneya Nair's avatar
      Add recognition session tokens · 749650c2
      Atneya Nair authored
      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
      749650c2
  4. May 02, 2023
    • Nicholas Ambur's avatar
      Add capture timestamp field to AIDL recognition event · 25272aab
      Nicholas Ambur authored
      - Add RecognitionEventSys to encapsulate HAL AIDL type plus framework extras
      
      Bug: 265852186
      Test: atest CtsVoiceInteractionHostTestCases
      Test: atest FrameworksVoiceInteractionTests
      Change-Id: Idd3dc44b89ea7cc8692ed5d9e6b7f4bb753a9eb6
      25272aab
  5. Mar 31, 2023
    • Atneya Nair's avatar
      Add triggerOnResourceAvailable to fake STHAL · 147d90ed
      Atneya Nair authored
      Exposing this functionality directly affords additional flexibility
      to the test instrumentation
      
      Test: atest AlwaysOnHotwordDetectorTest#isCorrectOnFailureReceived_onResumeFailed
      Fixes: 276474853
      Change-Id: I585c721966731327fe4b99a064edfb779cd28be7
      147d90ed
  6. Mar 28, 2023
    • Atneya Nair's avatar
      SoundTrigger OWNERS cleanup · 72554e39
      Atneya Nair authored
      - 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
      72554e39
  7. Mar 27, 2023
    • Atneya Nair's avatar
      Implement fake STHAL · 890b2b36
      Atneya Nair authored
      - 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
      890b2b36
  8. Mar 24, 2023
    • Atneya Nair's avatar
      Add AIDL interfaces for fake STHAL · 52bf345a
      Atneya Nair authored
      - 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
      52bf345a
  9. Jan 23, 2023
  10. Oct 14, 2022
  11. Oct 03, 2022
    • Mikhail Naganov's avatar
      audio: Provide boxed types for remaining primitive types · f73b21dd
      Mikhail Naganov authored
      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
      f73b21dd
  12. Sep 06, 2022
  13. Aug 25, 2022
  14. Aug 19, 2022
    • Mikhail Naganov's avatar
      audio: Clarify comments on AudioPortMixExt fields · e9afecbb
      Mikhail Naganov authored
      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 52ca76ed)
      e9afecbb
  15. Aug 18, 2022
    • Mikhail Naganov's avatar
      Mark 'session' field in audio HAL AIDL as unused. · 439df6e2
      Mikhail Naganov authored
      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 8abc0314)
      439df6e2
  16. Mar 23, 2022
  17. Mar 14, 2022
    • Mikhail Naganov's avatar
      Mark 'session' field in audio HAL AIDL as unused. · 8abc0314
      Mikhail Naganov authored
      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
      Change-Id: Ia214c343bbf08c7944ea5ebf6140a92821941b46
      8abc0314
  18. Jan 21, 2022
    • Eric Laurent's avatar
      audio: add spatializer output flag · 95e9e26c
      Eric Laurent authored
      Add output flag SPATIALIZER indicating an
      output mix port dedicated to spatial audio.
      
      Bug: 210803914
      Test: manual spatial audio tests
      Change-Id: Ia60d3b7aaeef911eb1af0d0a47a54a83cd2c8418
      95e9e26c
  19. Jan 20, 2022
  20. Jan 19, 2022
  21. Jan 06, 2022
    • Josh Wu's avatar
      Add necessary parcelables of metadata · 04a84760
      Josh Wu authored
      This change partial upstream necessary
      a.m.audio.common.types for aosp/1936041.
      
      Bug: 203490261
      Test: m android.hardware.audio.common
      Change-Id: Ice160b3eb642245daaa47394b156fd1ebafab82b
      Merged-In: I3331d7e3d76db50f5b3c4db57891a20e4f935ad8
      04a84760
  22. Dec 14, 2021
    • Mikhail Naganov's avatar
      Add 'flags' to device port extended info · cc628bf5
      Mikhail Naganov authored
      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
      cc628bf5
  23. Dec 06, 2021
    • Mikhail Naganov's avatar
      Update AudioPort <-> configs mapping · 9a63dde7
      Mikhail Naganov authored
      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
      9a63dde7
  24. Nov 15, 2021
    • Eric Laurent's avatar
      audio: add call redirection audio modes · 1c3408fc
      Eric Laurent authored
      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
      1c3408fc
  25. Oct 21, 2021
    • Mikhail Naganov's avatar
      audio: Add missing fields from APM XSD schema to structs · d80ff5a7
      Mikhail Naganov authored
      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
      d80ff5a7
  26. Oct 18, 2021
    • Ytai Ben-Tsvi's avatar
      Support back-to-back soundtrigger recognitions · 78bb22a1
      Ytai Ben-Tsvi authored
      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
      78bb22a1
  27. Sep 30, 2021
    • Mikhail Naganov's avatar
      Add AudioPort* to android.media.audio.common · af0e3bf5
      Mikhail Naganov authored
      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
      af0e3bf5
  28. Sep 28, 2021
  29. Sep 23, 2021
  30. Sep 21, 2021
    • Mikhail Naganov's avatar
      Updates to AudioDevice · 8cebf069
      Mikhail Naganov authored
      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
      8cebf069
  31. Sep 20, 2021
  32. Sep 17, 2021
  33. Sep 07, 2021
    • Mikhail Naganov's avatar
      Move more types from android.media -> a.m.audio.common SAIDL · 67c75e46
      Mikhail Naganov authored
      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
      67c75e46
  34. Sep 03, 2021
    • Mikhail Naganov's avatar
      AudioFormatDescription: remove docs about encapsulation · 8dad472e
      Mikhail Naganov authored
      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
      8dad472e
  35. Sep 02, 2021
  36. Sep 01, 2021
    • Mikhail Naganov's avatar
      Move in common audio types into audio.media.audio.common · b6148eed
      Mikhail Naganov authored
      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
      b6148eed
  37. Aug 24, 2021
    • Mikhail Naganov's avatar
      Move common audio AIDL types to audio.media.audio.common · 1571010b
      Mikhail Naganov authored
      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
      1571010b
Loading