OSDN Git Service

Audio V4: Split system and vendor Audio.h
authorKevin Rocard <krocard@google.com>
Wed, 17 Jan 2018 23:57:40 +0000 (15:57 -0800)
committerKevin Rocard <krocard@google.com>
Tue, 23 Jan 2018 06:07:02 +0000 (22:07 -0800)
audio.h and its dependencies (audio-effect.h, sound_trigger.h...)
used to be shared between system and vendor code.

This led to multiple problems:

1) Such sharing contradicts the Treble policy of
strict independence of framework and vendor code.

2) When audio.h was changed, every vendor needed to update
its code in the next release. This meant that audio*.h
headers were mostly changed in backward compatible manner.
Nevertheless, for P the HIDL interface and thus the audio.h
interface are changed in backward incompatible way.
(Some enum are becoming 64 bit long).

3) As the headers were common, some API used only by the framework
needed to be visible to the vendors (mostly enum values).

4) Treble policy is to support at least one previous HAL version

As a result the audio*.h headers are now duplicated,
one set for the framework, and one for the vendor.

Each set will evolve independently. After this split,
the framework-only APIs will be removed from the vendor headers
and vice versa.

The split is implements as such:

 + for system code

    - NOT moving the libaudio_system_headers
      Eg: system/audio.h and system/audio_effects/effect_equalizer.h
          are still in system/media/audio

    - the legacy audio HAL API that were in libhardware headers
          are now in libaudiohal_legacy_headers
      Eg: hardware/audio.h and hardware/audio_effect.h
          are now in frameworks/av/media/libaudiohal/legacy/

 + for vendor code

    - moving libaudio_system_headers and the legacy audio HAL API
          that were in libhardware_headers in
          android.hardware.audio.common.legacy@2.0
      Note that those headers are now versioned, so migrating to a @4.0
          HIDL HAL will mean changing the legacy dependency too.
      Eg: system/audio.h, system/audio-effect.h, hardware/audio.h
          are now in hardware/interfaces/audio/common/2.0/legacy

    - the legacy audio effect HAL API that was in libaudioeffects
          is now moved in android.hardware.audio.effect.legacy@2.0
      Eg: audio_effects/effect*.h are now in
          hardware/interfaces/audio/effect/2.0/legacy

    - the legacy sound trigger HAL API that were in libhardware_headers
          is now moved in android.hardware.soundtrigger.legacy@2.0
      Eg: hardware/sound_trigger.h is now in
          hardware/interfaces/audio/effect/2.0/legacy

libaudioutil being used by both system and vendor, had
to be renamed for system to libaudioutil_system.

Vendor libs that now depend on the audio.h of a specific
version and are not extensively referenced in non google code,
append @2.0 to their name.

Note that headers that are not expected to change in the 4.0 HAL are
left in all-versions folder to avoid duplication.
This is an implementation detail as the versioned libraries export
the all-versions headers.

Note that strict vendor-system separation is enforced by the
build-system. The system headers are not available for vendor
libs and vice-versa.

Note that this patch is split between numerous git repository (>10),
all the commits having the same Change-id for searchability.

Note that audio_policy.h is no longer exposed to vendors
as the legacy audio policy HAL API was never officially supported.
As a result the audiopolicy stub implementation has been removed.

Test: compile taimen-userdebug walleye-userdebug
              sailfish-userdebug marlin-userdebug
              gce_x86_phone-userdebug gce_x86_phone
              full-eng aosp_arm aosp_x86-eng
