summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOscar Azucena <oscarazu@google.com>2020-06-16 22:22:45 -0700
committerOscar Azucena <oscarazu@google.com>2020-06-17 20:09:46 -0700
commitfadcdfa51c9189d619a1f6a8adae09ed80b751d5 (patch)
tree747691c3cb1977b059de2f3242dd8087e5f839b3
parent15d270acab395c7c5b489863eb4562b067fc2b51 (diff)
downloaddevice_generic_car-fadcdfa51c9189d619a1f6a8adae09ed80b751d5.tar.gz
device_generic_car-fadcdfa51c9189d619a1f6a8adae09ed80b751d5.tar.bz2
device_generic_car-fadcdfa51c9189d619a1f6a8adae09ed80b751d5.zip
Enabled car audio in car emulator
Goldfish had disabled car audio with their latest changes. Re-enabled car audio by enabling EMULATOR_VENDOR_NO_SOUND flag. Also added missing car audio HAL information. Bug: 159165632 Test: Run emulator and verify MZ audio works as expected. Change-Id: I4edfc928ce2c1bc89de35719622136f47b6a143d
-rw-r--r--aosp_car_arm.mk1
-rw-r--r--aosp_car_arm64.mk1
-rw-r--r--aosp_car_x86.mk1
-rw-r--r--aosp_car_x86_64.mk1
-rw-r--r--car_x86_64.mk1
-rw-r--r--emulator/audio/car_emulator_audio.mk3
-rw-r--r--emulator/audio/driver/Android.bp1
-rw-r--r--emulator/audio/driver/android.hardware.audio@6.0-impl.xml25
8 files changed, 34 insertions, 0 deletions
diff --git a/aosp_car_arm.mk b/aosp_car_arm.mk
index 9698d61..3a0909a 100644
--- a/aosp_car_arm.mk
+++ b/aosp_car_arm.mk
@@ -18,6 +18,7 @@ PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay
$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_arm.mk)
+EMULATOR_VENDOR_NO_SOUND := true
PRODUCT_NAME := aosp_car_arm
PRODUCT_DEVICE := generic
PRODUCT_BRAND := Android
diff --git a/aosp_car_arm64.mk b/aosp_car_arm64.mk
index 682f9b1..c07da6c 100644
--- a/aosp_car_arm64.mk
+++ b/aosp_car_arm64.mk
@@ -18,6 +18,7 @@ PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay
$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_arm64.mk)
+EMULATOR_VENDOR_NO_SOUND := true
PRODUCT_NAME := aosp_car_arm64
PRODUCT_DEVICE := generic_arm64
PRODUCT_BRAND := Android
diff --git a/aosp_car_x86.mk b/aosp_car_x86.mk
index f6138c0..f2e0713 100644
--- a/aosp_car_x86.mk
+++ b/aosp_car_x86.mk
@@ -18,6 +18,7 @@ PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay
$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_x86.mk)
+EMULATOR_VENDOR_NO_SOUND := true
PRODUCT_NAME := aosp_car_x86
PRODUCT_DEVICE := generic_x86
PRODUCT_BRAND := Android
diff --git a/aosp_car_x86_64.mk b/aosp_car_x86_64.mk
index 360a349..2a5e20a 100644
--- a/aosp_car_x86_64.mk
+++ b/aosp_car_x86_64.mk
@@ -18,6 +18,7 @@ PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay
$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_x86_64.mk)
+EMULATOR_VENDOR_NO_SOUND := true
PRODUCT_NAME := aosp_car_x86_64
PRODUCT_DEVICE := generic_x86_64
PRODUCT_BRAND := Android
diff --git a/car_x86_64.mk b/car_x86_64.mk
index 3832149..0235441 100644
--- a/car_x86_64.mk
+++ b/car_x86_64.mk
@@ -31,6 +31,7 @@ PRODUCT_SDK_ADDON_COPY_MODULES := \
DEVICE_PACKAGE_OVERLAYS += device/generic/car/car_x86_64/overlay
+EMULATOR_VENDOR_NO_SOUND := true
PRODUCT_NAME := car_x86_64
PRODUCT_DEVICE := generic_x86_64
PRODUCT_BRAND := Google
diff --git a/emulator/audio/car_emulator_audio.mk b/emulator/audio/car_emulator_audio.mk
index 43d52cc..6e29916 100644
--- a/emulator/audio/car_emulator_audio.mk
+++ b/emulator/audio/car_emulator_audio.mk
@@ -14,6 +14,9 @@
# limitations under the License.
PRODUCT_PACKAGES += audio.primary.caremu
+PRODUCT_PACKAGES += \
+ android.hardware.audio@6.0-impl:32
+
PRODUCT_PROPERTY_OVERRIDES += ro.hardware.audio.primary=caremu
PRODUCT_COPY_FILES += \
diff --git a/emulator/audio/driver/Android.bp b/emulator/audio/driver/Android.bp
index b0c2c34..5cf177c 100644
--- a/emulator/audio/driver/Android.bp
+++ b/emulator/audio/driver/Android.bp
@@ -18,6 +18,7 @@
cc_library_shared {
vendor: true,
+ vintf_fragments: ["android.hardware.audio@6.0-impl.xml"],
name: "audio.primary.caremu",
relative_install_path: "hw",
diff --git a/emulator/audio/driver/android.hardware.audio@6.0-impl.xml b/emulator/audio/driver/android.hardware.audio@6.0-impl.xml
new file mode 100644
index 0000000..2814739
--- /dev/null
+++ b/emulator/audio/driver/android.hardware.audio@6.0-impl.xml
@@ -0,0 +1,25 @@
+<!-- Copyright (C) 2020 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.
+-->
+<manifest version="1.0" type="device">
+ <hal format="hidl">
+ <name>android.hardware.audio</name>
+ <transport>hwbinder</transport>
+ <version>6.0</version>
+ <interface>
+ <name>IDevicesFactory</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+</manifest> \ No newline at end of file