From 3bc7741e914a6a1761c63bcddbcead706c45a78d Mon Sep 17 00:00:00 2001 From: Baekgyeong Kim Date: Tue, 19 Nov 2019 16:08:11 +0900 Subject: [PATCH] Add audio stream and usage for virtual assistant 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: I3696d8fba32070954cc6a330574af8507fea7a74 --- audio/6.0/config/api/current.txt | 1 + .../6.0/config/audio_policy_configuration.xsd | 1 + audio/common/6.0/types.hal | 1 + audio/effect/6.0/xml/api/current.txt | 1 + audio/effect/6.0/xml/audio_effects_conf.xsd | 231 +++++++++++++++++- current.txt | 2 +- 6 files changed, 235 insertions(+), 2 deletions(-) mode change 120000 => 100644 audio/effect/6.0/xml/audio_effects_conf.xsd diff --git a/audio/6.0/config/api/current.txt b/audio/6.0/config/api/current.txt index ddd4d1ccc6..0407d69c35 100644 --- a/audio/6.0/config/api/current.txt +++ b/audio/6.0/config/api/current.txt @@ -361,6 +361,7 @@ package audio.policy.configuration.V6_0 { method public String getRawName(); enum_constant public static final audio.policy.configuration.V6_0.Stream AUDIO_STREAM_ACCESSIBILITY; enum_constant public static final audio.policy.configuration.V6_0.Stream AUDIO_STREAM_ALARM; + enum_constant public static final audio.policy.configuration.V6_0.Stream AUDIO_STREAM_ASSISTANT; enum_constant public static final audio.policy.configuration.V6_0.Stream AUDIO_STREAM_BLUETOOTH_SCO; enum_constant public static final audio.policy.configuration.V6_0.Stream AUDIO_STREAM_DTMF; enum_constant public static final audio.policy.configuration.V6_0.Stream AUDIO_STREAM_ENFORCED_AUDIBLE; diff --git a/audio/6.0/config/audio_policy_configuration.xsd b/audio/6.0/config/audio_policy_configuration.xsd index 3fab7dc151..05c8ab46e8 100644 --- a/audio/6.0/config/audio_policy_configuration.xsd +++ b/audio/6.0/config/audio_policy_configuration.xsd @@ -551,6 +551,7 @@ + diff --git a/audio/common/6.0/types.hal b/audio/common/6.0/types.hal index e69d9691b7..563e05d6ca 100644 --- a/audio/common/6.0/types.hal +++ b/audio/common/6.0/types.hal @@ -106,6 +106,7 @@ enum AudioStreamType : int32_t { TTS = 9, // Transmitted Through Speaker. Plays over speaker // only, silent on other devices ACCESSIBILITY = 10, // For accessibility talk back prompts + ASSISTANT = 11, // For virtual assistant service }; @export(name="audio_source_t", value_prefix="AUDIO_SOURCE_") diff --git a/audio/effect/6.0/xml/api/current.txt b/audio/effect/6.0/xml/api/current.txt index 2021639630..2dfcb9b348 100644 --- a/audio/effect/6.0/xml/api/current.txt +++ b/audio/effect/6.0/xml/api/current.txt @@ -82,6 +82,7 @@ package audio.effects.V6_0 { public enum StreamOutputType { method public String getRawName(); enum_constant public static final audio.effects.V6_0.StreamOutputType alarm; + enum_constant public static final audio.effects.V6_0.StreamOutputType assistant; enum_constant public static final audio.effects.V6_0.StreamOutputType bluetooth_sco; enum_constant public static final audio.effects.V6_0.StreamOutputType dtmf; enum_constant public static final audio.effects.V6_0.StreamOutputType enforced_audible; diff --git a/audio/effect/6.0/xml/audio_effects_conf.xsd b/audio/effect/6.0/xml/audio_effects_conf.xsd deleted file mode 120000 index 9d85fa7c68..0000000000 --- a/audio/effect/6.0/xml/audio_effects_conf.xsd +++ /dev/null @@ -1 +0,0 @@ -../../2.0/xml/audio_effects_conf.xsd \ No newline at end of file diff --git a/audio/effect/6.0/xml/audio_effects_conf.xsd b/audio/effect/6.0/xml/audio_effects_conf.xsd new file mode 100644 index 0000000000..a7ff20bb1c --- /dev/null +++ b/audio/effect/6.0/xml/audio_effects_conf.xsd @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of effect libraries to load. Each library element must have "name" and + "path" attributes. The latter is giving the path of the library .so file + relative to the standard effect folders: /(vendor|odm|system)/lib(64)?/soundfx/ + Example for a library in "/vendor/lib/soundfx/lib.so": + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + List of effects to load. Each effect element must contain "name", + "library", and "uuid" attrs. The value of the "library" attr must + correspond to the name of a "library" element. The name of the effect + element is indicative, only the value of the "uuid" element designates + the effect for the audio framework. The uuid is the implementation + specific UUID as specified by the effect vendor. This is not the generic + effect type UUID. + For effect proxy implementations, SW and HW implemetations of the effect + can be specified. + Example: + + + + + + + + + + + + + + + + + + + + + + + + + Audio preprocessing configuration. The processing configuration consists + of a list of elements each describing processing settings for a given + input stream. Valid input stream types are listed in "streamInputType". + Each stream element contains a list of "apply" elements. The value of the + "effect" attr must correspond to the name of an "effect" element. + Example: + + + + + + + + + + + + + + + + Audio postprocessing configuration. The processing configuration consists + of a list of elements each describing processing settings for a given + output stream. Valid output stream types are listed in "streamOutputType". + Each stream element contains a list of "apply" elements. The value of the + "effect" attr must correspond to the name of an "effect" element. + Example: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/current.txt b/current.txt index 1fe17d5ca4..b54c16aad4 100644 --- a/current.txt +++ b/current.txt @@ -605,7 +605,7 @@ fd1f1b29f26b42e886220f04a08086c00e5ade9d7b53f095438e578ab9d42a93 android.hardwar 2df5d5866b37776f25079c0e54b54350a2abe4e025a59c9e02a7d3abe8ca00e8 android.hardware.audio@6.0::IStreamIn 78e4138cc8307c11fc777c3bd376e581ba4ba48196b05ca1d7cdfa515c87b48a android.hardware.audio@6.0::IStreamOut 997fdaad7a9d17ee7e01feb7031a753e2365e72ad30b11d950e9183fabdf3844 android.hardware.audio@6.0::IStreamOutCallback -1349686814402fa10f711cc5763bc629aafc64a5f5843b4b21b8cd86ffb923e6 android.hardware.audio.common@6.0::types +8c4232772efeb9905b4c287723e0ee8b2c4bf5ba11728d051171b070e3d79144 android.hardware.audio.common@6.0::types 817930d58412d662cb45e641c50cb62c727e4a3e3ffe7029a53cad9677b97d58 android.hardware.audio.effect@6.0::types 525bec6b44f1103869c269a128d51b8dccd73af5340ba863c8886c68357c7faf android.hardware.audio.effect@6.0::IAcousticEchoCancelerEffect 8d76bbe3719d051a8e9a1dcf9244f37f5b0a491feb249fa48391edf7cb4f3131 android.hardware.audio.effect@6.0::IAutomaticGainControlEffect