Test: check that the emulator booted and played audio
Test: full QA on sailfish-userdebug and taimen-userdebug
Bug: 38184704
Change-Id: I950f4e0a55613d72e32eba31bd563cb5bafe2d1a
Signed-off-by: Kevin Rocard <krocard@google.com>
18 files changed:
alsa_utils/Android.bp
alsa_utils/alsa_device_profile.c
alsa_utils/include/alsa_format.h
audio/Android.bp
audio_effects/Android.bp [deleted file]
audio_effects/include/audio_effects/effect_aec.h [deleted file]
audio_effects/include/audio_effects/effect_agc.h [deleted file]
audio_effects/include/audio_effects/effect_bassboost.h [deleted file]
audio_effects/include/audio_effects/effect_downmix.h [deleted file]
audio_effects/include/audio_effects/effect_environmentalreverb.h [deleted file]
audio_effects/include/audio_effects/effect_equalizer.h [deleted file]
audio_effects/include/audio_effects/effect_loudnessenhancer.h [deleted file]
audio_effects/include/audio_effects/effect_ns.h [deleted file]
audio_effects/include/audio_effects/effect_presetreverb.h [deleted file]
audio_effects/include/audio_effects/effect_virtualizer.h [deleted file]
audio_effects/include/audio_effects/effect_visualizer.h [deleted file]
audio_utils/Android.bp
audio_utils/tests/Android.bp

