From 5f4a18bebc4c91ec4e75f1e60e1cec2f65087d87 Mon Sep 17 00:00:00 2001 From: Huihong Luo Date: Thu, 20 Feb 2020 15:56:02 -0800 Subject: Upgrade HWC from 2.1 to 2.3 This is needed to support multi-display. Test: lunch gcar_hl_md_emu_x86-userdebug Change-Id: Ifa0ba234dbd8265209936a37b4ff97b1d1f7ac64 --- common/manifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/manifest.xml b/common/manifest.xml index fda646a..8273de6 100644 --- a/common/manifest.xml +++ b/common/manifest.xml @@ -101,7 +101,7 @@ android.hardware.graphics.composer hwbinder - 2.1 + 2.3 IComposer default -- cgit v1.2.3 From 2ebc17563fc31002386f7fcb3c918559d43ce9b8 Mon Sep 17 00:00:00 2001 From: Oscar Azucena Date: Fri, 21 Feb 2020 12:15:42 -0800 Subject: Updated car emulator audio configuration Updated car emulator target car_audio_configuration.xml file to version 2. The new version requires audioZoneId be defined in all zones except for primary zone. Also Added occupantZoneId to primary zone. Other targets, like multi-display, should be updated independently as the number of occupants will vary in those files. Bug: 148292262 Test: lunch gcar_hl_md_emu_x86-userdebug, m -j Test: emulator -skin 1280x720 -verbose -show-kernel -selinux permissive -no-snapstorage -no-cache -prop ro.aae.simulateMultiZoneAudio=true -prop aae.playZoneId=2 Test: atest CarAudioZonesHelperTest Test: atest CarAudioZoneTest Test: atest CarOccupantZoneServiceTest Change-Id: If04c01a9b803ed41ee3fbb0e6c85f090c14f7c7e --- emulator/audio/car_audio_configuration.xml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/emulator/audio/car_audio_configuration.xml b/emulator/audio/car_audio_configuration.xml index a819e06..2305395 100644 --- a/emulator/audio/car_audio_configuration.xml +++ b/emulator/audio/car_audio_configuration.xml @@ -22,9 +22,9 @@ - Volume groups in the car environment. --> - + - + @@ -38,6 +38,10 @@ + + + + @@ -70,7 +74,7 @@ where port is the physical port of the display (See DisplayAddress.Phyisical) --> - + @@ -82,6 +86,10 @@ + + + + @@ -89,7 +97,7 @@ - + @@ -101,6 +109,10 @@ + + + + -- cgit v1.2.3 From 7ced5e83509268d91f0d2faefa90e5efb176a21d Mon Sep 17 00:00:00 2001 From: Hayden Gomes Date: Wed, 25 Mar 2020 17:18:51 -0700 Subject: Updating car emulator to IAudioControl@v2.0 Bug: 148098383 Test: build & run against target and verify audio works Change-Id: Ib1fc6e35fb3f810058d48b6fe4ec69db9748ec9e (cherry picked from commit 38025059727cfb3f0ed49c4f50e0651b67167f77) --- common/car.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/car.mk b/common/car.mk index f1f4040..bf1a4d2 100644 --- a/common/car.mk +++ b/common/car.mk @@ -18,7 +18,7 @@ # TODO: Add broadcastradio@.2.0 back once it's stable b/145694104 PRODUCT_PACKAGES += \ android.hardware.automotive.vehicle@2.0-service \ - android.hardware.automotive.audiocontrol@1.0-service \ + android.hardware.automotive.audiocontrol@2.0-service \ android.hardware.bluetooth@1.1-service.sim \ android.hardware.bluetooth.audio@2.0-impl \ -- cgit v1.2.3 From cd83503b2e02fed17d4cbac1a685ee449b650d7c Mon Sep 17 00:00:00 2001 From: Julius D'souza Date: Fri, 21 Feb 2020 13:22:06 -0800 Subject: Set ro.setupwizard.mode to OPTIONAL for AOSP car emulator variants. Bug: 147912941, 148489116 Test: TreeHugger Change-Id: Ic6d96769f0ba342d2e637e107779c155723fc54b Signed-off-by: Julius D'souza --- emulator/aosp_car_emulator.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/emulator/aosp_car_emulator.mk b/emulator/aosp_car_emulator.mk index 04f9031..0dae326 100644 --- a/emulator/aosp_car_emulator.mk +++ b/emulator/aosp_car_emulator.mk @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Enable Setup Wizard. This overrides the setting in emulator_vendor.mk +PRODUCT_SYSTEM_EXT_PROPERTIES += \ + ro.setupwizard.mode=OPTIONAL + $(call inherit-product, device/generic/car/common/car.mk) # This overrides device/generic/car/common/car.mk $(call inherit-product, device/generic/car/emulator/audio/car_emulator_audio.mk) -- cgit v1.2.3 From d8036aaba14fe3070ca2002eed0329fc6b1cb964 Mon Sep 17 00:00:00 2001 From: Julius D'souza Date: Thu, 30 Apr 2020 15:48:01 -0700 Subject: Add a setup overlay for AOSP emulators. Emulators have SetupWizard turned off by default. The setup overlay provides the correct configs needed to enable SetupWizard usage in an emulator. The emulator build will need to have both the SetupWizard APK and the product package overlay, e.g.: PRODUCT_PACKAGE_OVEFRLAYS += \ device/generic/car/setup/overlay This product package overlay should precede other overlays for emulators in makefile inclusion. Bug: 148489116 Test: create an emulator build with the SUW APK + this overlay Signed-off-by: Julius D'souza Change-Id: I53b8f073d6ab51c9c3c0a92fb21bf14d3559faa3 --- .../SettingsProvider/res/values/defaults.xml | 23 +++++++++++++++++ .../services/Car/service/res/values/config.xml | 30 ++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 setup/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml create mode 100644 setup/overlay/packages/services/Car/service/res/values/config.xml diff --git a/setup/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/setup/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml new file mode 100644 index 0000000..eee765b --- /dev/null +++ b/setup/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml @@ -0,0 +1,23 @@ + + + + false + + false + diff --git a/setup/overlay/packages/services/Car/service/res/values/config.xml b/setup/overlay/packages/services/Car/service/res/values/config.xml new file mode 100644 index 0000000..5add0cd --- /dev/null +++ b/setup/overlay/packages/services/Car/service/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + + + + com.google.android.car.setupwizard/.account.ShortNoticeService + -- cgit v1.2.3 From c2209df91cb07cd7a12da182de40446fb56b805d Mon Sep 17 00:00:00 2001 From: Oscar Azucena Date: Tue, 2 Jun 2020 21:25:19 -0700 Subject: Removed configs for car audio display API. Removed car audio configurations for car audio display API. Bug: 148223185 Test: m -j, run target Change-Id: I377225baf29f6529f232d1df5cd39daf4d40bdc4 --- emulator/audio/car_audio_configuration.xml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/emulator/audio/car_audio_configuration.xml b/emulator/audio/car_audio_configuration.xml index 3700def..d79ff33 100644 --- a/emulator/audio/car_audio_configuration.xml +++ b/emulator/audio/car_audio_configuration.xml @@ -17,7 +17,6 @@ @@ -93,9 +82,6 @@ - - - @@ -116,9 +102,6 @@ - - - -- cgit v1.2.3 From a043c9f75d148e9e526593c86a737db8d26f5160 Mon Sep 17 00:00:00 2001 From: Yuncheol Heo Date: Tue, 23 Jun 2020 14:16:21 -0700 Subject: Set the cluster display size to 400x600. - The existing cluster display size should be the same with the default display (b/158801569). But, it was too big for the most of people, so reduce the size since the bug is fixed. Bug: 156939420 Test: check if it shows with the reduced cluster display. Change-Id: Ic46d7f33cf702f32ee017aa2392905257c387a81 --- emulator/aosp_car_emulator.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulator/aosp_car_emulator.mk b/emulator/aosp_car_emulator.mk index 03b913b..45958d6 100644 --- a/emulator/aosp_car_emulator.mk +++ b/emulator/aosp_car_emulator.mk @@ -23,6 +23,6 @@ $(call inherit-product, device/generic/car/emulator/audio/car_emulator_audio.mk) ifeq (true,$(BUILD_EMULATOR_CLUSTER_DISPLAY)) PRODUCT_PRODUCT_PROPERTIES += \ - hwservicemanager.external.displays=1,1080,600,120,0 \ + hwservicemanager.external.displays=1,400,600,120,0 \ persist.service.bootanim.displays=8140900251843329 endif -- cgit v1.2.3 From 75451744d1b7ffc6444217c77ad2be681c80d72f Mon Sep 17 00:00:00 2001 From: Oscar Azucena Date: Tue, 30 Jun 2020 17:05:54 -0700 Subject: Fixed duplicate configurations for MD emulator Recent changes for managing system properties configuration broke other targets whose base is aosp_car_emulator and properties are redefined in the child target. The fix enables for these properties that are being redefined in child target to be safetely changed and the desired property applied. Test: m -j Test: run gcar_hl_md_emu_x86 target Bug: 160272636 Change-Id: I99713c076268e05b1d5f9376d0b4e9643bb4b3a2 --- emulator/aosp_car_emulator.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulator/aosp_car_emulator.mk b/emulator/aosp_car_emulator.mk index 45958d6..975da56 100644 --- a/emulator/aosp_car_emulator.mk +++ b/emulator/aosp_car_emulator.mk @@ -15,7 +15,7 @@ # Enable Setup Wizard. This overrides the setting in emulator_vendor.mk PRODUCT_SYSTEM_EXT_PROPERTIES += \ - ro.setupwizard.mode=OPTIONAL + ro.setupwizard.mode?=OPTIONAL $(call inherit-product, device/generic/car/common/car.mk) # This overrides device/generic/car/common/car.mk -- cgit v1.2.3 From 70d11de92c8962c556015a079530df0b50e67743 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Thu, 9 Jul 2020 23:56:55 -0700 Subject: Update emulator whitelist xml Removed packages that are now defined on frameworks/base/data/etc/preinstalled-packages-platform-overlays.xml Bug: 159826397 Test: manual: 1. adb shell dumpsys user 2. adb shell cmd user report-system-user-package-whitelist-problems Change-Id: Ia6afa131a28592dc24bf97fa14a41a82746bf3da --- .../preinstalled-packages-product-car-emulator.xml | 91 ---------------------- 1 file changed, 91 deletions(-) diff --git a/common/preinstalled-packages-product-car-emulator.xml b/common/preinstalled-packages-product-car-emulator.xml index 8ab6dca..9b61a19 100644 --- a/common/preinstalled-packages-product-car-emulator.xml +++ b/common/preinstalled-packages-product-car-emulator.xml @@ -137,91 +137,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -246,15 +161,9 @@ - - - - - - -- cgit v1.2.3 From dcb9c6cc213cc7884a05047e309bd50ac6a341a8 Mon Sep 17 00:00:00 2001 From: Oscar Azucena Date: Mon, 20 Jul 2020 17:57:25 -0700 Subject: Added missing audio libraries to car emulator Added audio effects, audio service, and default submix libraries. Due to a recent change in golfish the libraries were removed from car emulator targets. Bug: 161753755 Test: make -j60,run emulator and play MZ audio. Change-Id: I3ee44d739230bc0249d40acfdd784da9c23e0a38 --- emulator/audio/car_emulator_audio.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/emulator/audio/car_emulator_audio.mk b/emulator/audio/car_emulator_audio.mk index 6e29916..da5c60a 100644 --- a/emulator/audio/car_emulator_audio.mk +++ b/emulator/audio/car_emulator_audio.mk @@ -13,6 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +PRODUCT_PACKAGES += \ + audio.r_submix.default \ + android.hardware.audio.service \ + android.hardware.audio.effect@6.0-impl:32 + PRODUCT_PACKAGES += audio.primary.caremu PRODUCT_PACKAGES += \ android.hardware.audio@6.0-impl:32 -- cgit v1.2.3 From 8b13c43e95584504cf3a1474e388757205f67d54 Mon Sep 17 00:00:00 2001 From: Oscar Azucena Date: Tue, 28 Jul 2020 13:22:06 -0700 Subject: Remove duplicate output primary flags Car emulator audio configuration for ouput buses has non primary devices labeled with AUDIO_OUTPUT_FLAG_PRIMARY. Remove flags for other devices except music device in primary audio zone. Bug: 147504055 Test: run mz audio use case in gcar_md_emu_x86 target Change-Id: I26b5243164cdb4b4fd3653642b5ff4c6c9a3af20 --- emulator/audio/audio_policy_configuration.xml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/emulator/audio/audio_policy_configuration.xml b/emulator/audio/audio_policy_configuration.xml index ed0f4a6..4e61c76 100644 --- a/emulator/audio/audio_policy_configuration.xml +++ b/emulator/audio/audio_policy_configuration.xml @@ -78,56 +78,47 @@ samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> - + - + - + - + - + - + - + - + - + -- cgit v1.2.3 From 316b61f86f0760fb6d24a6aff467bea29304ac51 Mon Sep 17 00:00:00 2001 From: felipeal Date: Thu, 6 Aug 2020 12:36:54 -0700 Subject: Removed multi-user properties that are now defined on car.mk Test: m && egrep '(headless|hal_enabled|pre_created)' `find $OUT -name build.prop|xargs` Fixes: 163056008 Change-Id: Ib153effbdb973f1ed951c9a750bd758afca2655d --- common/car.mk | 6 ------ 1 file changed, 6 deletions(-) diff --git a/common/car.mk b/common/car.mk index fb557ba..8c746cf 100644 --- a/common/car.mk +++ b/common/car.mk @@ -81,12 +81,6 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/generic/car/common/preinstalled-packages-product-car-emulator.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/preinstalled-packages-product-car-emulator.xml -# Multi-user properties -PRODUCT_SYSTEM_DEFAULT_PROPERTIES := \ - android.car.number_pre_created_users=1 \ - android.car.number_pre_created_guests=1 \ - android.car.user_hal_enabled=true - # Additional selinux policy BOARD_SEPOLICY_DIRS += device/generic/car/common/sepolicy -- cgit v1.2.3 From 8360da754e81f69009357882016bec016965510d Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Tue, 8 Sep 2020 10:45:44 -0700 Subject: Removed android.software.input_methods. It's now defined on frameworks/native/data/etc/car_core_hardware.xml Test: m Bug: 149411720 Change-Id: I8395111b5dc11722dced099f083c7ab284826167 --- common/car_core_hardware.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/common/car_core_hardware.xml b/common/car_core_hardware.xml index 0656e49..c8b73df 100644 --- a/common/car_core_hardware.xml +++ b/common/car_core_hardware.xml @@ -46,7 +46,6 @@ - -- cgit v1.2.3 From eecc3621bb4b12e701ed44419444ec564953986e Mon Sep 17 00:00:00 2001 From: Tanmay Patil Date: Mon, 21 Sep 2020 14:44:05 -0700 Subject: Removes invalid sensors for automotive emulator Removes sensors that are not valid or irrelevant for automotive use-cases on car emulator. Keeps only the accel and gyro sensors, removes: proximity, hinge etc. Modifies the emulator mk file to remove features and the config.ini to remove hardware. Verified on sdk_gcar_x86 Bug: b/153604089 Test: atest SystemFeaturesTest#testSensorFeatures Change-Id: I86da1cfcbdc4e64d386fbe4449fc69b461036351 --- common/car.mk | 7 ------- common/config.ini | 16 ++++++++++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/common/car.mk b/common/car.mk index 05c806c..f2af98d 100644 --- a/common/car.mk +++ b/common/car.mk @@ -64,14 +64,7 @@ PRODUCT_COPY_FILES += \ # Sensor features PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \ - frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \ - frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \ - frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \ - frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \ - frameworks/native/data/etc/android.hardware.sensor.ambient_temperature.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.ambient_temperature.xml \ - frameworks/native/data/etc/android.hardware.sensor.relative_humidity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.relative_humidity.xml \ - frameworks/native/data/etc/android.hardware.sensor.hinge_angle.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hinge_angle.xml \ # Copy APN configs PRODUCT_COPY_FILES += \ diff --git a/common/config.ini b/common/config.ini index 05ef85d..4b6f766 100644 --- a/common/config.ini +++ b/common/config.ini @@ -8,9 +8,13 @@ skin.dynamic=yes skin.name=1080x600 skin.path=1080x600 disk.dataPartition.size=6G -hw.sensor.hinge=yes -hw.sensor.hinge.count=2 -Hw.sensor.hinge.type=0 -hw.sensor.hinge.ranges=0-360, 0-180 -hw.sensor.hinge.defaults=180, 180 - +hw.accelerometer=yes +hw.gyroscope=yes +hw.sensors.light=no +hw.sensors.pressure=no +hw.sensors.humidity=no +hw.sensors.proximity=no +hw.sensors.magnetic_field=no +hw.sensors.orientation=no +hw.sensors.temperature=no +hw.sensor.hinge=no -- cgit v1.2.3 From 01d4ec33424059883405cab25dfef4a221962429 Mon Sep 17 00:00:00 2001 From: Yuncheol Heo Date: Thu, 15 Oct 2020 14:25:04 -0700 Subject: Include RearViewCamara sample app in Car emulator. Bug: 157481389 Test: Changes the gear to R and check if the sample app is invoked. Change-Id: I5b87dff1b8530d41bb10dc0c4885eed551704482 --- common/preinstalled-packages-product-car-emulator.xml | 5 +++++ emulator/aosp_car_emulator.mk | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/common/preinstalled-packages-product-car-emulator.xml b/common/preinstalled-packages-product-car-emulator.xml index 9b61a19..926ea9c 100644 --- a/common/preinstalled-packages-product-car-emulator.xml +++ b/common/preinstalled-packages-product-car-emulator.xml @@ -82,6 +82,11 @@ + + + + + + + + + + + displayPort=0,displayType=MAIN,occupantZoneId=0 + displayPort=1,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0 + + -- cgit v1.2.3 From 39bb3a2e4c7f7d43258b3384726b0922c433fb3b Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Mon, 1 Feb 2021 16:02:52 -0800 Subject: Added android.software.device_admin feature. This feature allow the device to be managed by a device owner app. NOTE: not fully supported yet, CTS tests are still failing. Bug: 178412797 Test: manual verification Change-Id: Ie0f7daa176e6c4a78b9dc28ed856f70b638fe73a --- common/car_core_hardware.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/car_core_hardware.xml b/common/car_core_hardware.xml index 2acfdde..41b84c6 100644 --- a/common/car_core_hardware.xml +++ b/common/car_core_hardware.xml @@ -49,6 +49,11 @@ + + + + + + + + + -- cgit v1.2.3 From bbba0e2c7f78a97aa48252053346efed39b3d190 Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Mon, 1 Mar 2021 16:14:41 -0800 Subject: Initial / sample version of vendor_policy_exempt_apps.xml DevicePolicyManager has many APIs that let the DPC app to disable other apps, which could be a problem on automotive builds as some apps (like the rear-view camera app) are critical for driving safety and should never be disabled. Test: adb shell dumpsys device_policy| grep vendor_policy_exempt_apps Bug: 181238156 Change-Id: I839022c1e302565ffe6286af3e890223206ff65a --- .../res/res/values/vendor_policy_exempt_apps.xml | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 common/overlay/frameworks/base/core/res/res/values/vendor_policy_exempt_apps.xml diff --git a/common/overlay/frameworks/base/core/res/res/values/vendor_policy_exempt_apps.xml b/common/overlay/frameworks/base/core/res/res/values/vendor_policy_exempt_apps.xml new file mode 100644 index 0000000..93f80ac --- /dev/null +++ b/common/overlay/frameworks/base/core/res/res/values/vendor_policy_exempt_apps.xml @@ -0,0 +1,31 @@ + + + + + + + com.google.android.car.netdbug + + -- cgit v1.2.3 From e591cdf07abe1378e30ba3da7884f96dbebb0250 Mon Sep 17 00:00:00 2001 From: Remi NGUYEN VAN Date: Thu, 11 Mar 2021 18:12:30 +0900 Subject: Add connectivity resources preinstalled package com.android.connectivity.resources is part of the Tethering APEX, so it must be allowed in the same way. Bug: 182125649 Test: m Change-Id: I5fe4510d2a732b7d928027da7b5ea42f8d96058c --- common/preinstalled-packages-product-car-emulator.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/preinstalled-packages-product-car-emulator.xml b/common/preinstalled-packages-product-car-emulator.xml index fe61086..fa647ca 100644 --- a/common/preinstalled-packages-product-car-emulator.xml +++ b/common/preinstalled-packages-product-car-emulator.xml @@ -75,6 +75,10 @@ + + + + -- cgit v1.2.3 From 36c4a93afb54fc67d490374c1a6b2b295abcfd76 Mon Sep 17 00:00:00 2001 From: Yuncheol Heo Date: Tue, 23 Mar 2021 23:46:31 -0700 Subject: Revert "Disable adoptable_storage for car emulator" This reverts commit 3c78a69f98f4dd54982903f546ff63af8970580f. Reason for revert: the emulator doesn't boot. Bug: 183571842 Change-Id: I436110f5f61aea2ab00e0feaa8b05e60daf729c5 --- common/car.mk | 4 ---- common/fstab.ranchu.car | 9 --------- 2 files changed, 13 deletions(-) delete mode 100644 common/fstab.ranchu.car diff --git a/common/car.mk b/common/car.mk index 8665abf..5a071b1 100644 --- a/common/car.mk +++ b/common/car.mk @@ -45,10 +45,6 @@ PRODUCT_COPY_FILES += \ device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \ device/generic/car/common/android.hardware.disable.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ -# Overwrite goldfish fstab.ranchu to turn off adoptable_storage -PRODUCT_COPY_FILES += \ - device/generic/car/common/fstab.ranchu.car:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.ranchu - # Enable landscape PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml diff --git a/common/fstab.ranchu.car b/common/fstab.ranchu.car deleted file mode 100644 index 1ff0331..0000000 --- a/common/fstab.ranchu.car +++ /dev/null @@ -1,9 +0,0 @@ -# Android fstab file. -# This is a copy of device/generic/goldfish/fstab.ranchu, but removing encryptable=userdata to turn off adoptable_storage -# -system /system ext4 ro,barrier=1 wait,logical,avb=vbmeta,first_stage_mount -vendor /vendor ext4 ro,barrier=1 wait,logical,first_stage_mount -/dev/block/vdc /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait,check,quota,fileencryption=aes-256-xts:aes-256-cts,reservedsize=128M -/dev/block/pci/pci0000:00/0000:00:06.0/by-name/metadata /metadata ext4 noatime,nosuid,nodev wait,formattable,first_stage_mount -/devices/*/block/vdf auto auto defaults voldmanaged=sdcard:auto -dev/block/zram0 none swap defaults zramsize=75% -- cgit v1.2.3 From b367f6b61545f20a8f752e6e801ae75675f68de2 Mon Sep 17 00:00:00 2001 From: Hayden Gomes Date: Tue, 23 Mar 2021 10:41:29 -0700 Subject: Launching Audio and AudioControl HALs together - Created local implementation of AudioControl HAL for caremu - Registering AudioControl and Audio HALs in same main function Bug: 181550943 Test: built & ran `adb shell service list` Test: ran `adb shell dumpsys android.hardware.automotive.audiocontrol.IAudioControl/default` to verify service is responding. Test: Played sounds in emulator to verify they were still audible Change-Id: I759dda65753659b9565912773aad50ff6b76f418 --- common/car.mk | 2 +- common/sepolicy/file_contexts | 2 + common/sepolicy/hal_audio_caremu.te | 11 + emulator/audio/car_emulator_audio.mk | 2 +- emulator/audio/driver/audio_hw.c | 2 +- emulator/audio/halservice/Android.bp | 73 ++++++ emulator/audio/halservice/AudioControl.cpp | 271 +++++++++++++++++++++ emulator/audio/halservice/AudioControl.h | 55 +++++ .../android.hardware.audio.service-caremu.rc | 10 + emulator/audio/halservice/audiocontrol-caremu.xml | 6 + emulator/audio/halservice/service.cpp | 68 ++++++ 11 files changed, 499 insertions(+), 3 deletions(-) create mode 100644 common/sepolicy/file_contexts create mode 100644 common/sepolicy/hal_audio_caremu.te create mode 100644 emulator/audio/halservice/Android.bp create mode 100644 emulator/audio/halservice/AudioControl.cpp create mode 100644 emulator/audio/halservice/AudioControl.h create mode 100644 emulator/audio/halservice/android.hardware.audio.service-caremu.rc create mode 100644 emulator/audio/halservice/audiocontrol-caremu.xml create mode 100644 emulator/audio/halservice/service.cpp diff --git a/common/car.mk b/common/car.mk index 5a071b1..05bec5a 100644 --- a/common/car.mk +++ b/common/car.mk @@ -18,7 +18,7 @@ # TODO: Add broadcastradio@.2.0 back once it's stable b/145694104 PRODUCT_PACKAGES += \ android.hardware.automotive.vehicle@2.0-service \ - android.hardware.automotive.audiocontrol-service.example + android.hardware.audio.service-caremu # Emulator configuration PRODUCT_COPY_FILES += \ diff --git a/common/sepolicy/file_contexts b/common/sepolicy/file_contexts new file mode 100644 index 0000000..5737b92 --- /dev/null +++ b/common/sepolicy/file_contexts @@ -0,0 +1,2 @@ +# Audio HAL +/vendor/bin/hw/android\.hardware\.audio\.service-caremu u:object_r:hal_audio_caremu_exec:s0 diff --git a/common/sepolicy/hal_audio_caremu.te b/common/sepolicy/hal_audio_caremu.te new file mode 100644 index 0000000..11f657c --- /dev/null +++ b/common/sepolicy/hal_audio_caremu.te @@ -0,0 +1,11 @@ +type hal_audio_caremu, domain; + +hal_server_domain(hal_audio_caremu, hal_audio) +hal_server_domain(hal_audio_caremu, hal_audiocontrol) + +type hal_audio_caremu_exec, exec_type, vendor_file_type, file_type; +init_daemon_domain(hal_audio_caremu) + +carwatchdog_client_domain(hal_audio_caremu) +binder_use(hal_audio_caremu) + diff --git a/emulator/audio/car_emulator_audio.mk b/emulator/audio/car_emulator_audio.mk index da5c60a..d2e3d09 100644 --- a/emulator/audio/car_emulator_audio.mk +++ b/emulator/audio/car_emulator_audio.mk @@ -15,7 +15,7 @@ PRODUCT_PACKAGES += \ audio.r_submix.default \ - android.hardware.audio.service \ + android.hardware.audio.service-caremu \ android.hardware.audio.effect@6.0-impl:32 PRODUCT_PACKAGES += audio.primary.caremu diff --git a/emulator/audio/driver/audio_hw.c b/emulator/audio/driver/audio_hw.c index bc27e90..d38be66 100644 --- a/emulator/audio/driver/audio_hw.c +++ b/emulator/audio/driver/audio_hw.c @@ -19,7 +19,7 @@ * Changes made to adding support of AUDIO_DEVICE_OUT_BUS */ -#define LOG_TAG "audio_hw_generic" +#define LOG_TAG "audio_hw_generic_caremu" #include #include diff --git a/emulator/audio/halservice/Android.bp b/emulator/audio/halservice/Android.bp new file mode 100644 index 0000000..3810791 --- /dev/null +++ b/emulator/audio/halservice/Android.bp @@ -0,0 +1,73 @@ +// Copyright (C) 2021 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. +cc_binary { + name: "android.hardware.audio.service-caremu", + + init_rc: ["android.hardware.audio.service-caremu.rc"], + + relative_install_path: "hw", + vendor: true, + // Prefer 32 bit as the binary must always be installed at the same + // location for init to start it and the build system does not support + // having two binaries installable to the same location even if they are + // not installed in the same build. + compile_multilib: "prefer32", + srcs: [ + "service.cpp", + ], + + cflags: [ + "-Wall", + "-Wextra", + "-Werror", + ], + + shared_libs: [ + "android.hardware.audio@6.0", + "android.hardware.audio.common@6.0", + "android.hardware.audio.effect@6.0", + "android.hardware.automotive.audiocontrol-V1-ndk_platform", + "audiocontrol-caremu", + "libbase", + "libbinder", + "libbinder_ndk", + "libhardware", + "libhidlbase", + "liblog", + ], + + header_libs: [ + "libhardware_headers", + ], +} + +cc_library { + name: "audiocontrol-caremu", + vendor: true, + vintf_fragments: ["audiocontrol-caremu.xml"], + + shared_libs: [ + "android.hardware.audio.common@7.0-enums", + "android.hardware.automotive.audiocontrol-V1-ndk_platform", + "libbase", + "libbinder_ndk", + "libcutils", + "liblog", + ], + + srcs: [ + "AudioControl.cpp", + ], +} + diff --git a/emulator/audio/halservice/AudioControl.cpp b/emulator/audio/halservice/AudioControl.cpp new file mode 100644 index 0000000..3583df4 --- /dev/null +++ b/emulator/audio/halservice/AudioControl.cpp @@ -0,0 +1,271 @@ +/* + * Copyright (C) 2021 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. + */ + +#define LOG_TAG "AudioControl" +// #define LOG_NDEBUG 0 + +#include "AudioControl.h" + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include + +namespace aidl::android::hardware::automotive::audiocontrol { + +using ::android::base::EqualsIgnoreCase; +using ::android::base::ParseInt; +using ::std::shared_ptr; +using ::std::string; + +namespace xsd { +using namespace ::android::audio::policy::configuration::V7_0; +} + +namespace { +const float kLowerBound = -1.0f; +const float kUpperBound = 1.0f; +bool checkCallerHasWritePermissions(int fd) { + // Double check that's only called by root - it should be be blocked at debug() level, + // but it doesn't hurt to make sure... + if (AIBinder_getCallingUid() != AID_ROOT) { + dprintf(fd, "Must be root\n"); + return false; + } + return true; +} + +bool isValidValue(float value) { + return (value >= kLowerBound) && (value <= kUpperBound); +} + +bool safelyParseInt(string s, int* out) { + if (!ParseInt(s, out)) { + return false; + } + return true; +} +} // namespace + +ndk::ScopedAStatus AudioControl::registerFocusListener( + const shared_ptr& in_listener) { + + if (in_listener) { + std::atomic_store(&mFocusListener, in_listener); + } else { + LOG(ERROR) << "Unexpected nullptr for listener resulting in no-op."; + } + return ndk::ScopedAStatus::ok(); +} + +ndk::ScopedAStatus AudioControl::setBalanceTowardRight(float value) { + if (isValidValue(value)) { + // Just log in this default mock implementation + LOG(INFO) << "Balance set to " << value; + return ndk::ScopedAStatus::ok(); + } + + LOG(ERROR) << "Balance value out of range -1 to 1 at " << value; + return ndk::ScopedAStatus::ok(); +} + +ndk::ScopedAStatus AudioControl::setFadeTowardFront(float value) { + if (isValidValue(value)) { + // Just log in this default mock implementation + LOG(INFO) << "Fader set to " << value; + return ndk::ScopedAStatus::ok(); + } + LOG(ERROR) << "Fader value out of range -1 to 1 at " << value; + return ndk::ScopedAStatus::ok(); +} + +ndk::ScopedAStatus AudioControl::onAudioFocusChange(const string& in_usage, int32_t in_zoneId, + AudioFocusChange in_focusChange) { + LOG(INFO) << "Focus changed: " << toString(in_focusChange).c_str() << " for usage " + << in_usage.c_str() << " in zone " << in_zoneId; + return ndk::ScopedAStatus::ok(); +} + +ndk::ScopedAStatus AudioControl::onDevicesToDuckChange( + const std::vector& in_duckingInfos) { + LOG(INFO) << "AudioControl::onDevicesToDuckChange"; + for (const DuckingInfo& duckingInfo : in_duckingInfos) { + LOG(INFO) << "zone: " << duckingInfo.zoneId; + LOG(INFO) << "Devices to duck:"; + for (const auto& addressToDuck : duckingInfo.deviceAddressesToDuck) { + LOG(INFO) << addressToDuck; + } + LOG(INFO) << "Devices to unduck:"; + for (const auto& addressToUnduck : duckingInfo.deviceAddressesToUnduck) { + LOG(INFO) << addressToUnduck; + } + LOG(INFO) << "Usages holding focus:"; + for (const auto& usage : duckingInfo.usagesHoldingFocus) { + LOG(INFO) << usage; + } + } + return ndk::ScopedAStatus::ok(); +} + +ndk::ScopedAStatus AudioControl::onDevicesToMuteChange( + const std::vector& in_mutingInfos) { + LOG(INFO) << "AudioControl::onDevicesToMuteChange"; + for (const MutingInfo& mutingInfo : in_mutingInfos) { + LOG(INFO) << "zone: " << mutingInfo.zoneId; + LOG(INFO) << "Devices to mute:"; + for (const auto& addressToMute : mutingInfo.deviceAddressesToMute) { + LOG(INFO) << addressToMute; + } + LOG(INFO) << "Devices to unmute:"; + for (const auto& addressToUnmute : mutingInfo.deviceAddressesToUnmute) { + LOG(INFO) << addressToUnmute; + } + } + return ndk::ScopedAStatus::ok(); +} + +binder_status_t AudioControl::dump(int fd, const char** args, uint32_t numArgs) { + if (numArgs == 0) { + return dumpsys(fd); + } + + string option = string(args[0]); + if (EqualsIgnoreCase(option, "--help")) { + return cmdHelp(fd); + } else if (EqualsIgnoreCase(option, "--request")) { + return cmdRequestFocus(fd, args, numArgs); + } else if (EqualsIgnoreCase(option, "--abandon")) { + return cmdAbandonFocus(fd, args, numArgs); + } else { + dprintf(fd, "Invalid option: %s\n", option.c_str()); + return STATUS_BAD_VALUE; + } +} + +binder_status_t AudioControl::dumpsys(int fd) { + dprintf(fd, "*%s*\n", LOG_TAG); + std::shared_ptr focusListener = std::atomic_load(&mFocusListener); + if (focusListener == nullptr) { + dprintf(fd, "No focus listener registered\n"); + } else { + dprintf(fd, "Focus listener registered\n"); + } + return STATUS_OK; +} + +binder_status_t AudioControl::cmdHelp(int fd) const { + dprintf(fd, "Usage: \n\n"); + dprintf(fd, "[no args]: dumps focus listener status\n"); + dprintf(fd, "--help: shows this help\n"); + dprintf(fd, + "--request : requests audio focus for specified " + "usage (string), audio zone ID (int), and focus gain type (int)\n"); + dprintf(fd, + "--abandon : abandons audio focus for specified usage (string) and " + "audio zone ID (int)\n"); + dprintf(fd, "See audio_policy_configuration.xsd for valid AudioUsage values.\n"); + return STATUS_OK; +} + +binder_status_t AudioControl::cmdRequestFocus(int fd, const char** args, uint32_t numArgs) { + if (!checkCallerHasWritePermissions(fd)) { + return STATUS_PERMISSION_DENIED; + } + if (numArgs != 4) { + dprintf(fd, + "Invalid number of arguments: please provide --request " + "\n"); + return STATUS_BAD_VALUE; + } + + string usage = string(args[1]); + if (xsd::isUnknownAudioUsage(usage)) { + dprintf(fd, + "Unknown usage provided: %s. Please see audio_policy_configuration.xsd V7_0 " + "for supported values\n", + usage.c_str()); + return STATUS_BAD_VALUE; + } + + int zoneId; + if (!safelyParseInt(string(args[2]), &zoneId)) { + dprintf(fd, "Non-integer zoneId provided with request: %s\n", string(args[2]).c_str()); + return STATUS_BAD_VALUE; + } + + int focusGainValue; + if (!safelyParseInt(string(args[3]), &focusGainValue)) { + dprintf(fd, "Non-integer focusGain provided with request: %s\n", string(args[3]).c_str()); + return STATUS_BAD_VALUE; + } + AudioFocusChange focusGain = AudioFocusChange(focusGainValue); + + std::shared_ptr focusListener = std::atomic_load(&mFocusListener); + if (focusListener == nullptr) { + dprintf(fd, "Unable to request focus - no focus listener registered\n"); + return STATUS_BAD_VALUE; + } + + focusListener->requestAudioFocus(usage, zoneId, focusGain); + dprintf(fd, "Requested focus for usage %s, zoneId %d, and focusGain %d\n", usage.c_str(), + zoneId, focusGain); + return STATUS_OK; +} + +binder_status_t AudioControl::cmdAbandonFocus(int fd, const char** args, uint32_t numArgs) { + if (!checkCallerHasWritePermissions(fd)) { + return STATUS_PERMISSION_DENIED; + } + if (numArgs != 3) { + dprintf(fd, "Invalid number of arguments: please provide --abandon \n"); + return STATUS_BAD_VALUE; + } + + string usage = string(args[1]); + if (xsd::isUnknownAudioUsage(usage)) { + dprintf(fd, + "Unknown usage provided: %s. Please see audio_policy_configuration.xsd V7_0 " + "for supported values\n", + usage.c_str()); + return STATUS_BAD_VALUE; + } + + int zoneId; + if (!safelyParseInt(string(args[2]), &zoneId)) { + dprintf(fd, "Non-integer zoneId provided with abandon: %s\n", string(args[2]).c_str()); + return STATUS_BAD_VALUE; + } + + std::shared_ptr focusListener = std::atomic_load(&mFocusListener); + if (focusListener == nullptr) { + dprintf(fd, "Unable to abandon focus - no focus listener registered\n"); + return STATUS_BAD_VALUE; + } + + focusListener->abandonAudioFocus(usage, zoneId); + dprintf(fd, "Abandoned focus for usage %s and zoneId %d\n", usage.c_str(), zoneId); + return STATUS_OK; +} + +} // namespace aidl::android::hardware::automotive::audiocontrol diff --git a/emulator/audio/halservice/AudioControl.h b/emulator/audio/halservice/AudioControl.h new file mode 100644 index 0000000..35a55d3 --- /dev/null +++ b/emulator/audio/halservice/AudioControl.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2021 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. + */ +#ifndef ANDROID_HARDWARE_AUTOMOTIVE_AUDIOCONTROL_AUDIOCONTROL_H +#define ANDROID_HARDWARE_AUTOMOTIVE_AUDIOCONTROL_AUDIOCONTROL_H + +#include +#include +#include +#include + +namespace aidl::android::hardware::automotive::audiocontrol { + +class AudioControl : public BnAudioControl { + public: + ndk::ScopedAStatus onAudioFocusChange(const std::string& in_usage, int32_t in_zoneId, + AudioFocusChange in_focusChange) override; + ndk::ScopedAStatus onDevicesToDuckChange( + const std::vector& in_duckingInfos) override; + ndk::ScopedAStatus onDevicesToMuteChange( + const std::vector& in_mutingInfos) override; + ndk::ScopedAStatus registerFocusListener( + const std::shared_ptr& in_listener) override; + ndk::ScopedAStatus setBalanceTowardRight(float in_value) override; + ndk::ScopedAStatus setFadeTowardFront(float in_value) override; + binder_status_t dump(int fd, const char** args, uint32_t numArgs) override; + + private: + // This focus listener will only be used by this HAL instance to communicate with + // a single instance of CarAudioService. As such, it doesn't have explicit serialization. + // If a different AudioControl implementation were to have multiple threads leveraging this + // listener, then it should also include mutexes or make the listener atomic. + std::shared_ptr mFocusListener; + + binder_status_t cmdHelp(int fd) const; + binder_status_t cmdRequestFocus(int fd, const char** args, uint32_t numArgs); + binder_status_t cmdAbandonFocus(int fd, const char** args, uint32_t numArgs); + binder_status_t dumpsys(int fd); +}; + +} // namespace aidl::android::hardware::automotive::audiocontrol + +#endif // ANDROID_HARDWARE_AUTOMOTIVE_AUDIOCONTROL_AUDIOCONTROL_H diff --git a/emulator/audio/halservice/android.hardware.audio.service-caremu.rc b/emulator/audio/halservice/android.hardware.audio.service-caremu.rc new file mode 100644 index 0000000..768425f --- /dev/null +++ b/emulator/audio/halservice/android.hardware.audio.service-caremu.rc @@ -0,0 +1,10 @@ +service vendor.audio-hal /vendor/bin/hw/android.hardware.audio.service-caremu + override + class hal + user audioserver + # media gid needed for /dev/fm (radio) and for /data/misc/media (tee) + group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct wakelock context_hub + capabilities BLOCK_SUSPEND + ioprio rt 4 + task_profiles ProcessCapacityHigh HighPerformance + onrestart restart audioserver diff --git a/emulator/audio/halservice/audiocontrol-caremu.xml b/emulator/audio/halservice/audiocontrol-caremu.xml new file mode 100644 index 0000000..7bc44da --- /dev/null +++ b/emulator/audio/halservice/audiocontrol-caremu.xml @@ -0,0 +1,6 @@ + + + android.hardware.automotive.audiocontrol + IAudioControl/default + + \ No newline at end of file diff --git a/emulator/audio/halservice/service.cpp b/emulator/audio/halservice/service.cpp new file mode 100644 index 0000000..fe79fb4 --- /dev/null +++ b/emulator/audio/halservice/service.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2016 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. + */ + +#define LOG_TAG "audiohalservice" + +#include "AudioControl.h" + +#include +#include + +#include + +#include +#include +#include + +#include +#include + +#include +#include + +using namespace android::hardware; +using android::OK; +using aidl::android::hardware::automotive::audiocontrol::AudioControl; + +using android::hardware::configureRpcThreadpool; +using android::hardware::joinRpcThreadpool; +using android::hardware::registerPassthroughServiceImplementation; + +using android::hardware::audio::effect::V6_0::IEffectsFactory; +using android::hardware::audio::V6_0::IDevicesFactory; +using android::hardware::registerPassthroughServiceImplementation; + +int main(int /* argc */, char* /* argv */ []) { + // Setup HIDL Audio HAL + configureRpcThreadpool(16, false /*callerWillJoin*/); + android::status_t status; + status = registerPassthroughServiceImplementation(); + LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio service: %d", status); + status = registerPassthroughServiceImplementation(); + LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio effects service: %d", status); + + // Setup AudioControl HAL + ABinderProcess_setThreadPoolMaxThreadCount(0); + std::shared_ptr audioControl = ::ndk::SharedRefBase::make(); + + const std::string instance = std::string() + AudioControl::descriptor + "/default"; + binder_status_t aidlStatus = + AServiceManager_addService(audioControl->asBinder().get(), instance.c_str()); + CHECK(aidlStatus == STATUS_OK); + + ABinderProcess_joinThreadPool(); + return EXIT_FAILURE; // should not reach +} \ No newline at end of file -- cgit v1.2.3 From 661bb95cdca46bdd7bc7f7af78de033db774b0ed Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Fri, 26 Mar 2021 18:41:15 -0700 Subject: [LSC] Add LOCAL_LICENSE_KINDS to device/generic/car Added SPDX-license-identifier-Apache-2.0 to: emulator/audio/halservice/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: I163f4971fe52f8dfb4bdd94bf4c6b3e65560863d --- emulator/audio/halservice/Android.bp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/emulator/audio/halservice/Android.bp b/emulator/audio/halservice/Android.bp index 3810791..6c86f00 100644 --- a/emulator/audio/halservice/Android.bp +++ b/emulator/audio/halservice/Android.bp @@ -11,6 +11,15 @@ // 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. +package { + // See: http://go/android-license-faq + // A large-scale-change added 'default_applicable_licenses' to import + // all of the 'license_kinds' from "device_generic_car_license" + // to get the below license kinds: + // SPDX-license-identifier-Apache-2.0 + default_applicable_licenses: ["device_generic_car_license"], +} + cc_binary { name: "android.hardware.audio.service-caremu", @@ -70,4 +79,3 @@ cc_library { "AudioControl.cpp", ], } - -- cgit v1.2.3 From ad49839a653fbae866d159cd42504bcfbd03662f Mon Sep 17 00:00:00 2001 From: Hayden Gomes Date: Tue, 23 Mar 2021 13:25:17 -0700 Subject: Apply ducking based on AudioControl signals - audio_hw now maintains a pointer to the generic_audio_device - AudioControl updates generic_stream_out's is_ducked flag - ducking multiplier is now used when applying gains to ducked streams Bug: 181550943 Test: played local media and then used `adb shell dumpsys android.hardware.automotive.audiocontrol.IAudioControl/default --request AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE 0 3` to grab navigation focus. Verified music was ducked as a result Change-Id: Ic3931d86f60c8b5b05decbb7fc2f00e83a4ec569 --- emulator/audio/driver/Android.bp | 4 +- emulator/audio/driver/audio_hw.c | 73 ++++++++++++++++++----- emulator/audio/driver/audio_hw.h | 5 ++ emulator/audio/driver/include/AudioControlUtils.h | 14 +++++ emulator/audio/halservice/Android.bp | 5 ++ emulator/audio/halservice/AudioControl.cpp | 20 ++++--- 6 files changed, 97 insertions(+), 24 deletions(-) create mode 100644 emulator/audio/driver/include/AudioControlUtils.h diff --git a/emulator/audio/driver/Android.bp b/emulator/audio/driver/Android.bp index 8f1843f..945c628 100644 --- a/emulator/audio/driver/Android.bp +++ b/emulator/audio/driver/Android.bp @@ -38,7 +38,9 @@ cc_library_shared { ], include_dirs: ["external/tinyalsa/include"], - + export_include_dirs: [ + "include" + ], shared_libs: [ "libcutils", "liblog", diff --git a/emulator/audio/driver/audio_hw.c b/emulator/audio/driver/audio_hw.c index d38be66..afe6134 100644 --- a/emulator/audio/driver/audio_hw.c +++ b/emulator/audio/driver/audio_hw.c @@ -20,26 +20,29 @@ */ #define LOG_TAG "audio_hw_generic_caremu" +// #define LOG_NDEBUG 0 + +#include "audio_hw.h" +#include "include/AudioControlUtils.h" #include +#include +#include +#include +#include #include +#include +#include #include +#include #include +#include #include #include #include -#include -#include -#include - -#include -#include -#include - -#include #include +#include -#include "audio_hw.h" #include "ext_pcm.h" #define PCM_CARD 0 @@ -61,6 +64,9 @@ // Max tone frequency to auto assign, don't want to generate too high of a pitch #define MAX_TONE_FREQUENCY 500 +// -14dB to match the volume curve in PlaybackActivityMonitor +#define DUCKING_MULTIPLIER 0.2 + #define _bool_str(x) ((x)?"true":"false") static const char * const PROP_KEY_SIMULATE_MULTI_ZONE_AUDIO = "ro.aae.simulateMultiZoneAudio"; @@ -73,10 +79,33 @@ static const char * const AAE_PARAMETER_KEY_FOR_SELECTED_ZONE = "com.android.car static const char * const TONE_ADDRESS_KEYWORD = "_tone_"; static const char * const AUDIO_ZONE_KEYWORD = "_audio_zone_"; +static pthread_mutex_t adev_lock = PTHREAD_MUTEX_INITIALIZER; + #define SIZE_OF_PARSE_BUFFER 32 static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state); +void set_is_ducked(const char *address, bool is_ducked) { + pthread_mutex_lock(&adev_lock); + if(device_handle == 0) { + ALOGE("%s no device handle available", __func__); + pthread_mutex_unlock(&adev_lock); + return; + } + + struct generic_stream_out *out = hashmapGet(device_handle->out_bus_stream_map, address); + pthread_mutex_unlock(&adev_lock); + + if (!out) { + ALOGW("%s no device found with address %s", __func__, address); + return; + } + + pthread_mutex_lock(&out->lock); + out->is_ducked = is_ducked; + pthread_mutex_unlock(&out->lock); +} + static struct pcm_config pcm_config_out = { .channels = 2, .rate = 0, @@ -112,7 +141,6 @@ static struct pcm_config pcm_config_in = { .stop_threshold = INT_MAX, }; -static pthread_mutex_t adev_init_lock = PTHREAD_MUTEX_INITIALIZER; static unsigned int audio_device_ref_count = 0; static bool is_zone_selected_to_play(struct audio_hw_device *dev, int zone_id) { @@ -170,6 +198,7 @@ static int out_dump(const struct audio_stream *stream, int fd) { "\t\tdevice: %08x\n" "\t\tamplitude ratio: %f\n" "\t\tenabled channels: %d\n" + "\t\tis ducked: %s\n" "\t\taudio dev: %p\n\n", out->bus_address, out_get_sample_rate(stream), @@ -179,6 +208,7 @@ static int out_dump(const struct audio_stream *stream, int fd) { out->device, out->amplitude_ratio, out->enabled_channels, + _bool_str(out->is_ducked), out->dev); pthread_mutex_unlock(&out->lock); return 0; @@ -398,6 +428,10 @@ static void out_apply_gain(struct generic_stream_out *out, const void *buffer, s int16_buffer[i] = 0; } else { float multiplied = int16_buffer[i] * out->amplitude_ratio; + if (out->is_ducked) { + multiplied = multiplied * DUCKING_MULTIPLIER; + } + if (multiplied > INT16_MAX) int16_buffer[i] = INT16_MAX; else if (multiplied < INT16_MIN) int16_buffer[i] = INT16_MIN; else int16_buffer[i] = (int16_t)multiplied; @@ -1091,6 +1125,9 @@ static int adev_open_output_stream(struct audio_hw_device *dev, } out->enabled_channels = BOTH_CHANNELS; + // For targets where output streams are closed regularly, currently ducked addresses should be + // tracked so that the address of new streams can be checked to determine the default state + out->is_ducked = 0; if (address) { out->bus_address = calloc(strlen(address) + 1, sizeof(char)); strncpy(out->bus_address, address, strlen(address)); @@ -1369,6 +1406,8 @@ static int adev_set_audio_port_config(struct audio_hw_device *dev, int minDb = out->gain_stage.min_value / 100; int maxDb = out->gain_stage.max_value / 100; // curve: 10^((minDb + (maxDb - minDb) * gainIndex / totalSteps) / 20) + // 2x10, where 10 comes from the log 10 conversion from power ratios, + // which are the square (2) of amplitude out->amplitude_ratio = pow(10, (minDb + (maxDb - minDb) * (gainIndex / (float)totalSteps)) / 20); pthread_mutex_unlock(&out->lock); @@ -1423,7 +1462,7 @@ static int adev_close(hw_device_t *dev) { if (!adev) return 0; - pthread_mutex_lock(&adev_init_lock); + pthread_mutex_lock(&adev_lock); if (audio_device_ref_count == 0) { ALOGE("adev_close called when ref_count 0"); @@ -1441,11 +1480,13 @@ static int adev_close(hw_device_t *dev) { if (adev->in_bus_tone_frequency_map) { hashmapFree(adev->in_bus_tone_frequency_map); } + + device_handle = 0; free(adev); } error: - pthread_mutex_unlock(&adev_init_lock); + pthread_mutex_unlock(&adev_lock); return ret; } @@ -1477,7 +1518,7 @@ static int adev_open(const hw_module_t *module, if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0) return -EINVAL; - pthread_mutex_lock(&adev_init_lock); + pthread_mutex_lock(&adev_lock); if (audio_device_ref_count != 0) { *device = &adev->device.common; audio_device_ref_count++; @@ -1557,10 +1598,12 @@ static int adev_open(const hw_module_t *module, adev->last_zone_selected_to_play = DEFAULT_ZONE_TO_LEFT_SPEAKER; + device_handle = adev; + audio_device_ref_count++; unlock: - pthread_mutex_unlock(&adev_init_lock); + pthread_mutex_unlock(&adev_lock); return 0; } diff --git a/emulator/audio/driver/audio_hw.h b/emulator/audio/driver/audio_hw.h index d195a53..cbf7e9b 100644 --- a/emulator/audio/driver/audio_hw.h +++ b/emulator/audio/driver/audio_hw.h @@ -25,6 +25,8 @@ #include "audio_vbuffer.h" +void set_device_ducked(const char *address, bool is_ducked); + struct generic_audio_device { struct audio_hw_device device; // Constant after init pthread_mutex_t lock; @@ -39,6 +41,8 @@ struct generic_audio_device { int last_zone_selected_to_play; // Protected by this->lock }; +static struct generic_audio_device *device_handle; + enum output_channel_enable { LEFT_CHANNEL = 1, RIGHT_CHANNEL = 1 << 1, @@ -57,6 +61,7 @@ struct generic_stream_out { struct audio_gain gain_stage; // Constant after init float amplitude_ratio; // Protected by this->lock enum output_channel_enable enabled_channels; // Constant after init + bool is_ducked; // Protected by this->lock // Time & Position Keeping bool standby; // Protected by this->lock diff --git a/emulator/audio/driver/include/AudioControlUtils.h b/emulator/audio/driver/include/AudioControlUtils.h new file mode 100644 index 0000000..8ac7aba --- /dev/null +++ b/emulator/audio/driver/include/AudioControlUtils.h @@ -0,0 +1,14 @@ + +#ifndef AUDIO_CONTROL_UTILS +#define AUDIO_CONTROL_UTILS + +#include + +#ifdef __cplusplus +extern "C" { +#endif + void set_is_ducked(const char *address, bool isDucked); +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // AUDIO_CONTROL_UTILS \ No newline at end of file diff --git a/emulator/audio/halservice/Android.bp b/emulator/audio/halservice/Android.bp index 3810791..f4f7f98 100644 --- a/emulator/audio/halservice/Android.bp +++ b/emulator/audio/halservice/Android.bp @@ -64,10 +64,15 @@ cc_library { "libbinder_ndk", "libcutils", "liblog", + "audio.primary.caremu", ], srcs: [ "AudioControl.cpp", ], + + include_dirs: [ + "device/generic/car/emulator/audio/driver/include" + ], } diff --git a/emulator/audio/halservice/AudioControl.cpp b/emulator/audio/halservice/AudioControl.cpp index 3583df4..3886951 100644 --- a/emulator/audio/halservice/AudioControl.cpp +++ b/emulator/audio/halservice/AudioControl.cpp @@ -18,6 +18,7 @@ // #define LOG_NDEBUG 0 #include "AudioControl.h" +#include "AudioControlUtils.h" #include #include @@ -109,20 +110,23 @@ ndk::ScopedAStatus AudioControl::onAudioFocusChange(const string& in_usage, int3 ndk::ScopedAStatus AudioControl::onDevicesToDuckChange( const std::vector& in_duckingInfos) { - LOG(INFO) << "AudioControl::onDevicesToDuckChange"; + LOG(DEBUG) << "AudioControl::onDevicesToDuckChange"; for (const DuckingInfo& duckingInfo : in_duckingInfos) { - LOG(INFO) << "zone: " << duckingInfo.zoneId; - LOG(INFO) << "Devices to duck:"; + LOG(DEBUG) << "zone: " << duckingInfo.zoneId; + LOG(DEBUG) << "Devices to duck:"; for (const auto& addressToDuck : duckingInfo.deviceAddressesToDuck) { - LOG(INFO) << addressToDuck; + LOG(DEBUG) << addressToDuck; + set_is_ducked(addressToDuck.c_str(), true); } - LOG(INFO) << "Devices to unduck:"; + + LOG(DEBUG) << "Devices to unduck:"; for (const auto& addressToUnduck : duckingInfo.deviceAddressesToUnduck) { - LOG(INFO) << addressToUnduck; + LOG(DEBUG) << addressToUnduck; + set_is_ducked(addressToUnduck.c_str(), false); } - LOG(INFO) << "Usages holding focus:"; + LOG(DEBUG) << "Usages holding focus:"; for (const auto& usage : duckingInfo.usagesHoldingFocus) { - LOG(INFO) << usage; + LOG(DEBUG) << usage; } } return ndk::ScopedAStatus::ok(); -- cgit v1.2.3 From 172397cc1a5a5a974e3544911f9076f90c070e1e Mon Sep 17 00:00:00 2001 From: Antonio Kantek Date: Tue, 6 Apr 2021 14:13:37 -0700 Subject: Deleting SecondaryHomeApp This CL is part of the effort of deleting ActivityView. Test: atest CarServiceUnitTest Bug: 179161778 Change-Id: I698216d40a7b6a3c5c5ae0722b28ab2597a96f47 --- common/preinstalled-packages-product-car-emulator.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/preinstalled-packages-product-car-emulator.xml b/common/preinstalled-packages-product-car-emulator.xml index fa647ca..a22118f 100644 --- a/common/preinstalled-packages-product-car-emulator.xml +++ b/common/preinstalled-packages-product-car-emulator.xml @@ -216,9 +216,6 @@ - - - -- cgit v1.2.3 From c830418b3fcff561781225037fb39793aff171ae Mon Sep 17 00:00:00 2001 From: Oscar Azucena Date: Fri, 2 Apr 2021 16:53:58 -0700 Subject: Added volume group mute to car emulator Added car volume group mute to the emulator audio control HAL. The HAL uses the same mechanism for ducking to update the output stream is muted flag. The behavour largerly resembles the current behaviour for masters mute, which is to not write any data to the output buffer. Bug: 175732252 Test: atest AtsAudioDeviceTest Test: Mute audio via adb shell cmd car_service set-mute-car-volume-group 0 0 unmute Test: After command above, observe if audio is muted in correct group Change-Id: I9bd7265c5e9af2b74ce9762601f72931364f4b84 --- emulator/audio/driver/audio_hw.c | 41 +++++++++++++++----- emulator/audio/driver/audio_hw.h | 3 +- emulator/audio/driver/include/AudioControlUtils.h | 14 ------- emulator/audio/driver/include/audio_hw_control.h | 44 ++++++++++++++++++++++ emulator/audio/halservice/AudioControl.cpp | 20 +++++----- .../services/Car/service/res/values/config.xml | 5 +++ 6 files changed, 93 insertions(+), 34 deletions(-) delete mode 100644 emulator/audio/driver/include/AudioControlUtils.h create mode 100644 emulator/audio/driver/include/audio_hw_control.h diff --git a/emulator/audio/driver/audio_hw.c b/emulator/audio/driver/audio_hw.c index afe6134..2039d6b 100644 --- a/emulator/audio/driver/audio_hw.c +++ b/emulator/audio/driver/audio_hw.c @@ -23,7 +23,7 @@ // #define LOG_NDEBUG 0 #include "audio_hw.h" -#include "include/AudioControlUtils.h" +#include "include/audio_hw_control.h" #include #include @@ -85,19 +85,25 @@ static pthread_mutex_t adev_lock = PTHREAD_MUTEX_INITIALIZER; static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state); -void set_is_ducked(const char *address, bool is_ducked) { +static struct generic_stream_out * get_audio_device(const char *address, const char *caller) { pthread_mutex_lock(&adev_lock); if(device_handle == 0) { - ALOGE("%s no device handle available", __func__); + ALOGE("%s no device handle available", caller); pthread_mutex_unlock(&adev_lock); - return; + return NULL; } struct generic_stream_out *out = hashmapGet(device_handle->out_bus_stream_map, address); pthread_mutex_unlock(&adev_lock); + return out; +} + +void set_device_address_is_ducked(const char *device_address, bool is_ducked) { + struct generic_stream_out *out = get_audio_device(device_address, __func__); + if (!out) { - ALOGW("%s no device found with address %s", __func__, address); + ALOGW("%s no device found with address %s", __func__, device_address); return; } @@ -106,6 +112,19 @@ void set_is_ducked(const char *address, bool is_ducked) { pthread_mutex_unlock(&out->lock); } +void set_device_address_is_muted(const char *device_address, bool is_muted){ + struct generic_stream_out *out = get_audio_device(device_address, __func__); + + if (!out) { + ALOGW("%s no device found with address %s", __func__, device_address); + return; + } + + pthread_mutex_lock(&out->lock); + out->is_muted = is_muted; + pthread_mutex_unlock(&out->lock); +} + static struct pcm_config pcm_config_out = { .channels = 2, .rate = 0, @@ -199,6 +218,7 @@ static int out_dump(const struct audio_stream *stream, int fd) { "\t\tamplitude ratio: %f\n" "\t\tenabled channels: %d\n" "\t\tis ducked: %s\n" + "\t\tis muted: %s\n" "\t\taudio dev: %p\n\n", out->bus_address, out_get_sample_rate(stream), @@ -209,6 +229,7 @@ static int out_dump(const struct audio_stream *stream, int fd) { out->amplitude_ratio, out->enabled_channels, _bool_str(out->is_ducked), + _bool_str(out->is_muted), out->dev); pthread_mutex_unlock(&out->lock); return 0; @@ -464,8 +485,8 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, si } size_t frames_written = frames; - if (out->dev->master_mute) { - ALOGV("%s: ignored due to master mute", __func__); + if (out->dev->master_mute || out->is_muted) { + ALOGV("%s: ignored due to mute", __func__); } else { out_apply_gain(out, buffer, bytes); frames_written = audio_vbuffer_write(&out->buffer, buffer, frames); @@ -1125,9 +1146,11 @@ static int adev_open_output_stream(struct audio_hw_device *dev, } out->enabled_channels = BOTH_CHANNELS; - // For targets where output streams are closed regularly, currently ducked addresses should be - // tracked so that the address of new streams can be checked to determine the default state + // For targets where output streams are closed regularly, currently ducked/muted addresses + // should be tracked so that the address of new streams can be checked to determine the + // default state out->is_ducked = 0; + out->is_muted = 0; if (address) { out->bus_address = calloc(strlen(address) + 1, sizeof(char)); strncpy(out->bus_address, address, strlen(address)); diff --git a/emulator/audio/driver/audio_hw.h b/emulator/audio/driver/audio_hw.h index cbf7e9b..bfa2909 100644 --- a/emulator/audio/driver/audio_hw.h +++ b/emulator/audio/driver/audio_hw.h @@ -25,8 +25,6 @@ #include "audio_vbuffer.h" -void set_device_ducked(const char *address, bool is_ducked); - struct generic_audio_device { struct audio_hw_device device; // Constant after init pthread_mutex_t lock; @@ -62,6 +60,7 @@ struct generic_stream_out { float amplitude_ratio; // Protected by this->lock enum output_channel_enable enabled_channels; // Constant after init bool is_ducked; // Protected by this->lock + bool is_muted; // Protected by this->lock // Time & Position Keeping bool standby; // Protected by this->lock diff --git a/emulator/audio/driver/include/AudioControlUtils.h b/emulator/audio/driver/include/AudioControlUtils.h deleted file mode 100644 index 8ac7aba..0000000 --- a/emulator/audio/driver/include/AudioControlUtils.h +++ /dev/null @@ -1,14 +0,0 @@ - -#ifndef AUDIO_CONTROL_UTILS -#define AUDIO_CONTROL_UTILS - -#include - -#ifdef __cplusplus -extern "C" { -#endif - void set_is_ducked(const char *address, bool isDucked); -#ifdef __cplusplus -} -#endif // __cplusplus -#endif // AUDIO_CONTROL_UTILS \ No newline at end of file diff --git a/emulator/audio/driver/include/audio_hw_control.h b/emulator/audio/driver/include/audio_hw_control.h new file mode 100644 index 0000000..87cfb0e --- /dev/null +++ b/emulator/audio/driver/include/audio_hw_control.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2021 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. + */ + +#ifndef AUDIO_CONTROL_UTILS +#define AUDIO_CONTROL_UTILS + +#include + +#ifdef __cplusplus +extern "C" { +#endif +// Sets the device address specified to ducked state +// device_address is the device address to set ducked +// is_ducked is the new ducked state +// +// Note: The device address must be defined in +// audio_policy_configuration.xml +void set_device_address_is_ducked(const char *device_address, bool is_ducked); + + +// Sets the device address specified to muted state +// device_address is the device address to set muted +// is_muted is the new mute state +// +// Note: The device address must be defined in +// audio_policy_configuration.xml +void set_device_address_is_muted(const char *device_address, bool is_muted); +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // AUDIO_CONTROL_UTILS \ No newline at end of file diff --git a/emulator/audio/halservice/AudioControl.cpp b/emulator/audio/halservice/AudioControl.cpp index 3886951..89373b9 100644 --- a/emulator/audio/halservice/AudioControl.cpp +++ b/emulator/audio/halservice/AudioControl.cpp @@ -18,7 +18,7 @@ // #define LOG_NDEBUG 0 #include "AudioControl.h" -#include "AudioControlUtils.h" +#include "audio_hw_control.h" #include #include @@ -116,13 +116,13 @@ ndk::ScopedAStatus AudioControl::onDevicesToDuckChange( LOG(DEBUG) << "Devices to duck:"; for (const auto& addressToDuck : duckingInfo.deviceAddressesToDuck) { LOG(DEBUG) << addressToDuck; - set_is_ducked(addressToDuck.c_str(), true); + set_device_address_is_ducked(addressToDuck.c_str(), true); } LOG(DEBUG) << "Devices to unduck:"; for (const auto& addressToUnduck : duckingInfo.deviceAddressesToUnduck) { LOG(DEBUG) << addressToUnduck; - set_is_ducked(addressToUnduck.c_str(), false); + set_device_address_is_ducked(addressToUnduck.c_str(), false); } LOG(DEBUG) << "Usages holding focus:"; for (const auto& usage : duckingInfo.usagesHoldingFocus) { @@ -134,16 +134,18 @@ ndk::ScopedAStatus AudioControl::onDevicesToDuckChange( ndk::ScopedAStatus AudioControl::onDevicesToMuteChange( const std::vector& in_mutingInfos) { - LOG(INFO) << "AudioControl::onDevicesToMuteChange"; + LOG(DEBUG) << "AudioControl::onDevicesToMuteChange"; for (const MutingInfo& mutingInfo : in_mutingInfos) { - LOG(INFO) << "zone: " << mutingInfo.zoneId; - LOG(INFO) << "Devices to mute:"; + LOG(DEBUG) << "zone: " << mutingInfo.zoneId; + LOG(DEBUG) << "Devices to mute:"; for (const auto& addressToMute : mutingInfo.deviceAddressesToMute) { - LOG(INFO) << addressToMute; + LOG(DEBUG) << addressToMute; + set_device_address_is_muted(addressToMute.c_str(), true); } - LOG(INFO) << "Devices to unmute:"; + LOG(DEBUG) << "Devices to unmute:"; for (const auto& addressToUnmute : mutingInfo.deviceAddressesToUnmute) { - LOG(INFO) << addressToUnmute; + LOG(DEBUG) << addressToUnmute; + set_device_address_is_muted(addressToUnmute.c_str(), false); } } return ndk::ScopedAStatus::ok(); diff --git a/emulator/audio/overlay/packages/services/Car/service/res/values/config.xml b/emulator/audio/overlay/packages/services/Car/service/res/values/config.xml index 28857b3..38ad500 100644 --- a/emulator/audio/overlay/packages/services/Car/service/res/values/config.xml +++ b/emulator/audio/overlay/packages/services/Car/service/res/values/config.xml @@ -23,4 +23,9 @@ --> true + + true -- cgit v1.2.3 From df77e04c7f6aac06b7f4c9ce45eadaaa535569b0 Mon Sep 17 00:00:00 2001 From: Oscar Azucena Date: Thu, 22 Apr 2021 15:58:09 -0700 Subject: Car emulator re-arrange volume groups and contexts Moved system sounds contexts into alarms volume group, the main goals is to separate the system sounds and the media sounds. Also moved call_ring context into the same volume group with call context. Bug: 186158497 Test: build and run car emulator. Test: Play system sounds and make sure they have the same volume as alarms sounds. Change-Id: I77049580d2d67d7f42342314fbf3977c58890e88 --- emulator/audio/car_audio_configuration.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/emulator/audio/car_audio_configuration.xml b/emulator/audio/car_audio_configuration.xml index d79ff33..5c0a880 100644 --- a/emulator/audio/car_audio_configuration.xml +++ b/emulator/audio/car_audio_configuration.xml @@ -28,20 +28,11 @@ - - - + - - - - - - - @@ -55,11 +46,20 @@ + + + + + + + + + -- cgit v1.2.3 From 3fc4dffa37634bd873d3f717fa92b0b67f00051c Mon Sep 17 00:00:00 2001 From: Calvin Huang Date: Fri, 23 Apr 2021 00:42:34 +0000 Subject: Add gsi car targets These gsi car targets are based on mobile gsi targets Bug: 183422851 Test: Build these targets locally Change-Id: I88779458022502e2356a5b16ee0400e087f76419 --- AndroidProducts.mk | 6 +++ gsi_car_arm64.mk | 22 +++++++++ gsi_car_base.mk | 140 +++++++++++++++++++++++++++++++++++++++++++++++++++++ gsi_car_x86_64.mk | 22 +++++++++ 4 files changed, 190 insertions(+) create mode 100644 gsi_car_arm64.mk create mode 100644 gsi_car_base.mk create mode 100644 gsi_car_x86_64.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index ff095c2..13eeea7 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -20,6 +20,9 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/aosp_car_x86.mk \ $(LOCAL_DIR)/aosp_car_x86_64.mk \ $(LOCAL_DIR)/car_x86_64.mk \ + $(LOCAL_DIR)/gsi_car_arm64.mk \ + $(LOCAL_DIR)/gsi_car_x86_64.mk \ + COMMON_LUNCH_CHOICES := \ aosp_car_arm-userdebug \ @@ -27,5 +30,8 @@ COMMON_LUNCH_CHOICES := \ aosp_car_x86-userdebug \ aosp_car_x86_64-userdebug \ car_x86_64-userdebug \ + gsi_car_arm64-userdebug \ + gsi_car_x86_64-userdebug \ + EMULATOR_VENDOR_NO_SOUND_TRIGGER := false diff --git a/gsi_car_arm64.mk b/gsi_car_arm64.mk new file mode 100644 index 0000000..0977da4 --- /dev/null +++ b/gsi_car_arm64.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 2021 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. + +$(call inherit-product, device/generic/car/gsi_car_base.mk) +$(call inherit-product, device/generic/common/gsi_arm64.mk) + +PRODUCT_NAME := gsi_car_arm64 +PRODUCT_DEVICE := generic_arm64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := Car GSI on arm64 \ No newline at end of file diff --git a/gsi_car_base.mk b/gsi_car_base.mk new file mode 100644 index 0000000..23071d2 --- /dev/null +++ b/gsi_car_base.mk @@ -0,0 +1,140 @@ +# +# Copyright (C) 2021 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. + +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed + +PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ + root/init.bootstat.rc \ + root/init.car.rc \ + system/app/CarFrameworkPackageStubs/CarFrameworkPackageStubs.apk \ + system/app/CarFrameworkPackageStubs/oat/arm64/CarFrameworkPackageStubs.odex \ + system/app/CarFrameworkPackageStubs/oat/arm64/CarFrameworkPackageStubs.vdex \ + system/app/CarLatinIME/CarLatinIME.apk \ + system/app/CarMapsPlaceholder/CarMapsPlaceholder.apk \ + system/app/CarPermissionControllerRRO/CarPermissionControllerRRO.apk \ + system/app/RotaryIME/RotaryIME.apk \ + system/app/RotaryIME/oat/arm64/RotaryIME.odex \ + system/app/RotaryIME/oat/arm64/RotaryIME.vdex \ + system/app/RotaryPlayground/RotaryPlayground.apk \ + system/app/SampleCustomInputService/SampleCustomInputService.apk \ + system/app/SampleRearViewCamera/SampleRearViewCamera.apk \ + system/app/SampleRearViewCamera/oat/arm64/SampleRearViewCamera.odex \ + system/app/SampleRearViewCamera/oat/arm64/SampleRearViewCamera.vdex \ + system/app/SystemUpdater/SystemUpdater.apk \ + system/bin/android.automotive.evs.manager@1.1 \ + system/bin/carbugreportd \ + system/bin/carpowerpolicyd \ + system/bin/carwatchdogd \ + system/bin/com.android.car.procfsinspector \ + system/etc/apns-conf.xml \ + system/etc/init/android.automotive.evs.manager@1.1.rc \ + system/etc/init/carbugreportd.rc \ + system/etc/init/carpowerpolicyd.rc \ + system/etc/init/carwatchdogd.rc \ + system/etc/init/com.android.car.procfsinspector.rc \ + system/etc/init/init.bootstat.car.rc \ + system/etc/init/init.car.rc \ + system/etc/old-apns-conf.xml \ + system/etc/permissions/android.car.cluster.xml \ + system/etc/permissions/android.car.usb.handler.xml \ + system/etc/permissions/android.hardware.broadcastradio.xml \ + system/etc/permissions/android.hardware.type.automotive.xml \ + system/etc/permissions/com.android.car.activityresolver.xml \ + system/etc/permissions/com.android.car.bugreport.xml \ + system/etc/permissions/com.android.car.carlauncher.xml \ + system/etc/permissions/com.android.car.cluster.home.xml \ + system/etc/permissions/com.android.car.dialer.xml \ + system/etc/permissions/com.android.car.hvac.xml \ + system/etc/permissions/com.android.car.media.xml \ + system/etc/permissions/com.android.car.messenger.xml \ + system/etc/permissions/com.android.car.radio.xml \ + system/etc/permissions/com.android.car.rotary.xml \ + system/etc/permissions/com.android.car.settings.xml \ + system/etc/permissions/com.android.car.shell.xml \ + system/etc/permissions/com.android.car.xml \ + system/etc/permissions/com.google.android.car.defaultstoragemonitoringcompanionapp.xml \ + system/etc/permissions/com.google.android.car.garagemode.testapp.xml \ + system/etc/permissions/com.google.android.car.kitchensink.xml \ + system/etc/permissions/com.google.android.car.networking.preferenceupdater.xml \ + system/etc/sysconfig/preinstalled-packages-product-car-base.xml \ + system/etc/vintf/manifest/carpowerpolicyd.xml \ + system/etc/vintf/manifest/carwatchdogd.xml \ + system/etc/vintf/manifest/manifest_android.automotive.evs.manager@1.1.xml \ + system/framework/android.car.jar \ + system/framework/car-frameworks-service.jar \ + system/framework/oat/arm64/car-frameworks-service.odex \ + system/framework/oat/arm64/car-frameworks-service.vdex \ + system/lib/libcar-framework-service-jni.so \ + system/lib/libsuspend.so \ + system/lib64/android.automotive.watchdog-V3-cpp.so \ + system/lib64/android.automotive.watchdog.internal-cpp.so \ + system/lib64/android.frameworks.automotive.display@1.0.so \ + system/lib64/android.frameworks.automotive.powerpolicy-V1-cpp.so \ + system/lib64/android.frameworks.automotive.powerpolicy.internal-cpp.so \ + system/lib64/android.hardware.automotive.evs@1.0.so \ + system/lib64/android.hardware.automotive.evs@1.1.so \ + system/lib64/android.hardware.automotive.vehicle@2.0.so \ + system/lib64/libcar-framework-service-jni.so \ + system/lib64/libsuspend.so \ + system/lib64/libwatchdog_binder_mediator.so \ + system/lib64/libwatchdog_package_info_resolver.so \ + system/lib64/libwatchdog_perf_service.so \ + system/lib64/libwatchdog_process_service.so \ + system/media/bootanimation.zip \ + system/priv-app/BugReportApp/BugReportApp.apk \ + system/priv-app/CarActivityResolver/CarActivityResolver.apk \ + system/priv-app/CarActivityResolver/oat/arm64/CarActivityResolver.odex \ + system/priv-app/CarActivityResolver/oat/arm64/CarActivityResolver.vdex \ + system/priv-app/CarDialerApp/CarDialerApp.apk \ + system/priv-app/CarHvacApp/CarHvacApp.apk \ + system/priv-app/CarLauncher/CarLauncher.apk \ + system/priv-app/CarMediaApp/CarMediaApp.apk \ + system/priv-app/CarMessengerApp/CarMessengerApp.apk \ + system/priv-app/CarRadioApp/CarRadioApp.apk \ + system/priv-app/CarRotaryController/CarRotaryController.apk \ + system/priv-app/CarService/CarService.apk \ + system/priv-app/CarService/oat/arm64/CarService.odex \ + system/priv-app/CarService/oat/arm64/CarService.vdex \ + system/priv-app/CarSettings/CarSettings.apk \ + system/priv-app/CarShell/CarShell.apk \ + system/priv-app/CarShell/oat/arm64/CarShell.odex \ + system/priv-app/CarShell/oat/arm64/CarShell.vdex \ + system/priv-app/CarUsbHandler/CarUsbHandler.apk \ + system/priv-app/CarUsbHandler/oat/arm64/CarUsbHandler.odex \ + system/priv-app/CarUsbHandler/oat/arm64/CarUsbHandler.vdex \ + system/priv-app/ClusterHomeSample/ClusterHomeSample.apk \ + system/priv-app/ClusterHomeSample/oat/arm64/ClusterHomeSample.odex \ + system/priv-app/ClusterHomeSample/oat/arm64/ClusterHomeSample.vdex \ + system/priv-app/DefaultStorageMonitoringCompanionApp/DefaultStorageMonitoringCompanionApp.apk \ + system/priv-app/DirectRenderingCluster/DirectRenderingCluster.apk \ + system/priv-app/DirectRenderingCluster/oat/arm64/DirectRenderingCluster.odex \ + system/priv-app/DirectRenderingCluster/oat/arm64/DirectRenderingCluster.vdex \ + system/priv-app/EmbeddedKitchenSinkApp/EmbeddedKitchenSinkApp.apk \ + system/priv-app/ExperimentalCarService/ExperimentalCarService.apk \ + system/priv-app/ExperimentalCarService/oat/arm64/ExperimentalCarService.odex \ + system/priv-app/ExperimentalCarService/oat/arm64/ExperimentalCarService.vdex \ + system/priv-app/GarageModeTestApp/GarageModeTestApp.apk \ + system/priv-app/LocalMediaPlayer/LocalMediaPlayer.apk \ + system/priv-app/NetworkPreferenceApp/NetworkPreferenceApp.apk \ + system/lib64/libcarservicejni.so \ + system/priv-app/CarService/lib/arm64/libcarservicejni.so \ + +PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += %.odex %.vdex %.art + +PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay +EMULATOR_VENDOR_NO_SENSORS := true +PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true +$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk) +EMULATOR_VENDOR_NO_SOUND := true diff --git a/gsi_car_x86_64.mk b/gsi_car_x86_64.mk new file mode 100644 index 0000000..378fa5c --- /dev/null +++ b/gsi_car_x86_64.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 2021 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. + +$(call inherit-product, device/generic/car/gsi_car_base.mk) +$(call inherit-product, device/generic/common/gsi_x86_64.mk) + +PRODUCT_NAME := gsi_car_x86_64 +PRODUCT_DEVICE := generic_x86_64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := Car GSI on x86_64 \ No newline at end of file -- cgit v1.2.3 From 1af336f0c9fc1d4223d96788bdbc7a4f4810c1ba Mon Sep 17 00:00:00 2001 From: Calvin Huang Date: Mon, 26 Apr 2021 17:53:57 +0000 Subject: Add missing entry to gsi_car* allowed list Bug 186381337 Test: manually build the target locally Change-Id: I374afbc17b0a8a922ef4726c6e3274c7e42817d0 --- gsi_car_base.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gsi_car_base.mk b/gsi_car_base.mk index 23071d2..224be12 100644 --- a/gsi_car_base.mk +++ b/gsi_car_base.mk @@ -130,6 +130,12 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/priv-app/NetworkPreferenceApp/NetworkPreferenceApp.apk \ system/lib64/libcarservicejni.so \ system/priv-app/CarService/lib/arm64/libcarservicejni.so \ + system/priv-app/CarService/lib/x86_64/libcarservicejni.so \ + system/bin/android.automotive.telemetryd@1.0 \ + system/etc/init/android.automotive.telemetryd@1.0.rc \ + system/etc/vintf/manifest/android.automotive.telemetryd@1.0.xml \ + system/lib64/android.automotive.telemetryd@1.0-impl.so \ + system/lib64/android.frameworks.automotive.telemetry-V1-cpp.so \ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += %.odex %.vdex %.art -- cgit v1.2.3 From c883592694c7842eced95ac25d974ea5d6beeeaf Mon Sep 17 00:00:00 2001 From: Shuo Qian Date: Tue, 27 Apr 2021 16:50:24 +0000 Subject: Revert "Add missing entry to gsi_car* allowed list" This reverts commit 1af336f0c9fc1d4223d96788bdbc7a4f4810c1ba. Reason for revert: Change-Id: Ic684612cc977f106ca1f3ff8c7da8c1f8d67bbd4 --- gsi_car_base.mk | 6 ------ 1 file changed, 6 deletions(-) diff --git a/gsi_car_base.mk b/gsi_car_base.mk index 224be12..23071d2 100644 --- a/gsi_car_base.mk +++ b/gsi_car_base.mk @@ -130,12 +130,6 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/priv-app/NetworkPreferenceApp/NetworkPreferenceApp.apk \ system/lib64/libcarservicejni.so \ system/priv-app/CarService/lib/arm64/libcarservicejni.so \ - system/priv-app/CarService/lib/x86_64/libcarservicejni.so \ - system/bin/android.automotive.telemetryd@1.0 \ - system/etc/init/android.automotive.telemetryd@1.0.rc \ - system/etc/vintf/manifest/android.automotive.telemetryd@1.0.xml \ - system/lib64/android.automotive.telemetryd@1.0-impl.so \ - system/lib64/android.frameworks.automotive.telemetry-V1-cpp.so \ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += %.odex %.vdex %.art -- cgit v1.2.3 From 82cb522568f306fd1015fdd56ea9e597b8740a74 Mon Sep 17 00:00:00 2001 From: Shuo Qian Date: Tue, 27 Apr 2021 16:48:51 +0000 Subject: Revert "Add gsi car targets" This reverts commit 3fc4dffa37634bd873d3f717fa92b0b67f00051c. Reason for revert: Change-Id: I1abdb20c66e4cb0b598822e8e5f77823acb3904c --- AndroidProducts.mk | 6 --- gsi_car_arm64.mk | 22 --------- gsi_car_base.mk | 140 ----------------------------------------------------- gsi_car_x86_64.mk | 22 --------- 4 files changed, 190 deletions(-) delete mode 100644 gsi_car_arm64.mk delete mode 100644 gsi_car_base.mk delete mode 100644 gsi_car_x86_64.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 13eeea7..ff095c2 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -20,9 +20,6 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/aosp_car_x86.mk \ $(LOCAL_DIR)/aosp_car_x86_64.mk \ $(LOCAL_DIR)/car_x86_64.mk \ - $(LOCAL_DIR)/gsi_car_arm64.mk \ - $(LOCAL_DIR)/gsi_car_x86_64.mk \ - COMMON_LUNCH_CHOICES := \ aosp_car_arm-userdebug \ @@ -30,8 +27,5 @@ COMMON_LUNCH_CHOICES := \ aosp_car_x86-userdebug \ aosp_car_x86_64-userdebug \ car_x86_64-userdebug \ - gsi_car_arm64-userdebug \ - gsi_car_x86_64-userdebug \ - EMULATOR_VENDOR_NO_SOUND_TRIGGER := false diff --git a/gsi_car_arm64.mk b/gsi_car_arm64.mk deleted file mode 100644 index 0977da4..0000000 --- a/gsi_car_arm64.mk +++ /dev/null @@ -1,22 +0,0 @@ -# -# Copyright (C) 2021 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. - -$(call inherit-product, device/generic/car/gsi_car_base.mk) -$(call inherit-product, device/generic/common/gsi_arm64.mk) - -PRODUCT_NAME := gsi_car_arm64 -PRODUCT_DEVICE := generic_arm64 -PRODUCT_BRAND := Android -PRODUCT_MODEL := Car GSI on arm64 \ No newline at end of file diff --git a/gsi_car_base.mk b/gsi_car_base.mk deleted file mode 100644 index 23071d2..0000000 --- a/gsi_car_base.mk +++ /dev/null @@ -1,140 +0,0 @@ -# -# Copyright (C) 2021 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. - -PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed - -PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ - root/init.bootstat.rc \ - root/init.car.rc \ - system/app/CarFrameworkPackageStubs/CarFrameworkPackageStubs.apk \ - system/app/CarFrameworkPackageStubs/oat/arm64/CarFrameworkPackageStubs.odex \ - system/app/CarFrameworkPackageStubs/oat/arm64/CarFrameworkPackageStubs.vdex \ - system/app/CarLatinIME/CarLatinIME.apk \ - system/app/CarMapsPlaceholder/CarMapsPlaceholder.apk \ - system/app/CarPermissionControllerRRO/CarPermissionControllerRRO.apk \ - system/app/RotaryIME/RotaryIME.apk \ - system/app/RotaryIME/oat/arm64/RotaryIME.odex \ - system/app/RotaryIME/oat/arm64/RotaryIME.vdex \ - system/app/RotaryPlayground/RotaryPlayground.apk \ - system/app/SampleCustomInputService/SampleCustomInputService.apk \ - system/app/SampleRearViewCamera/SampleRearViewCamera.apk \ - system/app/SampleRearViewCamera/oat/arm64/SampleRearViewCamera.odex \ - system/app/SampleRearViewCamera/oat/arm64/SampleRearViewCamera.vdex \ - system/app/SystemUpdater/SystemUpdater.apk \ - system/bin/android.automotive.evs.manager@1.1 \ - system/bin/carbugreportd \ - system/bin/carpowerpolicyd \ - system/bin/carwatchdogd \ - system/bin/com.android.car.procfsinspector \ - system/etc/apns-conf.xml \ - system/etc/init/android.automotive.evs.manager@1.1.rc \ - system/etc/init/carbugreportd.rc \ - system/etc/init/carpowerpolicyd.rc \ - system/etc/init/carwatchdogd.rc \ - system/etc/init/com.android.car.procfsinspector.rc \ - system/etc/init/init.bootstat.car.rc \ - system/etc/init/init.car.rc \ - system/etc/old-apns-conf.xml \ - system/etc/permissions/android.car.cluster.xml \ - system/etc/permissions/android.car.usb.handler.xml \ - system/etc/permissions/android.hardware.broadcastradio.xml \ - system/etc/permissions/android.hardware.type.automotive.xml \ - system/etc/permissions/com.android.car.activityresolver.xml \ - system/etc/permissions/com.android.car.bugreport.xml \ - system/etc/permissions/com.android.car.carlauncher.xml \ - system/etc/permissions/com.android.car.cluster.home.xml \ - system/etc/permissions/com.android.car.dialer.xml \ - system/etc/permissions/com.android.car.hvac.xml \ - system/etc/permissions/com.android.car.media.xml \ - system/etc/permissions/com.android.car.messenger.xml \ - system/etc/permissions/com.android.car.radio.xml \ - system/etc/permissions/com.android.car.rotary.xml \ - system/etc/permissions/com.android.car.settings.xml \ - system/etc/permissions/com.android.car.shell.xml \ - system/etc/permissions/com.android.car.xml \ - system/etc/permissions/com.google.android.car.defaultstoragemonitoringcompanionapp.xml \ - system/etc/permissions/com.google.android.car.garagemode.testapp.xml \ - system/etc/permissions/com.google.android.car.kitchensink.xml \ - system/etc/permissions/com.google.android.car.networking.preferenceupdater.xml \ - system/etc/sysconfig/preinstalled-packages-product-car-base.xml \ - system/etc/vintf/manifest/carpowerpolicyd.xml \ - system/etc/vintf/manifest/carwatchdogd.xml \ - system/etc/vintf/manifest/manifest_android.automotive.evs.manager@1.1.xml \ - system/framework/android.car.jar \ - system/framework/car-frameworks-service.jar \ - system/framework/oat/arm64/car-frameworks-service.odex \ - system/framework/oat/arm64/car-frameworks-service.vdex \ - system/lib/libcar-framework-service-jni.so \ - system/lib/libsuspend.so \ - system/lib64/android.automotive.watchdog-V3-cpp.so \ - system/lib64/android.automotive.watchdog.internal-cpp.so \ - system/lib64/android.frameworks.automotive.display@1.0.so \ - system/lib64/android.frameworks.automotive.powerpolicy-V1-cpp.so \ - system/lib64/android.frameworks.automotive.powerpolicy.internal-cpp.so \ - system/lib64/android.hardware.automotive.evs@1.0.so \ - system/lib64/android.hardware.automotive.evs@1.1.so \ - system/lib64/android.hardware.automotive.vehicle@2.0.so \ - system/lib64/libcar-framework-service-jni.so \ - system/lib64/libsuspend.so \ - system/lib64/libwatchdog_binder_mediator.so \ - system/lib64/libwatchdog_package_info_resolver.so \ - system/lib64/libwatchdog_perf_service.so \ - system/lib64/libwatchdog_process_service.so \ - system/media/bootanimation.zip \ - system/priv-app/BugReportApp/BugReportApp.apk \ - system/priv-app/CarActivityResolver/CarActivityResolver.apk \ - system/priv-app/CarActivityResolver/oat/arm64/CarActivityResolver.odex \ - system/priv-app/CarActivityResolver/oat/arm64/CarActivityResolver.vdex \ - system/priv-app/CarDialerApp/CarDialerApp.apk \ - system/priv-app/CarHvacApp/CarHvacApp.apk \ - system/priv-app/CarLauncher/CarLauncher.apk \ - system/priv-app/CarMediaApp/CarMediaApp.apk \ - system/priv-app/CarMessengerApp/CarMessengerApp.apk \ - system/priv-app/CarRadioApp/CarRadioApp.apk \ - system/priv-app/CarRotaryController/CarRotaryController.apk \ - system/priv-app/CarService/CarService.apk \ - system/priv-app/CarService/oat/arm64/CarService.odex \ - system/priv-app/CarService/oat/arm64/CarService.vdex \ - system/priv-app/CarSettings/CarSettings.apk \ - system/priv-app/CarShell/CarShell.apk \ - system/priv-app/CarShell/oat/arm64/CarShell.odex \ - system/priv-app/CarShell/oat/arm64/CarShell.vdex \ - system/priv-app/CarUsbHandler/CarUsbHandler.apk \ - system/priv-app/CarUsbHandler/oat/arm64/CarUsbHandler.odex \ - system/priv-app/CarUsbHandler/oat/arm64/CarUsbHandler.vdex \ - system/priv-app/ClusterHomeSample/ClusterHomeSample.apk \ - system/priv-app/ClusterHomeSample/oat/arm64/ClusterHomeSample.odex \ - system/priv-app/ClusterHomeSample/oat/arm64/ClusterHomeSample.vdex \ - system/priv-app/DefaultStorageMonitoringCompanionApp/DefaultStorageMonitoringCompanionApp.apk \ - system/priv-app/DirectRenderingCluster/DirectRenderingCluster.apk \ - system/priv-app/DirectRenderingCluster/oat/arm64/DirectRenderingCluster.odex \ - system/priv-app/DirectRenderingCluster/oat/arm64/DirectRenderingCluster.vdex \ - system/priv-app/EmbeddedKitchenSinkApp/EmbeddedKitchenSinkApp.apk \ - system/priv-app/ExperimentalCarService/ExperimentalCarService.apk \ - system/priv-app/ExperimentalCarService/oat/arm64/ExperimentalCarService.odex \ - system/priv-app/ExperimentalCarService/oat/arm64/ExperimentalCarService.vdex \ - system/priv-app/GarageModeTestApp/GarageModeTestApp.apk \ - system/priv-app/LocalMediaPlayer/LocalMediaPlayer.apk \ - system/priv-app/NetworkPreferenceApp/NetworkPreferenceApp.apk \ - system/lib64/libcarservicejni.so \ - system/priv-app/CarService/lib/arm64/libcarservicejni.so \ - -PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += %.odex %.vdex %.art - -PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay -EMULATOR_VENDOR_NO_SENSORS := true -PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true -$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk) -EMULATOR_VENDOR_NO_SOUND := true diff --git a/gsi_car_x86_64.mk b/gsi_car_x86_64.mk deleted file mode 100644 index 378fa5c..0000000 --- a/gsi_car_x86_64.mk +++ /dev/null @@ -1,22 +0,0 @@ -# -# Copyright (C) 2021 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. - -$(call inherit-product, device/generic/car/gsi_car_base.mk) -$(call inherit-product, device/generic/common/gsi_x86_64.mk) - -PRODUCT_NAME := gsi_car_x86_64 -PRODUCT_DEVICE := generic_x86_64 -PRODUCT_BRAND := Android -PRODUCT_MODEL := Car GSI on x86_64 \ No newline at end of file -- cgit v1.2.3 From aa249a530d2be4a0e6f8ca41cde2e656828493bb Mon Sep 17 00:00:00 2001 From: Calvin Huang Date: Tue, 27 Apr 2021 18:48:53 +0000 Subject: Add gsi car targets Re-add these targets with more offending items in allowlist Bug: 183507588 Test: Forrest runs over test targets Change-Id: I4a7df077b5461297391e2a28b2d6a35a06265188 --- AndroidProducts.mk | 6 +++ gsi_car_arm64.mk | 22 ++++++++ gsi_car_base.mk | 148 +++++++++++++++++++++++++++++++++++++++++++++++++++++ gsi_car_x86_64.mk | 22 ++++++++ 4 files changed, 198 insertions(+) create mode 100644 gsi_car_arm64.mk create mode 100644 gsi_car_base.mk create mode 100644 gsi_car_x86_64.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index ff095c2..13eeea7 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -20,6 +20,9 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/aosp_car_x86.mk \ $(LOCAL_DIR)/aosp_car_x86_64.mk \ $(LOCAL_DIR)/car_x86_64.mk \ + $(LOCAL_DIR)/gsi_car_arm64.mk \ + $(LOCAL_DIR)/gsi_car_x86_64.mk \ + COMMON_LUNCH_CHOICES := \ aosp_car_arm-userdebug \ @@ -27,5 +30,8 @@ COMMON_LUNCH_CHOICES := \ aosp_car_x86-userdebug \ aosp_car_x86_64-userdebug \ car_x86_64-userdebug \ + gsi_car_arm64-userdebug \ + gsi_car_x86_64-userdebug \ + EMULATOR_VENDOR_NO_SOUND_TRIGGER := false diff --git a/gsi_car_arm64.mk b/gsi_car_arm64.mk new file mode 100644 index 0000000..0977da4 --- /dev/null +++ b/gsi_car_arm64.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 2021 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. + +$(call inherit-product, device/generic/car/gsi_car_base.mk) +$(call inherit-product, device/generic/common/gsi_arm64.mk) + +PRODUCT_NAME := gsi_car_arm64 +PRODUCT_DEVICE := generic_arm64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := Car GSI on arm64 \ No newline at end of file diff --git a/gsi_car_base.mk b/gsi_car_base.mk new file mode 100644 index 0000000..fe3324f --- /dev/null +++ b/gsi_car_base.mk @@ -0,0 +1,148 @@ +# +# Copyright (C) 2021 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. + +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed + +PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ + root/init.bootstat.rc \ + root/init.car.rc \ + system/app/CarFrameworkPackageStubs/CarFrameworkPackageStubs.apk \ + system/app/CarFrameworkPackageStubs/oat/arm64/CarFrameworkPackageStubs.odex \ + system/app/CarFrameworkPackageStubs/oat/arm64/CarFrameworkPackageStubs.vdex \ + system/app/CarLatinIME/CarLatinIME.apk \ + system/app/CarMapsPlaceholder/CarMapsPlaceholder.apk \ + system/app/CarPermissionControllerRRO/CarPermissionControllerRRO.apk \ + system/app/RotaryIME/RotaryIME.apk \ + system/app/RotaryIME/oat/arm64/RotaryIME.odex \ + system/app/RotaryIME/oat/arm64/RotaryIME.vdex \ + system/app/RotaryPlayground/RotaryPlayground.apk \ + system/app/SampleCustomInputService/SampleCustomInputService.apk \ + system/app/SampleRearViewCamera/SampleRearViewCamera.apk \ + system/app/SampleRearViewCamera/oat/arm64/SampleRearViewCamera.odex \ + system/app/SampleRearViewCamera/oat/arm64/SampleRearViewCamera.vdex \ + system/app/SystemUpdater/SystemUpdater.apk \ + system/bin/android.automotive.evs.manager@1.1 \ + system/bin/carbugreportd \ + system/bin/carpowerpolicyd \ + system/bin/carwatchdogd \ + system/bin/com.android.car.procfsinspector \ + system/etc/apns-conf.xml \ + system/etc/init/android.automotive.evs.manager@1.1.rc \ + system/etc/init/carbugreportd.rc \ + system/etc/init/carpowerpolicyd.rc \ + system/etc/init/carwatchdogd.rc \ + system/etc/init/com.android.car.procfsinspector.rc \ + system/etc/init/init.bootstat.car.rc \ + system/etc/init/init.car.rc \ + system/etc/old-apns-conf.xml \ + system/etc/permissions/android.car.cluster.xml \ + system/etc/permissions/android.car.usb.handler.xml \ + system/etc/permissions/android.hardware.broadcastradio.xml \ + system/etc/permissions/android.hardware.type.automotive.xml \ + system/etc/permissions/com.android.car.activityresolver.xml \ + system/etc/permissions/com.android.car.bugreport.xml \ + system/etc/permissions/com.android.car.carlauncher.xml \ + system/etc/permissions/com.android.car.cluster.home.xml \ + system/etc/permissions/com.android.car.dialer.xml \ + system/etc/permissions/com.android.car.hvac.xml \ + system/etc/permissions/com.android.car.media.xml \ + system/etc/permissions/com.android.car.messenger.xml \ + system/etc/permissions/com.android.car.radio.xml \ + system/etc/permissions/com.android.car.rotary.xml \ + system/etc/permissions/com.android.car.settings.xml \ + system/etc/permissions/com.android.car.shell.xml \ + system/etc/permissions/com.android.car.xml \ + system/etc/permissions/com.google.android.car.defaultstoragemonitoringcompanionapp.xml \ + system/etc/permissions/com.google.android.car.garagemode.testapp.xml \ + system/etc/permissions/com.google.android.car.kitchensink.xml \ + system/etc/permissions/com.google.android.car.networking.preferenceupdater.xml \ + system/etc/sysconfig/preinstalled-packages-product-car-base.xml \ + system/etc/vintf/manifest/carpowerpolicyd.xml \ + system/etc/vintf/manifest/carwatchdogd.xml \ + system/etc/vintf/manifest/manifest_android.automotive.evs.manager@1.1.xml \ + system/framework/android.car.jar \ + system/framework/car-frameworks-service.jar \ + system/framework/oat/arm64/car-frameworks-service.odex \ + system/framework/oat/arm64/car-frameworks-service.vdex \ + system/lib/libcar-framework-service-jni.so \ + system/lib/libsuspend.so \ + system/lib64/android.automotive.watchdog-V3-cpp.so \ + system/lib64/android.automotive.watchdog.internal-cpp.so \ + system/lib64/android.frameworks.automotive.display@1.0.so \ + system/lib64/android.frameworks.automotive.powerpolicy-V1-cpp.so \ + system/lib64/android.frameworks.automotive.powerpolicy.internal-cpp.so \ + system/lib64/android.hardware.automotive.evs@1.0.so \ + system/lib64/android.hardware.automotive.evs@1.1.so \ + system/lib64/android.hardware.automotive.vehicle@2.0.so \ + system/lib64/libcar-framework-service-jni.so \ + system/lib64/libsuspend.so \ + system/lib64/libwatchdog_binder_mediator.so \ + system/lib64/libwatchdog_package_info_resolver.so \ + system/lib64/libwatchdog_perf_service.so \ + system/lib64/libwatchdog_process_service.so \ + system/media/bootanimation.zip \ + system/priv-app/BugReportApp/BugReportApp.apk \ + system/priv-app/CarActivityResolver/CarActivityResolver.apk \ + system/priv-app/CarActivityResolver/oat/arm64/CarActivityResolver.odex \ + system/priv-app/CarActivityResolver/oat/arm64/CarActivityResolver.vdex \ + system/priv-app/CarDialerApp/CarDialerApp.apk \ + system/priv-app/CarHvacApp/CarHvacApp.apk \ + system/priv-app/CarLauncher/CarLauncher.apk \ + system/priv-app/CarMediaApp/CarMediaApp.apk \ + system/priv-app/CarMessengerApp/CarMessengerApp.apk \ + system/priv-app/CarRadioApp/CarRadioApp.apk \ + system/priv-app/CarRotaryController/CarRotaryController.apk \ + system/priv-app/CarService/CarService.apk \ + system/priv-app/CarService/oat/arm64/CarService.odex \ + system/priv-app/CarService/oat/arm64/CarService.vdex \ + system/priv-app/CarSettings/CarSettings.apk \ + system/priv-app/CarShell/CarShell.apk \ + system/priv-app/CarShell/oat/arm64/CarShell.odex \ + system/priv-app/CarShell/oat/arm64/CarShell.vdex \ + system/priv-app/CarUsbHandler/CarUsbHandler.apk \ + system/priv-app/CarUsbHandler/oat/arm64/CarUsbHandler.odex \ + system/priv-app/CarUsbHandler/oat/arm64/CarUsbHandler.vdex \ + system/priv-app/ClusterHomeSample/ClusterHomeSample.apk \ + system/priv-app/ClusterHomeSample/oat/arm64/ClusterHomeSample.odex \ + system/priv-app/ClusterHomeSample/oat/arm64/ClusterHomeSample.vdex \ + system/priv-app/DefaultStorageMonitoringCompanionApp/DefaultStorageMonitoringCompanionApp.apk \ + system/priv-app/DirectRenderingCluster/DirectRenderingCluster.apk \ + system/priv-app/DirectRenderingCluster/oat/arm64/DirectRenderingCluster.odex \ + system/priv-app/DirectRenderingCluster/oat/arm64/DirectRenderingCluster.vdex \ + system/priv-app/EmbeddedKitchenSinkApp/EmbeddedKitchenSinkApp.apk \ + system/priv-app/ExperimentalCarService/ExperimentalCarService.apk \ + system/priv-app/ExperimentalCarService/oat/arm64/ExperimentalCarService.odex \ + system/priv-app/ExperimentalCarService/oat/arm64/ExperimentalCarService.vdex \ + system/priv-app/GarageModeTestApp/GarageModeTestApp.apk \ + system/priv-app/LocalMediaPlayer/LocalMediaPlayer.apk \ + system/priv-app/NetworkPreferenceApp/NetworkPreferenceApp.apk \ + system/lib64/libcarservicejni.so \ + system/priv-app/CarService/lib/arm64/libcarservicejni.so \ + system/priv-app/CarService/lib/x86_64/libcarservicejni.so \ + system/bin/android.automotive.telemetryd@1.0 \ + system/etc/init/android.automotive.telemetryd@1.0.rc \ + system/etc/vintf/manifest/android.automotive.telemetryd@1.0.xml \ + system/lib64/android.automotive.telemetryd@1.0-impl.so \ + system/lib64/android.frameworks.automotive.telemetry-V1-cpp.so \ + system/lib64/android.automotive.telemetry.internal-ndk_platform.so \ + system/lib64/android.frameworks.automotive.telemetry-V1-ndk_platform.so \ + +PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += %.odex %.vdex %.art + +PRODUCT_PACKAGE_OVERLAYS := device/generic/car/common/overlay +EMULATOR_VENDOR_NO_SENSORS := true +PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true +$(call inherit-product, device/generic/car/emulator/aosp_car_emulator.mk) +EMULATOR_VENDOR_NO_SOUND := true diff --git a/gsi_car_x86_64.mk b/gsi_car_x86_64.mk new file mode 100644 index 0000000..378fa5c --- /dev/null +++ b/gsi_car_x86_64.mk @@ -0,0 +1,22 @@ +# +# Copyright (C) 2021 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. + +$(call inherit-product, device/generic/car/gsi_car_base.mk) +$(call inherit-product, device/generic/common/gsi_x86_64.mk) + +PRODUCT_NAME := gsi_car_x86_64 +PRODUCT_DEVICE := generic_x86_64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := Car GSI on x86_64 \ No newline at end of file -- cgit v1.2.3 From 2fcafc6e71fa07b96bbb9b7ae1f360cde6688c00 Mon Sep 17 00:00:00 2001 From: Hayden Gomes Date: Thu, 29 Apr 2021 06:53:08 -0700 Subject: Mute HAL audio when audio component disabled - Add PowerPolicyClient to audio HAL service Bug: 156910040 Test: Disable audio and check if things are muted `adb shell cmd car_service define-power-policy audio_off --disable AUDIO` `adb shell cmd car_service define-power-policy audio_on --enable AUDIO` `adb shell cmd car_service apply-power-policy audio_off` to disable audio. Then check if HAL is disabled and cannot be heard Change-Id: I4aaf3b703e4a0717d71e43cbdea35d1f89a90932 --- common/sepolicy/hal_audio_caremu.te | 2 + common/sepolicy/hal_audiocontrol_default.te | 2 - emulator/audio/driver/audio_hw.c | 39 ++++++++++--- emulator/audio/driver/include/audio_hw_control.h | 5 ++ emulator/audio/halservice/Android.bp | 3 + emulator/audio/halservice/AudioControl.cpp | 17 +++++- emulator/audio/halservice/AudioControl.h | 14 ++++- emulator/audio/halservice/PowerPolicyClient.cpp | 70 ++++++++++++++++++++++++ emulator/audio/halservice/PowerPolicyClient.h | 53 ++++++++++++++++++ emulator/audio/halservice/service.cpp | 7 ++- 10 files changed, 196 insertions(+), 16 deletions(-) delete mode 100644 common/sepolicy/hal_audiocontrol_default.te create mode 100644 emulator/audio/halservice/PowerPolicyClient.cpp create mode 100644 emulator/audio/halservice/PowerPolicyClient.h diff --git a/common/sepolicy/hal_audio_caremu.te b/common/sepolicy/hal_audio_caremu.te index 11f657c..5c0af23 100644 --- a/common/sepolicy/hal_audio_caremu.te +++ b/common/sepolicy/hal_audio_caremu.te @@ -9,3 +9,5 @@ init_daemon_domain(hal_audio_caremu) carwatchdog_client_domain(hal_audio_caremu) binder_use(hal_audio_caremu) +# Enable audiocontrol to listen to power policy daemon. +carpowerpolicy_callback_domain(hal_audio_caremu) diff --git a/common/sepolicy/hal_audiocontrol_default.te b/common/sepolicy/hal_audiocontrol_default.te deleted file mode 100644 index 3ec4f5f..0000000 --- a/common/sepolicy/hal_audiocontrol_default.te +++ /dev/null @@ -1,2 +0,0 @@ -# Enable audiocontrol to listen to power policy daemon. -carpowerpolicy_callback_domain(hal_audiocontrol_default) diff --git a/emulator/audio/driver/audio_hw.c b/emulator/audio/driver/audio_hw.c index 2039d6b..dec5ab4 100644 --- a/emulator/audio/driver/audio_hw.c +++ b/emulator/audio/driver/audio_hw.c @@ -79,22 +79,24 @@ static const char * const AAE_PARAMETER_KEY_FOR_SELECTED_ZONE = "com.android.car static const char * const TONE_ADDRESS_KEYWORD = "_tone_"; static const char * const AUDIO_ZONE_KEYWORD = "_audio_zone_"; -static pthread_mutex_t adev_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; + +static bool is_audio_enabled = 1; // Protected by lock #define SIZE_OF_PARSE_BUFFER 32 static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state); static struct generic_stream_out * get_audio_device(const char *address, const char *caller) { - pthread_mutex_lock(&adev_lock); + pthread_mutex_lock(&lock); if(device_handle == 0) { ALOGE("%s no device handle available", caller); - pthread_mutex_unlock(&adev_lock); + pthread_mutex_unlock(&lock); return NULL; } struct generic_stream_out *out = hashmapGet(device_handle->out_bus_stream_map, address); - pthread_mutex_unlock(&adev_lock); + pthread_mutex_unlock(&lock); return out; } @@ -125,6 +127,19 @@ void set_device_address_is_muted(const char *device_address, bool is_muted){ pthread_mutex_unlock(&out->lock); } +void set_audio_enabled(bool is_enabled) { + pthread_mutex_lock(&lock); + is_audio_enabled = is_enabled; + pthread_mutex_unlock(&lock); +} + +bool get_is_audio_enabled() { + pthread_mutex_lock(&lock); + bool is_enabled = is_audio_enabled; + pthread_mutex_unlock(&lock); + return is_enabled; +} + static struct pcm_config pcm_config_out = { .channels = 2, .rate = 0, @@ -207,6 +222,8 @@ static int out_set_format(struct audio_stream *stream, audio_format_t format) { static int out_dump(const struct audio_stream *stream, int fd) { struct generic_stream_out *out = (struct generic_stream_out *)stream; + bool is_enabled = get_is_audio_enabled(); + pthread_mutex_lock(&out->lock); dprintf(fd, "\tout_dump:\n" "\t\taddress: %s\n" @@ -219,6 +236,7 @@ static int out_dump(const struct audio_stream *stream, int fd) { "\t\tenabled channels: %d\n" "\t\tis ducked: %s\n" "\t\tis muted: %s\n" + "\t\tis audio enabled: %s\n" "\t\taudio dev: %p\n\n", out->bus_address, out_get_sample_rate(stream), @@ -230,6 +248,7 @@ static int out_dump(const struct audio_stream *stream, int fd) { out->enabled_channels, _bool_str(out->is_ducked), _bool_str(out->is_muted), + _bool_str(is_enabled), out->dev); pthread_mutex_unlock(&out->lock); return 0; @@ -465,6 +484,8 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, si ALOGV("%s: to device %s", __func__, out->bus_address); const size_t frames = bytes / audio_stream_out_frame_size(stream); + bool is_enabled = get_is_audio_enabled(); + pthread_mutex_lock(&out->lock); if (out->worker_standby) { @@ -485,7 +506,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, si } size_t frames_written = frames; - if (out->dev->master_mute || out->is_muted) { + if (out->dev->master_mute || out->is_muted || !is_enabled) { ALOGV("%s: ignored due to mute", __func__); } else { out_apply_gain(out, buffer, bytes); @@ -1485,7 +1506,7 @@ static int adev_close(hw_device_t *dev) { if (!adev) return 0; - pthread_mutex_lock(&adev_lock); + pthread_mutex_lock(&lock); if (audio_device_ref_count == 0) { ALOGE("adev_close called when ref_count 0"); @@ -1509,7 +1530,7 @@ static int adev_close(hw_device_t *dev) { } error: - pthread_mutex_unlock(&adev_lock); + pthread_mutex_unlock(&lock); return ret; } @@ -1541,7 +1562,7 @@ static int adev_open(const hw_module_t *module, if (strcmp(name, AUDIO_HARDWARE_INTERFACE) != 0) return -EINVAL; - pthread_mutex_lock(&adev_lock); + pthread_mutex_lock(&lock); if (audio_device_ref_count != 0) { *device = &adev->device.common; audio_device_ref_count++; @@ -1626,7 +1647,7 @@ static int adev_open(const hw_module_t *module, audio_device_ref_count++; unlock: - pthread_mutex_unlock(&adev_lock); + pthread_mutex_unlock(&lock); return 0; } diff --git a/emulator/audio/driver/include/audio_hw_control.h b/emulator/audio/driver/include/audio_hw_control.h index 87cfb0e..21d30d0 100644 --- a/emulator/audio/driver/include/audio_hw_control.h +++ b/emulator/audio/driver/include/audio_hw_control.h @@ -38,6 +38,11 @@ void set_device_address_is_ducked(const char *device_address, bool is_ducked); // Note: The device address must be defined in // audio_policy_configuration.xml void set_device_address_is_muted(const char *device_address, bool is_muted); + +// Sets whether audio component is enabled or disabled. +// Results in muting of all audio leaving the HAL if it is disabled +void set_audio_enabled(bool is_enabled); + #ifdef __cplusplus } #endif // __cplusplus diff --git a/emulator/audio/halservice/Android.bp b/emulator/audio/halservice/Android.bp index a3bd5be..01828af 100644 --- a/emulator/audio/halservice/Android.bp +++ b/emulator/audio/halservice/Android.bp @@ -34,6 +34,7 @@ cc_binary { compile_multilib: "prefer32", srcs: [ "service.cpp", + "PowerPolicyClient.cpp", ], cflags: [ @@ -47,6 +48,7 @@ cc_binary { "android.hardware.audio.common@6.0", "android.hardware.audio.effect@6.0", "android.hardware.automotive.audiocontrol-V1-ndk_platform", + "android.frameworks.automotive.powerpolicy-V1-ndk_platform", "audiocontrol-caremu", "libbase", "libbinder", @@ -54,6 +56,7 @@ cc_binary { "libhardware", "libhidlbase", "liblog", + "libpowerpolicyclient", ], header_libs: [ diff --git a/emulator/audio/halservice/AudioControl.cpp b/emulator/audio/halservice/AudioControl.cpp index 89373b9..87d77d8 100644 --- a/emulator/audio/halservice/AudioControl.cpp +++ b/emulator/audio/halservice/AudioControl.cpp @@ -33,7 +33,11 @@ #include -namespace aidl::android::hardware::automotive::audiocontrol { +namespace aidl { +namespace android { +namespace hardware { +namespace automotive { +namespace audiocontrol { using ::android::base::EqualsIgnoreCase; using ::android::base::ParseInt; @@ -169,6 +173,11 @@ binder_status_t AudioControl::dump(int fd, const char** args, uint32_t numArgs) } } +void AudioControl::setAudioEnabled(bool isEnabled) { + LOG(DEBUG) << "setAudioEnabled called with value: " << isEnabled; + set_audio_enabled(isEnabled); +} + binder_status_t AudioControl::dumpsys(int fd) { dprintf(fd, "*%s*\n", LOG_TAG); std::shared_ptr focusListener = std::atomic_load(&mFocusListener); @@ -274,4 +283,8 @@ binder_status_t AudioControl::cmdAbandonFocus(int fd, const char** args, uint32_ return STATUS_OK; } -} // namespace aidl::android::hardware::automotive::audiocontrol +} // namespace audiocontrol +} // namespace automotive +} // namespace hardware +} // namespace android +} // namespace aidl diff --git a/emulator/audio/halservice/AudioControl.h b/emulator/audio/halservice/AudioControl.h index 35a55d3..af11448 100644 --- a/emulator/audio/halservice/AudioControl.h +++ b/emulator/audio/halservice/AudioControl.h @@ -21,7 +21,11 @@ #include #include -namespace aidl::android::hardware::automotive::audiocontrol { +namespace aidl { +namespace android { +namespace hardware { +namespace automotive { +namespace audiocontrol { class AudioControl : public BnAudioControl { public: @@ -37,6 +41,8 @@ class AudioControl : public BnAudioControl { ndk::ScopedAStatus setFadeTowardFront(float in_value) override; binder_status_t dump(int fd, const char** args, uint32_t numArgs) override; + void setAudioEnabled(bool isEnabled); + private: // This focus listener will only be used by this HAL instance to communicate with // a single instance of CarAudioService. As such, it doesn't have explicit serialization. @@ -50,6 +56,10 @@ class AudioControl : public BnAudioControl { binder_status_t dumpsys(int fd); }; -} // namespace aidl::android::hardware::automotive::audiocontrol +} // namespace audiocontrol +} // namespace automotive +} // namespace hardware +} // namespace android +} // namespace aidl #endif // ANDROID_HARDWARE_AUTOMOTIVE_AUDIOCONTROL_AUDIOCONTROL_H diff --git a/emulator/audio/halservice/PowerPolicyClient.cpp b/emulator/audio/halservice/PowerPolicyClient.cpp new file mode 100644 index 0000000..cc431c6 --- /dev/null +++ b/emulator/audio/halservice/PowerPolicyClient.cpp @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2021 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. + */ + + #define LOG_TAG "AudioPowerPolicyClient" + +#include "PowerPolicyClient.h" +#include "AudioControl.h" + +#include + +namespace aidl { +namespace android { +namespace hardware { +namespace automotive { +namespace audiocontrol { + +namespace aafap = ::aidl::android::frameworks::automotive::powerpolicy; + +using aafap::CarPowerPolicy; +using aafap::CarPowerPolicyFilter; +using aafap::PowerComponent; +using ::android::frameworks::automotive::powerpolicy::hasComponent; +using ::ndk::ScopedAStatus; + +namespace { + +constexpr PowerComponent kAudioComponent = PowerComponent::AUDIO; + +} // namespace + +PowerPolicyClient::PowerPolicyClient(const std::shared_ptr& audioControl) + : mAudioControl(audioControl) {} + +void PowerPolicyClient::onInitFailed() { + LOG(ERROR) << "Initializing power policy client failed"; +} + +std::vector PowerPolicyClient::getComponentsOfInterest() { + std::vector components{kAudioComponent}; + return components; +} + +ScopedAStatus PowerPolicyClient::onPolicyChanged(const CarPowerPolicy& powerPolicy) { + if (hasComponent(powerPolicy.enabledComponents, kAudioComponent)) { + mAudioControl->setAudioEnabled(true); + } else if (hasComponent(powerPolicy.disabledComponents, kAudioComponent)) { + mAudioControl->setAudioEnabled(false); + } + + return ScopedAStatus::ok(); +} + +} // namespace audiocontrol +} // namespace automotive +} // namespace hardware +} // namespace android +} // namespace aidl diff --git a/emulator/audio/halservice/PowerPolicyClient.h b/emulator/audio/halservice/PowerPolicyClient.h new file mode 100644 index 0000000..a4772c6 --- /dev/null +++ b/emulator/audio/halservice/PowerPolicyClient.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2021 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. + */ + +#ifndef AUTOMOTIVE_AUDIOCONTROL_AIDL_DEFAULT_POWERPOLICYCLIENT_H_ +#define AUTOMOTIVE_AUDIOCONTROL_AIDL_DEFAULT_POWERPOLICYCLIENT_H_ + +#include "PowerPolicyClientBase.h" + +#include + +namespace aidl { +namespace android { +namespace hardware { +namespace automotive { +namespace audiocontrol { + +class AudioControl; + +class PowerPolicyClient + : public ::android::frameworks::automotive::powerpolicy::PowerPolicyClientBase { + public: + explicit PowerPolicyClient(const std::shared_ptr& audioControl); + + void onInitFailed(); + std::vector<::aidl::android::frameworks::automotive::powerpolicy::PowerComponent> + getComponentsOfInterest() override; + ::ndk::ScopedAStatus onPolicyChanged( + const ::aidl::android::frameworks::automotive::powerpolicy::CarPowerPolicy&) override; + + private: + std::shared_ptr mAudioControl; +}; + +} // namespace audiocontrol +} // namespace automotive +} // namespace hardware +} // namespace android +} // namespace aidl + +#endif // AUTOMOTIVE_AUDIOCONTROL_AIDL_DEFAULT_POWERPOLICYCLIENT_H_ diff --git a/emulator/audio/halservice/service.cpp b/emulator/audio/halservice/service.cpp index fe79fb4..e658cf4 100644 --- a/emulator/audio/halservice/service.cpp +++ b/emulator/audio/halservice/service.cpp @@ -17,6 +17,7 @@ #define LOG_TAG "audiohalservice" #include "AudioControl.h" +#include "PowerPolicyClient.h" #include #include @@ -36,6 +37,7 @@ using namespace android::hardware; using android::OK; using aidl::android::hardware::automotive::audiocontrol::AudioControl; +using aidl::android::hardware::automotive::audiocontrol::PowerPolicyClient; using android::hardware::configureRpcThreadpool; using android::hardware::joinRpcThreadpool; @@ -63,6 +65,9 @@ int main(int /* argc */, char* /* argv */ []) { AServiceManager_addService(audioControl->asBinder().get(), instance.c_str()); CHECK(aidlStatus == STATUS_OK); + PowerPolicyClient powerPolicyClient = PowerPolicyClient(audioControl); + powerPolicyClient.init(); + ABinderProcess_joinThreadPool(); return EXIT_FAILURE; // should not reach -} \ No newline at end of file +} -- cgit v1.2.3 From deba39308512c620bdecb4d4138db66042f1e854 Mon Sep 17 00:00:00 2001 From: Yabin Huang Date: Tue, 4 May 2021 13:18:37 -0700 Subject: Allow HMTLViewer to be in /system partition Bug: 185951366 Test: lunch gsi_car_arm64 && make CarHTMLViewer Test: manual test Change-Id: I2f54570122590a9377765644ce408eee12b64169 --- gsi_car_base.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/gsi_car_base.mk b/gsi_car_base.mk index fe3324f..3db6a0d 100644 --- a/gsi_car_base.mk +++ b/gsi_car_base.mk @@ -21,6 +21,7 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/app/CarFrameworkPackageStubs/CarFrameworkPackageStubs.apk \ system/app/CarFrameworkPackageStubs/oat/arm64/CarFrameworkPackageStubs.odex \ system/app/CarFrameworkPackageStubs/oat/arm64/CarFrameworkPackageStubs.vdex \ + system/app/CarHTMLViewer/CarHTMLViewer.apk \ system/app/CarLatinIME/CarLatinIME.apk \ system/app/CarMapsPlaceholder/CarMapsPlaceholder.apk \ system/app/CarPermissionControllerRRO/CarPermissionControllerRRO.apk \ -- cgit v1.2.3 From ef3035c1098a6e3f1ba26ad37de21169ae3193e7 Mon Sep 17 00:00:00 2001 From: Heemin Seog Date: Mon, 17 May 2021 16:46:39 -0700 Subject: Add rotary IME RRO Bug: 187549845 Test: manual Change-Id: I3c9d7432e28044a1b35ae4cd6d9246f314a5c68d --- emulator/rotary/car_rotary.mk | 3 +-- .../apps/Car/RotaryController/res/values/strings.xml | 20 -------------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml diff --git a/emulator/rotary/car_rotary.mk b/emulator/rotary/car_rotary.mk index e58a4f4..f910724 100644 --- a/emulator/rotary/car_rotary.mk +++ b/emulator/rotary/car_rotary.mk @@ -19,5 +19,4 @@ PRODUCT_PACKAGES += \ CarRotaryController \ RotaryPlayground \ RotaryIME \ - -DEVICE_PACKAGE_OVERLAYS += device/generic/car/emulator/rotary/overlay + CarRotaryImeRRO \ diff --git a/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml b/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml deleted file mode 100644 index 751c980..0000000 --- a/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - com.android.car.rotaryime/.RotaryIme - -- cgit v1.2.3 From 36bb8bb9606411cd5deebfaf783ee10ca9daf72c Mon Sep 17 00:00:00 2001 From: Nicole Huang Date: Fri, 21 May 2021 01:39:34 +0000 Subject: Revert "Add rotary IME RRO" Revert submission 14607794-rotary_ime_rro Reason for revert: build fail test Reverted Changes: I3c9d7432e:Add rotary IME RRO I4c889e86c:Add RRO for Rotary IME Change-Id: Iae709533e6ccda4df910f300d00a20e26fad431f --- emulator/rotary/car_rotary.mk | 3 ++- .../apps/Car/RotaryController/res/values/strings.xml | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml diff --git a/emulator/rotary/car_rotary.mk b/emulator/rotary/car_rotary.mk index f910724..e58a4f4 100644 --- a/emulator/rotary/car_rotary.mk +++ b/emulator/rotary/car_rotary.mk @@ -19,4 +19,5 @@ PRODUCT_PACKAGES += \ CarRotaryController \ RotaryPlayground \ RotaryIME \ - CarRotaryImeRRO \ + +DEVICE_PACKAGE_OVERLAYS += device/generic/car/emulator/rotary/overlay diff --git a/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml b/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml new file mode 100644 index 0000000..751c980 --- /dev/null +++ b/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml @@ -0,0 +1,20 @@ + + + + + com.android.car.rotaryime/.RotaryIme + -- cgit v1.2.3 From 11dedd163c451bc344346bce99eb9817f2d81fb1 Mon Sep 17 00:00:00 2001 From: Heemin Seog Date: Mon, 24 May 2021 16:25:58 +0000 Subject: Revert^2 "Add rotary IME RRO" 36bb8bb9606411cd5deebfaf783ee10ca9daf72c Bug: 187549845 Test: manual Test: lunch gsi_car_arm64 && make CarRotaryImeRRO Change-Id: I6dd7f9b699f9c75b8090562e46d857870421c2c6 --- emulator/rotary/car_rotary.mk | 3 +-- .../apps/Car/RotaryController/res/values/strings.xml | 20 -------------------- gsi_car_base.mk | 1 + 3 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml diff --git a/emulator/rotary/car_rotary.mk b/emulator/rotary/car_rotary.mk index e58a4f4..f910724 100644 --- a/emulator/rotary/car_rotary.mk +++ b/emulator/rotary/car_rotary.mk @@ -19,5 +19,4 @@ PRODUCT_PACKAGES += \ CarRotaryController \ RotaryPlayground \ RotaryIME \ - -DEVICE_PACKAGE_OVERLAYS += device/generic/car/emulator/rotary/overlay + CarRotaryImeRRO \ diff --git a/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml b/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml deleted file mode 100644 index 751c980..0000000 --- a/emulator/rotary/overlay/packages/apps/Car/RotaryController/res/values/strings.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - com.android.car.rotaryime/.RotaryIme - diff --git a/gsi_car_base.mk b/gsi_car_base.mk index 3db6a0d..d7eff44 100644 --- a/gsi_car_base.mk +++ b/gsi_car_base.mk @@ -28,6 +28,7 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/app/RotaryIME/RotaryIME.apk \ system/app/RotaryIME/oat/arm64/RotaryIME.odex \ system/app/RotaryIME/oat/arm64/RotaryIME.vdex \ + system/app/CarRotaryImeRRO/CarRotaryImeRRO.apk \ system/app/RotaryPlayground/RotaryPlayground.apk \ system/app/SampleCustomInputService/SampleCustomInputService.apk \ system/app/SampleRearViewCamera/SampleRearViewCamera.apk \ -- cgit v1.2.3 From 67a61c7c8b1a74f498661561edf7cf0d6806882d Mon Sep 17 00:00:00 2001 From: Yuncheol Heo Date: Fri, 4 Jun 2021 18:00:31 -0700 Subject: Enable ClusterOsDouble in CarEmulator. - Enables optional ClusterHomeService. - Configures ClusterOsDouble's virtual display as cluster display. Bug: 190237004 Test: Build the emulator and check if ClusterOsDouble is shown. Change-Id: I2593327765df67b68b3cc03fdf37ef1898acdbdb --- emulator/aosp_car_emulator.mk | 9 ++- .../services/Car/service/res/values/config.xml | 70 ++++++++++++++++++++++ 2 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 emulator/cluster/osdouble_overlay/packages/services/Car/service/res/values/config.xml diff --git a/emulator/aosp_car_emulator.mk b/emulator/aosp_car_emulator.mk index 8dc25c7..4375bd1 100644 --- a/emulator/aosp_car_emulator.mk +++ b/emulator/aosp_car_emulator.mk @@ -29,12 +29,15 @@ $(call inherit-product, device/generic/car/emulator/rotary/car_rotary.mk) ifeq (true,$(BUILD_EMULATOR_CLUSTER_DISPLAY)) PRODUCT_COPY_FILES += \ device/generic/car/emulator/cluster/display_settings.xml:system/etc/display_settings.xml -DEVICE_PACKAGE_OVERLAYS += \ - device/generic/car/emulator/cluster/overlay PRODUCT_PRODUCT_PROPERTIES += \ hwservicemanager.external.displays=1,400,600,120,0 \ persist.service.bootanim.displays=8140900251843329 -endif +ifeq (true,$(ENABLE_CLUSTER_OS_DOUBLE)) +DEVICE_PACKAGE_OVERLAYS += device/generic/car/emulator/cluster/osdouble_overlay +else +DEVICE_PACKAGE_OVERLAYS += device/generic/car/emulator/cluster/overlay +endif # ENABLE_CLUSTER_OS_DOUBLE +endif # BUILD_EMULATOR_CLUSTER_DISPLAY # Define the host tools and libs that are parts of the SDK. $(call inherit-product, sdk/build/product_sdk.mk) diff --git a/emulator/cluster/osdouble_overlay/packages/services/Car/service/res/values/config.xml b/emulator/cluster/osdouble_overlay/packages/services/Car/service/res/values/config.xml new file mode 100644 index 0000000..a637a8f --- /dev/null +++ b/emulator/cluster/osdouble_overlay/packages/services/Car/service/res/values/config.xml @@ -0,0 +1,70 @@ + + + + + + + + displayPort=0,displayType=MAIN,occupantZoneId=0 + displayUniqueId=virtual:com.android.car.cluster.osdouble:ClusterDisplay,displayType=INSTRUMENT_CLUSTER,occupantZoneId=0 + + + + + + car_navigation_service + cluster_home_service + com.android.car.user.CarUserNoticeService + diagnostic + storage_monitoring + vehicle_map_service + car_evs_service + car_telemetry_service + + -- cgit v1.2.3 From 74398bb9b7e2e881238e295afa1da0168a02683a Mon Sep 17 00:00:00 2001 From: Lakshman Annadorai Date: Wed, 9 Jun 2021 10:40:10 -0700 Subject: Add watchdog resource overuse config to artifact allowed list. Test: Build is okay. Bug: 186445673 Change-Id: I2eef135f0a208def220268551802ff8997b00703 --- gsi_car_base.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gsi_car_base.mk b/gsi_car_base.mk index d7eff44..249dbbd 100644 --- a/gsi_car_base.mk +++ b/gsi_car_base.mk @@ -140,6 +140,8 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/lib64/android.frameworks.automotive.telemetry-V1-cpp.so \ system/lib64/android.automotive.telemetry.internal-ndk_platform.so \ system/lib64/android.frameworks.automotive.telemetry-V1-ndk_platform.so \ + system/etc/automotive/watchdog/system_resource_overuse_configuration.xml \ + system/etc/automotive/watchdog/third_party_resource_overuse_configuration.xml \ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += %.odex %.vdex %.art -- cgit v1.2.3 From 8d20f3d83fef670e10305231f3d9215ae4318159 Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Wed, 2 Jun 2021 15:13:28 -0700 Subject: Add system properties to configure audio HAL Configure period and buffer period count by system properties Cherry-picked from https://partner-android-review.googlesource.com/c/device/google/trout/+/1899395 Test: Build and run emulator, play sounds Bug: 184180639 Change-Id: I65220131b3369f0743f49fe8a181780b48f5627d (cherry picked from commit 901237b5f7046b6213a644fc27c814718145ac27) --- emulator/audio/driver/audio_hw.c | 57 +++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 9 deletions(-) diff --git a/emulator/audio/driver/audio_hw.c b/emulator/audio/driver/audio_hw.c index dec5ab4..79bbff3 100644 --- a/emulator/audio/driver/audio_hw.c +++ b/emulator/audio/driver/audio_hw.c @@ -48,11 +48,16 @@ #define PCM_CARD 0 #define PCM_DEVICE 0 -#define OUT_PERIOD_MS 15 -#define OUT_PERIOD_COUNT 4 +#define DEFAULT_OUT_PERIOD_MS 15 +#define DEFAULT_OUT_PERIOD_COUNT 4 -#define IN_PERIOD_MS 15 -#define IN_PERIOD_COUNT 4 +#define DEFAULT_IN_PERIOD_MS 15 +#define DEFAULT_IN_PERIOD_COUNT 4 + +static const char* PROP_KEY_OUT_PERIOD_MS = "ro.vendor.caremu.audiohal.out_period_ms"; +static const char* PROP_KEY_OUT_PERIOD_COUNT = "ro.vendor.caremu.audiohal.out_period_count"; +static const char* PROP_KEY_IN_PERIOD_MS = "ro.vendor.caremu.audiohal.in_period_ms"; +static const char* PROP_KEY_IN_PERIOD_COUNT = "ro.vendor.caremu.audiohal.in_period_count"; #define PI 3.14159265 #define TWO_PI (2*PI) @@ -87,6 +92,38 @@ static bool is_audio_enabled = 1; // Protected by lock static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state); +static int get_out_period_ms() { + static int out_period_ms = -1; + if (out_period_ms == -1) { + out_period_ms = property_get_int32(PROP_KEY_OUT_PERIOD_MS, DEFAULT_OUT_PERIOD_MS); + } + return out_period_ms; +} + +static int get_out_period_count() { + static int out_period_count = -1; + if (out_period_count == -1) { + out_period_count = property_get_int32(PROP_KEY_OUT_PERIOD_COUNT, DEFAULT_OUT_PERIOD_COUNT); + } + return out_period_count; +} + +static int get_in_period_ms() { + static int in_period_ms = -1; + if (in_period_ms == -1) { + in_period_ms = property_get_int32(PROP_KEY_IN_PERIOD_MS, DEFAULT_IN_PERIOD_MS); + } + return in_period_ms; +} + +static int get_in_period_count() { + static int in_period_count = -1; + if (in_period_count == -1) { + in_period_count = property_get_int32(PROP_KEY_IN_PERIOD_COUNT, DEFAULT_IN_PERIOD_COUNT); + } + return in_period_count; +} + static struct generic_stream_out * get_audio_device(const char *address, const char *caller) { pthread_mutex_lock(&lock); if(device_handle == 0) { @@ -144,7 +181,6 @@ static struct pcm_config pcm_config_out = { .channels = 2, .rate = 0, .period_size = 0, - .period_count = OUT_PERIOD_COUNT, .format = PCM_FORMAT_S16_LE, .start_threshold = 0, }; @@ -169,7 +205,6 @@ static struct pcm_config pcm_config_in = { .channels = 2, .rate = 0, .period_size = 0, - .period_count = IN_PERIOD_COUNT, .format = PCM_FORMAT_S16_LE, .start_threshold = 0, .stop_threshold = INT_MAX, @@ -730,7 +765,7 @@ static size_t get_input_buffer_size(uint32_t sample_rate, audio_format_t format, if (refine_input_parameters(&sample_rate, &format, &channel_mask) != 0) return 0; - size = sample_rate*IN_PERIOD_MS/1000; + size = sample_rate * get_in_period_ms() / 1000; // Audioflinger expects audio buffers to be multiple of 16 frames size = ((size + 15) / 16) * 16; size *= sizeof(short) * channel_count; @@ -1144,7 +1179,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev, memcpy(&out->req_config, config, sizeof(struct audio_config)); memcpy(&out->pcm_config, &pcm_config_out, sizeof(struct pcm_config)); out->pcm_config.rate = config->sample_rate; - out->pcm_config.period_size = out->pcm_config.rate*OUT_PERIOD_MS/1000; + out->pcm_config.period_size = out->pcm_config.rate * get_out_period_ms() / 1000; out->standby = true; out->underrun_position = 0; @@ -1389,7 +1424,7 @@ static int adev_open_input_stream(struct audio_hw_device *dev, memcpy(&in->req_config, config, sizeof(struct audio_config)); memcpy(&in->pcm_config, &pcm_config_in, sizeof(struct pcm_config)); in->pcm_config.rate = config->sample_rate; - in->pcm_config.period_size = in->pcm_config.rate*IN_PERIOD_MS/1000; + in->pcm_config.period_size = in->pcm_config.rate * get_in_period_ms() / 1000; in->stereo_to_mono_buf = NULL; in->stereo_to_mono_buf_size = 0; @@ -1570,6 +1605,10 @@ static int adev_open(const hw_module_t *module, ALOGV("%s: exit", __func__); goto unlock; } + + pcm_config_in.period_count = get_in_period_count(); + pcm_config_out.period_count = get_out_period_count(); + adev = calloc(1, sizeof(struct generic_audio_device)); pthread_mutex_init(&adev->lock, (const pthread_mutexattr_t *) NULL); -- cgit v1.2.3 From 0a82a724e77d17d1078e9c33d66e3f1f27226ab8 Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Tue, 1 Jun 2021 11:43:19 -0700 Subject: Fill the audio vbuffer to prevent underrun Cherry-picked from https://android-review.googlesource.com/c/device/google/trout/+/1721736 Test: launch emulator and play sounds Bug: 184577782 Change-Id: I5e579e4fe6d1b28661f76b99796ce76502703251 (cherry picked from commit aff371b971927c19bb7da776abc4e15f87f6ee3e) --- emulator/audio/driver/audio_hw.c | 62 +++++++++++++++++++++------------------- emulator/audio/driver/audio_hw.h | 1 + emulator/audio/driver/ext_pcm.c | 25 +++++++++++----- emulator/audio/driver/ext_pcm.h | 1 + 4 files changed, 52 insertions(+), 37 deletions(-) diff --git a/emulator/audio/driver/audio_hw.c b/emulator/audio/driver/audio_hw.c index dec5ab4..b44d107 100644 --- a/emulator/audio/driver/audio_hw.c +++ b/emulator/audio/driver/audio_hw.c @@ -398,6 +398,7 @@ static void *out_write_worker(void *args) { } } int frames = audio_vbuffer_read(&out->buffer, buffer, buffer_frames); + pthread_cond_signal(&out->write_wake); pthread_mutex_unlock(&out->lock); if (is_zone_selected_to_play(out->dev, zone_id)) { @@ -419,7 +420,7 @@ static void *out_write_worker(void *args) { return NULL; } -// Call with in->lock held +// Call with out->lock held static void get_current_output_position(struct generic_stream_out *out, uint64_t *position, struct timespec * timestamp) { struct timespec curtime = { .tv_sec = 0, .tv_nsec = 0 }; @@ -482,7 +483,8 @@ static void out_apply_gain(struct generic_stream_out *out, const void *buffer, s static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, size_t bytes) { struct generic_stream_out *out = (struct generic_stream_out *)stream; ALOGV("%s: to device %s", __func__, out->bus_address); - const size_t frames = bytes / audio_stream_out_frame_size(stream); + const size_t frame_size = audio_stream_out_frame_size(stream); + const size_t frames = bytes / frame_size; bool is_enabled = get_is_audio_enabled(); @@ -496,8 +498,6 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, si struct timespec current_time; get_current_output_position(out, ¤t_position, ¤t_time); - const uint64_t now_us = (current_time.tv_sec * 1000000000LL + - current_time.tv_nsec) / 1000; if (out->standby) { out->standby = false; out->underrun_time = current_time; @@ -506,12 +506,38 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, si } size_t frames_written = frames; + + const int available_frames_in_buffer = audio_vbuffer_dead(&out->buffer); + const int frames_sleep = + available_frames_in_buffer > frames ? 0 : frames - available_frames_in_buffer; + const uint64_t sleep_time_us = + frames_sleep * 1000000LL / out_get_sample_rate(&stream->common); + + if (sleep_time_us > 0) { + pthread_mutex_unlock(&out->lock); + usleep(sleep_time_us); + pthread_mutex_lock(&out->lock); + } + if (out->dev->master_mute || out->is_muted || !is_enabled) { ALOGV("%s: ignored due to mute", __func__); } else { out_apply_gain(out, buffer, bytes); - frames_written = audio_vbuffer_write(&out->buffer, buffer, frames); - pthread_cond_signal(&out->worker_wake); + frames_written = 0; + + bool write_incomplete = true; + do { + frames_written += audio_vbuffer_write( + &out->buffer, + (const char *)buffer + frames_written * frame_size, + frames - frames_written); + pthread_cond_signal(&out->worker_wake); + write_incomplete = frames_written < frames; + if (write_incomplete) { + // Wait for write worker to consume the buffer + pthread_cond_wait(&out->write_wake, &out->lock); + } + } while (write_incomplete); } /* Implementation just consumes bytes if we start getting backed up */ @@ -519,32 +545,8 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, si out->frames_rendered += frames; out->frames_total_buffered += frames; - // We simulate the audio device blocking when it's write buffers become - // full. - - // At the beginning or after an underrun, try to fill up the vbuffer. - // This will be throttled by the PlaybackThread - int frames_sleep = out->frames_total_buffered < out->buffer.frame_count ? 0 : frames; - - uint64_t sleep_time_us = frames_sleep * 1000000LL / - out_get_sample_rate(&stream->common); - - // If the write calls are delayed, subtract time off of the sleep to - // compensate - uint64_t time_since_last_write_us = now_us - out->last_write_time_us; - if (time_since_last_write_us < sleep_time_us) { - sleep_time_us -= time_since_last_write_us; - } else { - sleep_time_us = 0; - } - out->last_write_time_us = now_us + sleep_time_us; - pthread_mutex_unlock(&out->lock); - if (sleep_time_us > 0) { - usleep(sleep_time_us); - } - if (frames_written < frames) { ALOGW("%s Hardware backing HAL too slow, could only write %zu of %zu frames", __func__, frames_written, frames); diff --git a/emulator/audio/driver/audio_hw.h b/emulator/audio/driver/audio_hw.h index bfa2909..1f9aa51 100644 --- a/emulator/audio/driver/audio_hw.h +++ b/emulator/audio/driver/audio_hw.h @@ -74,6 +74,7 @@ struct generic_stream_out { // Worker pthread_t worker_thread; // Constant after init pthread_cond_t worker_wake; // Protected by this->lock + pthread_cond_t write_wake; // Protected by this->lock bool worker_standby; // Protected by this->lock bool worker_exit; // Protected by this->lock }; diff --git a/emulator/audio/driver/ext_pcm.c b/emulator/audio/driver/ext_pcm.c index b1519f5..a8f6d8d 100644 --- a/emulator/audio/driver/ext_pcm.c +++ b/emulator/audio/driver/ext_pcm.c @@ -83,6 +83,7 @@ static void *mixer_thread_loop(void *context) { ext_pcm->mixer_pipeline.position * sizeof(int16_t)); } memset(&ext_pcm->mixer_pipeline, 0, sizeof(struct ext_mixer_pipeline)); + pthread_cond_signal(&ext_pcm->mixer_wake); pthread_mutex_unlock(&ext_pcm->mixer_lock); usleep(MIXER_INTERVAL_MS * 1000); } while (1); @@ -97,13 +98,23 @@ static int mixer_pipeline_write(struct ext_pcm *ext_pcm, const char *bus_address pipeline = calloc(1, sizeof(struct ext_mixer_pipeline)); hashmapPut(ext_pcm->mixer_pipeline_map, bus_address, pipeline); } - unsigned int byteCount = MIN(count, - (MIXER_BUFFER_SIZE - pipeline->position) * sizeof(int16_t)); - unsigned int int16Count = byteCount / sizeof(int16_t); - if (int16Count > 0) { - memcpy(&pipeline->buffer[pipeline->position], data, byteCount); - pipeline->position += int16Count; - } + unsigned int byteWritten = 0; + bool write_incomplete = true; + do { + const unsigned int byteCount = MIN(count - byteWritten, + (MIXER_BUFFER_SIZE - pipeline->position) * sizeof(int16_t)); + const unsigned int int16Count = byteCount / sizeof(int16_t); + if (int16Count > 0) { + memcpy(&pipeline->buffer[pipeline->position], (const char*)data + byteWritten, byteCount); + pipeline->position += int16Count; + } + byteWritten += byteCount; + write_incomplete = byteWritten < count; + if (write_incomplete) { + // wait for mixer thread to consume the pipeline buffer + pthread_cond_wait(&ext_pcm->mixer_wake, &ext_pcm->mixer_lock); + } + } while (write_incomplete); pthread_mutex_unlock(&ext_pcm->mixer_lock); return 0; } diff --git a/emulator/audio/driver/ext_pcm.h b/emulator/audio/driver/ext_pcm.h index 0bc8df5..c038b86 100644 --- a/emulator/audio/driver/ext_pcm.h +++ b/emulator/audio/driver/ext_pcm.h @@ -33,6 +33,7 @@ struct ext_mixer_pipeline { struct ext_pcm { struct pcm *pcm; pthread_mutex_t lock; + pthread_cond_t mixer_wake; unsigned int ref_count; pthread_mutex_t mixer_lock; struct ext_mixer_pipeline mixer_pipeline; -- cgit v1.2.3 From 2f53dc80fd9fc6832c03dbed2fad96a699ff7db6 Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Tue, 8 Jun 2021 16:27:19 -0700 Subject: Wake all condition variables after ext_pcm mixer consumes the buffers Test: Run emulator and play music and nav in KitchenSink Bug: 190133525 Change-Id: I9da76cc75456902d30ba7c58dc25b57cfbe71b66 --- emulator/audio/driver/ext_pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emulator/audio/driver/ext_pcm.c b/emulator/audio/driver/ext_pcm.c index a8f6d8d..df3e1f1 100644 --- a/emulator/audio/driver/ext_pcm.c +++ b/emulator/audio/driver/ext_pcm.c @@ -83,7 +83,7 @@ static void *mixer_thread_loop(void *context) { ext_pcm->mixer_pipeline.position * sizeof(int16_t)); } memset(&ext_pcm->mixer_pipeline, 0, sizeof(struct ext_mixer_pipeline)); - pthread_cond_signal(&ext_pcm->mixer_wake); + pthread_cond_broadcast(&ext_pcm->mixer_wake); pthread_mutex_unlock(&ext_pcm->mixer_lock); usleep(MIXER_INTERVAL_MS * 1000); } while (1); -- cgit v1.2.3 From 7ab5eee61703b1b6bc0e716c093ca2e492e6cca1 Mon Sep 17 00:00:00 2001 From: Gaurav Sarode Date: Tue, 15 Jun 2021 19:25:34 -0700 Subject: Add automotive display service to gsi bug: 189958519 Test: on gsi boot check if service is running Change-Id: I71fad65fa564dd6862aac764991b64a5cb7045bb --- gsi_car_base.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gsi_car_base.mk b/gsi_car_base.mk index 249dbbd..041347f 100644 --- a/gsi_car_base.mk +++ b/gsi_car_base.mk @@ -14,6 +14,7 @@ # limitations under the License. PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed +PRODUCT_PACKAGES += android.frameworks.automotive.display@1.0-service PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ root/init.bootstat.rc \ @@ -142,6 +143,9 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/lib64/android.frameworks.automotive.telemetry-V1-ndk_platform.so \ system/etc/automotive/watchdog/system_resource_overuse_configuration.xml \ system/etc/automotive/watchdog/third_party_resource_overuse_configuration.xml \ + system/bin/android.frameworks.automotive.display@1.0-service \ + system/etc/init/android.frameworks.automotive.display@1.0-service.rc \ + system/etc/vintf/manifest/manifest_android.frameworks.automotive.display@1.0.xml \ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += %.odex %.vdex %.art -- cgit v1.2.3 From ae2aaa5f77109d5470f2413d803b6a76f3c407a6 Mon Sep 17 00:00:00 2001 From: Max Dashouk Date: Thu, 1 Jul 2021 23:01:05 -0700 Subject: Adds Script Executor targets to the allow list to breaking the build again like in b/192386806. Test: previously failing build is successful https://android-build.googleplex.com/builds/abtd/run/L74200000939572748 Bug: 187517413 Change-Id: I34df824e42f466dc1f00c94840119ab136394c52 --- gsi_car_base.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gsi_car_base.mk b/gsi_car_base.mk index 041347f..85d1277 100644 --- a/gsi_car_base.mk +++ b/gsi_car_base.mk @@ -90,6 +90,8 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/lib64/android.hardware.automotive.evs@1.1.so \ system/lib64/android.hardware.automotive.vehicle@2.0.so \ system/lib64/libcar-framework-service-jni.so \ + system/lib64/libscriptexecutor.so \ + system/lib64/libscriptexecutorjni.so \ system/lib64/libsuspend.so \ system/lib64/libwatchdog_binder_mediator.so \ system/lib64/libwatchdog_package_info_resolver.so \ @@ -108,6 +110,8 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/priv-app/CarRadioApp/CarRadioApp.apk \ system/priv-app/CarRotaryController/CarRotaryController.apk \ system/priv-app/CarService/CarService.apk \ + system/priv-app/CarService/lib/arm64/libscriptexecutorjni.so \ + system/priv-app/CarService/lib/x86_64/libscriptexecutorjni.so \ system/priv-app/CarService/oat/arm64/CarService.odex \ system/priv-app/CarService/oat/arm64/CarService.vdex \ system/priv-app/CarSettings/CarSettings.apk \ -- cgit v1.2.3 From 0bbdaca823c53c2ace6deab05b6b49c5dbd0127a Mon Sep 17 00:00:00 2001 From: Ji Soo Shin Date: Fri, 23 Jul 2021 16:33:35 +0200 Subject: Enable usb host feature on car emulators This allows phantoscope team and remote app team to test and use emulator to test phantoscope features. Bug: 173649715 Change-Id: Ide1364002b3ab8bd15a7ca1e82fcef4162cc3981 --- emulator/aosp_car_emulator.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emulator/aosp_car_emulator.mk b/emulator/aosp_car_emulator.mk index 4375bd1..c0b0b59 100644 --- a/emulator/aosp_car_emulator.mk +++ b/emulator/aosp_car_emulator.mk @@ -26,6 +26,9 @@ $(call inherit-product, device/generic/car/common/car.mk) $(call inherit-product, device/generic/car/emulator/audio/car_emulator_audio.mk) $(call inherit-product, device/generic/car/emulator/rotary/car_rotary.mk) +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml + ifeq (true,$(BUILD_EMULATOR_CLUSTER_DISPLAY)) PRODUCT_COPY_FILES += \ device/generic/car/emulator/cluster/display_settings.xml:system/etc/display_settings.xml -- cgit v1.2.3 From a266323eea0c2c0ab8b96a06a763522d7721e807 Mon Sep 17 00:00:00 2001 From: Weilun Du Date: Fri, 23 Jul 2021 15:34:18 -0700 Subject: [AAOS emulator] Disable Ethernet by default VirtioWifi exposes network interface as eth0 in Android guest system and will therefore turn on Ethernet for AAOS once the usb_host hardware feature is turned on. By design, Wi-Fi will not be kept as the default network if Ethernet is present. To workaround the issue, set ethernet_iface_regex to a value that will never be matched and therefore Ethernet won't be running. Bug: 192710732 Signed-off-by: Weilun Du Change-Id: I34f5ba2160af996801b48e8bf3d658bf00c9c652 --- common/overlay/frameworks/base/core/res/res/values/config.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/overlay/frameworks/base/core/res/res/values/config.xml b/common/overlay/frameworks/base/core/res/res/values/config.xml index 6933a49..0bc32d4 100644 --- a/common/overlay/frameworks/base/core/res/res/values/config.xml +++ b/common/overlay/frameworks/base/core/res/res/values/config.xml @@ -25,4 +25,9 @@ + + + do_not_match -- cgit v1.2.3 From fed72b0b9a9831fcdf9695555d2b253216e59482 Mon Sep 17 00:00:00 2001 From: Weilun Du Date: Fri, 30 Jul 2021 18:40:30 +0000 Subject: Revert "[AAOS emulator] Disable Ethernet by default" This reverts commit 2bfbec7c1570db920d345ac266d304f58af6b682. Reason for revert: Found a better solution. Bug: 192710732 Change-Id: Iec88ed050c7b259ca3dd25d2539a732aba90451e (cherry picked from commit b25507e241da35dbd75ee637b713438392b7a4ae) --- common/overlay/frameworks/base/core/res/res/values/config.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/common/overlay/frameworks/base/core/res/res/values/config.xml b/common/overlay/frameworks/base/core/res/res/values/config.xml index 0bc32d4..6933a49 100644 --- a/common/overlay/frameworks/base/core/res/res/values/config.xml +++ b/common/overlay/frameworks/base/core/res/res/values/config.xml @@ -25,9 +25,4 @@ - - - do_not_match -- cgit v1.2.3 From 94942e4d8be0df7fabcb34e08a5a46e0103ad0a2 Mon Sep 17 00:00:00 2001 From: Weilun Du Date: Fri, 30 Jul 2021 14:01:51 -0700 Subject: [AAOS Emulator] Restricting ethernet network by default Configure virtual devices to prioritize Wi-Fi over Ethernet. Reference CL: https://android-review.googlesource.com/c/device/google/cuttlefish/+/1496543/ Bug: 192710732 Signed-off-by: Weilun Du Change-Id: I82eacd3ed590cb49ab7babd313f9327a32dfc08f (cherry picked from commit cdbd193391377559cbe4a4c306d3e4a2189521be) --- common/overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/overlay/frameworks/base/core/res/res/values/config.xml b/common/overlay/frameworks/base/core/res/res/values/config.xml index 6933a49..b6a7eb9 100644 --- a/common/overlay/frameworks/base/core/res/res/values/config.xml +++ b/common/overlay/frameworks/base/core/res/res/values/config.xml @@ -25,4 +25,7 @@ + + eth0;11,12,14;; + -- cgit v1.2.3