index db6beb1..0d1eb3e 100644 (file)
@@ -23,10 +23,10 @@ cc_library_shared {
     ],
     export_include_dirs: ["include"],
     header_libs: [
-        "libaudio_system_headers",
+        "android.hardware.audio.common.legacy@2.0",
     ],
     export_header_lib_headers: [
-        "libaudio_system_headers",
+        "android.hardware.audio.common.legacy@2.0",
     ],
     shared_libs: [
         "liblog",
index 10ab3e4..9f37c9c 100644 (file)
@@ -22,6 +22,7 @@
 #include <inttypes.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 #include <cutils/properties.h>
 
 #include <log/log.h>
index e07f836..f330f4e 100644 (file)
@@ -17,7 +17,6 @@
 #ifndef ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_FORMAT_H
 #define ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_FORMAT_H
 
-#include <system/audio.h>
 
 #include <tinyalsa/asoundlib.h>
 
index 1e9e569..ae8d344 100644 (file)
@@ -1,7 +1,6 @@
 cc_library_headers {
     name: "libaudio_system_headers",
     host_supported: true,
-    vendor_available: true,
 
     header_libs: ["libcutils_headers"],
     export_header_lib_headers: ["libcutils_headers"],
diff --git a/audio_effects/Android.bp b/audio_effects/Android.bp
deleted file mode 100644 (file)
index 78d2abe..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-cc_library_headers {
-    name: "libaudioeffects",
-    vendor_available: true,
-    header_libs: ["libhardware_headers"],
-    export_header_lib_headers: ["libhardware_headers"],
-    export_include_dirs: ["include"],
-}
diff --git a/audio_effects/include/audio_effects/effect_aec.h b/audio_effects/include/audio_effects/effect_aec.h
deleted file mode 100644 (file)
index f48749a..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_AEC_H_
-#define ANDROID_EFFECT_AEC_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_aec.h>
-
-#endif /*ANDROID_EFFECT_AEC_H_*/
diff --git a/audio_effects/include/audio_effects/effect_agc.h b/audio_effects/include/audio_effects/effect_agc.h
deleted file mode 100644 (file)
index 466ea96..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_AGC_H_
-#define ANDROID_EFFECT_AGC_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_agc.h>
-
-#endif /*ANDROID_EFFECT_AGC_H_*/
diff --git a/audio_effects/include/audio_effects/effect_bassboost.h b/audio_effects/include/audio_effects/effect_bassboost.h
deleted file mode 100644 (file)
index 157452e..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_BASSBOOST_H_
-#define ANDROID_EFFECT_BASSBOOST_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_bassboost.h>
-
-#endif /*ANDROID_EFFECT_BASSBOOST_H_*/
diff --git a/audio_effects/include/audio_effects/effect_downmix.h b/audio_effects/include/audio_effects/effect_downmix.h
deleted file mode 100644 (file)
index 26b849b..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_DOWNMIX_H_
-#define ANDROID_EFFECT_DOWNMIX_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_downmix.h>
-
-#endif /*ANDROID_EFFECT_DOWNMIX_H_*/
diff --git a/audio_effects/include/audio_effects/effect_environmentalreverb.h b/audio_effects/include/audio_effects/effect_environmentalreverb.h
deleted file mode 100644 (file)
index dd474c2..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_ENVIRONMENTALREVERB_H_
-#define ANDROID_EFFECT_ENVIRONMENTALREVERB_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_environmentalreverb.h>
-
-#endif /*ANDROID_EFFECT_ENVIRONMENTALREVERB_H_*/
diff --git a/audio_effects/include/audio_effects/effect_equalizer.h b/audio_effects/include/audio_effects/effect_equalizer.h
deleted file mode 100644 (file)
index 3059ec2..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_EQUALIZER_H_
-#define ANDROID_EFFECT_EQUALIZER_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_equalizer.h>
-
-#endif /*ANDROID_EFFECT_EQUALIZER_H_*/
diff --git a/audio_effects/include/audio_effects/effect_loudnessenhancer.h b/audio_effects/include/audio_effects/effect_loudnessenhancer.h
deleted file mode 100644 (file)
index f37ba45..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_LOUDNESS_ENHANCER_H_
-#define ANDROID_EFFECT_LOUDNESS_ENHANCER_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_loudnessenhancer.h>
-
-#endif /*ANDROID_EFFECT_LOUDNESS_ENHANCER_H_*/
diff --git a/audio_effects/include/audio_effects/effect_ns.h b/audio_effects/include/audio_effects/effect_ns.h
deleted file mode 100644 (file)
index 3bd8a41..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_NS_H_
-#define ANDROID_EFFECT_NS_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_ns.h>
-
-#endif /*ANDROID_EFFECT_NS_H_*/
diff --git a/audio_effects/include/audio_effects/effect_presetreverb.h b/audio_effects/include/audio_effects/effect_presetreverb.h
deleted file mode 100644 (file)
index eac1f5f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_PRESETREVERB_H_
-#define ANDROID_EFFECT_PRESETREVERB_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_presetreverb.h>
-
-#endif /*ANDROID_EFFECT_PRESETREVERB_H_*/
diff --git a/audio_effects/include/audio_effects/effect_virtualizer.h b/audio_effects/include/audio_effects/effect_virtualizer.h
deleted file mode 100644 (file)
index aeecfa5..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_VIRTUALIZER_H_
-#define ANDROID_EFFECT_VIRTUALIZER_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_virtualizer.h>
-
-#endif /*ANDROID_EFFECT_VIRTUALIZER_H_*/
diff --git a/audio_effects/include/audio_effects/effect_visualizer.h b/audio_effects/include/audio_effects/effect_visualizer.h
deleted file mode 100644 (file)
index 47217e7..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_VISUALIZER_H_
-#define ANDROID_EFFECT_VISUALIZER_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_visualizer.h>
-
-#endif /*ANDROID_EFFECT_VISUALIZER_H_*/
index bab4b48..105078c 100644 (file)
@@ -12,13 +12,8 @@ cc_defaults {
     ],
 }
 
-cc_library {
-    name: "libaudioutils",
-    vendor_available: true,
-    vndk: {
-        enabled: true,
-    },
-    host_supported: true,
+cc_defaults {
+    name: "libaudioutils_default",
     defaults: ["audio_utils_defaults"],
 
     srcs: [
@@ -37,12 +32,10 @@ cc_library {
     ],
 
     header_libs: [
-        "libaudio_system_headers",
         "libutils_headers",
     ],
 
     export_header_lib_headers: [
-        "libaudio_system_headers",
         "libutils_headers",
     ],
 
@@ -68,6 +61,28 @@ cc_library {
         },
     },
 }
+cc_library {
+    name: "libaudioutils_system",
+    host_supported: true,
+    defaults: ["libaudioutils_default"],
+    header_libs: [
+        "libaudio_system_headers",
+    ],
+    export_header_lib_headers: [
+        "libaudio_system_headers",
+    ],
+}
+cc_library {
+    name: "libaudioutils",
+    vendor: true,
+    defaults: ["libaudioutils_default"],
+    header_libs: [
+        "android.hardware.audio.common.legacy@2.0",
+    ],
+    export_header_lib_headers: [
+        "android.hardware.audio.common.legacy@2.0",
+    ],
+}
 
 cc_library_static {
     name: "libaudioutils_fixedfft",
index 8eec07c..40877b8 100644 (file)
@@ -15,10 +15,10 @@ cc_test {
     ],
     target: {
         android: {
-            shared_libs: ["libaudioutils"],
+            shared_libs: ["libaudioutils_system"],
         },
         host: {
-            static_libs: ["libaudioutils"],
+            static_libs: ["libaudioutils_system"],
         },
     }
 }
@@ -39,7 +39,7 @@ cc_binary {
     ],
     static_libs: [
         "libgoogle-benchmark",
-        "libaudioutils",
+        "libaudioutils_system",
     ],
 }
 
@@ -47,7 +47,7 @@ cc_binary {
     name: "fifo_tests",
     host_supported: true,
     srcs: ["fifo_tests.cpp"],
-    shared_libs: ["libaudioutils"],
+    shared_libs: ["libaudioutils_system"],
     static_libs: ["libsndfile"],
     cflags: [
         "-Werror",
@@ -59,7 +59,7 @@ cc_binary {
     name: "fifo_multiprocess",
     host_supported: false,
     srcs: ["fifo_multiprocess.cpp"],
-    shared_libs: ["libaudioutils", "libcutils"],
+    shared_libs: ["libaudioutils_system", "libcutils"],
     static_libs: ["libsndfile"],
     cflags: [
         "-Werror",
@@ -75,7 +75,7 @@ cc_binary_host {
         "getch.c",
     ],
     static_libs: [
-        "libaudioutils",
+        "libaudioutils_system",
         "liblog",
     ],
     cflags: [
@@ -87,7 +87,7 @@ cc_binary_host {
 cc_binary_host {
     name: "limiter_tests",
     srcs: ["limiter_tests.c"],
-    static_libs: ["libaudioutils"],
+    static_libs: ["libaudioutils_system"],
     cflags: [
         "-Werror",
         "-Wall",
@@ -111,10 +111,10 @@ cc_test {
     ],
     target: {
         android: {
-            shared_libs: ["libaudioutils"],
+            shared_libs: ["libaudioutils_system"],
         },
         host: {
-            static_libs: ["libaudioutils"],
+            static_libs: ["libaudioutils_system"],
         },
     }
 }
@@ -135,10 +135,10 @@ cc_test {
     ],
     target: {
         android: {
-            shared_libs: ["libaudioutils"],
+            shared_libs: ["libaudioutils_system"],
         },
         host: {
-            static_libs: ["libaudioutils"],
+            static_libs: ["libaudioutils_system"],
         },
     }
 }
@@ -159,10 +159,10 @@ cc_test {
     ],
     target: {
         android: {
-            shared_libs: ["libaudioutils"],
+            shared_libs: ["libaudioutils_system"],
         },
         host: {
-            static_libs: ["libaudioutils"],
+            static_libs: ["libaudioutils_system"],
         },
     }
 }
@@ -183,10 +183,10 @@ cc_test {
     ],
     target: {
         android: {
-            shared_libs: ["libaudioutils"],
+            shared_libs: ["libaudioutils_system"],
         },
         host: {
-            static_libs: ["libaudioutils"],
+            static_libs: ["libaudioutils_system"],
         },
     }
 }
@@ -206,10 +206,10 @@ cc_test {
     ],
     target: {
         android: {
-            shared_libs: ["libaudioutils"],
+            shared_libs: ["libaudioutils_system"],
         },
         host: {
-            static_libs: ["libaudioutils"],
+            static_libs: ["libaudioutils_system"],
         },
     }
 }