Initial akita device
based on 3b89a2d00ab5e110e6b01e8836ee6a7aaa6ec6e2 Bug: 249656909 Change-Id: I00dfa05d50a13e5229368ff33d5462c38f712069
This commit is contained in:
parent
1d248a4fb1
commit
f755ad1606
100 changed files with 226283 additions and 0 deletions
31
Android.bp
Normal file
31
Android.bp
Normal file
|
@ -0,0 +1,31 @@
|
|||
//
|
||||
// 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["device_google_akita_license"],
|
||||
}
|
||||
|
||||
// Added automatically by a large-scale-change
|
||||
// See: http://go/android-license-faq
|
||||
license {
|
||||
name: "device_google_akita_license",
|
||||
visibility: [":__subpackages__"],
|
||||
license_kinds: [
|
||||
"SPDX-license-identifier-Apache-2.0",
|
||||
],
|
||||
license_text: [
|
||||
"NOTICE",
|
||||
],
|
||||
}
|
30
Android.mk
Normal file
30
Android.mk
Normal file
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Copyright (C) 2011 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# WARNING: Everything listed here will be built on ALL platforms,
|
||||
# including x86, the universal, and the SDK. Modules must be uniquely
|
||||
# named (liblights.panda), and must build everywhere, or limit themselves
|
||||
# to only building on ARM if they include assembly. Individual makefiles
|
||||
# are responsible for having their own logic, for fine-grained control.
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# if some modules are built directly from this directory (not subdirectories),
|
||||
# their rules should be written here.
|
||||
|
||||
ifneq (,$(filter $(TARGET_DEVICE),akita))
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
endif
|
22
AndroidProducts.mk
Normal file
22
AndroidProducts.mk
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Copyright (C) 2019 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_MAKEFILES := \
|
||||
$(LOCAL_DIR)/aosp_akita.mk \
|
||||
$(LOCAL_DIR)/factory_akita.mk
|
||||
|
||||
COMMON_LUNCH_CHOICES := \
|
||||
aosp_akita-userdebug
|
190
NOTICE
Normal file
190
NOTICE
Normal file
|
@ -0,0 +1,190 @@
|
|||
|
||||
Copyright (c) 2014, 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.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
25
akita/BoardConfig.mk
Normal file
25
akita/BoardConfig.mk
Normal file
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# Copyright (C) 2020 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
TARGET_BOARD_INFO_FILE := device/google/akita/board-info.txt
|
||||
TARGET_BOOTLOADER_BOARD_NAME := akita
|
||||
TARGET_SCREEN_DENSITY := 420
|
||||
BOARD_USES_GENERIC_AUDIO := true
|
||||
USES_DEVICE_GOOGLE_AKITA := true
|
||||
|
||||
include device/google/zuma/BoardConfig-common.mk
|
||||
-include vendor/google_devices/zuma/prebuilts/BoardConfigVendor.mk
|
||||
include device/google/akita-sepolicy/akita-sepolicy.mk
|
||||
include device/google/akita/wifi/BoardConfig-wifi.mk
|
32
aosp_akita.mk
Normal file
32
aosp_akita.mk
Normal file
|
@ -0,0 +1,32 @@
|
|||
#
|
||||
# Copyright 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.
|
||||
#
|
||||
|
||||
TARGET_LINUX_KERNEL_VERSION := 5.15
|
||||
|
||||
USE_SWIFTSHADER := true
|
||||
BOARD_USES_SWIFTSHADER := true
|
||||
|
||||
$(call inherit-product, device/google/zuma/aosp_common.mk)
|
||||
$(call inherit-product, device/google/akita/device-akita.mk)
|
||||
|
||||
PRODUCT_NAME := aosp_akita
|
||||
PRODUCT_DEVICE := akita
|
||||
PRODUCT_MODEL := AOSP on akita
|
||||
PRODUCT_BRAND := Android
|
||||
PRODUCT_MANUFACTURER := Google
|
||||
|
||||
DEVICE_MANIFEST_FILE := \
|
||||
device/google/akita/manifest.xml
|
73
audio/akita/audio-tables.mk
Normal file
73
audio/akita/audio-tables.mk
Normal file
|
@ -0,0 +1,73 @@
|
|||
#
|
||||
# Copyright (C) 2020 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
AUDIO_TABLE_FOLDER := akita
|
||||
|
||||
# Platform Configuration for AudioHAL / SoundTriggerHAL
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/config/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/config/audio_platform_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_configuration.xml \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/config/sound_trigger_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_configuration.xml
|
||||
|
||||
# AudioEffectHAL Configuration
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/config/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml
|
||||
|
||||
# Mixer Path Configuration for AudioHAL
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/config/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml
|
||||
|
||||
# Speaker firmware files
|
||||
SPK_FIRMWARE_PATH := $(AUDIO_TABLE_FOLDER)/cs35l41/fw
|
||||
SPK_FIRMWARE_FULL_PATH := device/google/akita/audio/$(SPK_FIRMWARE_PATH)
|
||||
|
||||
PRODUCT_COPY_FILES += $(call copy-files,$(wildcard $(SPK_FIRMWARE_FULL_PATH)/*),$(TARGET_COPY_OUT_VENDOR)/firmware)
|
||||
|
||||
# Audio tuning
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/recording.gatf:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/recording.gatf \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/BLUETOOTH.dat:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/BLUETOOTH.dat \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSFREE.dat:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSFREE.dat \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSET.dat:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSET.dat \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HEADSET.dat:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HEADSET.dat \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/mcps.dat:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/mcps.dat \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/waves/waves_config.ini:$(TARGET_COPY_OUT_VENDOR)/etc/waves_config.ini \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/waves/waves_preset.mps:$(TARGET_COPY_OUT_VENDOR)/etc/waves_preset.mps
|
||||
|
||||
# userdebug specific
|
||||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/BLUETOOTH.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/BLUETOOTH.mods \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSFREE.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSFREE.mods \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HANDSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HANDSET.mods \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/fortemedia/HEADSET.mods:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/HEADSET.mods
|
||||
|
||||
#Bluenote files
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/template.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/template.xml \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/bluenote/tuning_constraints_combination.xml:$(TARGET_COPY_OUT_VENDOR)/etc/aoc/tuning_constraints_combination.xml
|
||||
|
||||
# Mixer Path Configuration for Audio Speaker Calibration Tool crus_sp_cal
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/cs35l41/crus_sp_cal_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/crus_sp_cal_mixer_paths.xml
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/waves/tests/test_config.ini:$(TARGET_COPY_OUT_VENDOR)/etc/test_config.ini \
|
||||
device/google/akita/audio/$(AUDIO_TABLE_FOLDER)/tuning/waves/tests/test_preset.mps:$(TARGET_COPY_OUT_VENDOR)/etc/test_preset.mps
|
||||
|
||||
endif
|
63
audio/akita/config/audio_effects.xml
Normal file
63
audio/akita/config/audio_effects.xml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<audio_effects_conf version="2.0" xmlns="http://schemas.android.com/audio/audio_effects_conf/v2_0">
|
||||
<libraries>
|
||||
<library name="bundle" path="libbundlewrapper.so"/>
|
||||
<library name="reverb" path="libreverbwrapper.so"/>
|
||||
<library name="visualizer_sw" path="libvisualizer.so"/>
|
||||
<library name="downmix" path="libdownmix.so"/>
|
||||
<library name="dynamics_processing" path="libdynproc.so"/>
|
||||
<library name="loudness_enhancer" path="libldnhncr.so"/>
|
||||
<library name="proxy" path="libeffectproxy.so"/>
|
||||
<library name="offload_effect" path="liboffloadeffect.so"/>
|
||||
<library name="haptic_generator" path="libhapticgenerator.so"/>
|
||||
</libraries>
|
||||
<effects>
|
||||
<effectProxy name="bassboost" library="proxy" uuid="2f0871a2-c93c-4824-9664-42eb2909f2ef">
|
||||
<libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
|
||||
<libhw library="offload_effect" uuid="c7e3b29d-e797-4cf9-9912-17c1956510cc"/>
|
||||
</effectProxy>
|
||||
<effectProxy name="virtualizer" library="proxy" uuid="626499c6-647e-455e-8c45-2d106e23c755">
|
||||
<libsw library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
|
||||
<libhw library="offload_effect" uuid="f8f88a03-fdf8-4554-8e60-77fbf8f2d3b0"/>
|
||||
</effectProxy>
|
||||
<effectProxy name="equalizer" library="proxy" uuid="49004f03-3391-4c44-97dd-a043d526ea7d">
|
||||
<libsw library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/>
|
||||
<libhw library="offload_effect" uuid="50deaa30-4a83-4b1f-bfe3-dec6d605ede0"/>
|
||||
</effectProxy>
|
||||
<effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
|
||||
<effectProxy name="reverb_env_aux" library="proxy" uuid="b8154738-a0a1-4fc0-bb79-c845a3197739">
|
||||
<libsw library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
|
||||
<libhw library="offload_effect" uuid="0c84bcd9-bce4-441b-ba9e-51f80897c949"/>
|
||||
</effectProxy>
|
||||
<effectProxy name="reverb_env_ins" library="proxy" uuid="ba0f19fe-8790-4831-a58b-1f3299dd0bae">
|
||||
<libsw library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
|
||||
<libhw library="offload_effect" uuid="86d1877a-127f-4bdc-9665-c958903ad7b2"/>
|
||||
</effectProxy>
|
||||
<effectProxy name="reverb_pre_aux" library="proxy" uuid="80974a8b-b3be-4c21-8c0b-b392a54e13bc">
|
||||
<libsw library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
|
||||
<libhw library="offload_effect" uuid="4f90220c-9742-4467-a9d7-122f85c01195"/>
|
||||
</effectProxy>
|
||||
<effectProxy name="reverb_pre_ins" library="proxy" uuid="c02d7dce-ca56-4aea-8c83-bbb53e5600e8">
|
||||
<libsw library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
|
||||
<libhw library="offload_effect" uuid="a2cf6b45-360b-49f3-94d7-fdb9837f89e8"/>
|
||||
</effectProxy>
|
||||
<effectProxy name="visualizer" library="proxy" uuid="b27271d9-64d6-413c-b316-80005ad09008">
|
||||
<libsw library="visualizer_sw" uuid="d069d9e0-8329-11df-9168-0002a5d5c51b"/>
|
||||
<libhw library="offload_effect" uuid="99fb2ecb-3426-4a0e-8082-1a1da5604b7d"/>
|
||||
</effectProxy>
|
||||
<effect name="downmix" library="downmix" uuid="93f04452-e4fe-41cc-91f9-e475b6d1d69f"/>
|
||||
<effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/>
|
||||
<effect name="aec" library="offload_effect" uuid="28c28780-ec8b-48b6-8590-8c84557d797d"/>
|
||||
<effect name="ns" library="offload_effect" uuid="62ff2836-d050-43c3-9c2d-94a73dad2c64"/>
|
||||
<effect name="haptic_generator" library="haptic_generator" uuid="97c4acd1-8b82-4f2f-832e-c2fe5d7a9931"/>
|
||||
<effect name="dynamics_processing" library="dynamics_processing" uuid="e0e6539b-1781-7261-676f-6d7573696340"/>
|
||||
</effects>
|
||||
<postprocess>
|
||||
</postprocess>
|
||||
<preprocess>
|
||||
<stream type="voice_communication">
|
||||
<apply effect="aec"/>
|
||||
<apply effect="ns"/>
|
||||
</stream>
|
||||
</preprocess>
|
||||
</audio_effects_conf>
|
304
audio/akita/config/audio_platform_configuration.xml
Normal file
304
audio/akita/config/audio_platform_configuration.xml
Normal file
|
@ -0,0 +1,304 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- Copyright (c) 2019, The Linux Foundation. All rights reserved. -->
|
||||
<!-- -->
|
||||
<!-- Redistribution and use in source and binary forms, with or without -->
|
||||
<!-- modification, are permitted provided that the following conditions are -->
|
||||
<!-- met: -->
|
||||
<!-- * Redistributions of source code must retain the above copyright -->
|
||||
<!-- notice, this list of conditions and the following disclaimer. -->
|
||||
<!-- * Redistributions in binary form must reproduce the above -->
|
||||
<!-- copyright notice, this list of conditions and the following -->
|
||||
<!-- disclaimer in the documentation and/or other materials provided -->
|
||||
<!-- with the distribution. -->
|
||||
<!-- * Neither the name of The Linux Foundation nor the names of its -->
|
||||
<!-- contributors may be used to endorse or promote products derived -->
|
||||
<!-- from this software without specific prior written permission. -->
|
||||
<!-- -->
|
||||
<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
|
||||
<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
|
||||
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
|
||||
<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
|
||||
<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
|
||||
<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
|
||||
<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
|
||||
<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
|
||||
<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
|
||||
<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
|
||||
<audio_platform_configuration>
|
||||
<hw_intf>
|
||||
<intf id="BE_HW_RX_INTF_0" name="TDM_RX_0" min_bit="24" min_chan="2" min_rate="48000" block_id="16"/>
|
||||
<intf id="BE_HW_RX_INTF_1" name="TDM_RX_1" min_bit="24" min_chan="2" min_rate="48000" block_id="17"/>
|
||||
<intf id="BE_HW_RX_INTF_2" name="USB_RX" min_bit="24" min_chan="2" min_rate="48000" block_id="20"/>
|
||||
<intf id="BE_HW_RX_INTF_3" name="I2S_RX_0" min_bit="24" min_chan="2" min_rate="48000" block_id="18"/>
|
||||
<!--intf id="BE_HW_RX_INTF_2" name="USB_RX" min_bit="24" min_chan="2" min_rate="48000" ctrl_config="USB device" ctrl_rate="Sample Rate" ctrl_bit="Bit Width" ctrl_chan="Channel"/-->
|
||||
<!--intf id="BE_HW_RX_INTF_3" name="BT_RX"/-->
|
||||
<intf id="BE_VIRTUAL_VOICE_RX_TUNING" block_id="19"/>
|
||||
<intf id="BE_VIRTUAL_VOICE_TX_TUNING" block_id="19"/>
|
||||
<intf id="BE_HW_TX_INTF_0" block_id="134,128,137"/>
|
||||
<intf id="BE_VIRTUAL_CRYSTAL_CLEAR_AUDIO_TUNING" block_id="138"/>
|
||||
</hw_intf>
|
||||
|
||||
<product_lists>
|
||||
<product name="Blackbird">
|
||||
<id value="18d1:5033"/>
|
||||
</product>
|
||||
<product name="Condor">
|
||||
<id value="18d1:5034"/>
|
||||
</product>
|
||||
<product name="Condor_Sprint">
|
||||
<id value="18d1:5038"/>
|
||||
</product>
|
||||
<product name="Condor_Sprint2">
|
||||
<id value="18d1:5036"/>
|
||||
</product>
|
||||
</product_lists>
|
||||
|
||||
<!-- The microphone capability is fake data -->
|
||||
<microphone_characteristics>
|
||||
<microphone device_id="builtin_mic_1" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="bottom" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
|
||||
group="0" index_in_the_group="0" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="93"
|
||||
frequencies="100.00 106.00 112.00 118.00 125.00 132.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 212.00 224.00 236.00 250.00 265.00 280.00 300.00 315.00 335.00 355.00 375.00 400.00 425.00 450.00 475.00 500.00 530.00 560.00 600.00 630.00 670.00 710.00 750.00 800.00 850.00 900.00 950.00 1000.00 1060.00 1120.00 1180.00 1250.00 1320.00 1400.00 1500.00 1600.00 1700.00 1800.00 1900.00 2000.00 2120.00 2240.00 2360.00 2500.00 2650.00 2800.00 3000.00 3150.00 3350.00 3550.00 3750.00 4000.00 4250.00 4500.00 4750.00 5000.00 5300.00 5600.00 6000.00 6300.00 6700.00 7100.00 7500.00 8000.00 8500.00 9000.00 9500.00 10000.00 10600.00 11200.00 11800.00 12500.00 13200.00 14000.00 15000.00 16000.00 17000.00 18000.00 19000.00 20000.00"
|
||||
responses="-0.78 -0.71 -0.64 -0.60 -0.55 -0.50 -0.47 -0.42 -0.39 -0.36 -0.34 -0.33 -0.32 -0.29 -0.28 -0.28 -0.27 -0.25 -0.25 -0.24 -0.23 -0.23 -0.22 -0.22 -0.19 -0.17 -0.15 -0.15 -0.14 -0.14 -0.12 -0.11 -0.10 -0.10 -0.08 -0.07 -0.07 -0.04 -0.03 -0.01 0.00 0.04 0.06 0.07 0.08 0.13 0.09 0.14 0.19 0.23 0.28 0.29 0.31 0.37 0.88 0.86 0.77 0.78 0.84 0.86 1.05 1.12 1.18 1.25 1.43 1.66 1.83 2.02 2.23 2.59 2.84 3.35 4.01 6.82 6.62 6.42 7.30 8.23 7.54 12.68 13.76 18.69 19.68 20.90 23.70 25.10 21.65 16.18 18.84 25.44 23.48 23.22 24.89"
|
||||
sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 0.0 1.0" geometric_location="0.0269 0.0058 0.0079" />
|
||||
<microphone device_id="builtin_mic_2" type="AUDIO_DEVICE_IN_BACK_MIC" address="back" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
|
||||
group="0" index_in_the_group="1" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="92"
|
||||
frequencies="106.00 112.00 118.00 125.00 132.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 212.00 224.00 236.00 250.00 265.00 280.00 300.00 315.00 335.00 355.00 375.00 400.00 425.00 450.00 475.00 500.00 530.00 560.00 600.00 630.00 670.00 710.00 750.00 800.00 850.00 900.00 950.00 1000.00 1060.00 1120.00 1180.00 1250.00 1320.00 1400.00 1500.00 1600.00 1700.00 1800.00 1900.00 2000.00 2120.00 2240.00 2360.00 2500.00 2650.00 2800.00 3000.00 3150.00 3350.00 3550.00 3750.00 4000.00 4250.00 4500.00 4750.00 5000.00 5300.00 5600.00 6000.00 6300.00 6700.00 7100.00 7500.00 8000.00 8500.00 9000.00 9500.00 10000.00 10600.00 11200.00 11800.00 12500.00 13200.00 14000.00 15000.00 16000.00 17000.00 18000.00 19000.00 20000.00"
|
||||
responses="-0.75 -0.74 -0.69 -0.65 -0.62 -0.61 -0.56 -0.53 -0.50 -0.47 -0.43 -0.40 -0.37 -0.36 -0.33 -0.30 -0.28 -0.25 -0.24 -0.24 -0.24 -0.25 -0.24 -0.12 -0.10 -0.08 -0.09 -0.07 -0.07 -0.06 -0.06 -0.06 -0.05 -0.04 -0.05 -0.04 -0.01 0.02 0.02 0.00 0.02 0.03 0.07 0.10 0.10 0.13 0.01 0.01 0.10 0.11 0.19 0.24 0.38 0.46 0.26 0.27 0.43 0.76 0.75 1.09 1.09 0.94 1.06 1.21 1.47 1.45 1.36 2.07 2.85 2.90 3.85 4.65 5.84 5.46 6.15 7.50 8.30 10.62 12.70 16.65 20.95 25.41 26.32 20.20 16.60 11.24 7.85 7.62 20.19 7.32 2.87 5.18"
|
||||
sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 1.0 0.0" geometric_location="0.0546 0.1456 0.00415" />
|
||||
<microphone device_id="builtin_mic_3" type="AUDIO_DEVICE_IN_BUILTIN_MIC" address="top" location="AUDIO_MICROPHONE_LOCATION_MAINBODY"
|
||||
group="0" index_in_the_group="2" directionality="AUDIO_MICROPHONE_DIRECTIONALITY_OMNI" num_frequency_responses="92"
|
||||
frequencies="100.00 106.00 112.00 118.00 125.00 132.00 140.00 150.00 160.00 170.00 180.00 190.00 200.00 212.00 224.00 236.00 250.00 265.00 280.00 300.00 315.00 335.00 355.00 375.00 400.00 425.00 450.00 475.00 500.00 530.00 560.00 600.00 630.00 670.00 710.00 750.00 800.00 850.00 900.00 950.00 1000.00 1060.00 1120.00 1180.00 1250.00 1320.00 1400.00 1500.00 1600.00 1700.00 1800.00 1900.00 2000.00 2120.00 2240.00 2360.00 2500.00 2650.00 2800.00 3000.00 3150.00 3350.00 3550.00 3750.00 4000.00 4250.00 4500.00 4750.00 5000.00 5300.00 5600.00 6000.00 6300.00 6700.00 7100.00 7500.00 8000.00 8500.00 9000.00 9500.00 10000.00 10600.00 11200.00 11800.00 12500.00 13200.00 14000.00 15000.00 16000.00 17000.00 18000.00 19000.00"
|
||||
responses="-9.24 -9.31 -9.39 -9.45 -9.46 -9.47 -9.50 -9.52 -9.51 -9.52 -9.51 -9.50 -9.49 -9.47 -9.48 -9.49 -9.48 -9.50 -9.51 -9.53 -9.55 -9.59 -9.63 -9.67 -9.58 -9.57 -9.65 -9.68 -9.71 -9.75 -9.79 -9.84 -9.87 -9.87 -9.90 -9.90 -9.91 -9.97 -10.01 -10.05 -9.85 -9.93 -9.94 -9.98 -10.04 -10.12 -10.28 -10.25 -10.01 -9.86 -9.81 -9.82 -9.61 -9.46 -8.27 -8.42 -8.98 -8.99 -8.82 -9.21 -8.92 -8.97 -9.30 -9.44 -9.52 -9.28 -9.09 -8.81 -7.02 -5.72 -5.30 -7.26 -8.39 -12.28 -8.23 -6.99 -5.52 -4.87 -3.82 -6.09 0.00 -2.15 -0.26 1.48 5.22 10.92 6.41 9.55 12.96 3.35 22.00 19.75"
|
||||
sensitivity="-37.0" max_spl="132.5" min_spl="28.5" orientation="0.0 0.0 1.0" geometric_location="0.0274 0.14065 0.0079" />
|
||||
</microphone_characteristics>
|
||||
|
||||
<!-- The microphone mapping of backend device is fake data -->
|
||||
<input_backend_cfg_mic_mapping>
|
||||
<backend_cfg in_cfg="IN_CAMCORDER_LANDSCAPE_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_CAMCORDER_INVERT_LANDSCAPE_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_CAMCORDER_PORTRAIT_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_CAMCORDER_SELFIE_LANDSCAPE_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_CAMCORDER_SELFIE_INVERT_LANDSCAPE_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_CAMCORDER_SELFIE_PORTRAIT_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_HANDSET_MIC_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_VOICECALL_HANDSET_MIC_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_VOICECALL_SPEAKER_MIC_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_USB_TTY_VCO_MIC_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_VOICE_RECOGN_MIC_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_UNPROCESSED_MIC_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_UNPROCESSED_DUAL_MIC_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
|
||||
</backend_cfg>
|
||||
<backend_cfg in_cfg="IN_UNPROCESSED_TRIPLE_MIC_BE_CFG">
|
||||
<mic_info mic_device_id="builtin_mic_1"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_2"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED"/>
|
||||
<mic_info mic_device_id="builtin_mic_3"
|
||||
channel_mapping="AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT"/>
|
||||
</backend_cfg>
|
||||
</input_backend_cfg_mic_mapping>
|
||||
|
||||
<usecase_attr>
|
||||
<!-- for output with AUDIO_OUTPUT_FLAG_RAW, 32 periods * 64 frames(around 1.3ms) * 2ch * 4(s32) = 16384 bytes -->
|
||||
<usecase id="UC_RAW_PLAYBACK" dev1="23" dyn_path="true" dsp_vol="false" mmap="true" period="64" period_num="32"/>
|
||||
<!-- for output with AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_FAST, 4 * 10ms buffer -->
|
||||
<usecase id="UC_LOW_LATENCY_PLAYBACK" dev1="1" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="4"/>
|
||||
<!-- for output with AUDIO_OUTPUT_FLAG_MMAP_NOIRQ, 40 periods * 48 frames/period(=1ms w/ 48k sample rate) * 2ch *4(float) = 15360 bytes -->
|
||||
<usecase id="UC_MMAP_PLAYBACK" dev1="0" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="40"/>
|
||||
<!-- for output with AUDIO_OUTPUT_FLAG_DEEP_BUFFER, 4 * 20ms buffer -->
|
||||
<usecase id="UC_DEEP_BUFFER_PLAYBACK" dev1="5" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="4"/>
|
||||
<!-- dev1: voice-call downlink dev2: voice-clal uplink -->
|
||||
<usecase id="UC_VOICE_CALL" dev1="4" dev2="11"/>
|
||||
<!-- for output with flag AUDIO_OUTPUT_SPATIALIZER -->
|
||||
<usecase id="UC_IMMERSIVE_PLAYBACK" dev1="30" dyn_path="true" dsp_vol="false" mmap="false" period="10" period_num="3"/>
|
||||
<!-- for output with AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD, 4 * 128KB buffer -->
|
||||
<usecase id="UC_COMPRESSED_OFFLOAD_PLAYBACK" dev1="6" dyn_path="true" dsp_vol="true" mmap="false" period="131072" period_num="4" pre_proc_id="14"/>
|
||||
<!-- dev1: audio dev2: haptic -->
|
||||
<usecase id="UC_HAPTIC_AUDIO" dev1="2" dev2="7" period="10" period_num="4"/>
|
||||
<!-- for VOIP output, 4 * 10ms buffer -->
|
||||
<usecase id="UC_VOIP_PLAYBACK" dev1="16" dyn_path="true" dsp_vol="true" mmap="false" period="10" period_num="4" pcm_ch="2"/>
|
||||
<!-- for input -->
|
||||
<usecase id="UC_AUDIO_RECORD" dev1="8" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="4"/>
|
||||
<usecase id="UC_HOSTLESS_UL" dev1="15"/>
|
||||
<!-- for VOIP input, 4 * 10ms buffer -->
|
||||
<usecase id="UC_VOIP_RECORD" dev1="17" dyn_path="true" dsp_vol="false" mmap="false" period="20" period_num="2"/>
|
||||
<!-- for input wit AUDIO_INPUT_FLAG_FAST 480 periods * 1ms buffer, 16-bit, 2ch, buffer size 92160 bytes-->
|
||||
<usecase id="UC_LOW_LATENCY_AUDIO_RECORD" dev1="10" dyn_path="true" dsp_vol="false" mmap="true" period="1" period_num="480"/>
|
||||
<!-- for input wit AUDIO_INPUT_FLAG_MMAP_NOIRQ 240 periods * 1ms buffer, 32-bit,2 ch, buffer size 92160 bytes -->
|
||||
<usecase id="UC_MMAP_RECORD" dev1="9" dyn_path="true" mmap="true" period="1" period_num="240"/>
|
||||
<!-- for hifi -->
|
||||
<usecase id="UC_HIFI_PLAYBACK" dev1="25"/>
|
||||
<usecase id="UC_HIFI_RECORD" dev1="26"/>
|
||||
</usecase_attr>
|
||||
|
||||
<dsp_latency>
|
||||
<usecase id="UC_LOW_LATENCY_PLAYBACK" type="playback">
|
||||
<be_cfg be_id="OUT_SPEAKER_BE_CFG" latency="20000"/>
|
||||
<be_cfg be_id="OUT_USB_HEADSET_BE_CFG" latency="10000"/>
|
||||
<be_cfg be_id="OUT_USB_HEADPHONE_BE_CFG" latency="10000"/>
|
||||
<be_cfg be_id="OUT_A2DP_BE_CFG" latency="10000"/>
|
||||
</usecase>
|
||||
|
||||
<usecase id="UC_DEEP_BUFFER_PLAYBACK" type="playback">
|
||||
<be_cfg be_id="OUT_SPEAKER_BE_CFG" latency="70000"/>
|
||||
<be_cfg be_id="OUT_USB_HEADSET_BE_CFG" latency="70000"/>
|
||||
<be_cfg be_id="OUT_USB_HEADPHONE_BE_CFG" latency="70000"/>
|
||||
<be_cfg be_id="OUT_A2DP_BE_CFG" latency="180000"/>
|
||||
</usecase>
|
||||
|
||||
<usecase id="UC_COMPRESSED_OFFLOAD_PLAYBACK" type="playback">
|
||||
<be_cfg be_id="OUT_SPEAKER_BE_CFG" latency="40000"/>
|
||||
<be_cfg be_id="OUT_USB_HEADSET_BE_CFG" latency="40000"/>
|
||||
<be_cfg be_id="OUT_USB_HEADPHONE_BE_CFG" latency="40000"/>
|
||||
<be_cfg be_id="OUT_A2DP_BE_CFG" latency="70000"/>
|
||||
</usecase>
|
||||
|
||||
<usecase id="UC_AUDIO_RECORD" type="capture">
|
||||
<be_cfg be_id="IN_CAMCORDER_LANDSCAPE_BE_CFG" latency="160000"/>
|
||||
<be_cfg be_id="IN_CAMCORDER_INVERT_LANDSCAPE_BE_CFG" latency="160000"/>
|
||||
<be_cfg be_id="IN_CAMCORDER_PORTRAIT_BE_CFG" latency="160000"/>
|
||||
<be_cfg be_id="IN_CAMCORDER_SELFIE_LANDSCAPE_BE_CFG" latency="160000"/>
|
||||
<be_cfg be_id="IN_CAMCORDER_SELFIE_INVERT_LANDSCAPE_BE_CFG" latency="160000"/>
|
||||
<be_cfg be_id="IN_CAMCORDER_SELFIE_PORTRAIT_BE_CFG" latency="160000"/>
|
||||
<be_cfg be_id="IN_BTSCO_MIC_BE_CFG" latency="40000"/>
|
||||
<be_cfg be_id="IN_BTSCO_MIC_NREC_BE_CFG" latency="40000"/>
|
||||
<be_cfg be_id="IN_BTSCO_MIC_WB_BE_CFG" latency="40000"/>
|
||||
<be_cfg be_id="IN_BTSCO_MIC_WB_NREC_BE_CFG" latency="40000"/>
|
||||
</usecase>
|
||||
</dsp_latency>
|
||||
|
||||
<soundcard_name name="google,aoc-snd-card" />
|
||||
|
||||
<cfg_attr>
|
||||
<cfg id="OUT_SPEAKER_BE_CFG" intf_name="TDM_RX_0" mux="HW_MUX_GP_0" tuning_id="2"/>
|
||||
<cfg id="OUT_HAC_HANDSET_BE_CFG" intf_name="TDM_RX_1" mux="HW_MUX_GP_1" be_path="hac-handset"/>
|
||||
<cfg id="OUT_USB_HEADSET_BE_CFG">
|
||||
<override product="Blackbird" tuning_id="22"/>
|
||||
<override product="Condor" tuning_id="33"/>
|
||||
</cfg>
|
||||
<cfg id="OUT_USB_TTY_FULL_BE_CFG" be_path="usb-headphone" codec_path="usb-headphone"/>
|
||||
<cfg id="OUT_USB_TTY_VCO_BE_CFG" be_path="usb-headphone" codec_path="usb-headphone"/>
|
||||
<cfg id="OUT_USB_TTY_HCO_BE_CFG" be_path="NULL" codec_path="voice-speaker"/>
|
||||
<cfg id="IN_USB_TTY_FULL_MIC_BE_CFG" be_path="usb-headset-mic" codec_path="usb-headset-mic" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_USB_TTY_VCO_MIC_BE_CFG" be_path="NULL" codec_path="voice-speaker-mic"/>
|
||||
<cfg id="IN_USB_TTY_HCO_MIC_BE_CFG" be_path="usb-headset-mic" codec_path="usb-headset-mic" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_SPK_VI_BE_CFG" codec_path="NULL" be_path="spk-vi"/>
|
||||
<cfg id="IN_HANDSET_MIC_BE_CFG" tuning_id="62"/>
|
||||
<cfg id="IN_HANDSET_DUAL_MIC_BE_CFG" tuning_id="63"/>
|
||||
<cfg id="IN_HANDSET_TRIPLE_MIC_BE_CFG" tuning_id="64"/>
|
||||
<cfg id="IN_CAMCORDER_LANDSCAPE_BE_CFG" tuning_id="70"/>
|
||||
<cfg id="IN_CAMCORDER_INVERT_LANDSCAPE_BE_CFG" tuning_id="71"/>
|
||||
<cfg id="IN_CAMCORDER_PORTRAIT_BE_CFG" tuning_id="72"/>
|
||||
<cfg id="IN_CAMCORDER_SELFIE_LANDSCAPE_BE_CFG" tuning_id="73"/>
|
||||
<cfg id="IN_CAMCORDER_SELFIE_INVERT_LANDSCAPE_BE_CFG" tuning_id="74"/>
|
||||
<cfg id="IN_CAMCORDER_SELFIE_PORTRAIT_BE_CFG" tuning_id="75"/>
|
||||
<cfg id="IN_CAMCORDER_MIC_BE_CFG" tuning_id="70"/>
|
||||
<cfg id="IN_CAMCORDER_TRIPLE_MIC_BE_CFG" tuning_id="70"/>
|
||||
<cfg id="IN_BTSCO_MIC_BE_CFG" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_BTSCO_MIC_NREC_BE_CFG" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_BTSCO_MIC_WB_BE_CFG" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_BTSCO_MIC_WB_NREC_BE_CFG" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_VOICE_RECOGN_USB_HEADSET_MIC_BE_CFG" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_USB_HEADSET_MIC_BE_CFG" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_VOICECALL_USB_HEADSET_MIC_BE_CFG" mux="HW_MUX_GP_0"/>
|
||||
<cfg id="IN_UNPROCESSED_USB_HEADSET_MIC_BE_CFG" mux="HW_MUX_GP_0"/>
|
||||
</cfg_attr>
|
||||
|
||||
<xlate_id>
|
||||
<item component="TUNING_COMPONENT_WAVES" id="2"/>
|
||||
<item component="TUNING_COMPONENT_FORTEMEDIA" id="3"/>
|
||||
<item component="TUNING_COMPONENT_CAMCORDER" id="6"/>
|
||||
</xlate_id>
|
||||
|
||||
<voip_db_mapping>
|
||||
<voip_path id="VOIP_RX_USB" value="0.01,0.02,0.04,0.1,0.21,0.47,1.0"/>
|
||||
</voip_db_mapping>
|
||||
|
||||
<device_handle>
|
||||
<handler libname="audio_bt_aoc.so"/>
|
||||
<handler libname="audio_usb_aoc.so" argu="MaxSamplingRate=96000,UnsupportedFormat=S24_LE"/>
|
||||
</device_handle>
|
||||
|
||||
<external_module>
|
||||
<module libname="audio_spk_35l41.so" argu="AcousticShockProtection"/>
|
||||
<module libname="audio_waves_aoc.so" argu="Sink=SPK:1"/>
|
||||
<module libname="audio_fortemedia_aoc.so" argu="DL_CH=y VoIP_DLCHs=SPK:2,USB:2 VoIP_Rate=32000"/>
|
||||
<module libname="liboffloadeffect.so"/>
|
||||
<module libname="audio_amcs_ext.so"/>
|
||||
<module libname="audio_bluenote_aoc.so"/>
|
||||
</external_module>
|
||||
</audio_platform_configuration>
|
255
audio/akita/config/audio_policy_configuration.xml
Normal file
255
audio/akita/config/audio_policy_configuration.xml
Normal file
|
@ -0,0 +1,255 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- Copyright (C) 2020 The Android Open Source Project
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
|
||||
<modules>
|
||||
<!-- Primary Audio HAL -->
|
||||
<module name="primary" halVersion="2.0">
|
||||
<attachedDevices>
|
||||
<item>Speaker</item>
|
||||
<item>Speaker Safe</item>
|
||||
<item>Earpiece</item>
|
||||
<item>Built-In Mic</item>
|
||||
<item>Built-In Back Mic</item>
|
||||
<item>Telephony Tx</item>
|
||||
<item>Voice Call And Telephony Rx</item>
|
||||
<item>Echo Ref In</item>
|
||||
</attachedDevices>
|
||||
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
||||
<mixPorts>
|
||||
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY AUDIO_OUTPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="deep buffer" role="source" flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="compressed_offload" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING">
|
||||
<profile name="" format="AUDIO_FORMAT_MP3"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_LC"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="haptic" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB" />
|
||||
</mixPort>
|
||||
<mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="incall playback" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
|
||||
</mixPort>
|
||||
<mixPort name="voice call tx" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
|
||||
</mixPort>
|
||||
<mixPort name="voip_rx" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="primary input" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_INDEX_MASK_3"/>
|
||||
</mixPort>
|
||||
<mixPort name="hotword input" role="sink" flags="AUDIO_INPUT_FLAG_HW_HOTWORD" maxActiveCount="0" >
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="incall capture" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voice call rx" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voip_tx" role="sink"
|
||||
flags="AUDIO_INPUT_FLAG_VOIP_TX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="hifi_playback" role="source" />
|
||||
<mixPort name="hifi_input" role="sink" />
|
||||
<mixPort name="echo_ref_input" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
|
||||
<devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
|
||||
</devicePort>
|
||||
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
|
||||
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink"
|
||||
encodedFormats="AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink"
|
||||
encodedFormats="AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink"
|
||||
encodedFormats="AUDIO_FORMAT_AAC AUDIO_FORMAT_SBC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100 48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
|
||||
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Echo Ref In" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source">
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<!-- route declaration, i.e. list all available sources for a given sink -->
|
||||
<routes>
|
||||
<route type="mix" sink="Speaker"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="Speaker Safe"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="Earpiece"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="BT A2DP Out"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="BT A2DP Headphones"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="BT A2DP Speaker"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="USB Device Out"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload"/>
|
||||
<route type="mix" sink="USB Headset Out"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload"/>
|
||||
<route type="mix" sink="BT SCO"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="BT SCO Headset"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="BT SCO Car Kit"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
|
||||
<route type="mix" sink="primary input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="hotword input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
|
||||
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
|
||||
<route type="mix" sink="voip_tx"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="fast input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="mmap_no_irq_in"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
|
||||
<route type="mix" sink="echo_ref_input" sources="Echo Ref In"/>
|
||||
</routes>
|
||||
</module>
|
||||
<!-- Bluetooth Audio HAL -->
|
||||
<xi:include href="bluetooth_audio_policy_configuration_7_0.xml"/>
|
||||
<!-- Usb Audio HAL -->
|
||||
<module name="usbv2" halVersion="2.0">
|
||||
<mixPorts>
|
||||
<mixPort name="usb_accessory output" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<routes>
|
||||
<route type="mix" sink="USB Host Out"
|
||||
sources="usb_accessory output"/>
|
||||
</routes>
|
||||
</module>
|
||||
<!-- Remote Submix Audio HAL -->
|
||||
<xi:include href="r_submix_audio_policy_configuration.xml"/>
|
||||
</modules>
|
||||
<!-- End of Modules section -->
|
||||
<!-- Volume section -->
|
||||
<xi:include href="audio_policy_volumes.xml"/>
|
||||
<xi:include href="default_volume_tables.xml"/>
|
||||
<!-- End of Volume section -->
|
||||
</audioPolicyConfiguration>
|
|
@ -0,0 +1,234 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- Copyright (C) 2020 The Android Open Source Project
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
|
||||
<modules>
|
||||
<!-- Primary Audio HAL -->
|
||||
<module name="primary" halVersion="2.0">
|
||||
<attachedDevices>
|
||||
<item>Speaker</item>
|
||||
<item>Speaker Safe</item>
|
||||
<item>Earpiece</item>
|
||||
<item>Built-In Mic</item>
|
||||
<item>Built-In Back Mic</item>
|
||||
<item>Telephony Tx</item>
|
||||
<item>Voice Call And Telephony Rx</item>
|
||||
<item>Echo Ref In</item>
|
||||
</attachedDevices>
|
||||
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
||||
<mixPorts>
|
||||
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY AUDIO_OUTPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="deep buffer" role="source" flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="compressed_offload" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING">
|
||||
<profile name="" format="AUDIO_FORMAT_MP3"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_LC"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="haptic" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB" />
|
||||
</mixPort>
|
||||
<mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="incall playback" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
|
||||
</mixPort>
|
||||
<mixPort name="voice call tx" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
|
||||
</mixPort>
|
||||
<mixPort name="voip_rx" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="primary input" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_INDEX_MASK_3"/>
|
||||
</mixPort>
|
||||
<mixPort name="hotword input" role="sink" flags="AUDIO_INPUT_FLAG_HW_HOTWORD" maxActiveCount="0" >
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="incall capture" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voice call rx" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voip_tx" role="sink"
|
||||
flags="AUDIO_INPUT_FLAG_VOIP_TX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="hifi_playback" role="source" />
|
||||
<mixPort name="hifi_input" role="sink" />
|
||||
<mixPort name="echo_ref_input" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
|
||||
<devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
|
||||
</devicePort>
|
||||
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
|
||||
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
|
||||
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Echo Ref In" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source">
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<!-- route declaration, i.e. list all available sources for a given sink -->
|
||||
<routes>
|
||||
<route type="mix" sink="Speaker"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="Speaker Safe"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="Earpiece"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="USB Device Out"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload"/>
|
||||
<route type="mix" sink="USB Headset Out"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback,compressed_offload"/>
|
||||
<route type="mix" sink="BT SCO"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="BT SCO Headset"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="BT SCO Car Kit"
|
||||
sources="primary output,deep buffer,haptic,voip_rx,compressed_offload"/>
|
||||
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
|
||||
<route type="mix" sink="primary input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="hotword input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
|
||||
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
|
||||
<route type="mix" sink="voip_tx"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="fast input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="mmap_no_irq_in"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
|
||||
<route type="mix" sink="echo_ref_input" sources="Echo Ref In"/>
|
||||
</routes>
|
||||
</module>
|
||||
<!-- Bluetooth Audio HAL -->
|
||||
<xi:include href="bluetooth_audio_policy_configuration_7_0.xml"/>
|
||||
<!-- Usb Audio HAL -->
|
||||
<module name="usbv2" halVersion="2.0">
|
||||
<mixPorts>
|
||||
<mixPort name="usb_accessory output" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<routes>
|
||||
<route type="mix" sink="USB Host Out"
|
||||
sources="usb_accessory output"/>
|
||||
</routes>
|
||||
</module>
|
||||
<!-- Remote Submix Audio HAL -->
|
||||
<xi:include href="r_submix_audio_policy_configuration.xml"/>
|
||||
</modules>
|
||||
<!-- End of Modules section -->
|
||||
<!-- Volume section -->
|
||||
<xi:include href="audio_policy_volumes.xml"/>
|
||||
<xi:include href="default_volume_tables.xml"/>
|
||||
<!-- End of Volume section -->
|
||||
</audioPolicyConfiguration>
|
|
@ -0,0 +1,234 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- Copyright (C) 2020 The Android Open Source Project
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<audioPolicyConfiguration version="7.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<globalConfiguration speaker_drc_enabled="false" call_screen_mode_supported="true" />
|
||||
<modules>
|
||||
<!-- Primary Audio HAL -->
|
||||
<module name="primary" halVersion="2.0">
|
||||
<attachedDevices>
|
||||
<item>Speaker</item>
|
||||
<item>Speaker Safe</item>
|
||||
<item>Earpiece</item>
|
||||
<item>Built-In Mic</item>
|
||||
<item>Built-In Back Mic</item>
|
||||
<item>Telephony Tx</item>
|
||||
<item>Voice Call And Telephony Rx</item>
|
||||
<item>Echo Ref In</item>
|
||||
</attachedDevices>
|
||||
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
||||
<mixPorts>
|
||||
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY AUDIO_OUTPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="deep buffer" role="source" flags="AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<!--mixPort name="compressed_offload" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD AUDIO_OUTPUT_FLAG_NON_BLOCKING">
|
||||
<profile name="" format="AUDIO_FORMAT_MP3"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_LC"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_HE_V1"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_HE_V2"
|
||||
samplingRates="8000 16000 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</mixPort-->
|
||||
<mixPort name="haptic" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB" />
|
||||
</mixPort>
|
||||
<mixPort name="raw" role="source" flags="AUDIO_OUTPUT_FLAG_RAW AUDIO_OUTPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="mmap_no_irq_out" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT AUDIO_OUTPUT_FLAG_MMAP_NOIRQ">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_FLOAT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="incall playback" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_INCALL_MUSIC">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
|
||||
</mixPort>
|
||||
<mixPort name="voice call tx" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO" />
|
||||
</mixPort>
|
||||
<mixPort name="voip_rx" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_VOIP_RX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="primary input" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO AUDIO_CHANNEL_INDEX_MASK_3"/>
|
||||
</mixPort>
|
||||
<mixPort name="hotword input" role="sink" flags="AUDIO_INPUT_FLAG_HW_HOTWORD" maxActiveCount="0" >
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000 11025 12000 16000 22050 24000 32000 44100 48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="incall capture" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voice call rx" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voip_tx" role="sink"
|
||||
flags="AUDIO_INPUT_FLAG_VOIP_TX">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="fast input" role="sink" flags="AUDIO_INPUT_FLAG_RAW AUDIO_INPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="mmap_no_irq_in" role="sink" flags="AUDIO_INPUT_FLAG_MMAP_NOIRQ">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="hifi_playback" role="source" />
|
||||
<mixPort name="hifi_input" role="sink" />
|
||||
<mixPort name="echo_ref_input" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_32_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
|
||||
<devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker" type="AUDIO_DEVICE_OUT_SPEAKER" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker Safe" type="AUDIO_DEVICE_OUT_SPEAKER_SAFE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Device Out" type="AUDIO_DEVICE_OUT_USB_DEVICE" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Headset Out" type="AUDIO_DEVICE_OUT_USB_HEADSET" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Aux Digital" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
|
||||
</devicePort>
|
||||
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
|
||||
</devicePort>
|
||||
<!-- Input devices declaration, i.e. Source DEVICE PORT -->
|
||||
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Device In" type="AUDIO_DEVICE_IN_USB_DEVICE" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="USB Headset In" type="AUDIO_DEVICE_IN_USB_HEADSET" role="source">
|
||||
</devicePort>
|
||||
<!-- AUDIO_DEVICE_IN_VOICE_CALL and AUDIO_DEVICE_IN_TELEPHONY_RX are in the same value -->
|
||||
<devicePort tagName="Voice Call And Telephony Rx" type="AUDIO_DEVICE_IN_VOICE_CALL" role="source">
|
||||
</devicePort>
|
||||
<devicePort tagName="Echo Ref In" type="AUDIO_DEVICE_IN_ECHO_REFERENCE" role="source">
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<!-- route declaration, i.e. list all available sources for a given sink -->
|
||||
<routes>
|
||||
<route type="mix" sink="Speaker"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx"/>
|
||||
<route type="mix" sink="Speaker Safe"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx"/>
|
||||
<route type="mix" sink="Earpiece"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx"/>
|
||||
<route type="mix" sink="USB Device Out"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback"/>
|
||||
<route type="mix" sink="USB Headset Out"
|
||||
sources="primary output,deep buffer,haptic,raw,mmap_no_irq_out,voip_rx,hifi_playback"/>
|
||||
<route type="mix" sink="BT SCO"
|
||||
sources="primary output,deep buffer,haptic,voip_rx"/>
|
||||
<route type="mix" sink="BT SCO Headset"
|
||||
sources="primary output,deep buffer,haptic,voip_rx"/>
|
||||
<route type="mix" sink="BT SCO Car Kit"
|
||||
sources="primary output,deep buffer,haptic,voip_rx"/>
|
||||
<route type="mix" sink="Telephony Tx" sources="incall playback,voice call tx" />
|
||||
<route type="mix" sink="primary input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="hotword input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="incall capture" sources="Voice Call And Telephony Rx" />
|
||||
<route type="mix" sink="voice call rx" sources="Voice Call And Telephony Rx" />
|
||||
<route type="mix" sink="voip_tx"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="fast input"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="mmap_no_irq_in"
|
||||
sources="Built-In Mic,Built-In Back Mic,USB Device In,USB Headset In"/>
|
||||
<route type="mix" sink="hifi_input" sources="USB Device In,USB Headset In" />
|
||||
<route type="mix" sink="echo_ref_input" sources="Echo Ref In"/>
|
||||
</routes>
|
||||
</module>
|
||||
<!-- A2dp Audio HAL -->
|
||||
<xi:include href="a2dp_audio_policy_configuration_7_0.xml"/>
|
||||
<!-- Usb Audio HAL -->
|
||||
<module name="usbv2" halVersion="2.0">
|
||||
<mixPorts>
|
||||
<mixPort name="usb_accessory output" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<devicePort tagName="USB Host Out" type="AUDIO_DEVICE_OUT_USB_ACCESSORY" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<routes>
|
||||
<route type="mix" sink="USB Host Out"
|
||||
sources="usb_accessory output"/>
|
||||
</routes>
|
||||
</module>
|
||||
<!-- Remote Submix Audio HAL -->
|
||||
<xi:include href="r_submix_audio_policy_configuration.xml"/>
|
||||
</modules>
|
||||
<!-- End of Modules section -->
|
||||
<!-- Volume section -->
|
||||
<xi:include href="audio_policy_volumes.xml"/>
|
||||
<xi:include href="default_volume_tables.xml"/>
|
||||
<!-- End of Volume section -->
|
||||
</audioPolicyConfiguration>
|
910
audio/akita/config/mixer_paths.xml
Normal file
910
audio/akita/config/mixer_paths.xml
Normal file
|
@ -0,0 +1,910 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- Copyright (c) 2019, The Linux Foundation. All rights reserved. -->
|
||||
<!-- -->
|
||||
<!-- Redistribution and use in source and binary forms, with or without -->
|
||||
<!-- modification, are permitted provided that the following conditions are -->
|
||||
<!-- met: -->
|
||||
<!-- * Redistributions of source code must retain the above copyright -->
|
||||
<!-- notice, this list of conditions and the following disclaimer. -->
|
||||
<!-- * Redistributions in binary form must reproduce the above -->
|
||||
<!-- copyright notice, this list of conditions and the following -->
|
||||
<!-- disclaimer in the documentation and/or other materials provided -->
|
||||
<!-- with the distribution. -->
|
||||
<!-- * Neither the name of The Linux Foundation nor the names of its -->
|
||||
<!-- contributors may be used to endorse or promote products derived -->
|
||||
<!-- from this software without specific prior written permission. -->
|
||||
<!-- -->
|
||||
<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
|
||||
<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
|
||||
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
|
||||
<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
|
||||
<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
|
||||
<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
|
||||
<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
|
||||
<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
|
||||
<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
|
||||
<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
|
||||
<mixer>
|
||||
<!-- Initial default value of ALSA command -->
|
||||
<!-- PCM timeout -->
|
||||
<ctl name="PCM Stream Wait Time in MSec" value="100"/>
|
||||
<ctl name="Voice PCM Stream Wait Time in MSec" value="500"/>
|
||||
|
||||
<!-- Enable it when AOC is ready to trim delay and padding -->
|
||||
<!--ctl name="Gapless Offload Enable" value="1"/-->
|
||||
|
||||
<!-- TDM 0 setting -->
|
||||
<ctl name="TDM_0_RX Chan" value="Four"/>
|
||||
<ctl name="TDM_0_RX Format" value="S32_LE"/>
|
||||
<ctl name="TDM_0_RX Sample Rate" value="SR_96K" />
|
||||
<ctl name="TDM_0_TX Chan" value="Four"/>
|
||||
<ctl name="TDM_0_TX Format" value="S32_LE"/>
|
||||
<ctl name="TDM_0_TX Sample Rate" value="SR_96K" />
|
||||
|
||||
<!-- Haptic setting -->
|
||||
<ctl name="Haptics Source" value="PCM"/>
|
||||
<ctl name="HAPTIC_RX Format" value="S32_LE"/>
|
||||
<ctl name="HAPTIC_RX SlotFmt" value="S32_LE"/>
|
||||
<ctl name="HAPTIC_RX Chan" value="Four"/>
|
||||
<ctl name="HAPTIC_RX nSlot" value="Four"/>
|
||||
<ctl name="RX Slots" id="0" value="2"/>
|
||||
<ctl name="RX Slots" id="1" value="3"/>
|
||||
|
||||
<!-- Cirrus default 96K -->
|
||||
<ctl name="Default 96K" value="1"/>
|
||||
<ctl name="R Default 96K" value="1"/>
|
||||
|
||||
<!-- Cirrus Booster Amp TDM slot assignment-->
|
||||
<!-- RX slot -->
|
||||
<ctl name="ASPRX1 Slot Position" value="0"/>
|
||||
<ctl name="ASPRX2 Slot Position" value="1"/>
|
||||
<ctl name="R ASPRX1 Slot Position" value="1"/>
|
||||
<ctl name="R ASPRX2 Slot Position" value="0"/>
|
||||
<!-- TX slot -->
|
||||
<ctl name="ASPTX1 Slot Position" value="0"/>
|
||||
<ctl name="R ASPTX1 Slot Position" value="1"/>
|
||||
<ctl name="ASPTX2 Slot Position" value="2"/>
|
||||
<ctl name="R ASPTX2 Slot Position" value="3"/>
|
||||
<ctl name="ASPTX3 Slot Position" value="4"/>
|
||||
<ctl name="R ASPTX3 Slot Position" value="5"/>
|
||||
<ctl name="ASPTX4 Slot Position" value="6"/>
|
||||
<ctl name="R ASPTX4 Slot Position" value="7"/>
|
||||
|
||||
<!-- Cirrus Booster Amp DRE and VBST config-->
|
||||
<ctl name="VBSTMON Output Switch" value="1"/>
|
||||
<ctl name="R VBSTMON Output Switch" value="1"/>
|
||||
<ctl name="DRE DRE Switch" value="1"/>
|
||||
<ctl name="R DRE DRE Switch" value="1"/>
|
||||
|
||||
<!-- Cirrus Booster Amp Output Gain -->
|
||||
<ctl name="AMP PCM Gain" value="17"/>
|
||||
<ctl name="R AMP PCM Gain" value="17"/>
|
||||
<ctl name="Digital PCM Volume" value="817"/>
|
||||
<ctl name="R Digital PCM Volume" value="817"/>
|
||||
|
||||
<!-- Cirrus Booster Amp Power -->
|
||||
<ctl name="Main AMP Enable Switch" value="0"/>
|
||||
<ctl name="R Main AMP Enable Switch" value="0"/>
|
||||
|
||||
<!-- Cirrus Booster mode -->
|
||||
<ctl name="PCM Source" value="DSP"/>
|
||||
<ctl name="R PCM Source" value="DSP"/>
|
||||
<ctl name="DSP1 Firmware" value="Protection"/>
|
||||
<ctl name="R DSP1 Firmware" value="Protection"/>
|
||||
<ctl name="DSP RX1 Source" value="ASPRX1"/>
|
||||
<ctl name="DSP RX2 Source" value="ASPRX1"/>
|
||||
<ctl name="R DSP RX1 Source" value="ASPRX1"/>
|
||||
<ctl name="R DSP RX2 Source" value="ASPRX1"/>
|
||||
<ctl name="Boost Peak Current Limit" value="3.50A"/>
|
||||
<ctl name="R Boost Peak Current Limit" value="3.50A"/>
|
||||
|
||||
<!-- Cirrus ASP TX source -->
|
||||
<ctl name="ASP TX1 Source" value="VMON" />
|
||||
<ctl name="R ASP TX1 Source" value="VMON" />
|
||||
<ctl name="ASP TX2 Source" value="IMON" />
|
||||
<ctl name="R ASP TX2 Source" value="IMON" />
|
||||
<ctl name="ASP TX3 Source" value="Zero" />
|
||||
<ctl name="R ASP TX3 Source" value="Zero" />
|
||||
<ctl name="ASP TX4 Source" value="Zero" />
|
||||
<ctl name="R ASP TX4 Source" value="Zero" />
|
||||
|
||||
<!-- Cirrus fast switch init -->
|
||||
<!--ctl name="Fast Use Case Switch Enable" value="0" />
|
||||
<ctl name="Fast Use Case Delta File" value="fast_switch5.txt" />
|
||||
<ctl name="R Fast Use Case Switch Enable" value="0" />
|
||||
<ctl name="R Fast Use Case Delta File" value="fast_switch5.txt" /-->
|
||||
|
||||
<!-- default EP volume -->
|
||||
<ctl name="PCM Playback Switch" value="1"/>
|
||||
<ctl name="PCM Playback Volume" value="10"/>
|
||||
|
||||
<!-- audio RX route initial/default value -->
|
||||
<ctl name="TDM_0_RX Mixer EP1" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer EP2" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer EP3" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer EP4" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer EP5" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer EP6" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer EP7" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer EP8" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer NoHost1" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer VOIP" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer RAW" value="0"/>
|
||||
<ctl name="TDM_0_RX Mixer IMSV" value="0"/>
|
||||
|
||||
<ctl name="TDM_1_RX Mixer EP1" value="0"/>
|
||||
<ctl name="TDM_1_RX Mixer EP2" value="0"/>
|
||||
<ctl name="TDM_1_RX Mixer EP3" value="0"/>
|
||||
<ctl name="TDM_1_RX Mixer EP4" value="0"/>
|
||||
<ctl name="TDM_1_RX Mixer EP5" value="0"/>
|
||||
<ctl name="TDM_1_RX Mixer EP6" value="0"/>
|
||||
<ctl name="TDM_1_RX Mixer EP7" value="0"/>
|
||||
<ctl name="TDM_1_RX Mixer EP8" value="0"/>
|
||||
<ctl name="TDM_1_RX Mixer NoHost1" value="0"/>
|
||||
|
||||
<ctl name="USB_RX Mixer EP1" value="0"/>
|
||||
<ctl name="USB_RX Mixer EP2" value="0"/>
|
||||
<ctl name="USB_RX Mixer EP3" value="0"/>
|
||||
<ctl name="USB_RX Mixer EP4" value="0"/>
|
||||
<ctl name="USB_RX Mixer EP5" value="0"/>
|
||||
<ctl name="USB_RX Mixer EP6" value="0"/>
|
||||
<ctl name="USB_RX Mixer EP7" value="0"/>
|
||||
<ctl name="USB_RX Mixer NoHost1" value="0"/>
|
||||
<ctl name="USB_RX Mixer VOIP" value="0"/>
|
||||
<ctl name="USB_RX Mixer HIFI" value="0"/>
|
||||
<ctl name="USB_RX Mixer RAW" value="0"/>
|
||||
<ctl name="USB_RX Mixer IMSV" value="0"/>
|
||||
|
||||
<ctl name="BT_RX Mixer EP1" value="0"/>
|
||||
<ctl name="BT_RX Mixer EP2" value="0"/>
|
||||
<ctl name="BT_RX Mixer EP3" value="0"/>
|
||||
<ctl name="BT_RX Mixer EP4" value="0"/>
|
||||
<ctl name="BT_RX Mixer EP5" value="0"/>
|
||||
<ctl name="BT_RX Mixer EP6" value="0"/>
|
||||
<ctl name="BT_RX Mixer EP7" value="0"/>
|
||||
<ctl name="BT_RX Mixer NoHost1" value="0"/>
|
||||
<ctl name="BT_RX Mixer VOIP" value="0"/>
|
||||
<ctl name="BT_RX Mixer RAW" value="0"/>
|
||||
<ctl name="BT_RX Mixer IMSV" value="0"/>
|
||||
|
||||
<ctl name="INCALL_RX Mixer EP1" value="0"/>
|
||||
<ctl name="INCALL_RX Mixer EP2" value="0"/>
|
||||
<ctl name="INCALL_RX Mixer EP3" value="0"/>
|
||||
<ctl name="INCALL_RX Mixer EP4" value="0"/>
|
||||
<ctl name="INCALL_RX Mixer EP5" value="0"/>
|
||||
<ctl name="INCALL_RX Mixer EP6" value="0"/>
|
||||
<ctl name="INCALL_RX Mixer EP7" value="0"/>
|
||||
<ctl name="INCALL_RX Mixer NoHost1" value="0"/>
|
||||
|
||||
<ctl name="SINK_IDS" id="0" value="-1"/>
|
||||
<ctl name="SINK_IDS" id="1" value="-1"/>
|
||||
|
||||
<!-- audio TX route initial/default value -->
|
||||
<ctl name="EP1 TX Mixer TDM_0_TX" value="0"/>
|
||||
<ctl name="EP2 TX Mixer TDM_0_TX" value="0"/>
|
||||
<ctl name="EP3 TX Mixer TDM_0_TX" value="0"/>
|
||||
<ctl name="EP4 TX Mixer TDM_0_TX" value="0"/>
|
||||
<ctl name="EP5 TX Mixer TDM_0_TX" value="0"/>
|
||||
<ctl name="EP6 TX Mixer TDM_0_TX" value="0"/>
|
||||
<ctl name="NoHost1 TX Mixer TDM_0_TX" value="0"/>
|
||||
|
||||
<ctl name="EP1 TX Mixer TDM_1_TX" value="0"/>
|
||||
<ctl name="EP2 TX Mixer TDM_1_TX" value="0"/>
|
||||
<ctl name="EP3 TX Mixer TDM_1_TX" value="0"/>
|
||||
<ctl name="EP4 TX Mixer TDM_1_TX" value="0"/>
|
||||
<ctl name="EP5 TX Mixer TDM_1_TX" value="0"/>
|
||||
<ctl name="EP6 TX Mixer TDM_1_TX" value="0"/>
|
||||
<ctl name="NoHost1 TX Mixer TDM_1_TX" value="0"/>
|
||||
|
||||
<ctl name="EP1 TX Mixer INTERNAL_MIC_TX" value="0"/>
|
||||
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="0"/>
|
||||
<ctl name="EP3 TX Mixer INTERNAL_MIC_TX" value="0"/>
|
||||
<ctl name="EP4 TX Mixer INTERNAL_MIC_TX" value="0"/>
|
||||
<ctl name="EP5 TX Mixer INTERNAL_MIC_TX" value="0"/>
|
||||
<ctl name="EP6 TX Mixer INTERNAL_MIC_TX" value="0"/>
|
||||
<ctl name="NoHost1 TX Mixer INTERNAL_MIC_TX" value="0"/>
|
||||
<ctl name="VOIP TX Mixer INTERNAL_MIC_TX" value="0"/>
|
||||
|
||||
<ctl name="EP1 TX Mixer BT_TX" value="0"/>
|
||||
<ctl name="EP2 TX Mixer BT_TX" value="0"/>
|
||||
<ctl name="EP3 TX Mixer BT_TX" value="0"/>
|
||||
<ctl name="EP4 TX Mixer BT_TX" value="0"/>
|
||||
<ctl name="EP5 TX Mixer BT_TX" value="0"/>
|
||||
<ctl name="EP6 TX Mixer BT_TX" value="0"/>
|
||||
<ctl name="NoHost1 TX Mixer BT_TX" value="0"/>
|
||||
<ctl name="VOIP TX Mixer BT_TX" value="0"/>
|
||||
|
||||
<ctl name="EP1 TX Mixer USB_TX" value="0"/>
|
||||
<ctl name="EP2 TX Mixer USB_TX" value="0"/>
|
||||
<ctl name="EP3 TX Mixer USB_TX" value="0"/>
|
||||
<ctl name="EP4 TX Mixer USB_TX" value="0"/>
|
||||
<ctl name="EP5 TX Mixer USB_TX" value="0"/>
|
||||
<ctl name="EP6 TX Mixer USB_TX" value="0"/>
|
||||
<ctl name="NoHost1 TX Mixer USB_TX" value="0"/>
|
||||
<ctl name="VOIP TX Mixer USB_TX" value="0"/>
|
||||
|
||||
<ctl name="EP1 TX Mixer INCALL_TX" value="0"/>
|
||||
<ctl name="EP2 TX Mixer INCALL_TX" value="0"/>
|
||||
<ctl name="EP3 TX Mixer INCALL_TX" value="0"/>
|
||||
<ctl name="EP4 TX Mixer INCALL_TX" value="0"/>
|
||||
<ctl name="EP5 TX Mixer INCALL_TX" value="0"/>
|
||||
<ctl name="EP6 TX Mixer INCALL_TX" value="0"/>
|
||||
<ctl name="NoHost1 TX Mixer INCALL_TX" value="0"/>
|
||||
|
||||
<ctl name="EP5 TX Mixer INTERNAL_MIC_US_TX" value="0"/>
|
||||
<ctl name="EP4 TX Mixer I2S_2_TX" value="0"/>
|
||||
|
||||
<!-- AoC Mic setting -->
|
||||
<ctl name="MIC DC Blocker" value="1" />
|
||||
<ctl name="MIC HW Gain At High Power Mode (cB)" value="0" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="-40"/>
|
||||
|
||||
<!-- USB setting v2 -->
|
||||
<ctl name="USB Bus ID v2" value="2"/>
|
||||
<ctl name="USB Dev ID v2" value="2"/>
|
||||
<ctl name="USB Playback EP ID v2" value="1"/>
|
||||
<ctl name="USB Playback FORMAT v2" value="0"/>
|
||||
<ctl name="USB Playback SR v2" value="48000"/>
|
||||
<ctl name="USB Playback CH v2" value="2"/>
|
||||
<ctl name="USB Playback BW v2" value="24"/>
|
||||
<ctl name="USB Capture EP ID v2" value="1"/>
|
||||
<ctl name="USB Capture FORMAT v2" value="0"/>
|
||||
<ctl name="USB Capture SR v2" value="48000"/>
|
||||
<ctl name="USB Capture CH v2" value="1"/>
|
||||
<ctl name="USB Capture BW v2" value="16"/>
|
||||
|
||||
<ctl name="AoC Modem Downlink ASRC Mode" value="ASP_ON"/>
|
||||
<ctl name="Voice Call Mic Source" value="Builtin_MIC"/>
|
||||
<ctl name="Mic Spatial Module Enable" value="0"/>
|
||||
<ctl name="Audio Capture Eraser Enable" value="0"/>
|
||||
|
||||
<!-- audio PDM mic default state -->
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="-1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="-1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="-1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="Audio Capture Mic Source" value="Builtin_MIC"/>
|
||||
|
||||
<!-- audio Ultrasound mic default state -->
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="0" value="-1"/>
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="1" value="-1"/>
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="2" value="-1"/>
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
|
||||
<!-- sidetone controls -->
|
||||
<ctl name="Sidetone Enable" value="0"/>
|
||||
<ctl name="Sidetone Volume" value="-96"/>
|
||||
<ctl name="Sidetone Selected Mic" value="0"/>
|
||||
<ctl name="Sidetone EQ Stage Number" value="1"/>
|
||||
<!-- IEEE 754, value is in float -->
|
||||
<ctl name="Sidetone Biquad0" id="0" value="0"/>
|
||||
<ctl name="Sidetone Biquad0" id="1" value="0"/>
|
||||
<ctl name="Sidetone Biquad0" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad0" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad0" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad0" id="5" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="0" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="1" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="5" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="0" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="1" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="5" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="0" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="1" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="5" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="0" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="1" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="5" value="0"/>
|
||||
|
||||
<ctl name="Incall Capture Stream0" value="Off"/>
|
||||
<ctl name="Incall Capture Stream1" value="Off"/>
|
||||
<ctl name="Incall Capture Stream2" value="Off"/>
|
||||
|
||||
<!-- These two controls control the muting function of mics and sinks during the voice call. -->
|
||||
<!-- They would be enabled by HAL. -->
|
||||
<ctl name="Incall Sink Mute" value="0"/>
|
||||
<ctl name="Incall Mic Mute" value="0"/>
|
||||
|
||||
<!-- Decoder Reference Enable is controlled in aoc_control -->
|
||||
<ctl name="Decoder Reference Enable" value="0"/>
|
||||
<ctl name="LVM Enable" value="0"/>
|
||||
|
||||
<!-- sidetone dynamic control -->
|
||||
<path name="sidetone-for handset">
|
||||
<!-- 1065353216 = 0x3f800000 = 1.0 -->
|
||||
<ctl name="Sidetone Biquad0" id="0" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad0" id="1" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad0" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad0" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad0" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad0" id="5" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="0" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad1" id="1" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad1" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad1" id="5" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="0" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad2" id="1" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad2" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad2" id="5" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="0" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad3" id="1" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad3" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad3" id="5" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="0" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad4" id="1" value="1065353216"/>
|
||||
<ctl name="Sidetone Biquad4" id="2" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="3" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="4" value="0"/>
|
||||
<ctl name="Sidetone Biquad4" id="5" value="0"/>
|
||||
<ctl name="Sidetone EQ Stage Number" value="5"/>
|
||||
<ctl name="Sidetone Volume" value="-90"/>
|
||||
<ctl name="Sidetone Enable" value="1"/>
|
||||
</path>
|
||||
|
||||
<!-- audio playback dynamic route -->
|
||||
<path name="deep-buffer-playbackP">
|
||||
<ctl name="TDM_0_RX Mixer EP6" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="deep-buffer-playbackP hac-handset">
|
||||
</path>
|
||||
|
||||
<path name="deep-buffer-playbackP bt">
|
||||
<ctl name="BT_RX Mixer EP6" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="deep-buffer-playbackP usb-headphone">
|
||||
<ctl name="USB_RX Mixer EP6" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="deep-buffer-playbackP hearing-aid">
|
||||
</path>
|
||||
|
||||
<path name="low-latency-playbackP">
|
||||
<ctl name="TDM_0_RX Mixer EP2" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="low-latency-playbackP hac-handset">
|
||||
</path>
|
||||
|
||||
<path name="low-latency-playbackP bt">
|
||||
<ctl name="BT_RX Mixer EP2" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="low-latency-playbackP usb-headphone">
|
||||
<ctl name="USB_RX Mixer EP2" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="low-latency-playbackP hearing-aid">
|
||||
</path>
|
||||
|
||||
<path name="raw-playbackP">
|
||||
<ctl name="TDM_0_RX Mixer RAW" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="raw-playbackP hac-handset">
|
||||
</path>
|
||||
|
||||
<path name="raw-playbackP usb-headphone">
|
||||
<ctl name="USB_RX Mixer RAW" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="raw-playbackP hearing-aid">
|
||||
</path>
|
||||
|
||||
<path name="raw-playbackP bt">
|
||||
<ctl name="BT_RX Mixer RAW" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="mmap-playbackP">
|
||||
<ctl name="TDM_0_RX Mixer EP1" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="mmap-playbackP hac-handset">
|
||||
</path>
|
||||
|
||||
<path name="mmap-playbackP usb-headphone">
|
||||
<ctl name="USB_RX Mixer EP1" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="mmap-playbackP bt">
|
||||
<ctl name="BT_RX Mixer EP1" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="mmap-playbackP hearing-aid">
|
||||
</path>
|
||||
|
||||
<path name="compress-offload-playback">
|
||||
<ctl name="LVM Enable" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="compress-offload-playbackP">
|
||||
<path name="compress-offload-playback" />
|
||||
<ctl name="TDM_0_RX Mixer EP7" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="compress-offload-playbackP hac-handset">
|
||||
<path name="compress-offload-playback" />
|
||||
</path>
|
||||
|
||||
<path name="compress-offload-playbackP bt">
|
||||
<path name="compress-offload-playback" />
|
||||
<ctl name="BT_RX Mixer EP7" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="compress-offload-playbackP usb-headphone">
|
||||
<path name="compress-offload-playback" />
|
||||
<ctl name="USB_RX Mixer EP7" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="compress-offload-playbackP hearing-aid">
|
||||
<path name="compress-offload-playback" />
|
||||
</path>
|
||||
|
||||
<path name="immersive-playbackP">
|
||||
<ctl name="TDM_0_RX Mixer IMSV" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="immersive-playbackP bt">
|
||||
<ctl name="BT_RX Mixer IMSV" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="immersive-playbackP usb-headphone">
|
||||
<ctl name="USB_RX Mixer IMSV" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voip-playbackP">
|
||||
<ctl name="TDM_0_RX Mixer VOIP" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voip-playbackP hac-handset">
|
||||
</path>
|
||||
|
||||
<path name="voip-playbackP bt">
|
||||
<ctl name="BT_RX Mixer VOIP" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voip-playbackP usb-headphone">
|
||||
<ctl name="USB_RX Mixer VOIP" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voip-playbackP hearing-aid">
|
||||
</path>
|
||||
|
||||
<path name="haptic-audioP">
|
||||
<ctl name="TDM_0_RX Mixer EP3" value="1"/>
|
||||
<ctl name="TDM_0_RX Mixer EP8" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="haptic-audioP hac-handset">
|
||||
</path>
|
||||
|
||||
<path name="haptic-audioP bt">
|
||||
<ctl name="BT_RX Mixer EP3" value="1"/>
|
||||
<ctl name="TDM_0_RX Mixer EP8" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="haptic-audioP usb-headphone">
|
||||
<ctl name="USB_RX Mixer EP3" value="1"/>
|
||||
<ctl name="TDM_0_RX Mixer EP8" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="hifi-playbackP">
|
||||
</path>
|
||||
|
||||
<path name="hifi-playbackP usb-headphone">
|
||||
<ctl name="USB_RX Mixer HIFI" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="hifi-recordC">
|
||||
</path>
|
||||
|
||||
<path name="hifi-recordC usb-headset-mic">
|
||||
</path>
|
||||
|
||||
<!-- audio capture dynamic route -->
|
||||
<path name="ultrasound-recordC">
|
||||
<ctl name="EP5 TX Mixer INTERNAL_MIC_US_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="audio-recordC">
|
||||
<ctl name="EP1 TX Mixer INTERNAL_MIC_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="audio-recordC usb-headset-mic">
|
||||
<ctl name="EP1 TX Mixer USB_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="audio-recordC bt-mic">
|
||||
<ctl name="EP1 TX Mixer BT_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voip-recordC">
|
||||
<ctl name="VOIP TX Mixer INTERNAL_MIC_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voip-recordC usb-headset-mic">
|
||||
<ctl name="VOIP TX Mixer USB_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voip-recordC bt-mic">
|
||||
<ctl name="VOIP TX Mixer BT_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<!-- voice-call dynamic route -->
|
||||
<path name="voice-callP">
|
||||
<ctl name="TDM_0_RX Mixer EP5" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callP bt">
|
||||
<ctl name="BT_RX Mixer EP5" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callP usb-headphone">
|
||||
<ctl name="USB_RX Mixer EP5" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callP hearing-aid">
|
||||
<ctl name="INCALL_RX Mixer EP5" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callP call-screen">
|
||||
<ctl name="INCALL_RX Mixer EP5" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callC">
|
||||
<ctl name="EP4 TX Mixer INTERNAL_MIC_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callC usb-headset-mic">
|
||||
<ctl name="EP4 TX Mixer USB_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callC bt-mic">
|
||||
<ctl name="EP4 TX Mixer BT_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callC hearing-aid">
|
||||
<ctl name="EP4 TX Mixer INCALL_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-callC call-screen">
|
||||
<ctl name="EP4 TX Mixer INCALL_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="hostless-ulC spk-vi">
|
||||
<ctl name="NoHost1 TX Mixer TDM_0_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="telephony-rx-captureC">
|
||||
<ctl name="Incall Capture Stream0" value="DL"/>
|
||||
</path>
|
||||
|
||||
<path name="incall-capture1C uplink">
|
||||
<ctl name="Incall Capture Stream1" value="UL"/>
|
||||
</path>
|
||||
|
||||
<path name="incall-capture1C downlink">
|
||||
<ctl name="Incall Capture Stream1" value="DL"/>
|
||||
</path>
|
||||
|
||||
<path name="incall-capture1C call">
|
||||
<ctl name="Incall Capture Stream1" value="UL_DL"/>
|
||||
</path>
|
||||
|
||||
<path name="incall-capture2C uplink">
|
||||
<ctl name="Incall Capture Stream2" value="UL"/>
|
||||
</path>
|
||||
|
||||
<path name="incall-capture2C downlink">
|
||||
<ctl name="Incall Capture Stream2" value="DL"/>
|
||||
</path>
|
||||
|
||||
<path name="incall-capture2C call">
|
||||
<ctl name="Incall Capture Stream2" value="UL_DL"/>
|
||||
</path>
|
||||
|
||||
<path name="low-latency-recordC">
|
||||
<ctl name="EP3 TX Mixer INTERNAL_MIC_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="low-latency-recordC usb-headset-mic">
|
||||
<ctl name="EP3 TX Mixer USB_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="low-latency-recordC bt-mic">
|
||||
<ctl name="EP3 TX Mixer BT_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="mmap-recordC">
|
||||
<ctl name="EP2 TX Mixer INTERNAL_MIC_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="mmap-recordC usb-headset-mic">
|
||||
<ctl name="EP2 TX Mixer USB_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="mmap-recordC bt-mic">
|
||||
<ctl name="EP2 TX Mixer BT_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<!-- codec setting -->>
|
||||
<!-- Rx device -->
|
||||
<path name="handset">
|
||||
<ctl name="PCM Source" value="ASP"/>
|
||||
<ctl name="AMP PCM Gain" value="6"/>
|
||||
<ctl name="Main AMP Enable Switch" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-handset">
|
||||
<ctl name="Boost Peak Current Limit" value="3.50A"/>
|
||||
<ctl name="PCM Source" value="ASP"/>
|
||||
<ctl name="AMP PCM Gain" value="7"/>
|
||||
<ctl name="Main AMP Enable Switch" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-hac">
|
||||
<path name="voice-handset"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-hac-handset">
|
||||
</path>
|
||||
|
||||
<path name="speaker">
|
||||
<ctl name="Boost Peak Current Limit" value="2.50A"/>
|
||||
<ctl name="R Boost Peak Current Limit" value="2.50A"/>
|
||||
<ctl name="Main AMP Enable Switch" value="1"/>
|
||||
<ctl name="R Main AMP Enable Switch" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="speaker-post">
|
||||
<!-- load Bypass FIR -->
|
||||
<!--ctl name="Fast Use Case Delta File" value="fast_switch3.txt" />
|
||||
<ctl name="Fast Use Case Switch Enable" value="1" />
|
||||
<ctl name="R Fast Use Case Delta File" value="fast_switch4.txt" />
|
||||
<ctl name="R Fast Use Case Switch Enable" value="1" /-->
|
||||
</path>
|
||||
|
||||
<path name="voice-speaker">
|
||||
<ctl name="R Boost Peak Current Limit" value="3.50A"/>
|
||||
<ctl name="Boost Peak Current Limit" value="3.50A"/>
|
||||
<ctl name="ASPTX1 Slot Position" value="1"/>
|
||||
<ctl name="R ASPTX1 Slot Position" value="0"/>
|
||||
<!--<ctl name="R DSP RX2 Source" value="ASPRX2"/>-->
|
||||
<ctl name="R Main AMP Enable Switch" value="1"/>
|
||||
<ctl name="Main AMP Enable Switch" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-speaker-post">
|
||||
<!-- load Enable FIR -->
|
||||
<!--ctl name="Fast Use Case Delta File" value="fast_switch1.txt" />
|
||||
<ctl name="Fast Use Case Switch Enable" value="1" />
|
||||
<ctl name="R Fast Use Case Delta File" value="fast_switch2.txt" />
|
||||
<ctl name="R Fast Use Case Switch Enable" value="1" />
|
||||
<ctl name="Digital PCM Volume" value="800"/-->
|
||||
</path>
|
||||
|
||||
<path name="voice-dual-speaker">
|
||||
<!-- Speaker Separation -->
|
||||
<path name="voice-speaker" />
|
||||
<path name="voice-speaker-post" />
|
||||
</path>
|
||||
|
||||
<path name="speaker-safe">
|
||||
<ctl name="R Boost Peak Current Limit" value="3.50A"/>
|
||||
<ctl name="R Main AMP Enable Switch" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="speaker-safe-post">
|
||||
<!-- load Bypass FIR -->
|
||||
<!--ctl name="R Fast Use Case Delta File" value="fast_switch4.txt" />
|
||||
<ctl name="R Fast Use Case Switch Enable" value="1" /-->
|
||||
</path>
|
||||
|
||||
<path name="usb-tty-full">
|
||||
</path>
|
||||
|
||||
<path name="usb-tty-hco">
|
||||
</path>
|
||||
|
||||
<path name="usb-tty-vco">
|
||||
</path>
|
||||
|
||||
<!-- Tx device -->
|
||||
<path name="handset-mic">
|
||||
<ctl name="Mic Spatial Module Enable" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="handset-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="22"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-handset-mic">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
<ctl name="MIC HW Gain At High Power Mode (cB)" value="130"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-handset-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0"/>
|
||||
</path>
|
||||
|
||||
<path name="speaker-mic">
|
||||
<ctl name="Mic Spatial Module Enable" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="speaker-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="22"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-speaker-mic">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
<ctl name="MIC HW Gain At High Power Mode (cB)" value="130"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-speaker-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0"/>
|
||||
</path>
|
||||
|
||||
<path name="camcorder-mic">
|
||||
<ctl name="Mic Spatial Module Enable" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="camcorder-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-recog-mic">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-recog-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="22"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-recog-aec-mic">
|
||||
<ctl name="Audio Capture Eraser Enable" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
<ctl name="Audio Capture Mic Source" value="ERASER"/>
|
||||
</path>
|
||||
|
||||
<path name="voice-recog-aec-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0"/>
|
||||
</path>
|
||||
|
||||
<path name="unprocessed-mic">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="unprocessed-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="5"/>
|
||||
</path>
|
||||
|
||||
<path name="unprocessed-dual-mic">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="unprocessed-dual-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="5"/>
|
||||
</path>
|
||||
|
||||
<path name="unprocessed-triple-mic">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="MIC DC Blocker" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="unprocessed-triple-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="5"/>
|
||||
</path>
|
||||
|
||||
<path name="ultrasound-mic">
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="2" value="-1"/>
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
</path>
|
||||
|
||||
<path name="ultrasound-mic-post">
|
||||
</path>
|
||||
|
||||
<path name="bt-mic">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="Audio Capture Mic Source" value="BT_MIC"/>
|
||||
<ctl name="Voice Call Mic Source" value="BT_MIC"/>
|
||||
</path>
|
||||
|
||||
<path name="bt-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0"/>
|
||||
</path>
|
||||
|
||||
<path name="usb-headset-mic">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2"/>
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1"/>
|
||||
<ctl name="Audio Capture Mic Source" value="USB_MIC"/>
|
||||
<ctl name="Voice Call Mic Source" value="USB_MIC"/>
|
||||
</path>
|
||||
|
||||
<path name="usb-headset-mic-post">
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0"/>
|
||||
</path>
|
||||
|
||||
<!-- cs35l41 specific path to load firmware in cs35l41.c -->
|
||||
<path name="cs35l41-load-protection-firmware-start">
|
||||
<!-- Enable it after get the protection firmware -->
|
||||
<ctl name="DSP Booted" value="0" />
|
||||
<ctl name="R DSP Booted" value="0" />
|
||||
<ctl name="DSP1 Preload Switch" value="0" />
|
||||
<ctl name="R DSP1 Preload Switch" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-load-protection-firmware-end">
|
||||
<!-- Enable it after get the protection firmware -->
|
||||
<ctl name="DSP1 Preload Switch" value="1" />
|
||||
<ctl name="R DSP1 Preload Switch" value="1" />
|
||||
</path>
|
||||
<!-- cs35l41 specific path to load firmware in cs35l41.c end-->
|
||||
</mixer>
|
411
audio/akita/config/mixer_paths_factory.xml
Normal file
411
audio/akita/config/mixer_paths_factory.xml
Normal file
|
@ -0,0 +1,411 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<mixer>
|
||||
<ctl name="TDM_0_RX Mixer EP3" value="0" />
|
||||
<ctl name="TDM_0_RX Mixer EP6" value="0" />
|
||||
<ctl name="I2S_0_RX Mixer EP3" value="0" />
|
||||
<ctl name="Main AMP Enable Switch" value="0" />
|
||||
<ctl name="R Main AMP Enable Switch" value="0" />
|
||||
<ctl name="MIC HW Gain At Lower Power Mode (cB)" value="-160" />
|
||||
<ctl name="MIC HW Gain At High Power Mode (cB)" value="0" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0"/>
|
||||
|
||||
<ctl name="EP1 TX Mixer TDM_0_TX" value="0" />
|
||||
<ctl name="DEFAULT_MIC_ID" value="0" />
|
||||
<ctl name="MIC0" value="0" />
|
||||
<ctl name="MIC1" value="0" />
|
||||
<ctl name="MIC2" value="0" />
|
||||
<ctl name="MIC3" value="0" />
|
||||
<ctl name="AoC Speaker Mixer ASP Mode" value="ASP_ON" />
|
||||
|
||||
<ctl name="TDM_0_RX Mixer US" value="0" />
|
||||
<ctl name="US Record Enable" value="0" />
|
||||
<ctl name="ASPRX1 Slot Position" value="0"/>
|
||||
<ctl name="R ASPRX1 Slot Position" value="1"/>
|
||||
|
||||
<path name="mfg-playback">
|
||||
</path>
|
||||
|
||||
<path name="deep-buffer-playback speaker">
|
||||
<ctl name="AoC Speaker Mixer ASP Mode" value="ASP_BYPASS" />
|
||||
<ctl name="TDM_0_RX Mixer EP6" value="1" />
|
||||
<path name="mfg-playback" />
|
||||
</path>
|
||||
|
||||
<path name="deep-buffer-playback headphones">
|
||||
<ctl name="I2S_0_RX Mixer EP6" value="1" />
|
||||
<path name="mfg-playback" />
|
||||
</path>
|
||||
|
||||
<path name="mfg-record">
|
||||
<ctl name="EP1 TX Mixer TDM_0_TX" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="mfg-record usb-headset-mic">
|
||||
<ctl name="Audio Capture Mic Source" value="USB_MIC"/>
|
||||
<ctl name="USB Capture FORMAT v2" value="1" />
|
||||
<ctl name="USB Config To AoC v2" value="1"/>
|
||||
<ctl name="EP1 TX Mixer USB_TX" value="1"/>
|
||||
</path>
|
||||
|
||||
<path name="us-mfg-record">
|
||||
<ctl name="US Record Enable" value="1" />
|
||||
<ctl name="EP5 TX Mixer INTERNAL_MIC_US_TX" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="mic1-status">
|
||||
<ctl name="MIC0" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="mic2-status">
|
||||
<ctl name="MIC1" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="mic3-status">
|
||||
<ctl name="MIC2" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="mic1-gain">
|
||||
<ctl name="MIC HW Gain At Lower Power Mode (cB)" />
|
||||
<ctl name="MIC HW Gain At High Power Mode (cB)" />
|
||||
</path>
|
||||
|
||||
<path name="mic2-gain">
|
||||
<ctl name="MIC HW Gain At Lower Power Mode (cB)" />
|
||||
<ctl name="MIC HW Gain At High Power Mode (cB)" />
|
||||
</path>
|
||||
|
||||
<path name="mic3-gain">
|
||||
<ctl name="MIC HW Gain At Lower Power Mode (cB)" />
|
||||
<ctl name="MIC HW Gain At High Power Mode (cB)" />
|
||||
</path>
|
||||
|
||||
<path name="mic1-sw-gain">
|
||||
<ctl name="MIC Record Soft Gain (dB)" />
|
||||
</path>
|
||||
|
||||
<path name="mic2-sw-gain">
|
||||
<ctl name="MIC Record Soft Gain (dB)" />
|
||||
</path>
|
||||
|
||||
<path name="mic3-sw-gain">
|
||||
<ctl name="MIC Record Soft Gain (dB)" />
|
||||
</path>
|
||||
|
||||
<path name="usb-capture-gain">
|
||||
<ctl name="MIC Record Soft Gain (dB)" />
|
||||
</path>
|
||||
|
||||
<path name="mic1-only">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="-1" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="-1" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1" />
|
||||
<ctl name="MIC0" value="1" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="mic2-only">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="1" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="-1" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="-1" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1" />
|
||||
<ctl name="MIC1" value="1" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="mic3-only">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="2" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="-1" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="-1" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1" />
|
||||
<ctl name="MIC2" value="1" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="mic-all">
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="0" value="0" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="1" value="1" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="2" value="2" />
|
||||
<ctl name="BUILDIN MIC ID CAPTURE LIST" id="3" value="-1" />
|
||||
<ctl name="MIC0" value="1" />
|
||||
<ctl name="MIC1" value="1" />
|
||||
<ctl name="MIC2" value="1" />
|
||||
<ctl name="MIC3" value="0" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="us-mic1-only">
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="0" value="0" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="1" value="-1" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="2" value="-1" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="3" value="-1" />
|
||||
<ctl name="MIC0" value="1" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="us-mic2-only">
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="0" value="1" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="1" value="-1" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="2" value="-1" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="3" value="-1" />
|
||||
<ctl name="MIC1" value="1" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="us-mic3-only">
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="0" value="2" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="1" value="-1" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="2" value="-1" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="3" value="-1" />
|
||||
<ctl name="MIC2" value="1" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="us-mic-all">
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="0" value="0" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="1" value="1" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="2" value="2" />
|
||||
<ctl name="BUILDIN US MIC ID CAPTURE LIST" id="3" value="-1" />
|
||||
<ctl name="MIC0" value="1" />
|
||||
<ctl name="MIC1" value="1" />
|
||||
<ctl name="MIC2" value="1" />
|
||||
<ctl name="MIC3" value="0" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-us-config">
|
||||
<ctl name="ASPRX1 Slot Position" value="2"/>
|
||||
<ctl name="R ASPRX1 Slot Position" value="3"/>
|
||||
</path>
|
||||
|
||||
<path name="amp_iv-only">
|
||||
<ctl name="R ASPTX1 Slot Position" value="2" />
|
||||
<ctl name="R ASPTX2 Slot Position" value="3" />
|
||||
<ctl name="R ASPTX3 Slot Position" value="6" />
|
||||
<ctl name="R ASPTX4 Slot Position" value="7" />
|
||||
<ctl name="ASPTX1 Slot Position" value="0" />
|
||||
<ctl name="ASPTX2 Slot Position" value="1" />
|
||||
<ctl name="ASPTX3 Slot Position" value="4" />
|
||||
<ctl name="ASPTX4 Slot Position" value="5" />
|
||||
<ctl name="R ASP TX1 Source" value="VMON" />
|
||||
<ctl name="R ASP TX2 Source" value="ASPRX1" />
|
||||
<ctl name="R ASP TX3 Source" value="Zero" />
|
||||
<ctl name="R ASP TX4 Source" value="Zero" />
|
||||
<ctl name="ASP TX1 Source" value="VMON" />
|
||||
<ctl name="ASP TX2 Source" value="ASPRX1" />
|
||||
<ctl name="ASP TX3 Source" value="Zero" />
|
||||
<ctl name="ASP TX4 Source" value="Zero" />
|
||||
<ctl name="NoHost1 TX Mixer TDM_0_TX" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="amp_iv1-only">
|
||||
<ctl name="R ASPTX1 Slot Position" value="4" />
|
||||
<ctl name="R ASPTX2 Slot Position" value="5" />
|
||||
<ctl name="R ASPTX3 Slot Position" value="6" />
|
||||
<ctl name="R ASPTX4 Slot Position" value="7" />
|
||||
<ctl name="ASPTX1 Slot Position" value="0" />
|
||||
<ctl name="ASPTX2 Slot Position" value="1" />
|
||||
<ctl name="ASPTX3 Slot Position" value="2" />
|
||||
<ctl name="ASPTX4 Slot Position" value="3" />
|
||||
<ctl name="R ASP TX1 Source" value="Zero" />
|
||||
<ctl name="R ASP TX2 Source" value="Zero" />
|
||||
<ctl name="R ASP TX3 Source" value="Zero" />
|
||||
<ctl name="R ASP TX4 Source" value="Zero" />
|
||||
<ctl name="ASP TX1 Source" value="VMON" />
|
||||
<ctl name="ASP TX2 Source" value="IMON" />
|
||||
<ctl name="ASP TX3 Source" value="VPMON" />
|
||||
<ctl name="ASP TX4 Source" value="ASPRX1" />
|
||||
<ctl name="NoHost1 TX Mixer TDM_0_TX" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="amp_iv2-only">
|
||||
<ctl name="R ASPTX1 Slot Position" value="0" />
|
||||
<ctl name="R ASPTX2 Slot Position" value="1" />
|
||||
<ctl name="R ASPTX3 Slot Position" value="2" />
|
||||
<ctl name="R ASPTX4 Slot Position" value="3" />
|
||||
<ctl name="ASPTX1 Slot Position" value="4" />
|
||||
<ctl name="ASPTX2 Slot Position" value="5" />
|
||||
<ctl name="ASPTX3 Slot Position" value="6" />
|
||||
<ctl name="ASPTX4 Slot Position" value="7" />
|
||||
<ctl name="R ASP TX1 Source" value="VMON" />
|
||||
<ctl name="R ASP TX2 Source" value="IMON" />
|
||||
<ctl name="R ASP TX3 Source" value="VPMON" />
|
||||
<ctl name="R ASP TX4 Source" value="ASPRX1" />
|
||||
<ctl name="ASP TX1 Source" value="Zero" />
|
||||
<ctl name="ASP TX2 Source" value="Zero" />
|
||||
<ctl name="ASP TX3 Source" value="Zero" />
|
||||
<ctl name="ASP TX4 Source" value="Zero" />
|
||||
<ctl name="NoHost1 TX Mixer TDM_0_TX" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="us-amp_iv-only">
|
||||
<ctl name="TDM_0_RX Sample Rate" value="SR_96K" />
|
||||
<ctl name="TDM_0_TX Sample Rate" value="SR_96K" />
|
||||
<path name="amp_iv-only" />
|
||||
</path>
|
||||
|
||||
<path name="us-amp_iv1-only">
|
||||
<ctl name="TDM_0_RX Sample Rate" value="SR_96K" />
|
||||
<ctl name="TDM_0_TX Sample Rate" value="SR_96K" />
|
||||
<path name="amp_iv1-only" />
|
||||
</path>
|
||||
|
||||
<path name="us-amp_iv2-only">
|
||||
<ctl name="TDM_0_RX Sample Rate" value="SR_96K" />
|
||||
<ctl name="TDM_0_TX Sample Rate" value="SR_96K" />
|
||||
<path name="amp_iv2-only" />
|
||||
</path>
|
||||
|
||||
<path name="speaker1-status">
|
||||
<ctl name="Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="speaker2-status">
|
||||
<ctl name="R Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="speaker1-gain">
|
||||
<ctl name="AMP PCM Gain" />
|
||||
</path>
|
||||
|
||||
<path name="speaker2-gain">
|
||||
<ctl name="R AMP PCM Gain" />
|
||||
</path>
|
||||
|
||||
<path name="usb-playback-gain">
|
||||
<ctl name="Headset Playback Volume" />
|
||||
</path>
|
||||
|
||||
<path name="mfg-playback speaker">
|
||||
<ctl name="AoC Speaker Mixer ASP Mode" value="ASP_BYPASS" />
|
||||
<ctl name="TDM_0_RX Mixer EP3" value="1" />
|
||||
<ctl name="ASPRX1 Slot Position" value="0" />
|
||||
<ctl name="R ASPRX1 Slot Position" value="1" />
|
||||
<ctl name="SINK_IDS" id="0" value="0" />
|
||||
<ctl name="SINK_IDS" id="1" value="-1" />
|
||||
</path>
|
||||
|
||||
<path name="mfg-playback headphones">
|
||||
<ctl name="I2S_0_RX Chan" value="Two" />
|
||||
<ctl name="I2S_0_RX Format" value="S32_LE" />
|
||||
<ctl name="I2S_0_RX Mixer EP3" value="1" />
|
||||
<ctl name="SINK_IDS" id="0" value="1" />
|
||||
<ctl name="SINK_IDS" id="1" value="-1" />
|
||||
</path>
|
||||
|
||||
<path name="mfg-playback usb-headphones">
|
||||
<ctl name="USB Dev ID v2" value="2" />
|
||||
<ctl name="USB Playback EP ID v2" value="1" />
|
||||
<ctl name="USB Playback FORMAT v2" value="6" />
|
||||
<ctl name="USB Playback SR v2" value="48000" />
|
||||
<ctl name="USB Playback CH v2" value="2" />
|
||||
<ctl name="USB Playback BW v2" value="16" />
|
||||
<ctl name="USB Config To AoC v2" value="1" />
|
||||
<ctl name="USB_RX Mixer EP3" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="us-mfg-playback speaker">
|
||||
<path name="cs35l41-us-config" />
|
||||
<ctl name="TDM_0_RX Sample Rate" value="SR_96K" />
|
||||
<ctl name="TDM_0_TX Sample Rate" value="SR_96K" />
|
||||
<ctl name="TDM_0_RX Mixer US" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="speaker1-only">
|
||||
<ctl name="Main AMP Enable Switch" value="1" />
|
||||
<path name="mfg-playback speaker" />
|
||||
<ctl name="AMP PCM Gain" value="17" />
|
||||
<ctl name="PCM Source" value="ASP" />
|
||||
</path>
|
||||
|
||||
<path name="speaker2-only">
|
||||
<ctl name="R Main AMP Enable Switch" value="1" />
|
||||
<path name="mfg-playback speaker" />
|
||||
<ctl name="R AMP PCM Gain" value="17" />
|
||||
<ctl name="R PCM Source" value="ASP" />
|
||||
</path>
|
||||
|
||||
<path name="us-speaker1-only">
|
||||
<path name="us-mfg-playback speaker" />
|
||||
<ctl name="PCM Source" value="ASP" />
|
||||
<ctl name="Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="us-speaker2-only">
|
||||
<path name="us-mfg-playback speaker" />
|
||||
<ctl name="R PCM Source" value="ASP" />
|
||||
<ctl name="R Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="headphones">
|
||||
<ctl name="DAC1 MIXL DAC1 Switch" value="1" />
|
||||
<ctl name="DAC1 MIXR DAC1 Switch" value="1" />
|
||||
<ctl name="Stereo1 DAC MIXL DAC L1 Switch" value="1" />
|
||||
<ctl name="Stereo1 DAC MIXR DAC R1 Switch" value="1" />
|
||||
<ctl name="DAC L1 Source" value="Stereo1 DAC Mixer" />
|
||||
<ctl name="DAC R1 Source" value="Stereo1 DAC Mixer" />
|
||||
<ctl name="HPOL Playback Switch" value="1" />
|
||||
<ctl name="HPOR Playback Switch" value="1" />
|
||||
<path name="mfg-playback headphones" />
|
||||
</path>
|
||||
|
||||
<path name="speaker-all">
|
||||
<ctl name="Main AMP Enable Switch" value="1" />
|
||||
<ctl name="PCM Source" value="ASP" />
|
||||
<ctl name="R Main AMP Enable Switch" value="1" />
|
||||
<ctl name="R PCM Source" value="ASP" />
|
||||
<path name="mfg-playback speaker" />
|
||||
</path>
|
||||
|
||||
<path name="us-speaker-all">
|
||||
<path name="us-mfg-playback speaker" />
|
||||
<ctl name="PCM Source" value="ASP" />
|
||||
<ctl name="Main AMP Enable Switch" value="1" />
|
||||
<ctl name="R PCM Source" value="ASP" />
|
||||
<ctl name="R Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="loopback-mic-speaker">
|
||||
<ctl name="EP1 TX Mixer TDM_0_TX" value="1" />
|
||||
<ctl name="SINK_IDS" id="0" value="0" />
|
||||
<ctl name="SINK_IDS" id="1" value="-1" />
|
||||
<path name="mfg-playback" />
|
||||
</path>
|
||||
|
||||
<path name="loopback-mic-headphones">
|
||||
<ctl name="EP1 TX Mixer TDM_0_TX" value="1" />
|
||||
<ctl name="SINK_IDS" id="0" value="1" />
|
||||
<ctl name="SINK_IDS" id="1" value="-1" />
|
||||
<path name="mfg-playback" />
|
||||
</path>
|
||||
|
||||
<path name="loopback-mic-usb-headphones">
|
||||
<ctl name="MIC HW Gain At Lower Power Mode (cB)" value="-160" />
|
||||
<ctl name="MIC HW Gain At High Power Mode (cB)" value="0" />
|
||||
<ctl name="TDM_0_TX Format" value="S32_LE" />
|
||||
<ctl name="TDM_0_TX Chan" value="One" />
|
||||
<ctl name="EP1 TX Mixer TDM_0_TX" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="loopback-usb-mic-speaker">
|
||||
<ctl name="Audio Capture Mic Source" value="USB_MIC" />
|
||||
<ctl name="USB Capture FORMAT v2" value="1" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<path name="loopback-usb-mic-usb-headphone">
|
||||
<ctl name="Audio Capture Mic Source" value="USB_MIC" />
|
||||
<ctl name="USB Capture FORMAT v2" value="1" />
|
||||
<ctl name="MIC Record Soft Gain (dB)" value="0" />
|
||||
</path>
|
||||
|
||||
<pcm_id name="loopback-mic1" value="EP1 capture (*)"/>
|
||||
<pcm_id name="loopback-mic2" value="EP1 capture (*)"/>
|
||||
<pcm_id name="loopback-mic3" value="EP1 capture (*)"/>
|
||||
<pcm_id name="loopback-speaker1" value="EP3 playback (*)"/>
|
||||
<pcm_id name="loopback-speaker2" value="EP3 playback (*)"/>
|
||||
<pcm_id name="loopback-headphones" value="EP3 playback (*)"/>
|
||||
<pcm_id name="loopback-usb-headphones" value="EP3 playback (*)"/>
|
||||
<pcm_id name="loopback-usb-mic" value="EP1 capture (*)"/>
|
||||
<pcm_id name="loopback-amp_iv" value="nohost1 capture (*)"/>
|
||||
</mixer>
|
33
audio/akita/config/sound_trigger_configuration.xml
Normal file
33
audio/akita/config/sound_trigger_configuration.xml
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- Copyright (c) 2020, The Linux Foundation. All rights reserved. -->
|
||||
<!-- -->
|
||||
<!-- Redistribution and use in source and binary forms, with or without -->
|
||||
<!-- modification, are permitted provided that the following conditions are -->
|
||||
<!-- met: -->
|
||||
<!-- * Redistributions of source code must retain the above copyright -->
|
||||
<!-- notice, this list of conditions and the following disclaimer. -->
|
||||
<!-- * Redistributions in binary form must reproduce the above -->
|
||||
<!-- copyright notice, this list of conditions and the following -->
|
||||
<!-- disclaimer in the documentation and/or other materials provided -->
|
||||
<!-- with the distribution. -->
|
||||
<!-- * Neither the name of The Linux Foundation nor the names of its -->
|
||||
<!-- contributors may be used to endorse or promote products derived -->
|
||||
<!-- from this software without specific prior written permission. -->
|
||||
<!-- -->
|
||||
<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
|
||||
<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
|
||||
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
|
||||
<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
|
||||
<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
|
||||
<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
|
||||
<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
|
||||
<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
|
||||
<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
|
||||
<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
|
||||
<sound_trigger_hal_configuration>
|
||||
<supported_model>
|
||||
<model name="CLIENT_HOTWORD" uuid="7038ddc8-30f2-11e6-b0ac-40a8f03d3f15" model_type="keyphrase" bargein="true"/>
|
||||
<model name="CLIENT_AMBIENT_MUSIC" uuid="9f6ad62a-1f0b-11e7-87c5-40a8f03d3f15" model_type="generic" bargein="false"/>
|
||||
<model name="CLIENT_AMBIENT_MUSIC_BREAK" uuid="12caddb1-acdb-4dce-8cb0-2e95a2313aee" model_type="generic" bargein="false"/>
|
||||
</supported_model>
|
||||
</sound_trigger_hal_configuration>
|
307
audio/akita/cs35l41/crus_sp_cal_mixer_paths.xml
Normal file
307
audio/akita/cs35l41/crus_sp_cal_mixer_paths.xml
Normal file
|
@ -0,0 +1,307 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<!-- Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. -->
|
||||
<!-- -->
|
||||
<!-- Redistribution and use in source and binary forms, with or without -->
|
||||
<!-- modification, are permitted provided that the following conditions are -->
|
||||
<!-- met: -->
|
||||
<!-- * Redistributions of source code must retain the above copyright -->
|
||||
<!-- notice, this list of conditions and the following disclaimer. -->
|
||||
<!-- * Redistributions in binary form must reproduce the above -->
|
||||
<!-- copyright notice, this list of conditions and the following -->
|
||||
<!-- disclaimer in the documentation and/or other materials provided -->
|
||||
<!-- with the distribution. -->
|
||||
<!-- * Neither the name of The Linux Foundation nor the names of its -->
|
||||
<!-- contributors may be used to endorse or promote products derived -->
|
||||
<!-- from this software without specific prior written permission. -->
|
||||
<!-- -->
|
||||
<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -->
|
||||
<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -->
|
||||
<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -->
|
||||
<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -->
|
||||
<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -->
|
||||
<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -->
|
||||
<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -->
|
||||
<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -->
|
||||
<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -->
|
||||
<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -->
|
||||
<mixer>
|
||||
<!-- Initial Values -->
|
||||
<!-- Preload Stage -->
|
||||
<ctl name="Main AMP Enable Switch" value="0" />
|
||||
<ctl name="DSP1 Preload Switch" value="0" />
|
||||
<ctl name="R Main AMP Enable Switch" value="0" />
|
||||
<ctl name="R DSP1 Preload Switch" value="0" />
|
||||
<!-- Clock-trigger Stage -->
|
||||
<ctl name="SINK_IDS" id="0" value="-1"/>
|
||||
<ctl name="SINK_IDS" id="1" value="-1"/>
|
||||
<ctl name="PCM Playback Volume" value="10"/>
|
||||
<ctl name="TDM_0_RX Mixer EP6" value="0"/>
|
||||
|
||||
<!-- Preparation Stage -->
|
||||
<path name="crus-switch-fw-prepare">
|
||||
<ctl name="DRE DRE Switch" value="1" />
|
||||
<ctl name="VBSTMON Output Switch" value="1" />
|
||||
<ctl name="DSP Booted" value="0" />
|
||||
<ctl name="DSP1 Preload Switch" value="0" />
|
||||
<ctl name="R DRE DRE Switch" value="1" />
|
||||
<ctl name="R VBSTMON Output Switch" value="1" />
|
||||
<ctl name="R DSP Booted" value="0" />
|
||||
<ctl name="R DSP1 Preload Switch" value="0" />
|
||||
</path>
|
||||
|
||||
<!-- Preload Stage -->
|
||||
<path name="crus-fw-preload">
|
||||
<ctl name="DSP1 Preload Switch" value="1" />
|
||||
<ctl name="R DSP1 Preload Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<!-- Firmware-switching Stage -->
|
||||
<path name="crus-switch-fw-Calibration">
|
||||
<ctl name="AMP PCM Gain" value="17" />
|
||||
<ctl name="Digital PCM Volume" value="817" />
|
||||
<ctl name="PCM Source" value="DSP" />
|
||||
<ctl name="DSP1 Firmware" value="Calibration" />
|
||||
<ctl name="R AMP PCM Gain" value="17" />
|
||||
<ctl name="R Digital PCM Volume" value="817" />
|
||||
<ctl name="R PCM Source" value="DSP" />
|
||||
<ctl name="R DSP1 Firmware" value="Calibration" />
|
||||
</path>
|
||||
|
||||
<path name="crus-switch-fw-Diagnostic">
|
||||
<ctl name="AMP PCM Gain" value="17" />
|
||||
<ctl name="Digital PCM Volume" value="817" />
|
||||
<ctl name="PCM Source" value="DSP" />
|
||||
<ctl name="DSP1 Firmware" value="Diagnostic" />
|
||||
<ctl name="R AMP PCM Gain" value="17" />
|
||||
<ctl name="R Digital PCM Volume" value="817" />
|
||||
<ctl name="R PCM Source" value="DSP" />
|
||||
<ctl name="R DSP1 Firmware" value="Diagnostic" />
|
||||
</path>
|
||||
|
||||
<path name="crus-switch-fw-Protection">
|
||||
<ctl name="PCM Source" value="DSP" />
|
||||
<ctl name="DSP1 Firmware" value="Protection" />
|
||||
<ctl name="R PCM Source" value="DSP" />
|
||||
<ctl name="R DSP1 Firmware" value="Protection" />
|
||||
</path>
|
||||
|
||||
<!-- DSP-initialization Stage -->
|
||||
<path name="crus-dsp-pre-calibration-amp1">
|
||||
<ctl name="Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="crus-dsp-pre-calibration-amp2">
|
||||
<ctl name="R Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="crus-dsp-pre-calibration">
|
||||
<path name="crus-dsp-pre-calibration-amp1" />
|
||||
<path name="crus-dsp-pre-calibration-amp2" />
|
||||
</path>
|
||||
|
||||
<path name="crus-dsp-pre-diagnostic-amp1">
|
||||
<ctl name="Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="crus-dsp-pre-diagnostic-amp2">
|
||||
<ctl name="R Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<path name="crus-dsp-pre-diagnostic">
|
||||
<path name="crus-dsp-pre-diagnostic-amp1" />
|
||||
<path name="crus-dsp-pre-diagnostic-amp2" />
|
||||
</path>
|
||||
|
||||
<path name="crus-dsp-pre-protection">
|
||||
<ctl name="Main AMP Enable Switch" value="1" />
|
||||
<ctl name="R Main AMP Enable Switch" value="1" />
|
||||
</path>
|
||||
|
||||
<!-- Clock-trigger Stage -->
|
||||
<path name="platform-controls">
|
||||
<ctl name="PCM Playback Volume" value="1000"/>
|
||||
<ctl name="SINK_IDS" id="0" value="0"/>
|
||||
<ctl name="SINK_IDS" id="1" value="-1"/>
|
||||
<ctl name="TDM_0_RX Mixer EP6" value="1"/>
|
||||
</path>
|
||||
|
||||
<!-- Post loaded firmware -->
|
||||
<path name="crus-dsp-post-loading-fw">
|
||||
<ctl name="Main AMP Enable Switch" value="0" />
|
||||
<ctl name="R Main AMP Enable Switch" value="0" />
|
||||
</path>
|
||||
|
||||
<!-- Value & Information Fetch Stage -->
|
||||
<path name="platform-values">
|
||||
<ctl name="TDM_0_RX Format" />
|
||||
<ctl name="TDM_0_RX Chan" />
|
||||
<ctl name="TDM_0_RX Sample Rate" />
|
||||
<ctl name="PCM Playback Volume" />
|
||||
<ctl name="TDM_0_RX Mixer EP6" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-values">
|
||||
<ctl name="DRE DRE Switch" />
|
||||
<ctl name="R DRE DRE Switch" />
|
||||
<ctl name="VBSTMON Output Switch" />
|
||||
<ctl name="R VBSTMON Output Switch" />
|
||||
<ctl name="AMP PCM Gain" />
|
||||
<ctl name="R AMP PCM Gain" />
|
||||
<ctl name="Digital PCM Volume" />
|
||||
<ctl name="R Digital PCM Volume" />
|
||||
<ctl name="PCM Source" />
|
||||
<ctl name="R PCM Source" />
|
||||
<ctl name="DSP Booted" />
|
||||
<ctl name="R DSP Booted" />
|
||||
<ctl name="Main AMP Enable Switch" />
|
||||
<ctl name="R Main AMP Enable Switch" />
|
||||
<ctl name="DSP1 Preload Switch" />
|
||||
<ctl name="R DSP1 Preload Switch" />
|
||||
<ctl name="DSP1 Firmware" />
|
||||
<ctl name="R DSP1 Firmware" />
|
||||
</path>
|
||||
|
||||
|
||||
<!-- Note that the order of controls does matter because
|
||||
it should be matched to the structure defined in
|
||||
sp_cal_common.h -->
|
||||
<!--
|
||||
struct calibration_data {
|
||||
unsigned int cal_r;
|
||||
unsigned int cal_status;
|
||||
unsigned int cal_checksum;
|
||||
unsigned int cal_ambient;
|
||||
unsigned int amp_pcm_gain;
|
||||
unsigned int digital_pcm_gain;
|
||||
};
|
||||
-->
|
||||
<path name="cs35l41-dsp-amp1-calibration-values">
|
||||
<ctl name="DSP1 Calibration cd CAL_R" />
|
||||
<ctl name="DSP1 Calibration cd CAL_STATUS" />
|
||||
<ctl name="DSP1 Calibration cd CAL_CHECKSUM" />
|
||||
<ctl name="DSP1 Calibration cd CAL_AMBIENT" />
|
||||
<ctl name="AMP PCM Gain" />
|
||||
<ctl name="Digital PCM Volume" />
|
||||
|
||||
<!-- Only for debug print -->
|
||||
<ctl name="DSP1 Calibration cd CAL_SET_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp2-calibration-values">
|
||||
<ctl name="R DSP1 Calibration cd CAL_R" />
|
||||
<ctl name="R DSP1 Calibration cd CAL_STATUS" />
|
||||
<ctl name="R DSP1 Calibration cd CAL_CHECKSUM" />
|
||||
<ctl name="R DSP1 Calibration cd CAL_AMBIENT" />
|
||||
<ctl name="R AMP PCM Gain" />
|
||||
<ctl name="R Digital PCM Volume" />
|
||||
|
||||
<!-- Only for debug print -->
|
||||
<ctl name="R DSP1 Calibration cd CAL_SET_STATUS" />
|
||||
</path>
|
||||
|
||||
<!--
|
||||
struct diagnostic_data {
|
||||
struct calibration_data calibration_data;
|
||||
unsigned int z_low_diff;
|
||||
unsigned int diag_f0;
|
||||
unsigned int diag_f0_status;
|
||||
};
|
||||
-->
|
||||
<path name="cs35l41-dsp-amp1-diagnostic-values">
|
||||
<!-- struct calibration_data START -->
|
||||
<ctl name="DSP1 Diagnostic cd CAL_R" />
|
||||
<ctl name="DSP1 Diagnostic cd CAL_STATUS" />
|
||||
<ctl name="DSP1 Diagnostic cd CAL_CHECKSUM" />
|
||||
<ctl name="DSP1 Diagnostic cd CAL_AMBIENT" />
|
||||
<ctl name="AMP PCM Gain" />
|
||||
<ctl name="Digital PCM Volume" />
|
||||
<!-- struct calibration_data END -->
|
||||
<ctl name="DSP1 Diagnostic cd DIAG_Z_LOW_DIFF" />
|
||||
<ctl name="DSP1 Diagnostic cd DIAG_F0" />
|
||||
<ctl name="DSP1 Diagnostic cd DIAG_F0_STATUS" />
|
||||
|
||||
<!-- Only for debug print -->
|
||||
<ctl name="DSP1 Diagnostic cd CAL_SET_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp2-diagnostic-values">
|
||||
<!-- struct calibration_data START -->
|
||||
<ctl name="R DSP1 Diagnostic cd CAL_R" />
|
||||
<ctl name="R DSP1 Diagnostic cd CAL_STATUS" />
|
||||
<ctl name="R DSP1 Diagnostic cd CAL_CHECKSUM" />
|
||||
<ctl name="R DSP1 Diagnostic cd CAL_AMBIENT" />
|
||||
<ctl name="R AMP PCM Gain" />
|
||||
<ctl name="R Digital PCM Volume" />
|
||||
<!-- struct calibration_data END -->
|
||||
<ctl name="R DSP1 Diagnostic cd DIAG_Z_LOW_DIFF" />
|
||||
<ctl name="R DSP1 Diagnostic cd DIAG_F0" />
|
||||
<ctl name="R DSP1 Diagnostic cd DIAG_F0_STATUS" />
|
||||
|
||||
<!-- Only for debug print -->
|
||||
<ctl name="R DSP1 Diagnostic cd CAL_SET_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp1-protection-values">
|
||||
<!-- struct calibration_data START -->
|
||||
<ctl name="DSP1 Protection cd CAL_R" />
|
||||
<ctl name="DSP1 Protection cd CAL_STATUS" />
|
||||
<ctl name="DSP1 Protection cd CAL_CHECKSUM" />
|
||||
<ctl name="DSP1 Protection cd CAL_AMBIENT" />
|
||||
|
||||
<!-- These controls are unrelated so we can simply
|
||||
skip them
|
||||
<ctl name="AMP PCM Gain" />
|
||||
<ctl name="Digital PCM Volume" />
|
||||
-->
|
||||
<!-- struct calibration_data END -->
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp2-protection-values">
|
||||
<!-- struct calibration_data START -->
|
||||
<ctl name="R DSP1 Protection cd CAL_R" />
|
||||
<ctl name="R DSP1 Protection cd CAL_STATUS" />
|
||||
<ctl name="R DSP1 Protection cd CAL_CHECKSUM" />
|
||||
<ctl name="R DSP1 Protection cd CAL_AMBIENT" />
|
||||
|
||||
<!-- These controls are unrelated so we can simply
|
||||
skip them
|
||||
<ctl name="R AMP PCM Gain" />
|
||||
<ctl name="R Digital PCM Volume" />
|
||||
-->
|
||||
<!-- struct calibration_data END -->
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp1-calibration-completion">
|
||||
<ctl name="DSP1 Calibration cd CAL_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp2-calibration-completion">
|
||||
<ctl name="R DSP1 Calibration cd CAL_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp1-protection-completion">
|
||||
<ctl name="DSP1 Protection cd CAL_SET_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp2-protection-completion">
|
||||
<ctl name="R DSP1 Protection cd CAL_SET_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp1-diagnostic-completion">
|
||||
<ctl name="DSP1 Diagnostic cd CAL_STATUS" />
|
||||
<ctl name="DSP1 Diagnostic cd DIAG_F0_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp2-diagnostic-completion">
|
||||
<ctl name="R DSP1 Diagnostic cd CAL_STATUS" />
|
||||
<ctl name="R DSP1 Diagnostic cd DIAG_F0_STATUS" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp1-enable-status">
|
||||
<ctl name="Main AMP Enable Switch" />
|
||||
</path>
|
||||
|
||||
<path name="cs35l41-dsp-amp2-enable-status">
|
||||
<ctl name="R Main AMP Enable Switch" />
|
||||
</path>
|
||||
</mixer>
|
BIN
audio/akita/cs35l41/fw/R-cs35l41-dsp1-spk-cali.bin
Normal file
BIN
audio/akita/cs35l41/fw/R-cs35l41-dsp1-spk-cali.bin
Normal file
Binary file not shown.
BIN
audio/akita/cs35l41/fw/R-cs35l41-dsp1-spk-diag.bin
Normal file
BIN
audio/akita/cs35l41/fw/R-cs35l41-dsp1-spk-diag.bin
Normal file
Binary file not shown.
BIN
audio/akita/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin
Normal file
BIN
audio/akita/cs35l41/fw/R-cs35l41-dsp1-spk-prot.bin
Normal file
Binary file not shown.
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-cali.bin
Normal file
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-cali.bin
Normal file
Binary file not shown.
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-cali.wmfw
Normal file
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-cali.wmfw
Normal file
Binary file not shown.
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-diag.bin
Normal file
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-diag.bin
Normal file
Binary file not shown.
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-diag.wmfw
Normal file
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-diag.wmfw
Normal file
Binary file not shown.
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-prot.bin
Normal file
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-prot.bin
Normal file
Binary file not shown.
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-prot.wmfw
Normal file
BIN
audio/akita/cs35l41/fw/cs35l41-dsp1-spk-prot.wmfw
Normal file
Binary file not shown.
22
audio/akita/factory-audio-tables.mk
Normal file
22
audio/akita/factory-audio-tables.mk
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Copyright (C) 2020 The Android Open-Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
AUDIO_FACTORY_TABLE_FOLDER := akita
|
||||
|
||||
# Mixer Path Configuration for Audio Factory
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/audio/$(AUDIO_FACTORY_TABLE_FOLDER)/config/mixer_paths_factory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_factory.xml
|
||||
|
298
audio/akita/tuning/bluenote/exported.xml
Normal file
298
audio/akita/tuning/bluenote/exported.xml
Normal file
File diff suppressed because one or more lines are too long
BIN
audio/akita/tuning/bluenote/recording.gatf
Normal file
BIN
audio/akita/tuning/bluenote/recording.gatf
Normal file
Binary file not shown.
284
audio/akita/tuning/bluenote/template.xml
Normal file
284
audio/akita/tuning/bluenote/template.xml
Normal file
|
@ -0,0 +1,284 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<template>
|
||||
<modules>
|
||||
<module id="2" name="Waves">
|
||||
<param id="0" max="3" name="opMode_" type="uint32"/>
|
||||
</module>
|
||||
<module id="3" name="Forte">
|
||||
<param id="0" max="3" name="opMode_" type="uint32"/>
|
||||
</module>
|
||||
<module id="5" name="Auto Gain Control">
|
||||
<param default="0" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="1" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="1" id="3" name="chMask_" type="uint32"/>
|
||||
<param id="16" name="GainApplied" type="float"/>
|
||||
<param id="17" name="idealRMS" type="float"/>
|
||||
<param id="18" name="noiseGate" type="float"/>
|
||||
<param id="19" name="minGain" type="float"/>
|
||||
<param id="20" name="maxGain" type="float"/>
|
||||
<param id="21" name="longGainAtRt" type="uint32"/>
|
||||
<param id="22" name="GainAtRt" type="uint32"/>
|
||||
<param id="23" name="rmsTav" type="uint32"/>
|
||||
</module>
|
||||
<module id="6" name="Surround Record">
|
||||
<param default="0" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="3" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="7" id="3" name="chMask_" type="uint32"/>
|
||||
<param id="16" max="1" min="0" name="alpha" type="float"/>
|
||||
<param complex="true" id="17" name="ch0_profileL" size="1024" type="float"/>
|
||||
<param complex="true" id="18" name="ch1_profileL" size="1024" type="float"/>
|
||||
<param complex="true" id="19" name="ch2_profileL" size="1024" type="float"/>
|
||||
<param complex="true" id="20" name="ch0_profileR" size="1024" type="float"/>
|
||||
<param complex="true" id="21" name="ch1_profileR" size="1024" type="float"/>
|
||||
<param complex="true" id="22" name="ch2_profileR" size="1024" type="float"/>
|
||||
<param complex="true" id="23" name="ch0_profileAZ" size="1024" type="float"/>
|
||||
<param complex="true" id="24" name="ch1_profileAZ" size="1024" type="float"/>
|
||||
<param complex="true" id="25" name="ch2_profileAZ" size="1024" type="float"/>
|
||||
<struct id="26">
|
||||
<param default="1" name="ch_gain" type="float"/>
|
||||
<param default="1" name="zoom_gain" type="float"/>
|
||||
</struct>
|
||||
<param default="0" id="27" name="ch0_assignFrom" type="int32"/>
|
||||
<param default="1" id="28" name="ch1_assignFrom" type="int32"/>
|
||||
<param default="2" id="29" name="ch2_assignFrom" type="int32"/>
|
||||
</module>
|
||||
<module id="7" name="Multi Channel IIR 2">
|
||||
<param default="0" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="3" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="1" id="3" name="chMask_" type="uint32"/>
|
||||
<param default="3" id="16" max="3" min="1" name="numOfChannel" type="uint32"/>
|
||||
<param id="17" name="coeff" size="300" type="float"/>
|
||||
<struct id="18">
|
||||
<param max="18" min="-96" name="gain" size="60" type="float"/>
|
||||
<param max="24000" min="0" name="frequency" size="60" type="uint32"/>
|
||||
<param max="200" min="0" name="qfactor" size="60" type="float"/>
|
||||
<param default="4" name="type" size="60" type="int32"/>
|
||||
</struct>
|
||||
</module>
|
||||
<module id="8" name="Multi Band DRC">
|
||||
<param default="0" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="2" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="3" id="3" name="chMask_" type="uint32"/>
|
||||
<struct id="16">
|
||||
<param default="1" max="3" min="1" name="numBand" type="uint32"/>
|
||||
<param name="IIR_LowPass1" size="5" type="float"/>
|
||||
<param name="IIR_HighPass1" size="5" type="float"/>
|
||||
<param name="IIR_LowPass2" size="5" type="float"/>
|
||||
<param name="IIR_HighPass2" size="5" type="float"/>
|
||||
</struct>
|
||||
<struct id="17">
|
||||
<param max="20" min="0" name="band0_delay_ms" type="float"/>
|
||||
<param default="5" max="20" min="0" minInclusive="false" name="band0_rms_ms" type="float"/>
|
||||
<param max="30" min="0" name="band0_gain_dB" type="float"/>
|
||||
<param max="30" min="-30" name="band0_Min_Gain_dB" type="float"/>
|
||||
<param default="1" max="3" min="1" name="band0_numOfKnee" type="uint32"/>
|
||||
<param name="band0_threadhold_dB" size="3" type="float"/>
|
||||
<param name="band0_compressRatio" size="4" type="float"/>
|
||||
<param name="band0_kneeWidth" size="3" type="float"/>
|
||||
<param name="band0_attackTime_ms" size="4" type="float"/>
|
||||
<param name="band0_releaseTime_ms" size="4" type="float"/>
|
||||
<param name="band0_hysteresis" size="4" type="float"/>
|
||||
<param max="20" min="0" name="band1_delay_ms" type="float"/>
|
||||
<param default="5" max="20" min="0" minInclusive="false" name="band1_rms_ms" type="float"/>
|
||||
<param max="30" min="0" name="band1_gain_dB" type="float"/>
|
||||
<param max="30" min="-30" name="band1_Min_Gain_dB" type="float"/>
|
||||
<param default="1" max="3" min="1" name="band1_numOfKnee" type="uint32"/>
|
||||
<param name="band1_threadhold_dB" size="3" type="float"/>
|
||||
<param name="band1_compressRatio" size="4" type="float"/>
|
||||
<param name="band1_kneeWidth" size="3" type="float"/>
|
||||
<param name="band1_attackTime_ms" size="4" type="float"/>
|
||||
<param name="band1_releaseTime_ms" size="4" type="float"/>
|
||||
<param name="band1_hysteresis" size="4" type="float"/>
|
||||
<param max="20" min="0" name="band2_delay_ms" type="float"/>
|
||||
<param default="5" max="20" min="0" minInclusive="false" name="band2_rms_ms" type="float"/>
|
||||
<param max="30" min="0" name="band2_gain_dB" type="float"/>
|
||||
<param max="30" min="-30" name="band2_Min_Gain_dB" type="float"/>
|
||||
<param default="1" max="3" min="1" name="band2_numOfKnee" type="uint32"/>
|
||||
<param name="band2_threadhold_dB" size="3" type="float"/>
|
||||
<param name="band2_compressRatio" size="4" type="float"/>
|
||||
<param name="band2_kneeWidth" size="3" type="float"/>
|
||||
<param name="band2_attackTime_ms" size="4" type="float"/>
|
||||
<param name="band2_releaseTime_ms" size="4" type="float"/>
|
||||
<param name="band2_hysteresis" size="4" type="float"/>
|
||||
</struct>
|
||||
<struct id="18">
|
||||
<param max="30" min="-30" name="limiter_gain_dB" type="float"/>
|
||||
<param max="0" min="-30" name="limiter_threadhold_dB" type="float"/>
|
||||
<param max="100" min="0" name="limiter_attackTime_ms" type="float"/>
|
||||
<param max="100" min="0" name="limiter_releaseTime_ms" type="float"/>
|
||||
</struct>
|
||||
<struct id="19">
|
||||
<param name="frequency0" type="uint32"/>
|
||||
<param name="frequency1" type="uint32"/>
|
||||
</struct>
|
||||
</module>
|
||||
<module id="11" name="Stationary Noise Suppression">
|
||||
<param default="0" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="2" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="3" id="3" name="chMask_" type="uint32"/>
|
||||
<param default="1" id="16" name="strength level" type="uint32"/>
|
||||
<param id="17" name="POWER_TIME_SMOOTH" type="float"/>
|
||||
<param id="18" name="RMS_TIME_SMOOTH" type="float"/>
|
||||
<param id="19" name="LOWER_BAND_THRESHOLD" size="129" type="float"/>
|
||||
<param id="20" name="UPPER_BAND_THRESHOLD" size="3" type="float"/>
|
||||
<param id="21" name="ATTACK_TIME" type="float"/>
|
||||
<param id="22" name="RELEASE_TIME" type="float"/>
|
||||
</module>
|
||||
<module id="14" name="Linear Gain">
|
||||
<param default="0" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="1" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="1" id="3" name="chMask_" type="uint32"/>
|
||||
<param id="16" name="Simple_gain" type="float"/>
|
||||
</module>
|
||||
<module id="17" name="Wind Noise Reduction">
|
||||
<param default="0" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="2" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="3" id="3" name="chMask_" type="uint32"/>
|
||||
<param default="450" id="16" name="DECISION_SMOOTHING_FACTOR" type="int32"/>
|
||||
<param default="50" id="17" name="DECISION_ATTACK_SMOOTHING_FACTOR" type="int32"/>
|
||||
<param default="50" id="18" name="DECISION_RELEASE_HIGH_SMOOTHING_FACTOR" type="int32"/>
|
||||
<param default="50" id="19" name="DECISION_RELEASE_LOW_SMOOTHING_FACTOR" type="int32"/>
|
||||
<param default="700" id="20" name="DECISION_RELEASE_THRESHOLD" type="int32"/>
|
||||
<param default="0" id="21" name="DECISION_RANGE_OFFSET_FACTOR" type="int32"/>
|
||||
<param default="1000" id="22" name="DECISION_RANGE_SLOPE_FACTOR" type="int32"/>
|
||||
<param default="450" id="23" name="DECISION_GAIN_SMOOTHING_FACTOR" type="int32"/>
|
||||
<param default="27" id="24" name="DECISION_DB_RANGE" type="int32"/>
|
||||
<param default="1000" id="25" name="MASTER_REDUCTION_FACTOR" type="int32"/>
|
||||
<param default="15" id="26" name="KEEP_NUM_OF_PREV_DECISIONS" type="int32"/>
|
||||
<param default="1000" id="27" name="DEC_PRE_GAIN" type="int32"/>
|
||||
<param default="16000" id="28" name="SUP_PRE_GAIN" type="int32"/>
|
||||
<param default="2" id="29" name="COHERENCE_ENABLE" type="int32"/>
|
||||
<param default="1" id="30" name="COHERENCE_START_BIN" type="int32"/>
|
||||
<param default="10" id="31" name="COHERENCE_END_BIN" type="int32"/>
|
||||
<param default="300" id="32" name="COHERENCE_THRESHOLD" type="int32"/>
|
||||
<param default="990" id="33" name="COHERENCE_FORGETTING_FACTOR" type="int32"/>
|
||||
<param default="0" id="34" name="DB_SCALING_FACTOR" type="int32"/>
|
||||
<param default="9" id="35" name="SEP_LAYER" type="int32"/>
|
||||
<param default="1" id="36" name="SP_GAIN_ENABLE" type="int32"/>
|
||||
<param default="15" id="37" name="SP_GAIN_MAX_BIN" type="int32"/>
|
||||
<param default="500" id="38" name="SP_GAIN_MIN" type="int32"/>
|
||||
<param default="200" id="39" name="SP_GAIN_TH_MIN" type="int32"/>
|
||||
<param default="450" id="40" name="SP_GAIN_TH_MAX" type="int32"/>
|
||||
<param default="800" id="41" name="SP_GAIN_SMOOTH" type="int32"/>
|
||||
<param default="3" id="42" name="SP_GAIN_FREQ_SMOOTH" type="int32"/>
|
||||
<param default="300" id="43" name="MASTER_MAX_SUP_SMOOTHING_FACTOR" type="int32"/>
|
||||
<param default="1" id="44" name="GAIN_FREQ_SMOOTH" type="int32"/>
|
||||
<param default="2" id="45" name="GMIN_CURVE_TYPE" type="int32"/>
|
||||
<param default="55" id="46" name="GMIN_LINEAR_SPLIT_MID_POINT_BINR" type="int32"/>
|
||||
<param default="330" id="47" name="GMIN_LINEAR_SPLIT_MID_POINT_VAL" type="int32"/>
|
||||
<param default="1000" id="48" name="SP_OVERSUB_RATIO" type="int32"/>
|
||||
<param default="16" id="49" name="WIND_ENERGY_EST_COMPENSATION_GAIN" type="int32"/>
|
||||
<param default="2000" id="50" name="WIND_ENERGY_CURVE_SLOPE" type="int32"/>
|
||||
<param default="300" id="51" name="WIND_ENERGY_CURVE_OFFSET" type="int32"/>
|
||||
<param default="16000" id="52" name="WIND_ENERGY_CURVE_MIN" type="int32"/>
|
||||
<param default="16000" id="53" name="WIND_ENERGY_CURVE_MAX" type="int32"/>
|
||||
<param default="900" id="54" name="WIND_ENERGY_SMOOTHING" type="int32"/>
|
||||
<param default="144" id="55" name="WIND_ENERGY_NORM_DENOM" type="int32"/>
|
||||
<param default="600" id="56" name="WIND_ENERGY_CURVE_SCALED_TH_MIN" type="int32"/>
|
||||
<param default="900" id="57" name="WIND_ENERGY_CURVE_SCALED_TH_MAX" type="int32"/>
|
||||
<param default="1" id="58" name="ENABLE_ML_COMBI_WIND_ENERGY" type="int32"/>
|
||||
<param default="1" id="59" name="ENABLE_SP_COMBI_WIND_ENERGY" type="int32"/>
|
||||
<param default="1" id="60" name="ENALBE_SP_COMBI_OVERSUBTRACTION" type="int32"/>
|
||||
<param default="1" id="61" name="ENABLE_PRIORI_SNR" type="int32"/>
|
||||
<param default="1000" id="62" name="PRIORI_SNR_ML_TUNING" type="int32"/>
|
||||
<param default="15" id="63" name="DEC_PREV_NUM" type="int32"/>
|
||||
<param default="1" id="64" name="SSC_ENABLE" type="int32"/>
|
||||
<param default="930" id="65" name="SSC_SOFT_SMOOTHING_FACTOR" type="int32"/>
|
||||
<param default="1600" id="66" name="SSC_OVERDRIVE" type="int32"/>
|
||||
<param default="3" id="67" name="SSC_MIN_FREQ" type="int32"/>
|
||||
<param default="130" id="68" name="SSC_MAX_FREQ" type="int32"/>
|
||||
<param default="700" id="69" name="SSC_PSD_SMOOTHING_FACTOR" type="int32"/>
|
||||
<param default="12" id="70" name="SSC_SOFT_DECISION_MIN_FREQ" type="int32"/>
|
||||
<param default="450" id="71" name="SSC_SOFT_DECISION_MAX_FREQ" type="int32"/>
|
||||
<param default="5" id="72" name="SSC_KEEP_SAVED_PROB_SMOOTH_SIZE" type="int32"/>
|
||||
<param default="1000" id="73" name="GAIN_BOOSTING_COST" type="int32"/>
|
||||
</module>
|
||||
<module id="18" name="Multi Channel IIR 1">
|
||||
<param default="0" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="2" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="3" id="3" name="chMask_" type="uint32"/>
|
||||
<param default="3" id="16" max="3" min="1" name="numOfChannel" type="uint32"/>
|
||||
<param id="17" name="coeff" size="300" type="float"/>
|
||||
<struct id="18">
|
||||
<param max="18" min="-96" name="gain" size="60" type="float"/>
|
||||
<param max="24000" min="0" name="frequency" size="60" type="uint32"/>
|
||||
<param max="200" min="0" name="qfactor" size="60" type="float"/>
|
||||
<param default="4" name="type" size="60" type="int32"/>
|
||||
</struct>
|
||||
</module>
|
||||
<module id="32" name="Single Band DRC">
|
||||
<param default="1" id="0" max="3" name="opMode_" type="uint32"/>
|
||||
<param default="48000" id="1" name="fs_" type="uint32"/>
|
||||
<param default="2" id="2" name="numCh_" type="uint32"/>
|
||||
<param default="3" id="3" name="chMask_" type="uint32"/>
|
||||
<struct id="16">
|
||||
<param max="20" min="0" name="delay_ms" type="float"/>
|
||||
<param default="5" max="20" min="0" minInclusive="false" name="rms_ms" type="float"/>
|
||||
<param max="30" min="0" name="gain_dB" type="float"/>
|
||||
<param max="30" min="-30" name="Min_Gain_dB" type="float"/>
|
||||
<param default="1" max="3" min="1" name="numOfKnee" type="uint32"/>
|
||||
<param name="threadhold_dB" size="3" type="float"/>
|
||||
<param name="compressRatio" size="4" type="float"/>
|
||||
<param name="kneeWidth" size="3" type="float"/>
|
||||
<param name="attackTime_ms" size="4" type="float"/>
|
||||
<param name="releaseTime_ms" size="4" type="float"/>
|
||||
<param name="hysteresis" size="4" type="float"/>
|
||||
</struct>
|
||||
<struct id="17">
|
||||
<param max="30" min="-30" name="limiter_gain_dB" type="float"/>
|
||||
<param max="0" min="-30" name="limiter_threadhold_dB" type="float"/>
|
||||
<param max="100" min="0" name="limiter_attackTime_ms" type="uint32"/>
|
||||
<param max="100" min="0" name="limiter_releaseTime_ms" type="uint32"/>
|
||||
</struct>
|
||||
</module>
|
||||
<module id="10000" name="Eraser">
|
||||
<param id="275" name="eraser_pre_gain" type="uint32"/>
|
||||
<param id="277" name="eraser_post_gain" type="uint32"/>
|
||||
<param id="279" name="non_eraser_gain" type="uint32"/>
|
||||
</module>
|
||||
<module id="10001" name="Cleaner">
|
||||
<param id="299" name="cleaner_post_gain" type="uint32"/>
|
||||
</module>
|
||||
<module id="10002" name="CHRE">
|
||||
<param id="297" name="chre_gain" type="uint32"/>
|
||||
</module>
|
||||
</modules>
|
||||
<signalflows>
|
||||
<signalflow id="1" name="Spatial Audio">
|
||||
<block id="128">
|
||||
<moduleRef id="18"/>
|
||||
<moduleRef id="17"/>
|
||||
</block>
|
||||
<block id="134">
|
||||
<moduleRef id="14"/>
|
||||
<moduleRef id="11"/>
|
||||
<moduleRef id="6"/>
|
||||
<moduleRef id="7"/>
|
||||
<moduleRef id="5"/>
|
||||
<moduleRef id="8"/>
|
||||
</block>
|
||||
</signalflow>
|
||||
<signalflow id="2" name="General Mic Recording">
|
||||
<block id="137">
|
||||
<moduleRef id="14"/>
|
||||
<moduleRef id="7"/>
|
||||
<moduleRef id="32"/>
|
||||
</block>
|
||||
</signalflow>
|
||||
<signalflow id="1000" name="Smart Feature">
|
||||
<block id="0">
|
||||
<moduleRef id="10000"/>
|
||||
<moduleRef id="10001"/>
|
||||
<moduleRef id="10002"/>
|
||||
</block>
|
||||
</signalflow>
|
||||
</signalflows>
|
||||
</template>
|
1284
audio/akita/tuning/bluenote/tuning_constraints_combination.xml
Normal file
1284
audio/akita/tuning/bluenote/tuning_constraints_combination.xml
Normal file
File diff suppressed because it is too large
Load diff
BIN
audio/akita/tuning/fortemedia/BLUETOOTH.dat
Normal file
BIN
audio/akita/tuning/fortemedia/BLUETOOTH.dat
Normal file
Binary file not shown.
56075
audio/akita/tuning/fortemedia/BLUETOOTH.mods
Normal file
56075
audio/akita/tuning/fortemedia/BLUETOOTH.mods
Normal file
File diff suppressed because it is too large
Load diff
BIN
audio/akita/tuning/fortemedia/HANDSET.dat
Normal file
BIN
audio/akita/tuning/fortemedia/HANDSET.dat
Normal file
Binary file not shown.
50735
audio/akita/tuning/fortemedia/HANDSET.mods
Normal file
50735
audio/akita/tuning/fortemedia/HANDSET.mods
Normal file
File diff suppressed because it is too large
Load diff
BIN
audio/akita/tuning/fortemedia/HANDSFREE.dat
Normal file
BIN
audio/akita/tuning/fortemedia/HANDSFREE.dat
Normal file
Binary file not shown.
18695
audio/akita/tuning/fortemedia/HANDSFREE.mods
Normal file
18695
audio/akita/tuning/fortemedia/HANDSFREE.mods
Normal file
File diff suppressed because it is too large
Load diff
BIN
audio/akita/tuning/fortemedia/HEADSET.dat
Normal file
BIN
audio/akita/tuning/fortemedia/HEADSET.dat
Normal file
Binary file not shown.
85445
audio/akita/tuning/fortemedia/HEADSET.mods
Normal file
85445
audio/akita/tuning/fortemedia/HEADSET.mods
Normal file
File diff suppressed because it is too large
Load diff
BIN
audio/akita/tuning/fortemedia/mcps.dat
Normal file
BIN
audio/akita/tuning/fortemedia/mcps.dat
Normal file
Binary file not shown.
58
audio/akita/tuning/waves/tests/test_config.ini
Normal file
58
audio/akita/tuning/waves/tests/test_config.ini
Normal file
|
@ -0,0 +1,58 @@
|
|||
########################################################################################################
|
||||
# (Optional) The supported features list for platform vendors to query from.
|
||||
# Platform vendors should call maxxaudio_qdsp_is_feature_supported with a string to query from the list.
|
||||
# This config has no effect in the MaxxAudioQdspHalController. It's only meaningful for platform vendors.
|
||||
# Putting any value other than 1 would be equivalent to not supported.
|
||||
########################################################################################################
|
||||
[HAL_SUPPORTED_FEATURES]
|
||||
CUSTOM_ACTION_256=1
|
||||
|
||||
########################################################################################################
|
||||
# This defined the options of supported sample rates.
|
||||
# This can be configured by Waves or platform vendor.
|
||||
########################################################################################################
|
||||
[HAL_SUPPORTED_SAMPLE_RATES]
|
||||
SR_COMMON = 48000
|
||||
|
||||
########################################################################################################
|
||||
# (Optional) The subtypes that applies to different angles(0, 90, 180, 270). Can be empty if not applicable.
|
||||
# This can be configured by Waves or platform vendor.
|
||||
########################################################################################################
|
||||
[HAL_ORIENTATION_SUBTYPES]
|
||||
OST_SPEAKER = 0:12,90:13,180:12,270:0|13
|
||||
|
||||
########################################################################################################
|
||||
# This defines available preset configurations.
|
||||
# This should be configured by Waves only unless platform vendor is familiar with MPS structure.
|
||||
########################################################################################################
|
||||
[HAL_SUPPORTED_PRESETS]
|
||||
SPEAKER_MUSIC = OM:1,SM:2,OST:OST_SPEAKER
|
||||
SPEAKER_SAFE_MUSIC = OM:10,SM:2,OST:OST_SPEAKER
|
||||
SPEAKER_SAFE_CALL = OM:10,SM:2,OST:OST_SPEAKER
|
||||
HEADSET_MUSIC = OM:2,SM:2
|
||||
|
||||
########################################################################################################
|
||||
# This defines available CONTROL configurations. Only define the CONTROL if you need it.
|
||||
# The numbers could vary from device to device.
|
||||
# This can be configured by Waves or platform vendor.
|
||||
########################################################################################################
|
||||
[HAL_SUPPORTED_CONTROLS]
|
||||
SPEAKER_INSTANCE = INSTANCE:1,DEV:0,SR:SR_COMMON,PRESET:SPEAKER_MUSIC|SPEAKER_SAFE_MUSIC|SPEAKER_SAFE_CALL
|
||||
A2DP_INSTANCE = INSTANCE:2,DEV:0,SR:SR_COMMON,PRESET:HEADSET_MUSIC
|
||||
USB_HEADPHONE_INSTANCE = INSTANCE:4,DEV:0,SR:SR_COMMON,PRESET:HEADSET_MUSIC
|
||||
|
||||
[COEFS_CONVERTER_SETTING]
|
||||
AlgFxPath=/vendor/lib/libAlgFx_HiFi3z.so
|
||||
AlgFxPath64=/vendor/lib64/libAlgFx_HiFi3z.so
|
||||
# do not modify the following if not necessary
|
||||
#AudioFormatType=0
|
||||
#AudioFormatChannels=2
|
||||
#AudioFormatSampleRate=48000
|
||||
#AudioFormatBitsPerSample=32
|
||||
#AudioFormatSampleSize=4
|
||||
#AudioFormatIncrement=8
|
||||
|
||||
[CUSTOM_ACTION_256]
|
||||
CASE_1=PRIORITY:0,NUMBERS:2:0|1,PRESET:SPEAKER_MUSIC
|
||||
CASE_2=PRIORITY:1,NUMBERS:1|2|4194304:2|3|4,PRESET:SPEAKER_SAFE_CALL
|
||||
CASE_3=PRIORITY:2,NUMBERS:1|4194304:0|1,PRESET:SPEAKER_SAFE_MUSIC
|
BIN
audio/akita/tuning/waves/tests/test_preset.mps
Normal file
BIN
audio/akita/tuning/waves/tests/test_preset.mps
Normal file
Binary file not shown.
64
audio/akita/tuning/waves/waves_config.ini
Normal file
64
audio/akita/tuning/waves/waves_config.ini
Normal file
|
@ -0,0 +1,64 @@
|
|||
########################################################################################################
|
||||
# (Optional) The supported features list for platform vendors to query from.
|
||||
# Platform vendors should call maxxaudio_qdsp_is_feature_supported with a string to query from the list.
|
||||
# This config has no effect in the MaxxAudioQdspHalController. It's only meaningful for platform vendors.
|
||||
# Putting any value other than 1 would be equivalent to not supported.
|
||||
########################################################################################################
|
||||
[HAL_SUPPORTED_FEATURES]
|
||||
CUSTOM_ACTION_258=1
|
||||
|
||||
########################################################################################################
|
||||
# This defined the options of supported sample rates.
|
||||
# This can be configured by Waves or platform vendor.
|
||||
########################################################################################################
|
||||
[HAL_SUPPORTED_SAMPLE_RATES]
|
||||
SR_COMMON = 48000
|
||||
|
||||
########################################################################################################
|
||||
# (Optional) The subtypes that applies to different angles(0, 90, 180, 270). Can be empty if not applicable.
|
||||
# This can be configured by Waves or platform vendor.
|
||||
########################################################################################################
|
||||
[HAL_ORIENTATION_SUBTYPES]
|
||||
OST_SPEAKER = 0:12,90:13,180:12,270:0|13
|
||||
|
||||
########################################################################################################
|
||||
# This defines available preset configurations.
|
||||
# This should be configured by Waves only unless platform vendor is familiar with MPS structure.
|
||||
########################################################################################################
|
||||
[HAL_SUPPORTED_PRESETS]
|
||||
SPEAKER_MUSIC_THROTTLE= OM:1,SM:2,OST:OST_SPEAKER
|
||||
SPEAKER_SAFE_MUSIC_THROTTLE = OM:10,SM:2,OST:OST_SPEAKER
|
||||
SPEAKER_SAFE_CALL_THROTTLE = OM:10,SM:2,OST:OST_SPEAKER
|
||||
SPEAKER_MUSIC = OM:1,SM:2,OST:OST_SPEAKER
|
||||
SPEAKER_SAFE_MUSIC = OM:10,SM:2,OST:OST_SPEAKER
|
||||
SPEAKER_SAFE_CALL = OM:10,SM:2,OST:OST_SPEAKER
|
||||
HEADSET_MUSIC = OM:2,SM:2
|
||||
|
||||
########################################################################################################
|
||||
# This defines available CONTROL configurations. Only define the CONTROL if you need it.
|
||||
# The numbers could vary from device to device.
|
||||
# This can be configured by Waves or platform vendor.
|
||||
########################################################################################################
|
||||
[HAL_SUPPORTED_CONTROLS]
|
||||
SPEAKER_INSTANCE = INSTANCE:1,DEV:0,SR:SR_COMMON,PRESET:SPEAKER_MUSIC|SPEAKER_SAFE_MUSIC|SPEAKER_SAFE_CALL|SPEAKER_MUSIC_THROTTLE|SPEAKER_SAFE_MUSIC_THROTTLE|SPEAKER_SAFE_CALL_THROTTLE
|
||||
A2DP_INSTANCE = INSTANCE:2,DEV:0,SR:SR_COMMON,PRESET:HEADSET_MUSIC
|
||||
USB_HEADPHONE_INSTANCE = INSTANCE:4,DEV:0,SR:SR_COMMON,PRESET:HEADSET_MUSIC
|
||||
|
||||
[COEFS_CONVERTER_SETTING]
|
||||
AlgFxPath=/vendor/lib/libAlgFx_HiFi3z.so
|
||||
AlgFxPath64=/vendor/lib64/libAlgFx_HiFi3z.so
|
||||
# do not modify the following if not necessary
|
||||
#AudioFormatType=0
|
||||
#AudioFormatChannels=2
|
||||
#AudioFormatSampleRate=48000
|
||||
#AudioFormatBitsPerSample=32
|
||||
#AudioFormatSampleSize=4
|
||||
#AudioFormatIncrement=8
|
||||
|
||||
[CUSTOM_ACTION_258]
|
||||
CASE_1=PRIORITY:0,NUMBERS:2:0|1:0,PRESET:SPEAKER_MUSIC
|
||||
CASE_2=PRIORITY:1,NUMBERS:1|2|4194304:2|3|4:0,PRESET:SPEAKER_SAFE_CALL
|
||||
CASE_3=PRIORITY:2,NUMBERS:1|4194304:0|1:0,PRESET:SPEAKER_SAFE_MUSIC
|
||||
CASE_4=PRIORITY:3,NUMBERS:2:0|1:4,PRESET:SPEAKER_MUSIC_THROTTLE
|
||||
CASE_5=PRIORITY:4,NUMBERS:1|2|4194304:2|3|4:4,PRESET:SPEAKER_SAFE_CALL_THROTTLE
|
||||
CASE_6=PRIORITY:5,NUMBERS:1|4194304:0|1:4,PRESET:SPEAKER_SAFE_MUSIC_THROTTLE
|
BIN
audio/akita/tuning/waves/waves_preset.mps
Normal file
BIN
audio/akita/tuning/waves/waves_preset.mps
Normal file
Binary file not shown.
7
bluetooth/bt_vendor_overlay.conf
Normal file
7
bluetooth/bt_vendor_overlay.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This is BTBCM HAL overlay configuration file.
|
||||
|
||||
# Uart port name
|
||||
UartPort = /dev/ttySAC18
|
||||
|
||||
# Sar backOff high resolution support
|
||||
SarBackOffHighResolution = true
|
1
board-info.txt
Normal file
1
board-info.txt
Normal file
|
@ -0,0 +1 @@
|
|||
require board=akita
|
83
conf/init.akita.rc
Normal file
83
conf/init.akita.rc
Normal file
|
@ -0,0 +1,83 @@
|
|||
# Akita specific init.rc
|
||||
import /vendor/etc/init/hw/init.zuma.rc
|
||||
|
||||
on init && property:ro.vendor.factory=1
|
||||
import /vendor/etc/init/hw/init.factory.rc
|
||||
|
||||
on early-boot
|
||||
# Wait for insmod_sh to finish all common modules
|
||||
wait_for_prop vendor.common.modules.ready 1
|
||||
start insmod_sh_akita
|
||||
|
||||
service insmod_sh_akita /vendor/bin/insmod.sh /vendor/etc/init.insmod.${ro.hardware}.cfg
|
||||
class main
|
||||
user root
|
||||
group root system
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:vendor.mfgapi.touchpanel.permission=1
|
||||
chmod 0600 /sys/devices/virtual/sec/tsp/cmd
|
||||
chown system system /sys/devices/virtual/sec/tsp/cmd
|
||||
|
||||
# Fingerprint
|
||||
on post-fs-data
|
||||
chown system system /dev/goodix_fp
|
||||
exec_background - system shell -- /vendor/bin/trusty_apploader /vendor/firmware/g7.app
|
||||
|
||||
# Overrides fingerprint antispoof if following persist sysprops are set
|
||||
on boot && property:ro.build.type=userdebug && \
|
||||
property:persist.vendor.fingerprint.disable.fake.override=0
|
||||
setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override}
|
||||
|
||||
on boot && property:ro.build.type=userdebug && \
|
||||
property:persist.vendor.fingerprint.disable.fake.override=1
|
||||
setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override}
|
||||
|
||||
on boot && property:ro.build.type=userdebug && \
|
||||
property:persist.vendor.fingerprint.disable.fake.override=100
|
||||
setprop vendor.fingerprint.disable.fake ${persist.vendor.fingerprint.disable.fake.override}
|
||||
|
||||
# WiFi
|
||||
on post-fs-data
|
||||
setprop wifi.direct.interface p2p-dev-wlan0
|
||||
setprop wifi.aware.interface aware_nmi0
|
||||
|
||||
# Speaker amp permission
|
||||
chmod 644 /mnt/vendor/persist/audio/speaker.cal
|
||||
|
||||
# Allow secure_element group to read / write ST33 SPI state
|
||||
chown secure_element secure_element /sys/class/st33spi/st33spi/st33spi_state
|
||||
chmod 0660 /sys/class/st33spi/st33spi/st33spi_state
|
||||
|
||||
# NFC
|
||||
on property:ro.boot.hardware.revision=PROTO1.0
|
||||
setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf
|
||||
|
||||
on property:ro.boot.hardware.revision=PROTO1.1
|
||||
setprop persist.vendor.nfc.config_file_name libnfc-hal-st-proto1.conf
|
||||
|
||||
# Bluetooth
|
||||
on post-fs-data
|
||||
chown bluetooth system /proc/bluetooth/timesync
|
||||
|
||||
# Touch
|
||||
on property:vendor.device.modules.ready=1
|
||||
chown system system /proc/focaltech_touch/Channel_Num
|
||||
chown system system /proc/focaltech_touch/FW_Version
|
||||
chown system system /proc/focaltech_touch/INT_PIN
|
||||
chown system system /proc/focaltech_touch/force_active
|
||||
chown system system /proc/focaltech_touch/Reset_Pin
|
||||
chown system system /proc/focaltech_touch/fw_grip
|
||||
chown system system /proc/focaltech_touch/fw_palm
|
||||
chown system system /proc/focaltech_touch/heatmap_onoff
|
||||
chown system system /proc/focaltech_touch/mf_mode
|
||||
chown system system /proc/focaltech_touch/selftest/Baseline
|
||||
chown system system /proc/focaltech_touch/selftest/Noise
|
||||
chown system system /proc/focaltech_touch/selftest/Panel_Differ
|
||||
chown system system /proc/focaltech_touch/selftest/Rawdata
|
||||
chown system system /proc/focaltech_touch/selftest/Rawdata_Uniformity
|
||||
chown system system /proc/focaltech_touch/selftest/Scap_CB
|
||||
chown system system /proc/focaltech_touch/selftest/Scap_Rawdata
|
||||
chown system system /proc/focaltech_touch/selftest/Short
|
||||
chown system system /proc/focaltech_touch/selftest/Strength
|
9
conf/init.recovery.device.rc
Normal file
9
conf/init.recovery.device.rc
Normal file
|
@ -0,0 +1,9 @@
|
|||
import /init.recovery.${ro.board.platform}.rc
|
||||
|
||||
# DELETE ME USB BRINGUP b/188672439. Delete the following two lines after
|
||||
# USB is brought up completely.
|
||||
on property:sys.usb.state=fastboot
|
||||
write /sys/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess 1
|
||||
|
||||
on property:sys.usb.state=adb
|
||||
write /sys/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess 1
|
183
device-akita.mk
Normal file
183
device-akita.mk
Normal file
|
@ -0,0 +1,183 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
TARGET_KERNEL_DIR ?= device/google/akita-kernel
|
||||
TARGET_BOARD_KERNEL_HEADERS := device/google/akita-kernel/kernel-headers
|
||||
|
||||
$(call inherit-product-if-exists, vendor/google_devices/akita/prebuilts/device-vendor-akita.mk)
|
||||
$(call inherit-product-if-exists, vendor/google_devices/zuma/prebuilts/device-vendor.mk)
|
||||
$(call inherit-product-if-exists, vendor/google_devices/zuma/proprietary/device-vendor.mk)
|
||||
$(call inherit-product-if-exists, vendor/google_devices/akita/proprietary/akita/device-vendor-akita.mk)
|
||||
|
||||
include device/google/zuma/device-shipping-common.mk
|
||||
include device/google/akita/audio/akita/audio-tables.mk
|
||||
include device/google/akita/vibrator/cs40l26/device-akita.mk
|
||||
include device/google/gs-common/bcmbt/bluetooth.mk
|
||||
|
||||
# go/lyric-soong-variables
|
||||
$(call soong_config_set,lyric,camera_hardware,shiba)
|
||||
$(call soong_config_set,lyric,tuning_product,shiba)
|
||||
$(call soong_config_set,google3a_config,target_device,shiba)
|
||||
|
||||
# Init files
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/conf/init.akita.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.akita.rc
|
||||
|
||||
# Recovery files
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.akita.rc
|
||||
|
||||
# insmod files
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/init.insmod.akita.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.akita.cfg
|
||||
|
||||
# Camera
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/media_profiles_akita.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
|
||||
|
||||
# NFC
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
|
||||
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
|
||||
frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
|
||||
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
|
||||
frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
|
||||
device/google/akita/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \
|
||||
device/google/akita/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
NfcNci \
|
||||
Tag \
|
||||
android.hardware.nfc-service.st
|
||||
|
||||
# SecureElement
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.secure_element@1.2-service-gto
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
|
||||
frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
|
||||
device/google/akita/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf
|
||||
|
||||
DEVICE_MANIFEST_FILE += \
|
||||
device/google/akita/nfc/manifest_se.xml
|
||||
|
||||
# Thermal Config
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/thermal_info_config_akita.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
|
||||
|
||||
# Power HAL config
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/powerhint-akita.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
|
||||
|
||||
# Bluetooth HAL
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/bluetooth/bt_vendor_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.bluetooth.a2dp_offload.supported=true \
|
||||
persist.bluetooth.a2dp_offload.disabled=false \
|
||||
persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac
|
||||
|
||||
# Bluetooth hci_inject test tool
|
||||
PRODUCT_PACKAGES_DEBUG += \
|
||||
hci_inject
|
||||
|
||||
# Bluetooth SAR test tool
|
||||
PRODUCT_PACKAGES_DEBUG += \
|
||||
sar_test
|
||||
|
||||
# Bluetooth EWP test tool
|
||||
PRODUCT_PACKAGES_DEBUG += \
|
||||
ewp_tool
|
||||
|
||||
# Bluetooth AAC VBR
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
persist.bluetooth.a2dp_aac.vbr_supported=true
|
||||
|
||||
# Spatial Audio
|
||||
PRODUCT_PACKAGES += \
|
||||
libspatialaudio \
|
||||
librondo
|
||||
|
||||
# Keymaster HAL
|
||||
#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
|
||||
|
||||
# Gatekeeper HAL
|
||||
#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software
|
||||
|
||||
|
||||
# Gatekeeper
|
||||
# PRODUCT_PACKAGES += \
|
||||
# android.hardware.gatekeeper@1.0-service.software
|
||||
|
||||
# Keymint replaces Keymaster
|
||||
# PRODUCT_PACKAGES += \
|
||||
# android.hardware.security.keymint-service
|
||||
|
||||
# Keymaster
|
||||
#PRODUCT_PACKAGES += \
|
||||
# android.hardware.keymaster@4.0-impl \
|
||||
# android.hardware.keymaster@4.0-service
|
||||
|
||||
#PRODUCT_PACKAGES += android.hardware.keymaster@4.0-service.remote
|
||||
#PRODUCT_PACKAGES += android.hardware.keymaster@4.1-service.remote
|
||||
#LOCAL_KEYMASTER_PRODUCT_PACKAGE := android.hardware.keymaster@4.1-service
|
||||
#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
|
||||
|
||||
# PRODUCT_PROPERTY_OVERRIDES += \
|
||||
# ro.hardware.keystore_desede=true \
|
||||
# ro.hardware.keystore=software \
|
||||
# ro.hardware.gatekeeper=software
|
||||
|
||||
# PowerStats HAL
|
||||
PRODUCT_SOONG_NAMESPACES += \
|
||||
device/google/akita/powerstats/akita
|
||||
|
||||
# WiFi Overlay
|
||||
PRODUCT_PACKAGES += \
|
||||
WifiOverlay2024Mid \
|
||||
PixelWifiOverlay2023
|
||||
|
||||
# Trusty liboemcrypto.so
|
||||
PRODUCT_SOONG_NAMESPACES += vendor/google_devices/akita/prebuilts
|
||||
|
||||
# Location
|
||||
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/location/gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
|
||||
else
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/location/gps_user.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
|
||||
endif
|
||||
|
||||
# Set zram size
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
vendor.zram.size=3g \
|
||||
vendor.disable.thermal.control=1 \
|
||||
persist.device_config.configuration.disable_rescue_party=true
|
||||
|
||||
# Fingerprint HAL
|
||||
GOODIX_CONFIG_BUILD_VERSION := g7_trusty
|
||||
include device/google/gs101/fingerprint/udfps_common.mk
|
||||
ifeq ($(filter factory%, $(TARGET_PRODUCT)),)
|
||||
include device/google/gs101/fingerprint/udfps_shipping.mk
|
||||
else
|
||||
include device/google/gs101/fingerprint/udfps_factory.mk
|
||||
endif
|
||||
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
persist.vendor.udfps.als_feed_forward_supported=true \
|
||||
persist.vendor.udfps.lhbm_controlled_in_hal_supported=true
|
31
factory_akita.mk
Normal file
31
factory_akita.mk
Normal file
|
@ -0,0 +1,31 @@
|
|||
#
|
||||
# Copyright 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.
|
||||
#
|
||||
|
||||
TARGET_LINUX_KERNEL_VERSION := 5.15
|
||||
|
||||
$(call inherit-product, device/google/zuma/factory_common.mk)
|
||||
$(call inherit-product, device/google/akita/device-akita.mk)
|
||||
include device/google/akita/audio/akita/factory-audio-tables.mk
|
||||
|
||||
PRODUCT_NAME := factory_akita
|
||||
PRODUCT_DEVICE := akita
|
||||
PRODUCT_MODEL := Factory build on Akita
|
||||
PRODUCT_BRAND := Android
|
||||
PRODUCT_MANUFACTURER := Google
|
||||
|
||||
# default BDADDR for EVB only
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.vendor.bluetooth.evb_bdaddr="22:22:22:33:44:55"
|
19
init.insmod.akita.cfg
Normal file
19
init.insmod.akita.cfg
Normal file
|
@ -0,0 +1,19 @@
|
|||
##########################################################
|
||||
# init.insmod.akita.cfg #
|
||||
# This file contains akita specific kernel modules #
|
||||
# to load at init time by init.insmod.sh script #
|
||||
##########################################################
|
||||
|
||||
# Load device specific kernel modules
|
||||
# Modules here will be loaded *after* all common modules
|
||||
modprobe|bcmdhd4398.ko
|
||||
modprobe|snd-soc-cs35l41-i2c.ko
|
||||
modprobe|goodix_brl_touch.ko
|
||||
modprobe|cl_dsp.ko
|
||||
modprobe|input-cs40l26-i2c.ko
|
||||
modprobe|snd-soc-cs40l26.ko
|
||||
|
||||
# All device specific modules loaded
|
||||
setprop|vendor.device.modules.ready
|
||||
setprop|vendor.all.modules.ready
|
||||
setprop|vendor.all.devices.ready
|
94
location/gps.xml
Normal file
94
location/gps.xml
Normal file
|
@ -0,0 +1,94 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >
|
||||
<hal
|
||||
PortName="/dev/ttyBCM"
|
||||
BaudRate="921600"
|
||||
GpioNStdbyPath="/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby"
|
||||
CustGpioDelayMs="250"
|
||||
LogEnabled="true"
|
||||
Log="JAVA"
|
||||
SecondaryConfigPath="/data/vendor/gps/overlay/gps_overlay.xml"
|
||||
LogDirectory="/sdcard/gps/broadcom/storage/"
|
||||
CtrlPipe="/data/vendor/gps/glgpsctrl"
|
||||
NmeaOutName="/data/vendor/gps/nmea_out"
|
||||
|
||||
acSuplServer="supl.google.com"
|
||||
SuplPort="7275"
|
||||
SuplLogEnable="true"
|
||||
SuplLogFullName="/data/vendor/gps/suplflow.txt"
|
||||
tlsEnable="true"
|
||||
|
||||
SuplSslMethod="SSLv23_NO_TLSv1_2"
|
||||
SuplEnable="true"
|
||||
SuplUseApn="false"
|
||||
SuplUseApnNI="true"
|
||||
SuplUseFwCellInfo="false"
|
||||
SuplDummyCellInfo ="true"
|
||||
SuplTlsCertDirPath="/etc/security/cacerts"
|
||||
SuplTlsCertPath="/vendor/etc/gnss/gps.cer"
|
||||
SuplUT1Seconds="20"
|
||||
SuplUT2Seconds="20"
|
||||
SuplUT3Seconds="20"
|
||||
TcpConnectionTimeout="20"
|
||||
SuplLppCapable="true"
|
||||
SuplEcidCapable="true"
|
||||
SuplVersion="2"
|
||||
SuplMinorVersion="0"
|
||||
SuplOtdoaCapable="true"
|
||||
SuplGlonassCapable = "true"
|
||||
SuplGalileoCapable = "true"
|
||||
SuplBdsCapable = "true"
|
||||
SuplMgpsCapable = "true"
|
||||
|
||||
RtoEnable="true"
|
||||
RtiEnable="true"
|
||||
HttpSyncLto="true"
|
||||
LtoFileName="lto2.dat"
|
||||
LtoDir="/data/vendor/gps/"
|
||||
LtoSyncThresholdDays="1"
|
||||
|
||||
GnssYearOfHardware="2020"
|
||||
CpGuardTimeSec="1"
|
||||
CpLppGuardTimeSec="1"
|
||||
IgnoreInjectedSystemTime="true"
|
||||
|
||||
AssertEnabled="true"
|
||||
CpLppeCancelDbhOnAgnssProvideLoc="true"
|
||||
CpLppeUseAgnssLocForEmptyDbh="true"
|
||||
ReAidingOnHotStart="false"
|
||||
ReAidingIntervalSec="1200"
|
||||
RuntimeSwLteFilterEnable="true"
|
||||
/>
|
||||
|
||||
<gll
|
||||
LogPriMask="LOG_INFO"
|
||||
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI"
|
||||
FrqPlan="FRQ_PLAN_26MHZ_2PPM_49_152MHZ_300PPB"
|
||||
MultiCarrRFMode="GL_MULTI_CARR_RF_MODE_L1_L5"
|
||||
MultiCarrLnaMask="L1_EXT_ON|L5_EXT_ON"
|
||||
RfType="GL_RF_4776_BRCM"
|
||||
ExtL5Bias="13.0"
|
||||
|
||||
WarmStandbyTimeout1Seconds="10"
|
||||
WarmStandbyTimeout2Seconds="15"
|
||||
|
||||
EnableGnssPropagateInStandby="true"
|
||||
|
||||
RfPathLossDb_Ap="3.5"
|
||||
RfPathLossDb_Cp="3.5"
|
||||
RfPathLossDb_Ap_L5="3.5"
|
||||
RfPathLossDb_Cp_L5="3.5"
|
||||
OnChipGpsCarrierType="3,2,3,3,2,3,2,3,3,3,1,2,1,3,2,1,2,3,1,1,1,1,3,3,3,3,3,1,2,3,2,3"
|
||||
|
||||
EnableOnChipStopNotification="2"
|
||||
PowerMode="3"
|
||||
MinGpsWeekNumber="2216"
|
||||
/>
|
||||
|
||||
<gll_features
|
||||
EnableNicAutoSwitch="true"
|
||||
EnableNavic="true"
|
||||
/>
|
||||
|
||||
</glgps>
|
||||
|
93
location/gps_user.xml
Normal file
93
location/gps_user.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<glgps xmlns="http://www.glpals.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.glpals.com/ glconfig.xsd" >
|
||||
<hal
|
||||
PortName="/dev/ttyBCM"
|
||||
BaudRate="921600"
|
||||
GpioNStdbyPath="/sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby"
|
||||
CustGpioDelayMs="250"
|
||||
LogEnabled="false"
|
||||
Log="JAVA"
|
||||
LogDirectory="/sdcard/gps/broadcom/storage/"
|
||||
CtrlPipe="/data/vendor/gps/glgpsctrl"
|
||||
NmeaOutName="/data/vendor/gps/nmea_out"
|
||||
|
||||
acSuplServer="supl.google.com"
|
||||
SuplPort="7275"
|
||||
SuplLogEnable="false"
|
||||
SuplLogFullName="/data/vendor/gps/suplflow.txt"
|
||||
tlsEnable="true"
|
||||
|
||||
SuplSslMethod="SSLv23_NO_TLSv1_2"
|
||||
SuplEnable="true"
|
||||
SuplUseApn="false"
|
||||
SuplUseApnNI="true"
|
||||
SuplUseFwCellInfo="false"
|
||||
SuplDummyCellInfo ="true"
|
||||
SuplTlsCertDirPath="/etc/security/cacerts"
|
||||
SuplTlsCertPath="/vendor/etc/gnss/gps.cer"
|
||||
SuplUT1Seconds="20"
|
||||
SuplUT2Seconds="20"
|
||||
SuplUT3Seconds="20"
|
||||
TcpConnectionTimeout="20"
|
||||
SuplLppCapable="true"
|
||||
SuplEcidCapable="true"
|
||||
SuplVersion="2"
|
||||
SuplMinorVersion="0"
|
||||
SuplOtdoaCapable="true"
|
||||
SuplGlonassCapable = "true"
|
||||
SuplGalileoCapable = "true"
|
||||
SuplBdsCapable = "true"
|
||||
SuplMgpsCapable = "true"
|
||||
|
||||
RtoEnable="true"
|
||||
RtiEnable="true"
|
||||
HttpSyncLto="true"
|
||||
LtoFileName="lto2.dat"
|
||||
LtoDir="/data/vendor/gps/"
|
||||
LtoSyncThresholdDays="1"
|
||||
|
||||
GnssYearOfHardware="2020"
|
||||
CpGuardTimeSec="1"
|
||||
CpLppGuardTimeSec="1"
|
||||
IgnoreInjectedSystemTime="true"
|
||||
|
||||
AssertEnabled="false"
|
||||
CpLppeCancelDbhOnAgnssProvideLoc="true"
|
||||
CpLppeUseAgnssLocForEmptyDbh="true"
|
||||
ReAidingOnHotStart="false"
|
||||
ReAidingIntervalSec="1200"
|
||||
RuntimeSwLteFilterEnable="true"
|
||||
/>
|
||||
|
||||
<gll
|
||||
LogPriMask="LOG_INFO"
|
||||
LogFacMask="LOG_NMEA | LOG_GLLIOS | LOG_GLLAPI"
|
||||
FrqPlan="FRQ_PLAN_26MHZ_2PPM_49_152MHZ_300PPB"
|
||||
MultiCarrRFMode="GL_MULTI_CARR_RF_MODE_L1_L5"
|
||||
MultiCarrLnaMask="L1_EXT_ON|L5_EXT_ON"
|
||||
RfType="GL_RF_4776_BRCM"
|
||||
ExtL5Bias="13.0"
|
||||
|
||||
WarmStandbyTimeout1Seconds="10"
|
||||
WarmStandbyTimeout2Seconds="15"
|
||||
|
||||
EnableGnssPropagateInStandby="true"
|
||||
|
||||
RfPathLossDb_Ap="3.5"
|
||||
RfPathLossDb_Cp="3.5"
|
||||
RfPathLossDb_Ap_L5="3.5"
|
||||
RfPathLossDb_Cp_L5="3.5"
|
||||
OnChipGpsCarrierType="3,2,3,3,2,3,2,3,3,3,1,2,1,3,2,1,2,3,1,1,1,1,3,3,3,3,3,1,2,3,2,3"
|
||||
|
||||
EnableOnChipStopNotification="0"
|
||||
PowerMode="3"
|
||||
MinGpsWeekNumber="2216"
|
||||
/>
|
||||
|
||||
<gll_features
|
||||
EnableNicAutoSwitch="true"
|
||||
EnableNavic="true"
|
||||
/>
|
||||
|
||||
</glgps>
|
||||
|
135
manifest.xml
Normal file
135
manifest.xml
Normal file
|
@ -0,0 +1,135 @@
|
|||
<manifest version="1.0" type="device" target-level="5">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.audio</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>7.1</version>
|
||||
<interface>
|
||||
<name>IDevicesFactory</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.audio.effect</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>7.0</version>
|
||||
<interface>
|
||||
<name>IEffectsFactory</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.soundtrigger</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.3</version>
|
||||
<interface>
|
||||
<name>ISoundTriggerHw</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.media.omx</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IOmx</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IOmxStore</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.graphics.allocator</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>4.0</version>
|
||||
<interface>
|
||||
<name>IAllocator</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.graphics.mapper</name>
|
||||
<transport arch="32+64">passthrough</transport>
|
||||
<version>4.0</version>
|
||||
<interface>
|
||||
<name>IMapper</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.graphics.composer</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.4</version>
|
||||
<interface>
|
||||
<name>IComposer</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.renderscript</name>
|
||||
<transport arch="32+64">passthrough</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IDevice</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format = "hidl">
|
||||
<name>android.hardware.dumpstate</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IDumpstateDevice</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.bluetooth.audio</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IBluetoothAudioProvidersFactory</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.boot</name>
|
||||
<transport>hwbinder</transport>
|
||||
<fqname>@1.2::IBootControl/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.neuralnetworks</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.2</version>
|
||||
<interface>
|
||||
<name>IDevice</name>
|
||||
<instance>armnn</instance>
|
||||
</interface>
|
||||
<fqname>@1.2::IDevice/armnn</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.neuralnetworks</name>
|
||||
<transport>hwbinder</transport>
|
||||
<fqname>@1.3::IDevice/google-edgetpu</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.health</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IHealth</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.google.whitechapel.audio.audioext</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>3.0</version>
|
||||
<interface>
|
||||
<name>IAudioExt</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<kernel target-level="6"/>
|
||||
</manifest>
|
1795
media_profiles_akita.xml
Normal file
1795
media_profiles_akita.xml
Normal file
File diff suppressed because it is too large
Load diff
152
nfc/libnfc-hal-st-disable.conf
Normal file
152
nfc/libnfc-hal-st-disable.conf
Normal file
|
@ -0,0 +1,152 @@
|
|||
########################### Start of libnf-hal-st_aosp.conf ###########################
|
||||
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# ST HAL trace log level
|
||||
STNFC_HAL_LOGLEVEL=4
|
||||
NFC_DEBUG_ENABLED=1
|
||||
|
||||
###############################################################################
|
||||
# Vendor specific mode to enable FW (RF & SWP) traces.
|
||||
STNFC_FW_DEBUG_ENABLED=0
|
||||
|
||||
###############################################################################
|
||||
# File used for NFA storage
|
||||
NFA_STORAGE="/data/nfc"
|
||||
|
||||
###############################################################################
|
||||
# Dev Node used for ST HAL
|
||||
ST_NFC_DEV_NODE="/dev/st_no_such_device"
|
||||
|
||||
###############################################################################
|
||||
# Keep the nfa storage file.
|
||||
PRESERVE_STORAGE=1
|
||||
|
||||
###############################################################################
|
||||
# In Switch OFF mode (phone switched-off), specify the desired CE mode to
|
||||
# the controller.
|
||||
# 0: No card-emulation; DEFAULT
|
||||
# 1: Switch-off card-emulation enabled
|
||||
CE_ON_SWITCH_OFF_STATE=1
|
||||
|
||||
###############################################################################
|
||||
# Vendor specific mode to support the USB charging mode if VPSIO=1 in switch off.
|
||||
STNFC_USB_CHARGING_MODE=1
|
||||
|
||||
###############################################################################
|
||||
# Vendor Specific Proprietary Protocol & Discovery Configuration
|
||||
# Set to 0xFF if unsupported
|
||||
# byte[0] NCI_PROTOCOL_18092_ACTIVE
|
||||
# byte[1] NCI_PROTOCOL_B_PRIME
|
||||
# byte[2] NCI_PROTOCOL_DUAL
|
||||
# byte[3] NCI_PROTOCOL_15693
|
||||
# byte[4] NCI_PROTOCOL_KOVIO
|
||||
# byte[5] NCI_PROTOCOL_MIFARE
|
||||
# byte[6] NCI_DISCOVERY_TYPE_POLL_KOVIO
|
||||
# byte[7] NCI_DISCOVERY_TYPE_POLL_B_PRIME
|
||||
# byte[8] NCI_DISCOVERY_TYPE_LISTEN_B_PRIME
|
||||
NFA_PROPRIETARY_CFG={05:FF:FF:06:8A:90:77:FF:FF}
|
||||
|
||||
###############################################################################
|
||||
# Choose the presence-check algorithm for type-4 tag. If not defined,
|
||||
# the default value is 1.
|
||||
# 0 NFA_RW_PRES_CHK_DEFAULT; Let stack selects an algorithm
|
||||
# 1 NFA_RW_PRES_CHK_I_BLOCK; ISO-DEP protocol's empty I-block
|
||||
# 2 NFA_RW_PRES_CHK_RESET; Deactivate to Sleep, then re-activate
|
||||
# 3 NFA_RW_PRES_CHK_RB_CH0; Type-4 tag protocol's ReadBinary command on channel 0
|
||||
# 4 NFA_RW_PRES_CHK_RB_CH3; Type-4 tag protocol's ReadBinary command on channel 3
|
||||
# 5 NFA_RW_PRES_CHK_ISO_DEP_NAK; presence check command ISO-DEP NAK as per NCI2.0
|
||||
PRESENCE_CHECK_ALGORITHM=5
|
||||
|
||||
###############################################################################
|
||||
# Name of the NCI HAL module to use
|
||||
# If unset, falls back to nfc_nci.bcm2079x
|
||||
NCI_HAL_MODULE="nfc_nci.st21nfc.default"
|
||||
|
||||
###############################################################################
|
||||
# Allow list to be set at startup.
|
||||
DEVICE_HOST_ALLOW_LIST={02:C0}
|
||||
|
||||
###############################################################################
|
||||
# BAIL OUT value for P2P
|
||||
# Implements algorithm for NFC-DEP protocol priority over ISO-DEP protocol.
|
||||
POLL_BAIL_OUT_MODE=1
|
||||
|
||||
###############################################################################
|
||||
# Extended APDU length for ISO_DEP
|
||||
ISO_DEP_MAX_TRANSCEIVE=0xFEFF
|
||||
|
||||
###############################################################################
|
||||
# Configure the NFC Extras to open and use a static pipe. If the value is
|
||||
# not set or set to 0, then the default is use a dynamic pipe based on a
|
||||
# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
|
||||
# for each EE (ESE/SIM)
|
||||
OFF_HOST_ESE_PIPE_ID=0x5E
|
||||
OFF_HOST_SIM_PIPE_ID=0x3E
|
||||
|
||||
###############################################################################
|
||||
#Set the default Felica T3T System Code OffHost route Location :
|
||||
#This settings will be used when application does not set this parameter
|
||||
# host 0x00
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_SYS_CODE_ROUTE=0x86
|
||||
|
||||
###############################################################################
|
||||
#Set the Felica T3T System Code supported power state:
|
||||
DEFAULT_SYS_CODE_PWR_STATE=0x3B
|
||||
|
||||
###############################################################################
|
||||
# Path and Files used for FW update binaries storage
|
||||
STNFC_FW_PATH_STORAGE="/vendor/firmware"
|
||||
STNFC_FW_BIN_NAME="/st54l_fw.bin"
|
||||
STNFC_FW_CONF_NAME="/st54l_conf.bin"
|
||||
|
||||
###############################################################################
|
||||
# Default off-host route for Felica.
|
||||
# This settings will be used when application does not set this parameter
|
||||
# host 0x00
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_NFCF_ROUTE=0x86
|
||||
|
||||
###############################################################################
|
||||
# Configure the default off-host route.
|
||||
# used for technology A and B routing
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_OFFHOST_ROUTE=0x81
|
||||
|
||||
###############################################################################
|
||||
# Configure the default AID route.
|
||||
# host 0x00
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_ROUTE=0x00
|
||||
|
||||
###############################################################################
|
||||
# Configure the NFCEEIDs of offhost UICC.
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
OFFHOST_ROUTE_UICC={81}
|
||||
|
||||
###############################################################################
|
||||
# Configure the NFCEEIDs of offhost eSEs.
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
OFFHOST_ROUTE_ESE={86}
|
||||
|
||||
###############################################################################
|
||||
# Configure the list of NFCEE for the ISO-DEP routing.
|
||||
# host 0x00
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_ISODEP_ROUTE=0x81
|
||||
|
||||
###############################################################################
|
||||
# Core configuration settings
|
||||
CORE_CONF_PROP={ 20, 02, 0a, 03,
|
||||
a1, 01, 1e,
|
||||
a2, 01, 19,
|
||||
80, 01, 01
|
||||
}
|
||||
|
||||
|
163
nfc/libnfc-hal-st.conf
Normal file
163
nfc/libnfc-hal-st.conf
Normal file
|
@ -0,0 +1,163 @@
|
|||
########################### Start of libnf-hal-st_aosp.conf ###########################
|
||||
|
||||
###############################################################################
|
||||
###############################################################################
|
||||
# ST HAL trace log level
|
||||
STNFC_HAL_LOGLEVEL=1
|
||||
NFC_DEBUG_ENABLED=0
|
||||
|
||||
###############################################################################
|
||||
# Vendor specific mode to enable FW (RF & SWP) traces.
|
||||
STNFC_FW_DEBUG_ENABLED=0
|
||||
|
||||
###############################################################################
|
||||
# File used for NFA storage
|
||||
NFA_STORAGE="/data/nfc"
|
||||
|
||||
###############################################################################
|
||||
# Dev Node used for ST HAL
|
||||
ST_NFC_DEV_NODE="/dev/st21nfc"
|
||||
|
||||
###############################################################################
|
||||
# Keep the nfa storage file.
|
||||
PRESERVE_STORAGE=1
|
||||
|
||||
###############################################################################
|
||||
# In Switch OFF mode (phone switched-off), specify the desired CE mode to
|
||||
# the controller.
|
||||
# 0: No card-emulation; DEFAULT
|
||||
# 1: Switch-off card-emulation enabled
|
||||
CE_ON_SWITCH_OFF_STATE=1
|
||||
|
||||
###############################################################################
|
||||
# Vendor specific mode to support the USB charging mode if VPSIO=1 in switch off.
|
||||
STNFC_USB_CHARGING_MODE=1
|
||||
|
||||
###############################################################################
|
||||
# Vendor Specific Proprietary Protocol & Discovery Configuration
|
||||
# Set to 0xFF if unsupported
|
||||
# byte[0] NCI_PROTOCOL_18092_ACTIVE
|
||||
# byte[1] NCI_PROTOCOL_B_PRIME
|
||||
# byte[2] NCI_PROTOCOL_DUAL
|
||||
# byte[3] NCI_PROTOCOL_15693
|
||||
# byte[4] NCI_PROTOCOL_KOVIO
|
||||
# byte[5] NCI_PROTOCOL_MIFARE
|
||||
# byte[6] NCI_DISCOVERY_TYPE_POLL_KOVIO
|
||||
# byte[7] NCI_DISCOVERY_TYPE_POLL_B_PRIME
|
||||
# byte[8] NCI_DISCOVERY_TYPE_LISTEN_B_PRIME
|
||||
NFA_PROPRIETARY_CFG={05:FF:FF:06:8A:90:77:FF:FF}
|
||||
|
||||
###############################################################################
|
||||
# Choose the presence-check algorithm for type-4 tag. If not defined,
|
||||
# the default value is 1.
|
||||
# 0 NFA_RW_PRES_CHK_DEFAULT; Let stack selects an algorithm
|
||||
# 1 NFA_RW_PRES_CHK_I_BLOCK; ISO-DEP protocol's empty I-block
|
||||
# 2 NFA_RW_PRES_CHK_RESET; Deactivate to Sleep, then re-activate
|
||||
# 3 NFA_RW_PRES_CHK_RB_CH0; Type-4 tag protocol's ReadBinary command on channel 0
|
||||
# 4 NFA_RW_PRES_CHK_RB_CH3; Type-4 tag protocol's ReadBinary command on channel 3
|
||||
# 5 NFA_RW_PRES_CHK_ISO_DEP_NAK; presence check command ISO-DEP NAK as per NCI2.0
|
||||
PRESENCE_CHECK_ALGORITHM=5
|
||||
|
||||
###############################################################################
|
||||
# Name of the NCI HAL module to use
|
||||
# If unset, falls back to nfc_nci.bcm2079x
|
||||
NCI_HAL_MODULE="nfc_nci.st21nfc.default"
|
||||
|
||||
###############################################################################
|
||||
# Allow list to be set at startup.
|
||||
DEVICE_HOST_ALLOW_LIST={02:C0}
|
||||
|
||||
###############################################################################
|
||||
# BAIL OUT value for P2P
|
||||
# Implements algorithm for NFC-DEP protocol priority over ISO-DEP protocol.
|
||||
POLL_BAIL_OUT_MODE=1
|
||||
|
||||
###############################################################################
|
||||
# Extended APDU length for ISO_DEP
|
||||
ISO_DEP_MAX_TRANSCEIVE=0xFEFF
|
||||
|
||||
###############################################################################
|
||||
# Configure the NFC Extras to open and use a static pipe. If the value is
|
||||
# not set or set to 0, then the default is use a dynamic pipe based on a
|
||||
# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
|
||||
# for each EE (ESE/SIM)
|
||||
OFF_HOST_ESE_PIPE_ID=0x5E
|
||||
OFF_HOST_SIM_PIPE_ID=0x3E
|
||||
|
||||
###############################################################################
|
||||
#Set the default Felica T3T System Code OffHost route Location :
|
||||
#This settings will be used when application does not set this parameter
|
||||
# host 0x00
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_SYS_CODE_ROUTE=0x86
|
||||
|
||||
###############################################################################
|
||||
#Set the Felica T3T System Code supported power state:
|
||||
DEFAULT_SYS_CODE_PWR_STATE=0x3B
|
||||
|
||||
###############################################################################
|
||||
# Path and Files used for FW update binaries storage
|
||||
STNFC_FW_PATH_STORAGE="/vendor/firmware"
|
||||
STNFC_FW_BIN_NAME="/st54l_fw.bin"
|
||||
STNFC_FW_CONF_NAME="/st54l_conf.bin"
|
||||
|
||||
###############################################################################
|
||||
# Default off-host route for Felica.
|
||||
# This settings will be used when application does not set this parameter
|
||||
# host 0x00
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_NFCF_ROUTE=0x86
|
||||
|
||||
###############################################################################
|
||||
# Configure the default off-host route.
|
||||
# used for technology A and B routing
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_OFFHOST_ROUTE=0x81
|
||||
|
||||
###############################################################################
|
||||
# Configure the default AID route.
|
||||
# host 0x00
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_ROUTE=0x00
|
||||
|
||||
###############################################################################
|
||||
# Configure the NFCEEIDs of offhost UICC.
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
OFFHOST_ROUTE_UICC={81}
|
||||
|
||||
###############################################################################
|
||||
# Configure the NFCEEIDs of offhost eSEs.
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
OFFHOST_ROUTE_ESE={86}
|
||||
|
||||
###############################################################################
|
||||
# Configure the list of NFCEE for the ISO-DEP routing.
|
||||
# host 0x00
|
||||
# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE)
|
||||
# UICC 0x81 (UICC_1), 0x85 (UICC_2)
|
||||
DEFAULT_ISODEP_ROUTE=0x81
|
||||
|
||||
###############################################################################
|
||||
# Configure the HAL Clock control
|
||||
# enable 0x01
|
||||
# disable 0x00 default value
|
||||
STNFC_CONTROL_CLK=0x01
|
||||
|
||||
###############################################################################
|
||||
# Configure the ACTIVE_RW timer
|
||||
# Default 0x00, set 0x01 to enable it
|
||||
# STNFC_ACTIVERW_TIMER=0x01
|
||||
|
||||
###############################################################################
|
||||
# Core configuration settings
|
||||
CORE_CONF_PROP={ 20, 02, 0a, 03,
|
||||
a1, 01, 1e,
|
||||
a2, 01, 19,
|
||||
80, 01, 01
|
||||
}
|
||||
|
||||
|
121
nfc/libnfc-nci.conf
Normal file
121
nfc/libnfc-nci.conf
Normal file
|
@ -0,0 +1,121 @@
|
|||
###############################################################################
|
||||
# Application options
|
||||
NFC_DEBUG_ENABLED=0
|
||||
|
||||
###############################################################################
|
||||
# File used for NFA storage
|
||||
NFA_STORAGE="/data/nfc"
|
||||
|
||||
###############################################################################
|
||||
# Force UICC to only listen to the following technology(s).
|
||||
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
|
||||
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | NFA_TECHNOLOGY_MASK_F
|
||||
UICC_LISTEN_TECH_MASK=0x07
|
||||
|
||||
###############################################################################
|
||||
# Set HOST default listen to the following technology(s).
|
||||
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
|
||||
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F
|
||||
# 0x07 = A + B + F
|
||||
HOST_LISTEN_TECH_MASK=0x07
|
||||
|
||||
###############################################################################
|
||||
# AID for Empty Select command
|
||||
# If specified, this AID will be substituted when an Empty SELECT command is
|
||||
# detected. The first byte is the length of the AID. Maximum length is 16.
|
||||
AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
|
||||
|
||||
###############################################################################
|
||||
# When screen is turned off, specify the desired power state of the controller.
|
||||
# 0: power-off-sleep state; DEFAULT
|
||||
# 1: full-power state
|
||||
# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used)
|
||||
SCREEN_OFF_POWER_STATE=1
|
||||
|
||||
###############################################################################
|
||||
# Force tag polling for the following technology(s).
|
||||
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
|
||||
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B |
|
||||
# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 |
|
||||
# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO |
|
||||
# NFA_TECHNOLOGY_MASK_ACTIVE
|
||||
#
|
||||
# Notable bits:
|
||||
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
|
||||
# NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */
|
||||
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
|
||||
# NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */
|
||||
# NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */
|
||||
# NFA_TECHNOLOGY_MASK_ACTIVE 0x40 /* NFC Technology Active */
|
||||
POLLING_TECH_MASK=0x2F
|
||||
|
||||
###############################################################################
|
||||
# Force P2P to only listen for the following technology(s).
|
||||
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
|
||||
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F |
|
||||
# NFA_TECHNOLOGY_MASK_ACTIVE
|
||||
#
|
||||
# Notable bits:
|
||||
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
|
||||
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
|
||||
# NFA_TECHNOLOGY_MASK_ACTIVE 0x40 /* NFC Technology Active */
|
||||
P2P_LISTEN_TECH_MASK=0x00
|
||||
|
||||
PRESERVE_STORAGE=0x01
|
||||
|
||||
###############################################################################
|
||||
# Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h.
|
||||
# The value is set to 3 by default as it assumes we will discover 0xF2,
|
||||
# 0xF3, and 0xF4. If a platform will exclude and SE, this value can be reduced
|
||||
# so that the stack will not wait any longer than necessary.
|
||||
# Maximum EE supported number
|
||||
# NXP PN547C2 0x02
|
||||
# NXP PN65T 0x03
|
||||
# NXP PN548C2 0x02
|
||||
# NXP PN66T 0x03
|
||||
NFA_MAX_EE_SUPPORTED=0x02
|
||||
|
||||
###############################################################################
|
||||
# AID_MATCHING constants
|
||||
# AID_MATCHING_EXACT_ONLY 0x00
|
||||
# AID_MATCHING_EXACT_OR_PREFIX 0x01
|
||||
# AID_MATCHING_PREFIX_ONLY 0x02
|
||||
# AID_MATCHING_EXACT_OR_SUBSET_OR_PREFIX 0x03
|
||||
AID_MATCHING_MODE=0x03
|
||||
|
||||
###############################################################################
|
||||
#Set the default Felica T3T System Code :
|
||||
#This settings will be used when application does not set this parameter
|
||||
DEFAULT_SYS_CODE={FE:FE}
|
||||
|
||||
###############################################################################
|
||||
# Value of NIC parameter NFCC_COFNIG_CONTROL
|
||||
# 0x00 NFCC is not allowed to manage RF configuration
|
||||
# 0x01 NFCC is allowed to manage RF configuration
|
||||
NFCC_CONFIG_CONTROL=0x01
|
||||
|
||||
###############################################################################
|
||||
#Set if the AID routing should be blocked for the power modes not supported.
|
||||
NFA_AID_BLOCK_ROUTE=1
|
||||
|
||||
###############################################################################
|
||||
#Set the OffHost AID supported power state:
|
||||
OFFHOST_AID_ROUTE_PWR_STATE=0x3B
|
||||
|
||||
###############################################################################
|
||||
# Mifare Tag implementation
|
||||
# 0: General implementation
|
||||
# 1: Legacy implementation
|
||||
LEGACY_MIFARE_READER=0
|
||||
|
||||
###############################################################################
|
||||
# Nfc recovery implementation
|
||||
# 0: Crash Nfc Service
|
||||
# 1: Toggle Nfc state
|
||||
RECOVERY_OPTION=1
|
||||
|
||||
###############################################################################
|
||||
# NFCEE Power Supply and Communication Link Control Configuration
|
||||
# Set when SetAlwaysOn enabled
|
||||
# Default 0x00 when SetAlways on disabled
|
||||
ALWAYS_ON_SET_EE_POWER_AND_LINK_CONF=0x03
|
2
nfc/libse-gto-hal-disable.conf
Normal file
2
nfc/libse-gto-hal-disable.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
#Gemalto SPI devnode
|
||||
GTO_DEV=/dev/nothing;
|
2
nfc/libse-gto-hal.conf
Normal file
2
nfc/libse-gto-hal.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
#Gemalto SPI devnode
|
||||
GTO_DEV=/dev/st54spi;
|
7
nfc/manifest_se.xml
Normal file
7
nfc/manifest_se.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.secure_element</name>
|
||||
<transport>hwbinder</transport>
|
||||
<fqname>@1.2::ISecureElement/eSE1</fqname>
|
||||
</hal>
|
||||
</manifest>
|
991
powerhint-akita.json
Normal file
991
powerhint-akita.json
Normal file
|
@ -0,0 +1,991 @@
|
|||
{
|
||||
"Nodes": [
|
||||
{
|
||||
"Name": "MemFreq",
|
||||
"Path": "/sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/min_freq",
|
||||
"Values": [
|
||||
"3172000",
|
||||
"1014000",
|
||||
"421000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "IntFreq",
|
||||
"Path": "/sys/devices/platform/17000020.devfreq_int/devfreq/17000020.devfreq_int/min_freq",
|
||||
"Values": [
|
||||
"533000",
|
||||
"100000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPULittleClusterMaxFreq",
|
||||
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq",
|
||||
"Values": [
|
||||
"9999999",
|
||||
"1098000",
|
||||
"1401000",
|
||||
"1197000"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPULittleClusterMinFreq",
|
||||
"Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq",
|
||||
"Values": [
|
||||
"9999999",
|
||||
"1197000",
|
||||
"0"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUMidClusterMaxFreq",
|
||||
"Path": "/sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq",
|
||||
"Values": [
|
||||
"9999999",
|
||||
"1024000",
|
||||
"1197000",
|
||||
"1999000",
|
||||
"1491000"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUMidClusterMinFreq",
|
||||
"Path": "/sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq",
|
||||
"Values": [
|
||||
"9999999",
|
||||
"1197000",
|
||||
"0"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUBigClusterMaxFreq",
|
||||
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq",
|
||||
"Values": [
|
||||
"9999999",
|
||||
"984000",
|
||||
"1426000",
|
||||
"1826000"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUBigClusterMinFreq",
|
||||
"Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq",
|
||||
"Values": [
|
||||
"9999999",
|
||||
"1106000",
|
||||
"0"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "GPUMinFreq",
|
||||
"Path": "/sys/devices/platform/1f000000.mali/hint_min_freq",
|
||||
"Values": [
|
||||
"649000",
|
||||
"580000",
|
||||
"521000",
|
||||
"467000",
|
||||
"376000",
|
||||
"302000",
|
||||
"150000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CPUUtilThreshold",
|
||||
"Path": "/proc/vendor_sched/util_threshold",
|
||||
"Values": [
|
||||
"1280",
|
||||
"1100"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "TAUClampBoost",
|
||||
"Path": "/proc/vendor_sched/ta_uclamp_min",
|
||||
"Values": [
|
||||
"0",
|
||||
"553",
|
||||
"246",
|
||||
"185",
|
||||
"123",
|
||||
"62"
|
||||
],
|
||||
"DefaultIndex": 0,
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CDPreferIdle",
|
||||
"Path": "/proc/vendor_sched/cam_prefer_idle",
|
||||
"Values": [
|
||||
"0",
|
||||
"1"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CDCpuset",
|
||||
"Path": "/dev/cpuset/camera-daemon/cpus",
|
||||
"Values": [
|
||||
"4-7",
|
||||
"0-7"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CDHighCpusetCpus",
|
||||
"Path": "/dev/cpuset/camera-daemon-high-group/cpus",
|
||||
"Values": [
|
||||
"6-7",
|
||||
"0-7"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CDMidCpusetCpus",
|
||||
"Path": "/dev/cpuset/camera-daemon-mid-group/cpus",
|
||||
"Values": [
|
||||
"4-5",
|
||||
"0-7"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CDMidHighCpusetCpus",
|
||||
"Path": "/dev/cpuset/camera-daemon-mid-high-group/cpus",
|
||||
"Values": [
|
||||
"4-7",
|
||||
"0-7"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "TAPreferHighCap",
|
||||
"Path": "/proc/vendor_sched/ta_prefer_high_cap",
|
||||
"Values": [
|
||||
"1",
|
||||
"0"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "TAPreferIdle",
|
||||
"Path": "/proc/vendor_sched/ta_prefer_idle",
|
||||
"Values": [
|
||||
"0",
|
||||
"1"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "CDPreferHighCap",
|
||||
"Path": "/proc/vendor_sched/cam_prefer_high_cap",
|
||||
"Values": [
|
||||
"1",
|
||||
"0"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "DisplayWakeup",
|
||||
"Path": "/sys/devices/platform/19470000.drmdecon/early_wakeup",
|
||||
"Values": [
|
||||
"1",
|
||||
"0"
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "LimitFlashCurrent",
|
||||
"Path": "vendor.camera.max_flash_current",
|
||||
"Values": [
|
||||
"100",
|
||||
"1500"
|
||||
],
|
||||
"ResetOnInit": true,
|
||||
"Type": "Property"
|
||||
},
|
||||
{
|
||||
"Name": "PowerHALRenderingState",
|
||||
"Path": "vendor.powerhal.rendering",
|
||||
"Values": [
|
||||
"EXPENSIVE_RENDERING",
|
||||
""
|
||||
],
|
||||
"Type": "Property"
|
||||
},
|
||||
{
|
||||
"Name": "INTCAMFreq",
|
||||
"Path": "/sys/devices/platform/17000030.devfreq_intcam/devfreq/17000030.devfreq_intcam/min_freq",
|
||||
"Values": [
|
||||
"664000",
|
||||
"67000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
},
|
||||
{
|
||||
"Name": "TNRFreq",
|
||||
"Path": "/sys/devices/platform/17000060.devfreq_tnr/devfreq/17000060.devfreq_tnr/min_freq",
|
||||
"Values": [
|
||||
"664000",
|
||||
"67000"
|
||||
],
|
||||
"ResetOnInit": true
|
||||
}
|
||||
],
|
||||
"Actions": [
|
||||
{
|
||||
"PowerHint": "INTERACTION",
|
||||
"Type": "EndHint",
|
||||
"Value": "DISABLE_TA_BOOST"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 6000,
|
||||
"Value": "1106000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION",
|
||||
"Node": "CPUMidClusterMinFreq",
|
||||
"Duration": 6000,
|
||||
"Value": "1197000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION",
|
||||
"Node": "CPULittleClusterMinFreq",
|
||||
"Duration": 6000,
|
||||
"Value": "1197000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION",
|
||||
"Type": "DoHint",
|
||||
"Value": "INTERACTION_120"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION",
|
||||
"Type": "DoHint",
|
||||
"Value": "INTERACTION_90"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION",
|
||||
"Type": "DoHint",
|
||||
"Value": "INTERACTION_60"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION_120",
|
||||
"Node": "TAUClampBoost",
|
||||
"Duration": 6000,
|
||||
"Value": "246"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION_90",
|
||||
"Node": "TAUClampBoost",
|
||||
"Duration": 6000,
|
||||
"Value": "185"
|
||||
},
|
||||
{
|
||||
"PowerHint": "INTERACTION_60",
|
||||
"Node": "TAUClampBoost",
|
||||
"Duration": 6000,
|
||||
"Value": "123"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_120FPS",
|
||||
"Type": "MaskHint",
|
||||
"Value": "INTERACTION_60"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_120FPS",
|
||||
"Type": "MaskHint",
|
||||
"Value": "INTERACTION_90"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_90FPS",
|
||||
"Type": "MaskHint",
|
||||
"Value": "INTERACTION_60"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_90FPS",
|
||||
"Type": "MaskHint",
|
||||
"Value": "INTERACTION_120"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_60FPS",
|
||||
"Type": "MaskHint",
|
||||
"Value": "INTERACTION_90"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_60FPS",
|
||||
"Type": "MaskHint",
|
||||
"Value": "INTERACTION_120"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_IDLE",
|
||||
"Type": "EndHint",
|
||||
"Value": "INTERACTION_120"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_IDLE",
|
||||
"Type": "EndHint",
|
||||
"Value": "INTERACTION_90"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_IDLE",
|
||||
"Type": "EndHint",
|
||||
"Value": "INTERACTION_60"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 5000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Type": "EndHint",
|
||||
"Value": "DISABLE_TA_BOOST"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 5000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "TAUClampBoost",
|
||||
"Duration": 5000,
|
||||
"Value": "553"
|
||||
},
|
||||
{
|
||||
"PowerHint": "LAUNCH",
|
||||
"Node": "MemFreq",
|
||||
"Duration": 5000,
|
||||
"Value": "3172000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_LAUNCH",
|
||||
"Node": "MemFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "3172000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_LAUNCH",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_LAUNCH",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_LAUNCH",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_LAUNCH",
|
||||
"Node": "CPUMidClusterMinFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_LAUNCH",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_LAUNCH",
|
||||
"Node": "CPULittleClusterMinFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_LAUNCH",
|
||||
"Node": "CDCpuset",
|
||||
"Duration": 1000,
|
||||
"Value": "4-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_THERMAL_CPU_THROTTLE",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "984000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_THERMAL_CPU_THROTTLE",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "1024000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_THERMAL_CPU_THROTTLE",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "1098000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "1426000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "1197000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "1401000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_SHOT",
|
||||
"Node": "MemFreq",
|
||||
"Duration": 300,
|
||||
"Value": "3172000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_SHOT",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 300,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_SHOT",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 300,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_SHOT",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 300,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_SHOT",
|
||||
"Node": "CPUMidClusterMinFreq",
|
||||
"Duration": 300,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_BACKEND_BOOST",
|
||||
"Node": "MemFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "3172000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_BACKEND_BOOST",
|
||||
"Node": "IntFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "533000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_BACKEND_BOOST",
|
||||
"Node": "INTCAMFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "664000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_BACKEND_BOOST",
|
||||
"Node": "TNRFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "664000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_BIGCPU",
|
||||
"Node": "TAPreferHighCap",
|
||||
"Duration": 3000,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_BIGCPU",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_BIGCPU",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_BIGMIDCPU",
|
||||
"Node": "TAPreferHighCap",
|
||||
"Duration": 3000,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_BIGMIDCPU",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_BIGMIDCPU",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_BIGMIDCPU",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_BIGMIDCPU",
|
||||
"Node": "CPUMidClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_ALLCPU",
|
||||
"Node": "TAPreferHighCap",
|
||||
"Duration": 3000,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_ALLCPU",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_ALLCPU",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_ALLCPU",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_ALLCPU",
|
||||
"Node": "CPUMidClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_ALLCPU",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "GCA_CAMERA_SHOT_ALLCPU",
|
||||
"Node": "CPULittleClusterMinFreq",
|
||||
"Duration": 3000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1401000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1491000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1826000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "CDPreferHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "GPUMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "302000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "MemFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1014000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "TAPreferHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "TAPreferIdle",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "CDHighCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "6-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "CDMidCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "4-5"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_EXTREME",
|
||||
"Node": "CDMidHighCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "4-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "CPUUtilThreshold",
|
||||
"Duration": 0,
|
||||
"Value": "1100"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1491000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1826000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "CDPreferHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1401000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "GPUMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "302000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "MemFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1014000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "TAPreferHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "TAPreferIdle",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "CDHighCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "6-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "CDMidCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "4-5"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_HIGH",
|
||||
"Node": "CDMidHighCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "4-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "CDPreferHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "TAPreferHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1826000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1491000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1401000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "GPUMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "302000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "MemFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1014000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "CDHighCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "6-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "CDMidCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "4-5"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_STANDARD",
|
||||
"Node": "CDMidHighCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "4-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "CDPreferHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "TAPreferHighCap",
|
||||
"Duration": 0,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "CDPreferIdle",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1826000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1491000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1401000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "GPUMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "302000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "MemFreq",
|
||||
"Duration": 0,
|
||||
"Value": "1014000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "CDHighCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "6-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "CDMidCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "4-5"
|
||||
},
|
||||
{
|
||||
"PowerHint": "CAMERA_STREAMING_LOW",
|
||||
"Node": "CDMidHighCpusetCpus",
|
||||
"Duration": 0,
|
||||
"Value": "4-7"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPUMidClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPUMidClusterMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPULittleClusterMaxFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FIXED_PERFORMANCE",
|
||||
"Node": "CPULittleClusterMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_120FPS",
|
||||
"Node": "TAUClampBoost",
|
||||
"Duration": 0,
|
||||
"Value": "185"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_90FPS",
|
||||
"Node": "TAUClampBoost",
|
||||
"Duration": 0,
|
||||
"Value": "123"
|
||||
},
|
||||
{
|
||||
"PowerHint": "REFRESH_60FPS",
|
||||
"Node": "TAUClampBoost",
|
||||
"Duration": 0,
|
||||
"Value": "62"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISABLE_TA_BOOST",
|
||||
"Node": "TAUClampBoost",
|
||||
"Duration": 0,
|
||||
"Value": "0"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_IDLE",
|
||||
"Type": "DoHint",
|
||||
"Value": "DISABLE_TA_BOOST"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_IDLE",
|
||||
"Type": "EndHint",
|
||||
"Value": "INTERACTION"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_IDLE",
|
||||
"Type": "EndHint",
|
||||
"Value": "DISPLAY_UPDATE_IMMINENT"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_UPDATE_IMMINENT",
|
||||
"Type": "EndHint",
|
||||
"Value": "DISABLE_TA_BOOST"
|
||||
},
|
||||
{
|
||||
"PowerHint": "DISPLAY_UPDATE_IMMINENT",
|
||||
"Node": "DisplayWakeup",
|
||||
"Duration": 50,
|
||||
"Value": "1"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_FLASH_LED_REDUCE_CRITICAL",
|
||||
"Node": "LimitFlashCurrent",
|
||||
"Duration": 0,
|
||||
"Value": "100"
|
||||
},
|
||||
{
|
||||
"PowerHint": "THERMAL_FLASH_LED_REDUCE_NONE",
|
||||
"Node": "LimitFlashCurrent",
|
||||
"Duration": 0,
|
||||
"Value": "1500"
|
||||
},
|
||||
{
|
||||
"PowerHint": "EXPENSIVE_RENDERING",
|
||||
"Node": "PowerHALRenderingState",
|
||||
"Duration": 0,
|
||||
"Value": "EXPENSIVE_RENDERING"
|
||||
},
|
||||
{
|
||||
"PowerHint": "EXPENSIVE_RENDERING",
|
||||
"Node": "GPUMinFreq",
|
||||
"Duration": 0,
|
||||
"Value": "521000"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FP_BOOST",
|
||||
"Node": "CPUBigClusterMaxFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "9999999"
|
||||
},
|
||||
{
|
||||
"PowerHint": "FP_BOOST",
|
||||
"Node": "CPUBigClusterMinFreq",
|
||||
"Duration": 1000,
|
||||
"Value": "9999999"
|
||||
}
|
||||
]
|
||||
}
|
42
powerstats/akita/Android.bp
Normal file
42
powerstats/akita/Android.bp
Normal file
|
@ -0,0 +1,42 @@
|
|||
// 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.
|
||||
|
||||
soong_namespace {
|
||||
imports: [
|
||||
"hardware/google/pixel",
|
||||
"device/google/zuma/powerstats",
|
||||
]
|
||||
}
|
||||
|
||||
package {
|
||||
// See: http://go/android-license-faq
|
||||
// A large-scale-change added 'default_applicable_licenses' to import
|
||||
// all of the 'license_kinds' from "device_google_akita_license"
|
||||
// to get the below license kinds:
|
||||
// SPDX-license-identifier-Apache-2.0
|
||||
default_applicable_licenses: ["device_google_akita_license"],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "android.hardware.power.stats-service.pixel",
|
||||
defaults: ["powerstats_pixel_binary_defaults"],
|
||||
|
||||
srcs: [
|
||||
"*.cpp",
|
||||
],
|
||||
|
||||
shared_libs: [
|
||||
"android.hardware.power.stats-impl.zuma",
|
||||
],
|
||||
}
|
76
powerstats/akita/service.cpp
Normal file
76
powerstats/akita/service.cpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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 "android.hardware.power.stats-service.pixel"
|
||||
|
||||
#include <dataproviders/DisplayStateResidencyDataProvider.h>
|
||||
#include <dataproviders/PowerStatsEnergyConsumer.h>
|
||||
#include <ZumaCommonDataProviders.h>
|
||||
#include <PowerStatsAidl.h>
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <android-base/properties.h>
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <log/log.h>
|
||||
|
||||
using aidl::android::hardware::power::stats::DisplayStateResidencyDataProvider;
|
||||
using aidl::android::hardware::power::stats::EnergyConsumerType;
|
||||
using aidl::android::hardware::power::stats::PowerStatsEnergyConsumer;
|
||||
|
||||
void addDisplay(std::shared_ptr<PowerStats> p) {
|
||||
// Add display residency stats
|
||||
std::vector<std::string> states = {
|
||||
"Off",
|
||||
"LP: 1080x2340@30",
|
||||
"On: 1080x2340@60",
|
||||
"On: 1080x2340@90",
|
||||
"HBM: 1080x2340@60",
|
||||
"HBM: 1080x2340@90"};
|
||||
|
||||
p->addStateResidencyDataProvider(std::make_unique<DisplayStateResidencyDataProvider>(
|
||||
"Display",
|
||||
"/sys/class/backlight/panel0-backlight/state",
|
||||
states));
|
||||
|
||||
// Add display energy consumer
|
||||
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterAndEntityConsumer(
|
||||
p, EnergyConsumerType::DISPLAY, "display", {"PPVAR_VSYS_PWR_DISP"}, "Display",
|
||||
{{"LP: 1080x2340@30", 1},
|
||||
{"On: 1080x2340@60", 2},
|
||||
{"On: 1080x2340@90", 3},
|
||||
{"HBM: 1080x2340@60", 4},
|
||||
{"HBM: 1080x2340@90", 5}}));
|
||||
}
|
||||
|
||||
int main() {
|
||||
LOG(INFO) << "Pixel PowerStats HAL AIDL Service is starting.";
|
||||
|
||||
// single thread
|
||||
ABinderProcess_setThreadPoolMaxThreadCount(0);
|
||||
|
||||
std::shared_ptr<PowerStats> p = ndk::SharedRefBase::make<PowerStats>();
|
||||
|
||||
addZumaCommonDataProviders(p);
|
||||
addDisplay(p);
|
||||
|
||||
const std::string instance = std::string() + PowerStats::descriptor + "/default";
|
||||
binder_status_t status = AServiceManager_addService(p->asBinder().get(), instance.c_str());
|
||||
LOG_ALWAYS_FATAL_IF(status != STATUS_OK);
|
||||
|
||||
ABinderProcess_joinThreadPool();
|
||||
return EXIT_FAILURE; // should not reach
|
||||
}
|
18
rro_overlays/WifiOverlay/Android.bp
Normal file
18
rro_overlays/WifiOverlay/Android.bp
Normal file
|
@ -0,0 +1,18 @@
|
|||
package {
|
||||
// See: http://go/android-license-faq
|
||||
// A large-scale-change added 'default_applicable_licenses' to import
|
||||
// all of the 'license_kinds' from "//device/google/akita:device_google_akita_license"
|
||||
// to get the below license kinds:
|
||||
// SPDX-license-identifier-Apache-2.0
|
||||
default_applicable_licenses: [
|
||||
"//device/google/akita:device_google_akita_license",
|
||||
],
|
||||
}
|
||||
|
||||
runtime_resource_overlay {
|
||||
name: "WifiOverlay2024Mid",
|
||||
theme: "WifiOverlay2024Mid",
|
||||
certificate: "platform",
|
||||
sdk_version: "current",
|
||||
product_specific: true
|
||||
}
|
27
rro_overlays/WifiOverlay/AndroidManifest.xml
Normal file
27
rro_overlays/WifiOverlay/AndroidManifest.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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.
|
||||
-->
|
||||
<!-- Pixel specific wifi overlays -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.wifi.resources.pixel"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<application android:hasCode="false" />
|
||||
<overlay
|
||||
android:targetPackage="com.android.wifi.resources"
|
||||
android:targetName="WifiCustomization"
|
||||
android:isStatic="true"
|
||||
android:priority="0"/>
|
||||
</manifest>
|
4
rro_overlays/WifiOverlay/OWNERS
Normal file
4
rro_overlays/WifiOverlay/OWNERS
Normal file
|
@ -0,0 +1,4 @@
|
|||
# People who can approve changes for submission
|
||||
kumachang@google.com
|
||||
wangroger@google.com
|
||||
hsuvictor@google.com
|
148
rro_overlays/WifiOverlay/res/values/config.xml
Normal file
148
rro_overlays/WifiOverlay/res/values/config.xml
Normal file
|
@ -0,0 +1,148 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!--
|
||||
/*
|
||||
* Copyright (C) 2019 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.
|
||||
*/
|
||||
-->
|
||||
<resources>
|
||||
<!-- Boolean indicating whether the wifi chipset has 5GHz frequency band support -->
|
||||
<bool translatable="false" name="config_wifi5ghzSupport">true</bool>
|
||||
|
||||
<!-- boolean indicating whether the WiFi chipset has 6GHz band support -->
|
||||
<bool translatable="false" name ="config_wifi6ghzSupport">true</bool>
|
||||
|
||||
<!-- Boolean indicating whether 802.11r Fast BSS Transition is enabled on this platform -->
|
||||
<bool translatable="false" name="config_wifi_fast_bss_transition_enabled">true</bool>
|
||||
|
||||
<!-- Boolean indicating whether the wifi chipset has background scan support -->
|
||||
<bool translatable="false" name="config_wifi_background_scan_support">true</bool>
|
||||
|
||||
<!-- Integer thresholds, do not connect to APs with RSSI lower than these values -->
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-77</integer>
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-80</integer>
|
||||
<!-- Integer thresholds for low network score, should be somewhat less than the entry thresholds -->
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-80</integer>
|
||||
<integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-83</integer>
|
||||
|
||||
<!-- Boolean indicating whether or not to revert to default country code when cellular
|
||||
radio is unable to find any MCC information to infer wifi country code from -->
|
||||
<bool translatable="false" name="config_wifi_revert_country_code_on_cellular_loss">false</bool>
|
||||
|
||||
<!-- Boolean indicating whether or not wifi should turn off when emergency call is made -->
|
||||
<bool translatable="false" name="config_wifi_turn_off_during_emergency_call">true</bool>
|
||||
|
||||
<!-- Configure wifi tcp buffersizes in the form:
|
||||
rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
|
||||
<string name="config_wifi_tcp_buffers" translatable="false">524288,2097152,8388608,262144,524288,4194304</string>
|
||||
|
||||
<!-- Enable ACS (auto channel selection) for Wifi hotspot (SAP) -->
|
||||
<bool translatable="false" name="config_wifi_softap_acs_supported">true</bool>
|
||||
|
||||
<!-- Enable 802.11ac for Wifi hotspot (SAP) -->
|
||||
<bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">true</bool>
|
||||
|
||||
<!-- True if the firmware supports connected MAC randomization -->
|
||||
<bool name="config_wifi_connected_mac_randomization_supported">true</bool>
|
||||
|
||||
<!-- True if the firmware supports p2p MAC randomization -->
|
||||
<bool name="config_wifi_p2p_mac_randomization_supported">true</bool>
|
||||
|
||||
<!-- True if the firmware supports ap MAC randomization -->
|
||||
<bool name="config_wifi_ap_mac_randomization_supported">true</bool>
|
||||
|
||||
<!-- True if the firmware supports Wi-Fi link probing -->
|
||||
<bool name="config_wifi_link_probing_supported">true</bool>
|
||||
|
||||
<!-- Indicates that a full bugreport should be triggered when wifi diagnostics detects an error on non-user (i.e debug) builds -->
|
||||
<bool translatable="false" name="config_wifi_diagnostics_bugreport_enabled">true</bool>
|
||||
|
||||
<!-- Default access point SSID used for tethering -->
|
||||
<string name="wifi_tether_configure_ssid_default" translatable="false">Pixel</string>
|
||||
|
||||
<!-- Integer indicating maximum hardware supported client number of soft ap -->
|
||||
<integer translatable="false" name="config_wifiHardwareSoftapMaxClientCount">32</integer>
|
||||
|
||||
<!-- Array indicating wifi fatal firmware alert error code list from driver -->
|
||||
<array translatable="false" name="config_wifi_fatal_firmware_alert_error_code_list">
|
||||
<item>1</item> <!-- ALERT_TX_STALL -->
|
||||
<item>2</item> <!-- ALERT_RX_STALL -->
|
||||
<item>3</item> <!-- ALERT_IOCTL_TIMEOUT -->
|
||||
<item>8</item> <!-- ALERT_FW_QUEUE_STALL -->
|
||||
</array>
|
||||
|
||||
<!-- Integer delay in milliseconds before set wlan interface up during watchdog recovery -->
|
||||
<integer name="config_wifi_framework_recovery_timeout_delay">3000</integer>
|
||||
|
||||
<!-- Number of self recoveries to be attempted per hour. Any fatal errors beyond this will
|
||||
cause the wifi stack to turn wifi off and wait for user input.
|
||||
Set to 0 to turn off recovery attempts and always turn off wifi on failures -->
|
||||
<integer translatable="false" name="config_wifiMaxNativeFailureSelfRecoveryPerHour">10</integer>
|
||||
|
||||
<!-- Wifi driver supports IEEE80211AX for softap -->
|
||||
<bool translatable="false" name="config_wifiSoftapIeee80211axSupported">true</bool>
|
||||
|
||||
<!-- Indicates that 11ax mode is supported on this device
|
||||
Note that if this flag is set to true, then 11ax is assumed to be supported.
|
||||
However, if it is left to the default value of false, the 11ax support will
|
||||
be checked via NL80211 interface -->
|
||||
<bool translatable="false" name="config_wifi11axSupportOverride">true</bool>
|
||||
|
||||
<!-- Wifi driver supports 6GHz band for softap -->
|
||||
<bool translatable="false" name="config_wifiSoftap6ghzSupported">false</bool>
|
||||
|
||||
<!-- Wifi driver supports WPA3 Simultaneous Authentication of Equals (WPA3-SAE) for softap -->
|
||||
<bool translatable="false" name="config_wifi_softap_sae_supported">true</bool>
|
||||
|
||||
<!-- Override channel utilization estimation with fixed value, disabled in brcm-based pixels -->
|
||||
<bool translatable="false" name="config_wifiChannelUtilizationOverrideEnabled">false</bool>
|
||||
|
||||
<!-- Enable adding minimum confirmation duration when sending network score to connectivity service. -->
|
||||
<bool translatable="false" name="config_wifiMinConfirmationDurationSendNetworkScoreEnabled">true</bool>
|
||||
|
||||
<!-- Enable concurrent STA + STA peer to peer + internet connectivity -->
|
||||
<bool translatable="false" name="config_wifiMultiStaLocalOnlyConcurrencyEnabled">true</bool>
|
||||
|
||||
<!-- Enable concurrent STA + STA MBB support -->
|
||||
<bool translatable="false" name="config_wifiMultiStaNetworkSwitchingMakeBeforeBreakEnabled">true</bool>
|
||||
|
||||
<!-- Enable concurrent Bridged access point (AP) support -->
|
||||
<bool translatable="false" name="config_wifiBridgedSoftApSupported">true</bool>
|
||||
|
||||
<!-- Enable concurrent STA + Bridged access point (AP) support -->
|
||||
<bool translatable="false" name="config_wifiStaWithBridgedSoftApConcurrencySupported">true</bool>
|
||||
|
||||
<!-- Indicates that SAE Hash-to-Element is supported on this device -->
|
||||
<bool translatable="false" name="config_wifiSaeH2eSupported">true</bool>
|
||||
|
||||
<!-- Enable the default coex channel avoidance algorithm and disable the functionality of
|
||||
WifiManager#setCoexUnsafeChannels. -->
|
||||
<bool translatable="false" name="config_wifiDefaultCoexAlgorithmEnabled">true</bool>
|
||||
|
||||
<!-- Whether to use the explicit vendor HAL API: IWifiStaIface.setRoamingState for disabling fw roaming. -->
|
||||
<bool translatable="false" name="config_wifiUseHalApiToDisableFwRoaming">true</bool>
|
||||
|
||||
<!-- Indicate the driver doesn't support NL80211 Reg changed event -->
|
||||
<bool translatable="false" name="config_wifiDriverSupportedNl80211RegChangedEvent">false</bool>
|
||||
|
||||
<!-- boolean indicating whether or not to disable shutdown idle instance timer in the bridged mode when charging -->
|
||||
<bool translatable="false" name ="config_wifiFrameworkSoftApDisableBridgedModeShutdownIdleInstanceWhenCharging">true</bool>
|
||||
|
||||
<!-- Indicate whether the verbose logging is always on -->
|
||||
<!-- 0: verbose logging controlled by user
|
||||
1: verbose logging on by default for userdebug
|
||||
2: verbose logging on by default for all builds -->
|
||||
<integer translatable="false" name="config_wifiVerboseLoggingAlwaysOnLevel">1</integer>
|
||||
</resources>
|
30
sensors/Android.mk
Normal file
30
sensors/Android.mk
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Copyright (C) 2009 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.
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
# HAL module implementation stored in
|
||||
# hw/<SENSORS_HARDWARE_MODULE_ID>.<ro.hardware>.so
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_SHARED_LIBRARIES := liblog libcutils libhardware
|
||||
LOCAL_SRC_FILES := sensors_dummy.c
|
||||
LOCAL_MODULE := sensors.akita
|
||||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
||||
LOCAL_LICENSE_CONDITIONS := notice
|
||||
LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
409
sensors/sensors_dummy.c
Normal file
409
sensors/sensors_dummy.c
Normal file
|
@ -0,0 +1,409 @@
|
|||
/*
|
||||
* Copyright (C) 2009 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.
|
||||
*/
|
||||
|
||||
/* this implements a sensors hardware library for the Android emulator.
|
||||
* the following code should be built as a shared library that will be
|
||||
* placed into /system/lib/hw/sensors.goldfish.so
|
||||
*
|
||||
* it will be loaded by the code in hardware/libhardware/hardware.c
|
||||
* which is itself called from com_android_server_SensorService.cpp
|
||||
*/
|
||||
|
||||
#define SENSORS_SERVICE_NAME "sensors"
|
||||
|
||||
#define LOG_TAG "Dummy_Sensors"
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <log/log.h>
|
||||
#include <cutils/sockets.h>
|
||||
#include <hardware/sensors.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#if 0
|
||||
#define D(...) ALOGD(__VA_ARGS__)
|
||||
#else
|
||||
#define D(...) ((void)0)
|
||||
#endif
|
||||
|
||||
#define E(...) ALOGE(__VA_ARGS__)
|
||||
|
||||
/** SENSOR IDS AND NAMES
|
||||
**/
|
||||
|
||||
#define MAX_NUM_SENSORS 8
|
||||
|
||||
#define SUPPORTED_SENSORS ((1<<MAX_NUM_SENSORS)-1)
|
||||
|
||||
#define ID_BASE SENSORS_HANDLE_BASE
|
||||
#define ID_ACCELERATION (ID_BASE+0)
|
||||
#define ID_MAGNETIC_FIELD (ID_BASE+1)
|
||||
#define ID_ORIENTATION (ID_BASE+2)
|
||||
#define ID_TEMPERATURE (ID_BASE+3)
|
||||
#define ID_PROXIMITY (ID_BASE+4)
|
||||
#define ID_LIGHT (ID_BASE+5)
|
||||
#define ID_PRESSURE (ID_BASE+6)
|
||||
#define ID_HUMIDITY (ID_BASE+7)
|
||||
|
||||
#define SENSORS_ACCELERATION (1 << ID_ACCELERATION)
|
||||
#define SENSORS_MAGNETIC_FIELD (1 << ID_MAGNETIC_FIELD)
|
||||
#define SENSORS_ORIENTATION (1 << ID_ORIENTATION)
|
||||
#define SENSORS_TEMPERATURE (1 << ID_TEMPERATURE)
|
||||
#define SENSORS_PROXIMITY (1 << ID_PROXIMITY)
|
||||
#define SENSORS_LIGHT (1 << ID_LIGHT)
|
||||
#define SENSORS_PRESSURE (1 << ID_PRESSURE)
|
||||
#define SENSORS_HUMIDITY (1 << ID_HUMIDITY)
|
||||
|
||||
#define ID_CHECK(x) ((unsigned)((x) - ID_BASE) < MAX_NUM_SENSORS)
|
||||
|
||||
#define SENSORS_LIST \
|
||||
SENSOR_(ACCELERATION,"acceleration") \
|
||||
SENSOR_(MAGNETIC_FIELD,"magnetic-field") \
|
||||
SENSOR_(ORIENTATION,"orientation") \
|
||||
SENSOR_(TEMPERATURE,"temperature") \
|
||||
SENSOR_(PROXIMITY,"proximity") \
|
||||
SENSOR_(LIGHT, "light") \
|
||||
SENSOR_(PRESSURE, "pressure") \
|
||||
SENSOR_(HUMIDITY, "humidity")
|
||||
|
||||
static const struct {
|
||||
const char* name;
|
||||
int id; } _sensorIds[MAX_NUM_SENSORS] =
|
||||
{
|
||||
#define SENSOR_(x,y) { y, ID_##x },
|
||||
SENSORS_LIST
|
||||
#undef SENSOR_
|
||||
};
|
||||
|
||||
static const char*
|
||||
_sensorIdToName( int id )
|
||||
{
|
||||
int nn;
|
||||
for (nn = 0; nn < MAX_NUM_SENSORS; nn++)
|
||||
if (id == _sensorIds[nn].id)
|
||||
return _sensorIds[nn].name;
|
||||
return "<UNKNOWN>";
|
||||
}
|
||||
|
||||
static int
|
||||
_sensorIdFromName( const char* name )
|
||||
{
|
||||
int nn;
|
||||
|
||||
if (name == NULL)
|
||||
return -1;
|
||||
|
||||
for (nn = 0; nn < MAX_NUM_SENSORS; nn++)
|
||||
if (!strcmp(name, _sensorIds[nn].name))
|
||||
return _sensorIds[nn].id;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* return the current time in nanoseconds */
|
||||
static int64_t now_ns(void) {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
return (int64_t)ts.tv_sec * 1000000000 + ts.tv_nsec;
|
||||
}
|
||||
|
||||
/** SENSORS POLL DEVICE
|
||||
**
|
||||
** This one is used to read sensor data from the hardware.
|
||||
** We implement this by simply reading the data from the
|
||||
** emulator through the QEMUD channel.
|
||||
**/
|
||||
|
||||
typedef struct SensorDevice {
|
||||
struct sensors_poll_device_1 device;
|
||||
sensors_event_t sensors[MAX_NUM_SENSORS];
|
||||
uint32_t pendingSensors;
|
||||
int64_t timeStart;
|
||||
int64_t timeOffset;
|
||||
uint32_t active_sensors;
|
||||
int fd;
|
||||
pthread_mutex_t lock;
|
||||
} SensorDevice;
|
||||
|
||||
/* Grab the file descriptor to the emulator's sensors service pipe.
|
||||
* This function returns a file descriptor on success, or -errno on
|
||||
* failure, and assumes the SensorDevice instance's lock is held.
|
||||
*
|
||||
* This is needed because set_delay(), poll() and activate() can be called
|
||||
* from different threads, and poll() is blocking.
|
||||
*
|
||||
* 1) On a first thread, de-activate() all sensors first, then call poll(),
|
||||
* which results in the thread blocking.
|
||||
*
|
||||
* 2) On a second thread, slightly later, call set_delay() then activate()
|
||||
* to enable the acceleration sensor.
|
||||
*
|
||||
* The system expects this to unblock the first thread which will receive
|
||||
* new sensor events after the activate() call in 2).
|
||||
*
|
||||
* This cannot work if both threads don't use the same connection.
|
||||
*
|
||||
* TODO(digit): This protocol is brittle, implement another control channel
|
||||
* for set_delay()/activate()/batch() when supporting HAL 1.3
|
||||
*/
|
||||
static int sensor_device_get_fd_locked(SensorDevice* dev) {
|
||||
/* Create connection to service on first call */
|
||||
if (dev->fd < 0) {
|
||||
int ret = -errno;
|
||||
E("%s: Could not open connection to service: %s", __FUNCTION__,
|
||||
strerror(-ret));
|
||||
return ret;
|
||||
}
|
||||
return dev->fd;
|
||||
}
|
||||
|
||||
/* Pick up one pending sensor event. On success, this returns the sensor
|
||||
* id, and sets |*event| accordingly. On failure, i.e. if there are no
|
||||
* pending events, return -EINVAL.
|
||||
*
|
||||
* Note: The device's lock must be acquired.
|
||||
*/
|
||||
static int sensor_device_pick_pending_event_locked(SensorDevice* d,
|
||||
sensors_event_t* event)
|
||||
{
|
||||
uint32_t mask = SUPPORTED_SENSORS & d->pendingSensors;
|
||||
|
||||
if (mask) {
|
||||
uint32_t i = 31 - __builtin_clz(mask);
|
||||
|
||||
pthread_mutex_lock(&d->lock);
|
||||
d->pendingSensors &= ~(1U << i);
|
||||
*event = d->sensors[i];
|
||||
event->sensor = i;
|
||||
event->version = sizeof(*event);
|
||||
pthread_mutex_unlock(&d->lock);
|
||||
D("%s: %d [%f, %f, %f]", __FUNCTION__,
|
||||
i,
|
||||
event->data[0],
|
||||
event->data[1],
|
||||
event->data[2]);
|
||||
return i;
|
||||
}
|
||||
E("No sensor to return!!! pendingSensors=0x%08x", d->pendingSensors);
|
||||
// we may end-up in a busy loop, slow things down, just in case.
|
||||
usleep(1000);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int sensor_device_close(struct hw_device_t* dev0)
|
||||
{
|
||||
SensorDevice* dev = (void*)dev0;
|
||||
// Assume that there are no other threads blocked on poll()
|
||||
if (dev->fd >= 0) {
|
||||
close(dev->fd);
|
||||
dev->fd = -1;
|
||||
}
|
||||
pthread_mutex_destroy(&dev->lock);
|
||||
free(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Return an array of sensor data. This function blocks until there is sensor
|
||||
* related events to report. On success, it will write the events into the
|
||||
* |data| array, which contains |count| items. The function returns the number
|
||||
* of events written into the array, which shall never be greater than |count|.
|
||||
* On error, return -errno code.
|
||||
*
|
||||
* Note that according to the sensor HAL [1], it shall never return 0!
|
||||
*
|
||||
* [1] http://source.android.com/devices/sensors/hal-interface.html
|
||||
*/
|
||||
static int sensor_device_poll(struct sensors_poll_device_t *dev0,
|
||||
sensors_event_t* data, int count)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int sensor_device_activate(struct sensors_poll_device_t *dev0,
|
||||
int handle,
|
||||
int enabled)
|
||||
{
|
||||
SensorDevice* dev = (void*)dev0;
|
||||
|
||||
D("%s: handle=%s (%d) enabled=%d", __FUNCTION__,
|
||||
_sensorIdToName(handle), handle, enabled);
|
||||
|
||||
/* Sanity check */
|
||||
if (!ID_CHECK(handle)) {
|
||||
E("%s: bad handle ID", __FUNCTION__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Exit early if sensor is already enabled/disabled. */
|
||||
uint32_t mask = (1U << handle);
|
||||
uint32_t sensors = enabled ? mask : 0;
|
||||
|
||||
pthread_mutex_lock(&dev->lock);
|
||||
|
||||
uint32_t active = dev->active_sensors;
|
||||
uint32_t new_sensors = (active & ~mask) | (sensors & mask);
|
||||
uint32_t changed = active ^ new_sensors;
|
||||
|
||||
if (changed)
|
||||
dev->active_sensors = new_sensors;
|
||||
|
||||
pthread_mutex_unlock(&dev->lock);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_device_default_flush(
|
||||
struct sensors_poll_device_1* dev0,
|
||||
int handle) {
|
||||
|
||||
SensorDevice* dev = (void*)dev0;
|
||||
|
||||
D("%s: handle=%s (%d)", __FUNCTION__,
|
||||
_sensorIdToName(handle), handle);
|
||||
|
||||
/* Sanity check */
|
||||
if (!ID_CHECK(handle)) {
|
||||
E("%s: bad handle ID", __FUNCTION__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&dev->lock);
|
||||
dev->sensors[handle].version = META_DATA_VERSION;
|
||||
dev->sensors[handle].type = SENSOR_TYPE_META_DATA;
|
||||
dev->sensors[handle].sensor = 0;
|
||||
dev->sensors[handle].timestamp = 0;
|
||||
dev->sensors[handle].meta_data.what = META_DATA_FLUSH_COMPLETE;
|
||||
dev->pendingSensors |= (1U << handle);
|
||||
pthread_mutex_unlock(&dev->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_device_set_delay(struct sensors_poll_device_t *dev0,
|
||||
int handle __unused,
|
||||
int64_t ns)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sensor_device_default_batch(
|
||||
struct sensors_poll_device_1* dev,
|
||||
int sensor_handle,
|
||||
int flags,
|
||||
int64_t sampling_period_ns,
|
||||
int64_t max_report_latency_ns) {
|
||||
return sensor_device_set_delay(dev, sensor_handle, sampling_period_ns);
|
||||
}
|
||||
|
||||
/** MODULE REGISTRATION SUPPORT
|
||||
**
|
||||
** This is required so that hardware/libhardware/hardware.c
|
||||
** will dlopen() this library appropriately.
|
||||
**/
|
||||
|
||||
/*
|
||||
* the following is the list of all supported sensors.
|
||||
* this table is used to build sSensorList declared below
|
||||
* according to which hardware sensors are reported as
|
||||
* available from the emulator (see get_sensors_list below)
|
||||
*
|
||||
* note: numerical values for maxRange/resolution/power for
|
||||
* all sensors but light, pressure and humidity were
|
||||
* taken from the reference AK8976A implementation
|
||||
*/
|
||||
static const struct sensor_t sSensorListInit[] = {
|
||||
{ .name = "Accelerometer",
|
||||
.vendor = "The Android Open Source Project",
|
||||
.version = 1,
|
||||
.handle = ID_ACCELERATION,
|
||||
.type = SENSOR_TYPE_ACCELEROMETER,
|
||||
.maxRange = 2.8f,
|
||||
.resolution = 1.0f/4032.0f,
|
||||
.power = 3.0f,
|
||||
.minDelay = 10000,
|
||||
.maxDelay = 60 * 1000 * 1000,
|
||||
.fifoReservedEventCount = 0,
|
||||
.fifoMaxEventCount = 0,
|
||||
.stringType = 0,
|
||||
.requiredPermission = 0,
|
||||
.flags = SENSOR_FLAG_CONTINUOUS_MODE,
|
||||
.reserved = {}
|
||||
},
|
||||
};
|
||||
|
||||
static struct sensor_t sSensorList[1];
|
||||
|
||||
static int sensors__get_sensors_list(struct sensors_module_t* module __unused,
|
||||
struct sensor_t const** list)
|
||||
{
|
||||
*list = sSensorList;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
open_sensors(const struct hw_module_t* module,
|
||||
const char* name,
|
||||
struct hw_device_t* *device)
|
||||
{
|
||||
int status = -EINVAL;
|
||||
|
||||
D("%s: name=%s", __FUNCTION__, name);
|
||||
|
||||
if (!strcmp(name, SENSORS_HARDWARE_POLL)) {
|
||||
SensorDevice *dev = malloc(sizeof(*dev));
|
||||
|
||||
memset(dev, 0, sizeof(*dev));
|
||||
|
||||
dev->device.common.tag = HARDWARE_DEVICE_TAG;
|
||||
dev->device.common.version = SENSORS_DEVICE_API_VERSION_1_3;
|
||||
dev->device.common.module = (struct hw_module_t*) module;
|
||||
dev->device.common.close = sensor_device_close;
|
||||
dev->device.poll = sensor_device_poll;
|
||||
dev->device.activate = sensor_device_activate;
|
||||
dev->device.setDelay = sensor_device_set_delay;
|
||||
|
||||
// Version 1.3-specific functions
|
||||
dev->device.batch = sensor_device_default_batch;
|
||||
dev->device.flush = sensor_device_default_flush;
|
||||
|
||||
dev->fd = -1;
|
||||
pthread_mutex_init(&dev->lock, NULL);
|
||||
|
||||
*device = &dev->device.common;
|
||||
status = 0;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
static struct hw_module_methods_t sensors_module_methods = {
|
||||
.open = open_sensors
|
||||
};
|
||||
|
||||
struct sensors_module_t HAL_MODULE_INFO_SYM = {
|
||||
.common = {
|
||||
.tag = HARDWARE_MODULE_TAG,
|
||||
.version_major = 1,
|
||||
.version_minor = 0,
|
||||
.id = SENSORS_HARDWARE_MODULE_ID,
|
||||
.name = "Dummy SENSORS Module",
|
||||
.author = "The Android Open Source Project",
|
||||
.methods = &sensors_module_methods,
|
||||
},
|
||||
.get_sensors_list = sensors__get_sensors_list
|
||||
};
|
618
thermal_info_config_akita.json
Normal file
618
thermal_info_config_akita.json
Normal file
|
@ -0,0 +1,618 @@
|
|||
{
|
||||
"Sensors":[
|
||||
{
|
||||
"Name":"battery",
|
||||
"Type":"BATTERY",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"60.0"
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":0.001
|
||||
},
|
||||
{
|
||||
"Name":"LITTLE",
|
||||
"Type":"CPU",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
115.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":0.001
|
||||
},
|
||||
{
|
||||
"Name":"MID",
|
||||
"Type":"CPU",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
115.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":0.001
|
||||
},
|
||||
{
|
||||
"Name":"G3D",
|
||||
"Type":"GPU",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
115.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":0.001
|
||||
},
|
||||
{
|
||||
"Name":"battery_cycle",
|
||||
"Type":"BCL_VOLTAGE",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":false
|
||||
},
|
||||
{
|
||||
"Name":"critical-battery-cell",
|
||||
"Type":"BCL_VOLTAGE",
|
||||
"VirtualSensor":true,
|
||||
"Formula":"COUNT_THRESHOLD",
|
||||
"TriggerSensor": "vdroop1",
|
||||
"Combination":[
|
||||
"battery",
|
||||
"battery_cycle",
|
||||
"vdroop1"
|
||||
],
|
||||
"Coefficient":[
|
||||
"-10000",
|
||||
"400",
|
||||
"1000"
|
||||
],
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
3.00,
|
||||
"NAN"
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"FLASH_LED_REDUCE",
|
||||
"Type":"UNKNOWN",
|
||||
"VirtualSensor":true,
|
||||
"Formula":"COUNT_THRESHOLD",
|
||||
"TriggerSensor": "vdroop1",
|
||||
"Combination":[
|
||||
"battery",
|
||||
"battery_cycle",
|
||||
"vdroop1"
|
||||
],
|
||||
"Coefficient":[
|
||||
"-10000",
|
||||
"400",
|
||||
"1000"
|
||||
],
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
3.00,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true,
|
||||
"SendPowerHint":true
|
||||
},
|
||||
{
|
||||
"Name":"soc",
|
||||
"Type":"BCL_PERCENTAGE",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
80,
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"batoilo",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
5000,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true,
|
||||
"BindedCdevInfo": [
|
||||
{
|
||||
"CdevRequest": "thermal-cpufreq-2",
|
||||
"LimitInfo": [0, 0, 0, 0, 7, 10, 10]
|
||||
},
|
||||
{
|
||||
"CdevRequest": "thermal-gpufreq-0",
|
||||
"LimitInfo": [0, 0, 0, 0, 10, 11, 11]
|
||||
},
|
||||
{
|
||||
"CdevRequest": "tpu_cooling",
|
||||
"LimitInfo": [0, 0, 0, 0, 4, 4, 4]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name":"BCL_AUDIO_BAACL",
|
||||
"Type":"BCL_VOLTAGE",
|
||||
"VirtualSensor":true,
|
||||
"Formula":"COUNT_THRESHOLD",
|
||||
"TriggerSensor": "soc",
|
||||
"Combination":[
|
||||
"battery",
|
||||
"soc"
|
||||
],
|
||||
"Coefficient":[
|
||||
"-25000",
|
||||
"80"
|
||||
],
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
2.0,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"vdroop1",
|
||||
"Type":"BCL_VOLTAGE",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
1000,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true,
|
||||
"BindedCdevInfo": [
|
||||
{
|
||||
"CdevRequest": "thermal-cpufreq-2",
|
||||
"LimitInfo": [0, 0, 0, 0, 7, 10, 10]
|
||||
},
|
||||
{
|
||||
"CdevRequest": "thermal-gpufreq-0",
|
||||
"LimitInfo": [0, 0, 0, 0, 7, 7, 7]
|
||||
},
|
||||
{
|
||||
"CdevRequest": "tpu_cooling",
|
||||
"LimitInfo": [0, 0, 0, 0, 4, 4, 4]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name":"vdroop2",
|
||||
"Type":"BCL_VOLTAGE",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
1200,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true,
|
||||
"BindedCdevInfo": [
|
||||
{
|
||||
"CdevRequest": "thermal-cpufreq-2",
|
||||
"LimitInfo": [0, 0, 0, 0, 7, 10, 10]
|
||||
},
|
||||
{
|
||||
"CdevRequest": "thermal-gpufreq-0",
|
||||
"LimitInfo": [0, 0, 0, 0, 15, 15, 15]
|
||||
},
|
||||
{
|
||||
"CdevRequest": "tpu_cooling",
|
||||
"LimitInfo": [0, 0, 0, 0, 4, 4, 4]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name":"smpl_gm",
|
||||
"Type":"BCL_VOLTAGE",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
1100,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true,
|
||||
"BindedCdevInfo": [
|
||||
{
|
||||
"CdevRequest": "thermal-cpufreq-2",
|
||||
"LimitInfo": [0, 0, 0, 0, 7, 10, 10]
|
||||
},
|
||||
{
|
||||
"CdevRequest": "thermal-gpufreq-0",
|
||||
"LimitInfo": [0, 0, 0, 0, 13, 13, 13]
|
||||
},
|
||||
{
|
||||
"CdevRequest": "tpu_cooling",
|
||||
"LimitInfo": [0, 0, 0, 0, 4, 4, 4]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name":"ocp_cpu1",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
7000,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"ocp_cpu2",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
12000,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"ocp_tpu",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
10500,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"ocp_gpu",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
12000,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"soft_ocp_cpu2",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
9000,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"soft_ocp_cpu1",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
7000,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"soft_ocp_tpu",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
8500,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"soft_ocp_gpu",
|
||||
"Type":"BCL_CURRENT",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
9000,
|
||||
"NAN",
|
||||
"NAN"
|
||||
],
|
||||
"HotHysteresis":[
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
100,
|
||||
0.0,
|
||||
0.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":1,
|
||||
"Monitor":true
|
||||
},
|
||||
{
|
||||
"Name":"TPU",
|
||||
"Type":"NPU",
|
||||
"HotThreshold":[
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
"NAN",
|
||||
115.0
|
||||
],
|
||||
"VrThreshold":"NAN",
|
||||
"Multiplier":0.001
|
||||
}
|
||||
],
|
||||
"CoolingDevices":[
|
||||
{
|
||||
"Name":"thermal-cpufreq-0",
|
||||
"Type":"CPU",
|
||||
"WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote",
|
||||
"State2Power":["1100", "1050", "1000", "950", "900", "850", "800", "750", "700", "650", "600"]
|
||||
},
|
||||
{
|
||||
"Name":"thermal-cpufreq-1",
|
||||
"Type":"CPU",
|
||||
"WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote",
|
||||
"State2Power":["1400", "1350", "1300", "1250", "1200", "1150", "1100", "1050", "1000", "950", "900", "850", "800", "750"]
|
||||
},
|
||||
{
|
||||
"Name":"thermal-cpufreq-2",
|
||||
"Type":"CPU",
|
||||
"WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote",
|
||||
"State2Power":["1450", "1400", "1350", "1300", "1250", "1200", "1150", "1100", "1050", "1000", "950", "900", "850", "800", "750"]
|
||||
},
|
||||
{
|
||||
"Name":"thermal-gpufreq-0",
|
||||
"Type":"GPU",
|
||||
"WritePath":"/dev/thermal/cdev-by-name/thermal-gpufreq-0/user_vote"
|
||||
},
|
||||
{
|
||||
"Name":"tpu_cooling",
|
||||
"Type":"NPU",
|
||||
"WritePath":"/dev/thermal/cdev-by-name/tpu_cooling/user_vote"
|
||||
}
|
||||
],
|
||||
"PowerRails":[
|
||||
{
|
||||
"Name":"PPVAR_VSYS_PWR_DISP"
|
||||
},
|
||||
{
|
||||
"Name":"VSYS_PWR_MODEM"
|
||||
},
|
||||
{
|
||||
"Name":"S2M_VDD_CPUCL2",
|
||||
"PowerSampleDelay":14000,
|
||||
"PowerSampleCount":5
|
||||
|
||||
},
|
||||
{
|
||||
"Name":"S3M_VDD_CPUCL1",
|
||||
"PowerSampleDelay":14000,
|
||||
"PowerSampleCount":5
|
||||
},
|
||||
{
|
||||
"Name":"S4M_VDD_CPUCL0",
|
||||
"PowerSampleDelay":14000,
|
||||
"PowerSampleCount":5
|
||||
},
|
||||
{
|
||||
"Name":"S5M_VDD_INT"
|
||||
},
|
||||
{
|
||||
"Name":"S1M_VDD_MIF"
|
||||
},
|
||||
{
|
||||
"Name":"S2S_VDD_G3D",
|
||||
"PowerSampleDelay":14000,
|
||||
"PowerSampleCount":5
|
||||
}
|
||||
]
|
||||
}
|
142
uwb/UWB-calibration.conf
Normal file
142
uwb/UWB-calibration.conf
Normal file
|
@ -0,0 +1,142 @@
|
|||
[CCC]version=2
|
||||
[CCC]ant0.ch5.prf64.pdoa_iso_rf2_rf1=0
|
||||
[CCC]ant0.ch5.prf64.pdoa_iso_rf1_rf2=0
|
||||
[CCC]ant0.ch9.prf64.pdoa_iso_rf2_rf1=0
|
||||
[CCC]ant0.ch9.prf64.pdoa_iso_rf1_rf2=0
|
||||
[CCC]ant0.ch5.prf64.pdoa_offset=0
|
||||
[CCC]ant0.ch9.prf64.pdoa_offset=0
|
||||
[CCC]ant0.ch5.prf64.pll_locking_code=0
|
||||
[CCC]ant0.ch9.prf64.pll_locking_code=0
|
||||
[CCC]id=0
|
||||
[CCC]wifi_coex_time_gap=10
|
||||
[CCC]ap_coop_mode=1
|
||||
[CCC]antenna_selection=4
|
||||
ant0.ch5.prf16.ant_delay=16450
|
||||
ant0.ch5.prf16.tx_power=0
|
||||
ant0.ch5.prf16.pg_count=0
|
||||
ant0.ch5.prf16.pg_delay=0
|
||||
ant0.ch5.prf64.ant_delay=16450
|
||||
ant0.ch5.prf64.tx_power=0
|
||||
ant0.ch5.prf64.pg_count=0
|
||||
ant0.ch5.prf64.pg_delay=0
|
||||
ant0.ch9.prf16.ant_delay=16450
|
||||
ant0.ch9.prf16.tx_power=0
|
||||
ant0.ch9.prf16.pg_count=0
|
||||
ant0.ch9.prf16.pg_delay=0
|
||||
ant0.ch9.prf64.ant_delay=16450
|
||||
ant0.ch9.prf64.tx_power=0
|
||||
ant0.ch9.prf64.pg_count=0
|
||||
ant0.ch9.prf64.pg_delay=0
|
||||
ant0.port=0
|
||||
ant0.selector_gpio=7
|
||||
ant0.selector_gpio_value=0
|
||||
ant1.ch5.prf16.ant_delay=16450
|
||||
ant1.ch5.prf16.tx_power=0
|
||||
ant1.ch5.prf16.pg_count=0
|
||||
ant1.ch5.prf16.pg_delay=0
|
||||
ant1.ch5.prf64.ant_delay=16450
|
||||
ant1.ch5.prf64.tx_power=0
|
||||
ant1.ch5.prf64.pg_count=0
|
||||
ant1.ch5.prf64.pg_delay=0
|
||||
ant1.ch9.prf16.ant_delay=16450
|
||||
ant1.ch9.prf16.tx_power=0
|
||||
ant1.ch9.prf16.pg_count=0
|
||||
ant1.ch9.prf16.pg_delay=0
|
||||
ant1.ch9.prf64.ant_delay=16450
|
||||
ant1.ch9.prf64.tx_power=0
|
||||
ant1.ch9.prf64.pg_count=0
|
||||
ant1.ch9.prf64.pg_delay=0
|
||||
ant1.port=0
|
||||
ant1.selector_gpio=7
|
||||
ant1.selector_gpio_value=1
|
||||
ant2.ch5.prf16.ant_delay=16450
|
||||
ant2.ch5.prf16.tx_power=0
|
||||
ant2.ch5.prf16.pg_count=0
|
||||
ant2.ch5.prf16.pg_delay=0
|
||||
ant2.ch5.prf64.ant_delay=16450
|
||||
ant2.ch5.prf64.tx_power=0
|
||||
ant2.ch5.prf64.pg_count=0
|
||||
ant2.ch5.prf64.pg_delay=0
|
||||
ant2.ch9.prf16.ant_delay=16450
|
||||
ant2.ch9.prf16.tx_power=0
|
||||
ant2.ch9.prf16.pg_count=0
|
||||
ant2.ch9.prf16.pg_delay=0
|
||||
ant2.ch9.prf64.ant_delay=16450
|
||||
ant2.ch9.prf64.tx_power=0
|
||||
ant2.ch9.prf64.pg_count=0
|
||||
ant2.ch9.prf64.pg_delay=0
|
||||
ant2.port=1
|
||||
ant2.selector_gpio=6
|
||||
ant2.selector_gpio_value=0
|
||||
ant3.ch5.prf16.ant_delay=16450
|
||||
ant3.ch5.prf16.tx_power=0
|
||||
ant3.ch5.prf16.pg_count=0
|
||||
ant3.ch5.prf16.pg_delay=0
|
||||
ant3.ch5.prf64.ant_delay=16450
|
||||
ant3.ch5.prf64.tx_power=0
|
||||
ant3.ch5.prf64.pg_count=0
|
||||
ant3.ch5.prf64.pg_delay=0
|
||||
ant3.ch9.prf16.ant_delay=16450
|
||||
ant3.ch9.prf16.tx_power=0
|
||||
ant3.ch9.prf16.pg_count=0
|
||||
ant3.ch9.prf16.pg_delay=0
|
||||
ant3.ch9.prf64.ant_delay=16450
|
||||
ant3.ch9.prf64.tx_power=0
|
||||
ant3.ch9.prf64.pg_count=0
|
||||
ant3.ch9.prf64.pg_delay=0
|
||||
ant3.port=1
|
||||
ant3.selector_gpio=6
|
||||
ant3.selector_gpio_value=1
|
||||
ant0.ant1.ch5.pdoa_offset=0
|
||||
ant0.ant1.ch9.pdoa_offset=0
|
||||
ant0.ant2.ch5.pdoa_offset=0
|
||||
ant0.ant2.ch9.pdoa_offset=0
|
||||
ant1.ant2.ch5.pdoa_offset=2173
|
||||
ant1.ant2.ch9.pdoa_offset=3555
|
||||
ant0.ant3.ch5.pdoa_offset=0
|
||||
ant0.ant3.ch9.pdoa_offset=0
|
||||
ant1.ant3.ch5.pdoa_offset=3845
|
||||
ant1.ant3.ch9.pdoa_offset=647
|
||||
ant2.ant3.ch5.pdoa_offset=0
|
||||
ant2.ant3.ch9.pdoa_offset=0
|
||||
ch5.pll_locking_code=0
|
||||
ch9.pll_locking_code=0
|
||||
ant1.ant2.ch5.pdoa_lut=3d:ea:7b:0a:66:ea:c3:09:a4:ea:0a:09:cd:ea:66:08:0a:eb:ae:07:33:eb:f6:06:48:eb:52:06:71:eb:9a:05:c3:eb:e1:04:e1:ec:29:04:c3:ef:85:03:a4:f4:cd:02:14:f8:14:02:b8:fa:5c:01:8f:fc:b8:00:e1:fe:00:00:48:01:48:ff:85:03:a4:fe:ae:05:ec:fd:00:08:33:fd:d7:09:7b:fc:85:0b:d7:fb:0a:0d:1f:fb:66:0e:66:fa:33:0f:ae:f9:00:10:0a:f9:a4:10:52:f8:1f:11:9a:f7:5c:11:f6:f6:9a:11:3d:f6:ae:11:85:f5
|
||||
ant1.ant2.ch9.pdoa_lut=c3:ed:7b:0a:29:ee:c3:09:3d:ee:0a:09:cd:ee:66:08:c3:ef:ae:07:f6:f0:f6:06:3d:f2:52:06:52:f2:9a:05:cd:f2:e1:04:5c:f3:29:04:c3:f3:85:03:b8:f4:cd:02:71:f7:14:02:52:fa:5c:01:85:fd:b8:00:00:00:00:00:0a:01:48:ff:5c:01:a4:fe:14:02:ec:fd:5c:03:33:fd:48:05:7b:fc:b8:06:d7:fb:14:08:1f:fb:33:09:66:fa:ec:09:ae:f9:3d:0a:0a:f9:0a:0b:52:f8:1f:0b:9a:f7:48:0b:f6:f6:85:0b:3d:f6:9a:0b:85:f5
|
||||
ant1.ant3.ch5.pdoa_lut=66:ec:7b:0a:e1:ec:c3:09:14:ee:0a:09:d7:ef:66:08:8f:f2:ae:07:00:f6:f6:06:cd:f6:52:06:33:f7:9a:05:d7:f7:e1:04:48:f9:29:04:33:fd:85:03:d7:fd:cd:02:3d:fe:14:02:ec:ff:5c:01:14:00:b8:00:3d:00:00:00:cd:02:48:ff:29:04:a4:fe:a4:04:ec:fd:85:05:33:fd:e1:06:7b:fc:b8:08:d7:fb:14:0a:1f:fb:e1:0a:66:fa:1f:0b:0a:f9:1f:0b:ae:f9:5c:0b:52:f8:c3:0b:9a:f7:52:0c:f6:f6:0a:0d:3d:f6:00:0e:85:f5
|
||||
ant1.ant3.ch9.pdoa_lut=0a:ef:7b:0a:c3:ef:c3:09:00:f0:0a:09:14:f0:66:08:7b:f0:ae:07:48:f1:f6:06:00:f2:52:06:c3:f3:9a:05:00:f6:e1:04:d7:f7:29:04:1f:f9:85:03:ae:f9:cd:02:e1:fa:14:02:e1:fc:5c:01:b8:fe:b8:00:c3:ff:00:00:00:02:48:ff:5c:05:a4:fe:52:08:ec:fd:14:0a:33:fd:e1:0a:7b:fc:14:0c:d7:fb:14:0e:1f:fb:1f:0f:66:fa:00:10:ae:f9:b8:10:0a:f9:29:12:52:f8:00:14:9a:f7:7b:16:f6:f6:d7:17:3d:f6:29:18:85:f5
|
||||
xtal_trim=23
|
||||
temperature_reference=85
|
||||
smart_tx_power=1
|
||||
auto_sleep_margin=20000
|
||||
restricted_channels=0
|
||||
[HAL]aoa_capability=1
|
||||
[HAL]ant_sets.ch5.range.rx_ant_set_nonranging = 6
|
||||
[HAL]ant_sets.ch5.range.rx_ant_set_ranging = 3
|
||||
[HAL]ant_sets.ch5.range.tx_ant_set_nonranging = 0
|
||||
[HAL]ant_sets.ch5.range.tx_ant_set_ranging = 0
|
||||
[HAL]ant_sets.ch5.azimuth.rx_ant_set_nonranging = 6
|
||||
[HAL]ant_sets.ch5.azimuth.rx_ant_set_ranging = 3
|
||||
[HAL]ant_sets.ch5.azimuth.tx_ant_set_nonranging = 0
|
||||
[HAL]ant_sets.ch5.azimuth.tx_ant_set_ranging = 0
|
||||
[HAL]ant_sets.ch9.range.rx_ant_set_nonranging = 6
|
||||
[HAL]ant_sets.ch9.range.rx_ant_set_ranging = 3
|
||||
[HAL]ant_sets.ch9.range.tx_ant_set_nonranging = 0
|
||||
[HAL]ant_sets.ch9.range.tx_ant_set_ranging = 0
|
||||
[HAL]ant_sets.ch5.elevation.rx_ant_set_nonranging = 6
|
||||
[HAL]ant_sets.ch5.elevation.rx_ant_set_ranging = 1
|
||||
[HAL]ant_sets.ch5.elevation.tx_ant_set_nonranging = 0
|
||||
[HAL]ant_sets.ch5.elevation.tx_ant_set_ranging = 0
|
||||
[HAL]ant_sets.ch9.elevation.rx_ant_set_nonranging = 6
|
||||
[HAL]ant_sets.ch9.elevation.rx_ant_set_ranging = 1
|
||||
[HAL]ant_sets.ch9.elevation.tx_ant_set_nonranging = 0
|
||||
[HAL]ant_sets.ch9.elevation.tx_ant_set_ranging = 0
|
||||
[HAL]ant_sets.ch9.azimuth.rx_ant_set_nonranging = 6
|
||||
[HAL]ant_sets.ch9.azimuth.rx_ant_set_ranging = 3
|
||||
[HAL]ant_sets.ch9.azimuth.tx_ant_set_nonranging = 0
|
||||
[HAL]ant_sets.ch9.azimuth.tx_ant_set_ranging = 0
|
||||
[HAL]minimum_system_offset_uwbtime0=500
|
||||
coex_gpio=4
|
||||
coex_delay_us=1000
|
||||
coex_margin_us=500
|
||||
coex_interval_us=2000
|
21
uwb/uwb_calibration.mk
Normal file
21
uwb/uwb_calibration.mk
Normal file
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# 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.
|
||||
|
||||
LOCAL_UWB_CAL_DIR=device/google/akita/uwb
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration.conf \
|
||||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration-unknown.conf \
|
||||
$(LOCAL_UWB_CAL_DIR)/UWB-calibration.conf:$(TARGET_COPY_OUT_VENDOR)/etc/UWB-calibration-default.conf \
|
52
vibrator/Android.bp
Normal file
52
vibrator/Android.bp
Normal file
|
@ -0,0 +1,52 @@
|
|||
//
|
||||
// Copyright (C) 2019 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "PixelVibratorDefaultsAkita",
|
||||
relative_install_path: "hw",
|
||||
static_libs: [
|
||||
"PixelVibratorCommonAkita",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libbinder_ndk",
|
||||
"libcutils",
|
||||
"libhardware",
|
||||
"liblog",
|
||||
"libutils",
|
||||
],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "PixelVibratorBinaryDefaultsAkita",
|
||||
defaults: ["PixelVibratorDefaultsAkita"],
|
||||
shared_libs: [
|
||||
"android.hardware.vibrator-V2-ndk",
|
||||
],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "PixelVibratorTestDefaultsAkita",
|
||||
defaults: ["PixelVibratorDefaultsAkita"],
|
||||
static_libs: [
|
||||
"android.hardware.vibrator-V2-ndk",
|
||||
],
|
||||
test_suites: ["device-tests"],
|
||||
require_root: true,
|
||||
}
|
3
vibrator/OWNERS
Normal file
3
vibrator/OWNERS
Normal file
|
@ -0,0 +1,3 @@
|
|||
chrispaulo@google.com
|
||||
taikuo@google.com
|
||||
chasewu@google.com
|
73
vibrator/common/Android.bp
Normal file
73
vibrator/common/Android.bp
Normal file
|
@ -0,0 +1,73 @@
|
|||
//
|
||||
// Copyright (C) 2019 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
soong_config_module_type {
|
||||
name: "haptics_feature_cc_defaults_akita",
|
||||
module_type: "cc_defaults",
|
||||
config_namespace: "haptics",
|
||||
variables: [
|
||||
"actuator_model",
|
||||
],
|
||||
properties: ["cflags"],
|
||||
}
|
||||
|
||||
soong_config_string_variable {
|
||||
name: "actuator_model",
|
||||
values: [
|
||||
"luxshare_ict_081545",
|
||||
"luxshare_ict_lt_xlra1906d",
|
||||
],
|
||||
}
|
||||
|
||||
haptics_feature_cc_defaults_akita {
|
||||
name: "haptics_feature_defaults_akita",
|
||||
soong_config_variables: {
|
||||
actuator_model: {
|
||||
luxshare_ict_081545: {
|
||||
cflags: [
|
||||
"-DLUXSHARE_ICT_081545",
|
||||
],
|
||||
},
|
||||
luxshare_ict_lt_xlra1906d: {
|
||||
cflags: [
|
||||
"-DLUXSHARE_ICT_LT_XLRA1906D",
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
cc_library {
|
||||
name: "PixelVibratorCommonAkita",
|
||||
srcs: [
|
||||
"HardwareBase.cpp",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libcutils",
|
||||
"liblog",
|
||||
"libutils",
|
||||
],
|
||||
cflags: [
|
||||
"-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)",
|
||||
"-DLOG_TAG=\"android.hardware.vibrator@1.x-common\"",
|
||||
],
|
||||
export_include_dirs: ["."],
|
||||
vendor_available: true,
|
||||
}
|
154
vibrator/common/HardwareBase.cpp
Normal file
154
vibrator/common/HardwareBase.cpp
Normal file
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
* Copyright (C) 2019 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.
|
||||
*/
|
||||
|
||||
#include "HardwareBase.h"
|
||||
|
||||
#include <cutils/properties.h>
|
||||
#include <log/log.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
|
||||
HwApiBase::HwApiBase() {
|
||||
std::map<std::string, std::ifstream> ret;
|
||||
|
||||
mPathPrefix = std::getenv("HWAPI_PATH_PREFIX") ?: "";
|
||||
|
||||
auto value = std::getenv("HWAPI_DEBUG_NODES");
|
||||
std::istringstream paths{value};
|
||||
std::string path;
|
||||
|
||||
while (paths >> path) {
|
||||
ret[path].open(mPathPrefix + path + "default/vibe_state");
|
||||
if (ret[path].good()) {
|
||||
mPathPrefix += path;
|
||||
ALOGE("Vibrator found at %s!", mPathPrefix.c_str());
|
||||
ret[path].close();
|
||||
break;
|
||||
}
|
||||
ret[path].close();
|
||||
}
|
||||
|
||||
if (mPathPrefix.empty()) {
|
||||
ALOGE("Failed get HWAPI path prefix!");
|
||||
}
|
||||
}
|
||||
|
||||
void HwApiBase::saveName(const std::string &name, const std::ios *stream) {
|
||||
mNames[stream] = name;
|
||||
}
|
||||
|
||||
bool HwApiBase::has(const std::ios &stream) {
|
||||
return !!stream;
|
||||
}
|
||||
|
||||
void HwApiBase::debug(int fd) {
|
||||
dprintf(fd, "Kernel:\n");
|
||||
|
||||
for (auto &entry : utils::pathsFromEnv("HWAPI_DEBUG_PATHS", mPathPrefix)) {
|
||||
auto &path = entry.first;
|
||||
auto &stream = entry.second;
|
||||
std::string line;
|
||||
|
||||
dprintf(fd, " %s:\n", path.c_str());
|
||||
while (std::getline(stream, line)) {
|
||||
dprintf(fd, " %s\n", line.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
mRecordsMutex.lock();
|
||||
dprintf(fd, " Records:\n");
|
||||
for (auto &r : mRecords) {
|
||||
if (r == nullptr) {
|
||||
continue;
|
||||
}
|
||||
dprintf(fd, " %s\n", r->toString(mNames).c_str());
|
||||
}
|
||||
mRecordsMutex.unlock();
|
||||
}
|
||||
|
||||
HwCalBase::HwCalBase() {
|
||||
std::ifstream calfile;
|
||||
auto propertyPrefix = std::getenv("PROPERTY_PREFIX");
|
||||
|
||||
if (propertyPrefix != NULL) {
|
||||
mPropertyPrefix = std::string(propertyPrefix);
|
||||
} else {
|
||||
ALOGE("Failed get property prefix!");
|
||||
}
|
||||
|
||||
utils::fileFromEnv("CALIBRATION_FILEPATH", &calfile);
|
||||
|
||||
for (std::string line; std::getline(calfile, line);) {
|
||||
if (line.empty() || line[0] == '#') {
|
||||
continue;
|
||||
}
|
||||
std::istringstream is_line(line);
|
||||
std::string key, value;
|
||||
if (std::getline(is_line, key, ':') && std::getline(is_line, value)) {
|
||||
mCalData[utils::trim(key)] = utils::trim(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HwCalBase::debug(int fd) {
|
||||
std::ifstream stream;
|
||||
std::string path;
|
||||
std::string line;
|
||||
struct context {
|
||||
HwCalBase *obj;
|
||||
int fd;
|
||||
} context{this, fd};
|
||||
|
||||
dprintf(fd, "Properties:\n");
|
||||
|
||||
property_list(
|
||||
[](const char *key, const char *value, void *cookie) {
|
||||
struct context *context = static_cast<struct context *>(cookie);
|
||||
HwCalBase *obj = context->obj;
|
||||
int fd = context->fd;
|
||||
const std::string expect{obj->mPropertyPrefix};
|
||||
const std::string actual{key, std::min(strlen(key), expect.size())};
|
||||
if (actual == expect) {
|
||||
dprintf(fd, " %s:\n", key);
|
||||
dprintf(fd, " %s\n", value);
|
||||
}
|
||||
},
|
||||
&context);
|
||||
|
||||
dprintf(fd, "\n");
|
||||
|
||||
dprintf(fd, "Persist:\n");
|
||||
|
||||
utils::fileFromEnv("CALIBRATION_FILEPATH", &stream, &path);
|
||||
|
||||
dprintf(fd, " %s:\n", path.c_str());
|
||||
while (std::getline(stream, line)) {
|
||||
dprintf(fd, " %s\n", line.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace vibrator
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
221
vibrator/common/HardwareBase.h
Normal file
221
vibrator/common/HardwareBase.h
Normal file
|
@ -0,0 +1,221 @@
|
|||
/*
|
||||
* Copyright (C) 2019 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <log/log.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <utils/Trace.h>
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
|
||||
using ::android::base::unique_fd;
|
||||
|
||||
class HwApiBase {
|
||||
private:
|
||||
using NamesMap = std::map<const std::ios *, std::string>;
|
||||
|
||||
class RecordInterface {
|
||||
public:
|
||||
virtual std::string toString(const NamesMap &names) = 0;
|
||||
virtual ~RecordInterface() {}
|
||||
};
|
||||
template <typename T>
|
||||
class Record : public RecordInterface {
|
||||
public:
|
||||
Record(const char *func, const T &value, const std::ios *stream)
|
||||
: mFunc(func), mValue(value), mStream(stream) {}
|
||||
std::string toString(const NamesMap &names) override;
|
||||
|
||||
private:
|
||||
const char *mFunc;
|
||||
const T mValue;
|
||||
const std::ios *mStream;
|
||||
};
|
||||
using Records = std::list<std::unique_ptr<RecordInterface>>;
|
||||
|
||||
static constexpr uint32_t RECORDS_SIZE = 32;
|
||||
|
||||
public:
|
||||
HwApiBase();
|
||||
void debug(int fd);
|
||||
|
||||
protected:
|
||||
void saveName(const std::string &name, const std::ios *stream);
|
||||
template <typename T>
|
||||
void open(const std::string &name, T *stream);
|
||||
bool has(const std::ios &stream);
|
||||
template <typename T>
|
||||
bool get(T *value, std::istream *stream);
|
||||
template <typename T>
|
||||
bool set(const T &value, std::ostream *stream);
|
||||
template <typename T>
|
||||
bool poll(const T &value, std::istream *stream, const int32_t timeout = -1);
|
||||
template <typename T>
|
||||
void record(const char *func, const T &value, const std::ios *stream);
|
||||
|
||||
private:
|
||||
std::string mPathPrefix;
|
||||
NamesMap mNames;
|
||||
Records mRecords{RECORDS_SIZE};
|
||||
std::mutex mRecordsMutex;
|
||||
std::mutex mIoMutex;
|
||||
};
|
||||
|
||||
#define HWAPI_RECORD(args...) HwApiBase::record(__FUNCTION__, ##args)
|
||||
|
||||
template <typename T>
|
||||
void HwApiBase::open(const std::string &name, T *stream) {
|
||||
saveName(name, stream);
|
||||
utils::openNoCreate(mPathPrefix + name, stream);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool HwApiBase::get(T *value, std::istream *stream) {
|
||||
ATRACE_NAME("HwApi::get");
|
||||
std::scoped_lock ioLock{mIoMutex};
|
||||
bool ret;
|
||||
stream->seekg(0);
|
||||
*stream >> *value;
|
||||
if (!(ret = !!*stream)) {
|
||||
ALOGE("Failed to read %s (%d): %s", mNames[stream].c_str(), errno, strerror(errno));
|
||||
}
|
||||
stream->clear();
|
||||
HWAPI_RECORD(*value, stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool HwApiBase::set(const T &value, std::ostream *stream) {
|
||||
ATRACE_NAME("HwApi::set");
|
||||
using utils::operator<<;
|
||||
std::scoped_lock ioLock{mIoMutex};
|
||||
bool ret;
|
||||
*stream << value << std::endl;
|
||||
if (!(ret = !!*stream)) {
|
||||
ALOGE("Failed to write %s (%d): %s", mNames[stream].c_str(), errno, strerror(errno));
|
||||
stream->clear();
|
||||
}
|
||||
HWAPI_RECORD(value, stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool HwApiBase::poll(const T &value, std::istream *stream, const int32_t timeoutMs) {
|
||||
ATRACE_NAME("HwApi::poll");
|
||||
auto path = mPathPrefix + mNames[stream];
|
||||
unique_fd fileFd{::open(path.c_str(), O_RDONLY)};
|
||||
unique_fd epollFd{epoll_create(1)};
|
||||
epoll_event event = {
|
||||
.events = EPOLLPRI | EPOLLET,
|
||||
};
|
||||
T actual;
|
||||
bool ret;
|
||||
int epollRet;
|
||||
|
||||
if (timeoutMs < -1) {
|
||||
ALOGE("Invalid polling timeout!");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (epoll_ctl(epollFd, EPOLL_CTL_ADD, fileFd, &event)) {
|
||||
ALOGE("Failed to poll %s (%d): %s", mNames[stream].c_str(), errno, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
||||
while ((ret = get(&actual, stream)) && (actual != value)) {
|
||||
epollRet = epoll_wait(epollFd, &event, 1, timeoutMs);
|
||||
if (epollRet <= 0) {
|
||||
ALOGE("Polling error or timeout! (%d)", epollRet);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
HWAPI_RECORD(value, stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void HwApiBase::record(const char *func, const T &value, const std::ios *stream) {
|
||||
std::lock_guard<std::mutex> lock(mRecordsMutex);
|
||||
mRecords.emplace_back(std::make_unique<Record<T>>(func, value, stream));
|
||||
mRecords.pop_front();
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::string HwApiBase::Record<T>::toString(const NamesMap &names) {
|
||||
using utils::operator<<;
|
||||
std::stringstream ret;
|
||||
|
||||
ret << mFunc << " '" << names.at(mStream) << "' = '" << mValue << "'";
|
||||
|
||||
return ret.str();
|
||||
}
|
||||
|
||||
class HwCalBase {
|
||||
public:
|
||||
HwCalBase();
|
||||
void debug(int fd);
|
||||
|
||||
protected:
|
||||
template <typename T>
|
||||
bool getProperty(const char *key, T *value, const T defval);
|
||||
template <typename T>
|
||||
bool getPersist(const char *key, T *value);
|
||||
|
||||
private:
|
||||
std::string mPropertyPrefix;
|
||||
std::map<std::string, std::string> mCalData;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
bool HwCalBase::getProperty(const char *key, T *outval, const T defval) {
|
||||
ATRACE_NAME("HwCal::getProperty");
|
||||
*outval = utils::getProperty(mPropertyPrefix + key, defval);
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool HwCalBase::getPersist(const char *key, T *value) {
|
||||
ATRACE_NAME("HwCal::getPersist");
|
||||
auto it = mCalData.find(key);
|
||||
if (it == mCalData.end()) {
|
||||
ALOGE("Missing %s config!", key);
|
||||
return false;
|
||||
}
|
||||
std::stringstream stream{it->second};
|
||||
utils::unpack(stream, value);
|
||||
if (!stream || !stream.eof()) {
|
||||
ALOGE("Invalid %s config!", key);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace vibrator
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
173
vibrator/common/utils.h
Normal file
173
vibrator/common/utils.h
Normal file
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
* Copyright (C) 2019 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <android-base/macros.h>
|
||||
#include <android-base/parsedouble.h>
|
||||
#include <android-base/properties.h>
|
||||
#include <log/log.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <sstream>
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
namespace utils {
|
||||
|
||||
template <typename T>
|
||||
class Is_Iterable {
|
||||
private:
|
||||
template <typename U>
|
||||
static std::true_type test(typename U::iterator *u);
|
||||
|
||||
template <typename U>
|
||||
static std::false_type test(U *u);
|
||||
|
||||
public:
|
||||
static const bool value = decltype(test<T>(0))::value;
|
||||
};
|
||||
|
||||
template <typename T, bool B>
|
||||
using Enable_If_Iterable = std::enable_if_t<Is_Iterable<T>::value == B>;
|
||||
|
||||
template <typename T, typename U = void>
|
||||
using Enable_If_Signed = std::enable_if_t<std::is_signed_v<T>, U>;
|
||||
|
||||
template <typename T, typename U = void>
|
||||
using Enable_If_Unsigned = std::enable_if_t<std::is_unsigned_v<T>, U>;
|
||||
|
||||
// override for default behavior of printing as a character
|
||||
inline std::ostream &operator<<(std::ostream &stream, const int8_t value) {
|
||||
return stream << +value;
|
||||
}
|
||||
// override for default behavior of printing as a character
|
||||
inline std::ostream &operator<<(std::ostream &stream, const uint8_t value) {
|
||||
return stream << +value;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline auto toUnderlying(const T value) {
|
||||
return static_cast<std::underlying_type_t<T>>(value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline Enable_If_Iterable<T, true> unpack(std::istream &stream, T *value) {
|
||||
for (auto &entry : *value) {
|
||||
stream >> entry;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline Enable_If_Iterable<T, false> unpack(std::istream &stream, T *value) {
|
||||
stream >> *value;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline void unpack<std::string>(std::istream &stream, std::string *value) {
|
||||
*value = std::string(std::istreambuf_iterator(stream), {});
|
||||
stream.setstate(std::istream::eofbit);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline Enable_If_Signed<T, T> getProperty(const std::string &key, const T def) {
|
||||
if (std::is_floating_point_v<T>) {
|
||||
float result;
|
||||
std::string value = ::android::base::GetProperty(key, "");
|
||||
if (!value.empty() && ::android::base::ParseFloat(value, &result)) {
|
||||
return result;
|
||||
}
|
||||
return def;
|
||||
} else {
|
||||
return ::android::base::GetIntProperty(key, def);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline Enable_If_Unsigned<T, T> getProperty(const std::string &key, const T def) {
|
||||
return ::android::base::GetUintProperty(key, def);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool getProperty<bool>(const std::string &key, const bool def) {
|
||||
return ::android::base::GetBoolProperty(key, def);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static void openNoCreate(const std::string &file, T *outStream) {
|
||||
auto mode = std::is_base_of_v<std::ostream, T> ? std::ios_base::out : std::ios_base::in;
|
||||
|
||||
// Force 'in' mode to prevent file creation
|
||||
outStream->open(file, mode | std::ios_base::in);
|
||||
if (!*outStream) {
|
||||
ALOGE("Failed to open %s (%d): %s", file.c_str(), errno, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static void fileFromEnv(const char *env, T *outStream, std::string *outName = nullptr) {
|
||||
auto file = std::getenv(env);
|
||||
|
||||
if (file == nullptr) {
|
||||
ALOGE("Failed get env %s", env);
|
||||
return;
|
||||
}
|
||||
|
||||
if (outName != nullptr) {
|
||||
*outName = std::string(file);
|
||||
}
|
||||
|
||||
openNoCreate(file, outStream);
|
||||
}
|
||||
|
||||
static ATTRIBUTE_UNUSED auto pathsFromEnv(const char *env, const std::string &prefix = "") {
|
||||
std::map<std::string, std::ifstream> ret;
|
||||
auto value = std::getenv(env);
|
||||
|
||||
if (value == nullptr) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::istringstream paths{value};
|
||||
std::string path;
|
||||
|
||||
while (paths >> path) {
|
||||
ret[path].open(prefix + path);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static ATTRIBUTE_UNUSED std::string trim(const std::string &str,
|
||||
const std::string &whitespace = " \t") {
|
||||
const auto str_begin = str.find_first_not_of(whitespace);
|
||||
if (str_begin == std::string::npos) {
|
||||
return "";
|
||||
}
|
||||
|
||||
const auto str_end = str.find_last_not_of(whitespace);
|
||||
const auto str_range = str_end - str_begin + 1;
|
||||
|
||||
return str.substr(str_begin, str_range);
|
||||
}
|
||||
|
||||
} // namespace utils
|
||||
} // namespace vibrator
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
91
vibrator/cs40l26/Android.bp
Normal file
91
vibrator/cs40l26/Android.bp
Normal file
|
@ -0,0 +1,91 @@
|
|||
//
|
||||
// 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "android.hardware.vibrator-defaults.cs40l26-akita",
|
||||
cflags: [
|
||||
"-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)",
|
||||
"-DLOG_TAG=\"android.hardware.vibrator-cs40l26\"",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbinder",
|
||||
],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "VibratorHalCs40l26BinaryDefaultsAkita",
|
||||
defaults: [
|
||||
"PixelVibratorBinaryDefaultsAkita",
|
||||
"android.hardware.vibrator-defaults.cs40l26-akita",
|
||||
],
|
||||
include_dirs: [
|
||||
"external/tinyalsa/include",
|
||||
],
|
||||
shared_libs: [
|
||||
"libcutils",
|
||||
"libtinyalsa",
|
||||
],
|
||||
}
|
||||
|
||||
cc_defaults {
|
||||
name: "VibratorHalCs40l26TestDefaultsAkita",
|
||||
defaults: [
|
||||
"PixelVibratorTestDefaultsAkita",
|
||||
"android.hardware.vibrator-defaults.cs40l26-akita",
|
||||
],
|
||||
static_libs: [
|
||||
"android.hardware.vibrator-impl.cs40l26-akita",
|
||||
"libtinyalsa",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library {
|
||||
name: "android.hardware.vibrator-impl.cs40l26-akita",
|
||||
defaults: [
|
||||
"VibratorHalCs40l26BinaryDefaultsAkita",
|
||||
"haptics_feature_defaults_akita",
|
||||
],
|
||||
srcs: ["Vibrator.cpp"],
|
||||
export_include_dirs: ["."],
|
||||
vendor_available: true,
|
||||
visibility: [":__subpackages__"],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "android.hardware.vibrator-service.cs40l26-akita",
|
||||
defaults: ["VibratorHalCs40l26BinaryDefaultsAkita"],
|
||||
init_rc: ["android.hardware.vibrator-service.cs40l26-akita.rc"],
|
||||
vintf_fragments: ["android.hardware.vibrator-service.cs40l26-akita.xml"],
|
||||
srcs: ["service.cpp"],
|
||||
shared_libs: ["android.hardware.vibrator-impl.cs40l26-akita"],
|
||||
proprietary: true,
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "android.hardware.vibrator-service.cs40l26-dual-akita",
|
||||
defaults: ["VibratorHalCs40l26BinaryDefaultsAkita"],
|
||||
init_rc: ["android.hardware.vibrator-service.cs40l26-dual-akita.rc"],
|
||||
vintf_fragments: ["android.hardware.vibrator-service.cs40l26-dual-akita.xml"],
|
||||
srcs: ["service.cpp"],
|
||||
shared_libs: ["android.hardware.vibrator-impl.cs40l26-akita"],
|
||||
cflags: ["-DVIBRATOR_NAME=\"dual\""],
|
||||
proprietary: true,
|
||||
}
|
||||
|
||||
|
344
vibrator/cs40l26/Hardware.h
Normal file
344
vibrator/cs40l26/Hardware.h
Normal file
|
@ -0,0 +1,344 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "HardwareBase.h"
|
||||
#include "Vibrator.h"
|
||||
|
||||
#define PROC_SND_PCM "/proc/asound/pcm"
|
||||
#define HAPTIC_PCM_DEVICE_SYMBOL "haptic nohost playback"
|
||||
|
||||
static struct pcm_config haptic_nohost_config = {
|
||||
.channels = 1,
|
||||
.rate = 48000,
|
||||
.period_size = 80,
|
||||
.period_count = 2,
|
||||
.format = PCM_FORMAT_S16_LE,
|
||||
};
|
||||
|
||||
enum WaveformIndex : uint16_t {
|
||||
/* Physical waveform */
|
||||
WAVEFORM_LONG_VIBRATION_EFFECT_INDEX = 0,
|
||||
WAVEFORM_RESERVED_INDEX_1 = 1,
|
||||
WAVEFORM_CLICK_INDEX = 2,
|
||||
WAVEFORM_SHORT_VIBRATION_EFFECT_INDEX = 3,
|
||||
WAVEFORM_THUD_INDEX = 4,
|
||||
WAVEFORM_SPIN_INDEX = 5,
|
||||
WAVEFORM_QUICK_RISE_INDEX = 6,
|
||||
WAVEFORM_SLOW_RISE_INDEX = 7,
|
||||
WAVEFORM_QUICK_FALL_INDEX = 8,
|
||||
WAVEFORM_LIGHT_TICK_INDEX = 9,
|
||||
WAVEFORM_LOW_TICK_INDEX = 10,
|
||||
WAVEFORM_RESERVED_MFG_1,
|
||||
WAVEFORM_RESERVED_MFG_2,
|
||||
WAVEFORM_RESERVED_MFG_3,
|
||||
WAVEFORM_MAX_PHYSICAL_INDEX,
|
||||
/* OWT waveform */
|
||||
WAVEFORM_COMPOSE = WAVEFORM_MAX_PHYSICAL_INDEX,
|
||||
WAVEFORM_PWLE,
|
||||
/*
|
||||
* Refer to <linux/input.h>, the WAVEFORM_MAX_INDEX must not exceed 96.
|
||||
* #define FF_GAIN 0x60 // 96 in decimal
|
||||
* #define FF_MAX_EFFECTS FF_GAIN
|
||||
*/
|
||||
WAVEFORM_MAX_INDEX,
|
||||
};
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
|
||||
class HwApi : public Vibrator::HwApi, private HwApiBase {
|
||||
public:
|
||||
HwApi() {
|
||||
open("calibration/f0_stored", &mF0);
|
||||
open("default/f0_offset", &mF0Offset);
|
||||
open("calibration/redc_stored", &mRedc);
|
||||
open("calibration/q_stored", &mQ);
|
||||
open("default/vibe_state", &mVibeState);
|
||||
open("default/num_waves", &mEffectCount);
|
||||
open("default/owt_free_space", &mOwtFreeSpace);
|
||||
open("default/f0_comp_enable", &mF0CompEnable);
|
||||
open("default/redc_comp_enable", &mRedcCompEnable);
|
||||
open("default/delay_before_stop_playback_us", &mMinOnOffInterval);
|
||||
}
|
||||
|
||||
bool setF0(std::string value) override { return set(value, &mF0); }
|
||||
bool setF0Offset(uint32_t value) override { return set(value, &mF0Offset); }
|
||||
bool setRedc(std::string value) override { return set(value, &mRedc); }
|
||||
bool setQ(std::string value) override { return set(value, &mQ); }
|
||||
bool getEffectCount(uint32_t *value) override { return get(value, &mEffectCount); }
|
||||
bool pollVibeState(uint32_t value, int32_t timeoutMs) override {
|
||||
return poll(value, &mVibeState, timeoutMs);
|
||||
}
|
||||
bool hasOwtFreeSpace() override { return has(mOwtFreeSpace); }
|
||||
bool getOwtFreeSpace(uint32_t *value) override { return get(value, &mOwtFreeSpace); }
|
||||
bool setF0CompEnable(bool value) override { return set(value, &mF0CompEnable); }
|
||||
bool setRedcCompEnable(bool value) override { return set(value, &mRedcCompEnable); }
|
||||
bool setMinOnOffInterval(uint32_t value) override { return set(value, &mMinOnOffInterval); }
|
||||
// TODO(b/234338136): Need to add the force feedback HW API test cases
|
||||
bool setFFGain(int fd, uint16_t value) override {
|
||||
struct input_event gain = {
|
||||
.type = EV_FF,
|
||||
.code = FF_GAIN,
|
||||
.value = value,
|
||||
};
|
||||
if (write(fd, (const void *)&gain, sizeof(gain)) != sizeof(gain)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool setFFEffect(int fd, struct ff_effect *effect, uint16_t timeoutMs) override {
|
||||
if (((*effect).replay.length != timeoutMs) || (ioctl(fd, EVIOCSFF, effect) < 0)) {
|
||||
ALOGE("setFFEffect fail");
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
bool setFFPlay(int fd, int8_t index, bool value) override {
|
||||
struct input_event play = {
|
||||
.type = EV_FF,
|
||||
.code = static_cast<uint16_t>(index),
|
||||
.value = value,
|
||||
};
|
||||
if (write(fd, (const void *)&play, sizeof(play)) != sizeof(play)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
bool getHapticAlsaDevice(int *card, int *device) override {
|
||||
std::string line;
|
||||
std::ifstream myfile(PROC_SND_PCM);
|
||||
if (myfile.is_open()) {
|
||||
while (getline(myfile, line)) {
|
||||
if (line.find(HAPTIC_PCM_DEVICE_SYMBOL) != std::string::npos) {
|
||||
std::stringstream ss(line);
|
||||
std::string currentToken;
|
||||
std::getline(ss, currentToken, ':');
|
||||
sscanf(currentToken.c_str(), "%d-%d", card, device);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
myfile.close();
|
||||
} else {
|
||||
ALOGE("Failed to read file: %s", PROC_SND_PCM);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool setHapticPcmAmp(struct pcm **haptic_pcm, bool enable, int card, int device) override {
|
||||
int ret = 0;
|
||||
|
||||
if (enable) {
|
||||
*haptic_pcm = pcm_open(card, device, PCM_OUT, &haptic_nohost_config);
|
||||
if (!pcm_is_ready(*haptic_pcm)) {
|
||||
ALOGE("cannot open pcm_out driver: %s", pcm_get_error(*haptic_pcm));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = pcm_prepare(*haptic_pcm);
|
||||
if (ret < 0) {
|
||||
ALOGE("cannot prepare haptic_pcm: %s", pcm_get_error(*haptic_pcm));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ret = pcm_start(*haptic_pcm);
|
||||
if (ret < 0) {
|
||||
ALOGE("cannot start haptic_pcm: %s", pcm_get_error(*haptic_pcm));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
if (*haptic_pcm) {
|
||||
pcm_close(*haptic_pcm);
|
||||
*haptic_pcm = NULL;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
fail:
|
||||
pcm_close(*haptic_pcm);
|
||||
*haptic_pcm = NULL;
|
||||
return false;
|
||||
}
|
||||
bool uploadOwtEffect(int fd, uint8_t *owtData, uint32_t numBytes, struct ff_effect *effect,
|
||||
uint32_t *outEffectIndex, int *status) override {
|
||||
(*effect).u.periodic.custom_len = numBytes / sizeof(uint16_t);
|
||||
delete[] ((*effect).u.periodic.custom_data);
|
||||
(*effect).u.periodic.custom_data = new int16_t[(*effect).u.periodic.custom_len]{0x0000};
|
||||
if ((*effect).u.periodic.custom_data == nullptr) {
|
||||
ALOGE("Failed to allocate memory for custom data\n");
|
||||
*status = EX_NULL_POINTER;
|
||||
return false;
|
||||
}
|
||||
memcpy((*effect).u.periodic.custom_data, owtData, numBytes);
|
||||
|
||||
if ((*effect).id != -1) {
|
||||
ALOGE("(*effect).id != -1");
|
||||
}
|
||||
|
||||
/* Create a new OWT waveform to update the PWLE or composite effect. */
|
||||
(*effect).id = -1;
|
||||
if (ioctl(fd, EVIOCSFF, effect) < 0) {
|
||||
ALOGE("Failed to upload effect %d (%d): %s", *outEffectIndex, errno, strerror(errno));
|
||||
delete[] ((*effect).u.periodic.custom_data);
|
||||
*status = EX_ILLEGAL_STATE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((*effect).id >= FF_MAX_EFFECTS || (*effect).id < 0) {
|
||||
ALOGE("Invalid waveform index after upload OWT effect: %d", (*effect).id);
|
||||
*status = EX_ILLEGAL_ARGUMENT;
|
||||
return false;
|
||||
}
|
||||
*outEffectIndex = (*effect).id;
|
||||
*status = 0;
|
||||
return true;
|
||||
}
|
||||
bool eraseOwtEffect(int fd, int8_t effectIndex, std::vector<ff_effect> *effect) override {
|
||||
uint32_t effectCountBefore, effectCountAfter, i, successFlush = 0;
|
||||
|
||||
if (effectIndex < WAVEFORM_MAX_PHYSICAL_INDEX) {
|
||||
ALOGE("Invalid waveform index for OWT erase: %d", effectIndex);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (effectIndex < WAVEFORM_MAX_INDEX) {
|
||||
/* Normal situation. Only erase the effect which we just played. */
|
||||
if (ioctl(fd, EVIOCRMFF, effectIndex) < 0) {
|
||||
ALOGE("Failed to erase effect %d (%d): %s", effectIndex, errno, strerror(errno));
|
||||
}
|
||||
for (i = WAVEFORM_MAX_PHYSICAL_INDEX; i < WAVEFORM_MAX_INDEX; i++) {
|
||||
if ((*effect)[i].id == effectIndex) {
|
||||
(*effect)[i].id = -1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* Flush all non-prestored effects of ff-core and driver. */
|
||||
getEffectCount(&effectCountBefore);
|
||||
for (i = WAVEFORM_MAX_PHYSICAL_INDEX; i < FF_MAX_EFFECTS; i++) {
|
||||
if (ioctl(fd, EVIOCRMFF, i) >= 0) {
|
||||
successFlush++;
|
||||
}
|
||||
}
|
||||
getEffectCount(&effectCountAfter);
|
||||
ALOGW("Flushed effects: ff: %d; driver: %d -> %d; success: %d", effectIndex,
|
||||
effectCountBefore, effectCountAfter, successFlush);
|
||||
/* Reset all OWT effect index of HAL. */
|
||||
for (i = WAVEFORM_MAX_PHYSICAL_INDEX; i < WAVEFORM_MAX_INDEX; i++) {
|
||||
(*effect)[i].id = -1;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void debug(int fd) override { HwApiBase::debug(fd); }
|
||||
|
||||
private:
|
||||
std::ofstream mF0;
|
||||
std::ofstream mF0Offset;
|
||||
std::ofstream mRedc;
|
||||
std::ofstream mQ;
|
||||
std::ifstream mEffectCount;
|
||||
std::ifstream mVibeState;
|
||||
std::ifstream mOwtFreeSpace;
|
||||
std::ofstream mF0CompEnable;
|
||||
std::ofstream mRedcCompEnable;
|
||||
std::ofstream mMinOnOffInterval;
|
||||
};
|
||||
|
||||
class HwCal : public Vibrator::HwCal, private HwCalBase {
|
||||
private:
|
||||
static constexpr char VERSION[] = "version";
|
||||
static constexpr char F0_CONFIG[] = "f0_measured";
|
||||
static constexpr char REDC_CONFIG[] = "redc_measured";
|
||||
static constexpr char Q_CONFIG[] = "q_measured";
|
||||
static constexpr char TICK_VOLTAGES_CONFIG[] = "v_tick";
|
||||
static constexpr char CLICK_VOLTAGES_CONFIG[] = "v_click";
|
||||
static constexpr char LONG_VOLTAGES_CONFIG[] = "v_long";
|
||||
|
||||
static constexpr uint32_t VERSION_DEFAULT = 2;
|
||||
static constexpr int32_t DEFAULT_FREQUENCY_SHIFT = 0;
|
||||
static constexpr float DEFAULT_DEVICE_MASS = 0.21;
|
||||
static constexpr float DEFAULT_LOC_COEFF = 2.5;
|
||||
static constexpr std::array<uint32_t, 2> V_TICK_DEFAULT = {1, 100};
|
||||
static constexpr std::array<uint32_t, 2> V_CLICK_DEFAULT = {1, 100};
|
||||
static constexpr std::array<uint32_t, 2> V_LONG_DEFAULT = {1, 100};
|
||||
|
||||
public:
|
||||
HwCal() {}
|
||||
|
||||
bool getVersion(uint32_t *value) override {
|
||||
if (getPersist(VERSION, value)) {
|
||||
return true;
|
||||
}
|
||||
*value = VERSION_DEFAULT;
|
||||
return true;
|
||||
}
|
||||
bool getLongFrequencyShift(int32_t *value) override {
|
||||
return getProperty("long.frequency.shift", value, DEFAULT_FREQUENCY_SHIFT);
|
||||
}
|
||||
bool getDeviceMass(float *value) override {
|
||||
return getProperty("device.mass", value, DEFAULT_DEVICE_MASS);
|
||||
}
|
||||
bool getLocCoeff(float *value) override {
|
||||
return getProperty("loc.coeff", value, DEFAULT_LOC_COEFF);
|
||||
}
|
||||
bool getF0(std::string *value) override { return getPersist(F0_CONFIG, value); }
|
||||
bool getRedc(std::string *value) override { return getPersist(REDC_CONFIG, value); }
|
||||
bool getQ(std::string *value) override { return getPersist(Q_CONFIG, value); }
|
||||
bool getTickVolLevels(std::array<uint32_t, 2> *value) override {
|
||||
if (getPersist(TICK_VOLTAGES_CONFIG, value)) {
|
||||
return true;
|
||||
}
|
||||
*value = V_TICK_DEFAULT;
|
||||
return true;
|
||||
}
|
||||
bool getClickVolLevels(std::array<uint32_t, 2> *value) override {
|
||||
if (getPersist(CLICK_VOLTAGES_CONFIG, value)) {
|
||||
return true;
|
||||
}
|
||||
*value = V_CLICK_DEFAULT;
|
||||
return true;
|
||||
}
|
||||
bool getLongVolLevels(std::array<uint32_t, 2> *value) override {
|
||||
if (getPersist(LONG_VOLTAGES_CONFIG, value)) {
|
||||
return true;
|
||||
}
|
||||
*value = V_LONG_DEFAULT;
|
||||
return true;
|
||||
}
|
||||
bool isChirpEnabled() override {
|
||||
bool value;
|
||||
getProperty("chirp.enabled", &value, false);
|
||||
return value;
|
||||
}
|
||||
bool getSupportedPrimitives(uint32_t *value) override {
|
||||
return getProperty("supported_primitives", value, (uint32_t)0);
|
||||
}
|
||||
void debug(int fd) override { HwCalBase::debug(fd); }
|
||||
};
|
||||
|
||||
} // namespace vibrator
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
10
vibrator/cs40l26/TEST_MAPPING
Normal file
10
vibrator/cs40l26/TEST_MAPPING
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"presubmit": [
|
||||
{
|
||||
"name": "VibratorHalCs40l26TestSuite",
|
||||
"keywords": [
|
||||
"nextgen"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
1511
vibrator/cs40l26/Vibrator.cpp
Normal file
1511
vibrator/cs40l26/Vibrator.cpp
Normal file
File diff suppressed because it is too large
Load diff
217
vibrator/cs40l26/Vibrator.h
Normal file
217
vibrator/cs40l26/Vibrator.h
Normal file
|
@ -0,0 +1,217 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <aidl/android/hardware/vibrator/BnVibrator.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <linux/input.h>
|
||||
#include <tinyalsa/asoundlib.h>
|
||||
|
||||
#include <array>
|
||||
#include <fstream>
|
||||
#include <future>
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
|
||||
class Vibrator : public BnVibrator {
|
||||
public:
|
||||
// APIs for interfacing with the kernel driver.
|
||||
class HwApi {
|
||||
public:
|
||||
virtual ~HwApi() = default;
|
||||
// Stores the LRA resonant frequency to be used for PWLE playback
|
||||
// and click compensation.
|
||||
virtual bool setF0(std::string value) = 0;
|
||||
// Stores the frequency offset for long vibrations.
|
||||
virtual bool setF0Offset(uint32_t value) = 0;
|
||||
// Stores the LRA series resistance to be used for click
|
||||
// compensation.
|
||||
virtual bool setRedc(std::string value) = 0;
|
||||
// Stores the LRA Q factor to be used for Q-dependent waveform
|
||||
// selection.
|
||||
virtual bool setQ(std::string value) = 0;
|
||||
// Reports the number of effect waveforms loaded in firmware.
|
||||
virtual bool getEffectCount(uint32_t *value) = 0;
|
||||
// Blocks until timeout or vibrator reaches desired state
|
||||
// (2 = ASP enabled, 1 = haptic enabled, 0 = disabled).
|
||||
virtual bool pollVibeState(uint32_t value, int32_t timeoutMs = -1) = 0;
|
||||
// Reports whether getOwtFreeSpace() is supported.
|
||||
virtual bool hasOwtFreeSpace() = 0;
|
||||
// Reports the available OWT bytes.
|
||||
virtual bool getOwtFreeSpace(uint32_t *value) = 0;
|
||||
// Enables/Disables F0 compensation enable status
|
||||
virtual bool setF0CompEnable(bool value) = 0;
|
||||
// Enables/Disables Redc compensation enable status
|
||||
virtual bool setRedcCompEnable(bool value) = 0;
|
||||
// Stores the minumun delay time between playback and stop effects.
|
||||
virtual bool setMinOnOffInterval(uint32_t value) = 0;
|
||||
// Indicates the number of 0.125-dB steps of attenuation to apply to
|
||||
// waveforms triggered in response to vibration calls from the
|
||||
// Android vibrator HAL.
|
||||
virtual bool setFFGain(int fd, uint16_t value) = 0;
|
||||
// Create/modify custom effects for all physical waveforms.
|
||||
virtual bool setFFEffect(int fd, struct ff_effect *effect, uint16_t timeoutMs) = 0;
|
||||
// Activates/deactivates the effect index after setFFGain() and setFFEffect().
|
||||
virtual bool setFFPlay(int fd, int8_t index, bool value) = 0;
|
||||
// Get the Alsa device for the audio coupled haptics effect
|
||||
virtual bool getHapticAlsaDevice(int *card, int *device) = 0;
|
||||
// Set haptics PCM amplifier before triggering audio haptics feature
|
||||
virtual bool setHapticPcmAmp(struct pcm **haptic_pcm, bool enable, int card,
|
||||
int device) = 0;
|
||||
// Set OWT waveform for compose or compose PWLE request
|
||||
virtual bool uploadOwtEffect(int fd, uint8_t *owtData, uint32_t numBytes,
|
||||
struct ff_effect *effect, uint32_t *outEffectIndex,
|
||||
int *status) = 0;
|
||||
// Erase OWT waveform
|
||||
virtual bool eraseOwtEffect(int fd, int8_t effectIndex, std::vector<ff_effect> *effect) = 0;
|
||||
// Emit diagnostic information to the given file.
|
||||
virtual void debug(int fd) = 0;
|
||||
};
|
||||
|
||||
// APIs for obtaining calibration/configuration data from persistent memory.
|
||||
class HwCal {
|
||||
public:
|
||||
virtual ~HwCal() = default;
|
||||
// Obtain the calibration version
|
||||
virtual bool getVersion(uint32_t *value) = 0;
|
||||
// Obtains the LRA resonant frequency to be used for PWLE playback
|
||||
// and click compensation.
|
||||
virtual bool getF0(std::string *value) = 0;
|
||||
// Obtains the LRA series resistance to be used for click
|
||||
// compensation.
|
||||
virtual bool getRedc(std::string *value) = 0;
|
||||
// Obtains the LRA Q factor to be used for Q-dependent waveform
|
||||
// selection.
|
||||
virtual bool getQ(std::string *value) = 0;
|
||||
// Obtains frequency shift for long vibrations.
|
||||
virtual bool getLongFrequencyShift(int32_t *value) = 0;
|
||||
// Obtains device mass for calculating the bandwidth amplitude map
|
||||
virtual bool getDeviceMass(float *value) = 0;
|
||||
// Obtains loc coeff for calculating the bandwidth amplitude map
|
||||
virtual bool getLocCoeff(float *value) = 0;
|
||||
// Obtains the v0/v1(min/max) voltage levels to be applied for
|
||||
// tick/click/long in units of 1%.
|
||||
virtual bool getTickVolLevels(std::array<uint32_t, 2> *value) = 0;
|
||||
virtual bool getClickVolLevels(std::array<uint32_t, 2> *value) = 0;
|
||||
virtual bool getLongVolLevels(std::array<uint32_t, 2> *value) = 0;
|
||||
// Checks if the chirp feature is enabled.
|
||||
virtual bool isChirpEnabled() = 0;
|
||||
// Obtains the supported primitive effects.
|
||||
virtual bool getSupportedPrimitives(uint32_t *value) = 0;
|
||||
// Emit diagnostic information to the given file.
|
||||
virtual void debug(int fd) = 0;
|
||||
};
|
||||
|
||||
public:
|
||||
Vibrator(std::unique_ptr<HwApi> hwapi, std::unique_ptr<HwCal> hwcal);
|
||||
|
||||
ndk::ScopedAStatus getCapabilities(int32_t *_aidl_return) override;
|
||||
ndk::ScopedAStatus off() override;
|
||||
ndk::ScopedAStatus on(int32_t timeoutMs,
|
||||
const std::shared_ptr<IVibratorCallback> &callback) override;
|
||||
ndk::ScopedAStatus perform(Effect effect, EffectStrength strength,
|
||||
const std::shared_ptr<IVibratorCallback> &callback,
|
||||
int32_t *_aidl_return) override;
|
||||
ndk::ScopedAStatus getSupportedEffects(std::vector<Effect> *_aidl_return) override;
|
||||
ndk::ScopedAStatus setAmplitude(float amplitude) override;
|
||||
ndk::ScopedAStatus setExternalControl(bool enabled) override;
|
||||
ndk::ScopedAStatus getCompositionDelayMax(int32_t *maxDelayMs);
|
||||
ndk::ScopedAStatus getCompositionSizeMax(int32_t *maxSize);
|
||||
ndk::ScopedAStatus getSupportedPrimitives(std::vector<CompositePrimitive> *supported) override;
|
||||
ndk::ScopedAStatus getPrimitiveDuration(CompositePrimitive primitive,
|
||||
int32_t *durationMs) override;
|
||||
ndk::ScopedAStatus compose(const std::vector<CompositeEffect> &composite,
|
||||
const std::shared_ptr<IVibratorCallback> &callback) override;
|
||||
ndk::ScopedAStatus getSupportedAlwaysOnEffects(std::vector<Effect> *_aidl_return) override;
|
||||
ndk::ScopedAStatus alwaysOnEnable(int32_t id, Effect effect, EffectStrength strength) override;
|
||||
ndk::ScopedAStatus alwaysOnDisable(int32_t id) override;
|
||||
ndk::ScopedAStatus getResonantFrequency(float *resonantFreqHz) override;
|
||||
ndk::ScopedAStatus getQFactor(float *qFactor) override;
|
||||
ndk::ScopedAStatus getFrequencyResolution(float *freqResolutionHz) override;
|
||||
ndk::ScopedAStatus getFrequencyMinimum(float *freqMinimumHz) override;
|
||||
ndk::ScopedAStatus getBandwidthAmplitudeMap(std::vector<float> *_aidl_return) override;
|
||||
ndk::ScopedAStatus getPwlePrimitiveDurationMax(int32_t *durationMs) override;
|
||||
ndk::ScopedAStatus getPwleCompositionSizeMax(int32_t *maxSize) override;
|
||||
ndk::ScopedAStatus getSupportedBraking(std::vector<Braking> *supported) override;
|
||||
ndk::ScopedAStatus composePwle(const std::vector<PrimitivePwle> &composite,
|
||||
const std::shared_ptr<IVibratorCallback> &callback) override;
|
||||
|
||||
binder_status_t dump(int fd, const char **args, uint32_t numArgs) override;
|
||||
|
||||
private:
|
||||
ndk::ScopedAStatus on(uint32_t timeoutMs, uint32_t effectIndex, struct dspmem_chunk *ch,
|
||||
const std::shared_ptr<IVibratorCallback> &callback);
|
||||
// set 'amplitude' based on an arbitrary scale determined by 'maximum'
|
||||
ndk::ScopedAStatus setEffectAmplitude(float amplitude, float maximum);
|
||||
ndk::ScopedAStatus setGlobalAmplitude(bool set);
|
||||
// 'simple' effects are those precompiled and loaded into the controller
|
||||
ndk::ScopedAStatus getSimpleDetails(Effect effect, EffectStrength strength,
|
||||
uint32_t *outEffectIndex, uint32_t *outTimeMs,
|
||||
uint32_t *outVolLevel);
|
||||
// 'compound' effects are those composed by stringing multiple 'simple' effects
|
||||
ndk::ScopedAStatus getCompoundDetails(Effect effect, EffectStrength strength,
|
||||
uint32_t *outTimeMs, struct dspmem_chunk *outCh);
|
||||
ndk::ScopedAStatus getPrimitiveDetails(CompositePrimitive primitive, uint32_t *outEffectIndex);
|
||||
ndk::ScopedAStatus performEffect(Effect effect, EffectStrength strength,
|
||||
const std::shared_ptr<IVibratorCallback> &callback,
|
||||
int32_t *outTimeMs);
|
||||
ndk::ScopedAStatus performEffect(uint32_t effectIndex, uint32_t volLevel,
|
||||
struct dspmem_chunk *ch,
|
||||
const std::shared_ptr<IVibratorCallback> &callback);
|
||||
ndk::ScopedAStatus setPwle(const std::string &pwleQueue);
|
||||
bool isUnderExternalControl();
|
||||
void waitForComplete(std::shared_ptr<IVibratorCallback> &&callback);
|
||||
uint32_t intensityToVolLevel(float intensity, uint32_t effectIndex);
|
||||
bool findHapticAlsaDevice(int *card, int *device);
|
||||
bool hasHapticAlsaDevice();
|
||||
bool enableHapticPcmAmp(struct pcm **haptic_pcm, bool enable, int card, int device);
|
||||
void createPwleMaxLevelLimitMap();
|
||||
void createBandwidthAmplitudeMap();
|
||||
|
||||
std::unique_ptr<HwApi> mHwApi;
|
||||
std::unique_ptr<HwCal> mHwCal;
|
||||
uint32_t mF0Offset;
|
||||
std::array<uint32_t, 2> mTickEffectVol;
|
||||
std::array<uint32_t, 2> mClickEffectVol;
|
||||
std::array<uint32_t, 2> mLongEffectVol;
|
||||
std::vector<ff_effect> mFfEffects;
|
||||
std::vector<uint32_t> mEffectDurations;
|
||||
std::future<void> mAsyncHandle;
|
||||
::android::base::unique_fd mInputFd;
|
||||
int8_t mActiveId{-1};
|
||||
struct pcm *mHapticPcm;
|
||||
int mCard;
|
||||
int mDevice;
|
||||
bool mHasHapticAlsaDevice{false};
|
||||
bool mIsUnderExternalControl;
|
||||
float mLongEffectScale = 1.0;
|
||||
bool mIsChirpEnabled;
|
||||
uint32_t mSupportedPrimitivesBits = 0x0;
|
||||
float mRedc{0};
|
||||
float mResonantFrequency{0};
|
||||
std::vector<CompositePrimitive> mSupportedPrimitives;
|
||||
bool mConfigHapticAlsaDeviceDone{false};
|
||||
std::vector<float> mBandwidthAmplitudeMap{};
|
||||
bool mCreateBandwidthAmplitudeMapDone{false};
|
||||
};
|
||||
|
||||
} // namespace vibrator
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
|
@ -0,0 +1,74 @@
|
|||
on property:vendor.all.modules.ready=1
|
||||
wait /sys/bus/i2c/devices/6-0043/calibration/redc_cal_time_ms
|
||||
|
||||
mkdir /mnt/vendor/persist/haptics 0770 system system
|
||||
chmod 770 /mnt/vendor/persist/haptics
|
||||
chmod 440 /mnt/vendor/persist/haptics/cs40l26.cal
|
||||
chown system system /mnt/vendor/persist/haptics
|
||||
chown system system /mnt/vendor/persist/haptics/cs40l26.cal
|
||||
|
||||
chown system system /sys/bus/i2c/devices/6-0043/calibration/f0_stored
|
||||
chown system system /sys/bus/i2c/devices/6-0043/calibration/q_stored
|
||||
chown system system /sys/bus/i2c/devices/6-0043/calibration/redc_stored
|
||||
chown system system /sys/bus/i2c/devices/6-0043/default/vibe_state
|
||||
chown system system /sys/bus/i2c/devices/6-0043/default/num_waves
|
||||
chown system system /sys/bus/i2c/devices/6-0043/default/f0_offset
|
||||
chown system system /sys/bus/i2c/devices/6-0043/default/owt_free_space
|
||||
chown system system /sys/bus/i2c/devices/6-0043/default/f0_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/6-0043/default/redc_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/6-0043/default/delay_before_stop_playback_us
|
||||
|
||||
chown system system /sys/bus/i2c/devices/5-0043/calibration/f0_stored
|
||||
chown system system /sys/bus/i2c/devices/5-0043/calibration/q_stored
|
||||
chown system system /sys/bus/i2c/devices/5-0043/calibration/redc_stored
|
||||
chown system system /sys/bus/i2c/devices/5-0043/default/vibe_state
|
||||
chown system system /sys/bus/i2c/devices/5-0043/default/num_waves
|
||||
chown system system /sys/bus/i2c/devices/5-0043/default/f0_offset
|
||||
chown system system /sys/bus/i2c/devices/5-0043/default/owt_free_space
|
||||
chown system system /sys/bus/i2c/devices/5-0043/default/f0_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/5-0043/default/redc_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/5-0043/default/delay_before_stop_playback_us
|
||||
|
||||
chown system system /sys/bus/i2c/devices/4-0043/calibration/f0_stored
|
||||
chown system system /sys/bus/i2c/devices/4-0043/calibration/q_stored
|
||||
chown system system /sys/bus/i2c/devices/4-0043/calibration/redc_stored
|
||||
chown system system /sys/bus/i2c/devices/4-0043/default/vibe_state
|
||||
chown system system /sys/bus/i2c/devices/4-0043/default/num_waves
|
||||
chown system system /sys/bus/i2c/devices/4-0043/default/f0_offset
|
||||
chown system system /sys/bus/i2c/devices/4-0043/default/owt_free_space
|
||||
chown system system /sys/bus/i2c/devices/4-0043/default/f0_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/4-0043/default/redc_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/4-0043/default/delay_before_stop_playback_us
|
||||
|
||||
enable vendor.vibrator.cs40l26
|
||||
|
||||
service vendor.vibrator.cs40l26 /vendor/bin/hw/android.hardware.vibrator-service.cs40l26-akita
|
||||
class hal
|
||||
user system
|
||||
group system input
|
||||
|
||||
setenv INPUT_EVENT_NAME cs40l26_input
|
||||
setenv INPUT_EVENT_PATH /dev/input/event*
|
||||
setenv PROPERTY_PREFIX ro.vendor.vibrator.hal.
|
||||
setenv CALIBRATION_FILEPATH /mnt/vendor/persist/haptics/cs40l26.cal
|
||||
|
||||
setenv HWAPI_PATH_PREFIX /sys/bus/i2c/devices/
|
||||
setenv HWAPI_DEBUG_NODES "
|
||||
6-0043/
|
||||
5-0043/
|
||||
4-0043/
|
||||
"
|
||||
setenv HWAPI_DEBUG_PATHS "
|
||||
calibration/f0_stored
|
||||
calibration/redc_stored
|
||||
calibration/q_stored
|
||||
default/vibe_state
|
||||
default/num_waves
|
||||
default/f0_offset
|
||||
default/owt_free_space
|
||||
default/f0_comp_enable
|
||||
default/redc_comp_enable
|
||||
default/delay_before_stop_playback_us
|
||||
"
|
||||
|
||||
disabled
|
|
@ -0,0 +1,7 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.vibrator</name>
|
||||
<version>2</version>
|
||||
<fqname>IVibrator/default</fqname>
|
||||
</hal>
|
||||
</manifest>
|
|
@ -0,0 +1,74 @@
|
|||
on property:vendor.all.modules.ready=1
|
||||
wait /sys/bus/i2c/devices/6-0042/calibration/redc_cal_time_ms
|
||||
|
||||
mkdir /mnt/vendor/persist/haptics 0770 system system
|
||||
chmod 770 /mnt/vendor/persist/haptics
|
||||
chmod 440 /mnt/vendor/persist/haptics/cs40l26_dual.cal
|
||||
chown system system /mnt/vendor/persist/haptics
|
||||
chown system system /mnt/vendor/persist/haptics/cs40l26_dual.cal
|
||||
|
||||
chown system system /sys/bus/i2c/devices/6-0042/calibration/f0_stored
|
||||
chown system system /sys/bus/i2c/devices/6-0042/calibration/q_stored
|
||||
chown system system /sys/bus/i2c/devices/6-0042/calibration/redc_stored
|
||||
chown system system /sys/bus/i2c/devices/6-0042/default/vibe_state
|
||||
chown system system /sys/bus/i2c/devices/6-0042/default/num_waves
|
||||
chown system system /sys/bus/i2c/devices/6-0042/default/f0_offset
|
||||
chown system system /sys/bus/i2c/devices/6-0042/default/owt_free_space
|
||||
chown system system /sys/bus/i2c/devices/6-0042/default/f0_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/6-0042/default/redc_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/6-0042/default/delay_before_stop_playback_us
|
||||
|
||||
chown system system /sys/bus/i2c/devices/5-0042/calibration/f0_stored
|
||||
chown system system /sys/bus/i2c/devices/5-0042/calibration/q_stored
|
||||
chown system system /sys/bus/i2c/devices/5-0042/calibration/redc_stored
|
||||
chown system system /sys/bus/i2c/devices/5-0042/default/vibe_state
|
||||
chown system system /sys/bus/i2c/devices/5-0042/default/num_waves
|
||||
chown system system /sys/bus/i2c/devices/5-0042/default/f0_offset
|
||||
chown system system /sys/bus/i2c/devices/5-0042/default/owt_free_space
|
||||
chown system system /sys/bus/i2c/devices/5-0042/default/f0_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/5-0042/default/redc_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/5-0042/default/delay_before_stop_playback_us
|
||||
|
||||
chown system system /sys/bus/i2c/devices/4-0042/calibration/f0_stored
|
||||
chown system system /sys/bus/i2c/devices/4-0042/calibration/q_stored
|
||||
chown system system /sys/bus/i2c/devices/4-0042/calibration/redc_stored
|
||||
chown system system /sys/bus/i2c/devices/4-0042/default/vibe_state
|
||||
chown system system /sys/bus/i2c/devices/4-0042/default/num_waves
|
||||
chown system system /sys/bus/i2c/devices/4-0042/default/f0_offset
|
||||
chown system system /sys/bus/i2c/devices/4-0042/default/owt_free_space
|
||||
chown system system /sys/bus/i2c/devices/4-0042/default/f0_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/4-0042/default/redc_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/4-0042/default/delay_before_stop_playback_us
|
||||
|
||||
enable vendor.vibrator.cs40l26-dual
|
||||
|
||||
service vendor.vibrator.cs40l26-dual /vendor/bin/hw/android.hardware.vibrator-service.cs40l26-dual-akita
|
||||
class hal
|
||||
user system
|
||||
group system input
|
||||
|
||||
setenv INPUT_EVENT_NAME cs40l26_dual_input
|
||||
setenv INPUT_EVENT_PATH /dev/input/event*
|
||||
setenv PROPERTY_PREFIX ro.vendor.vibrator.hal.
|
||||
setenv CALIBRATION_FILEPATH /mnt/vendor/persist/haptics/cs40l26_dual.cal
|
||||
|
||||
setenv HWAPI_PATH_PREFIX /sys/bus/i2c/devices/
|
||||
setenv HWAPI_DEBUG_NODES "
|
||||
6-0042/
|
||||
5-0042/
|
||||
4-0042/
|
||||
"
|
||||
setenv HWAPI_DEBUG_PATHS "
|
||||
calibration/f0_stored
|
||||
calibration/redc_stored
|
||||
calibration/q_stored
|
||||
default/vibe_state
|
||||
default/num_waves
|
||||
default/f0_offset
|
||||
default/owt_free_space
|
||||
default/f0_comp_enable
|
||||
default/redc_comp_enable
|
||||
default/delay_before_stop_playback_us
|
||||
"
|
||||
|
||||
disabled
|
|
@ -0,0 +1,7 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.vibrator</name>
|
||||
<version>2</version>
|
||||
<fqname>IVibrator/dual</fqname>
|
||||
</hal>
|
||||
</manifest>
|
6
vibrator/cs40l26/device-akita.mk
Normal file
6
vibrator/cs40l26/device-akita.mk
Normal file
|
@ -0,0 +1,6 @@
|
|||
PRODUCT_PACKAGES += \
|
||||
android.hardware.vibrator-service.cs40l26-akita
|
||||
|
||||
BOARD_SEPOLICY_DIRS += \
|
||||
hardware/google/pixel-sepolicy/vibrator/common \
|
||||
device/google/akita-sepolicy/vibrator/cs40l26
|
7
vibrator/cs40l26/device-stereo-akita.mk
Normal file
7
vibrator/cs40l26/device-stereo-akita.mk
Normal file
|
@ -0,0 +1,7 @@
|
|||
PRODUCT_PACKAGES += \
|
||||
android.hardware.vibrator-service.cs40l26-akita \
|
||||
android.hardware.vibrator-service.cs40l26-dual-akita
|
||||
|
||||
BOARD_SEPOLICY_DIRS += \
|
||||
hardware/google/pixel-sepolicy/vibrator/common \
|
||||
device/google/akita-sepolicy/vibrator/cs40l26
|
55
vibrator/cs40l26/service.cpp
Normal file
55
vibrator/cs40l26/service.cpp
Normal file
|
@ -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.
|
||||
*/
|
||||
#include <android/binder_manager.h>
|
||||
#include <android/binder_process.h>
|
||||
#include <binder/IServiceManager.h>
|
||||
#include <binder/ProcessState.h>
|
||||
#include <log/log.h>
|
||||
|
||||
#include "Hardware.h"
|
||||
#include "Vibrator.h"
|
||||
|
||||
using ::aidl::android::hardware::vibrator::HwApi;
|
||||
using ::aidl::android::hardware::vibrator::HwCal;
|
||||
using ::aidl::android::hardware::vibrator::Vibrator;
|
||||
using ::android::defaultServiceManager;
|
||||
using ::android::ProcessState;
|
||||
using ::android::sp;
|
||||
using ::android::String16;
|
||||
|
||||
#if !defined(VIBRATOR_NAME)
|
||||
#define VIBRATOR_NAME "default"
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
auto svc = ndk::SharedRefBase::make<Vibrator>(std::make_unique<HwApi>(),
|
||||
std::make_unique<HwCal>());
|
||||
const auto svcName = std::string() + svc->descriptor + "/" + VIBRATOR_NAME;
|
||||
|
||||
ProcessState::initWithDriver("/dev/vndbinder");
|
||||
|
||||
auto svcBinder = svc->asBinder();
|
||||
binder_status_t status = AServiceManager_addService(svcBinder.get(), svcName.c_str());
|
||||
LOG_ALWAYS_FATAL_IF(status != STATUS_OK);
|
||||
|
||||
ProcessState::self()->setThreadPoolMaxThreadCount(1);
|
||||
ProcessState::self()->startThreadPool();
|
||||
|
||||
ABinderProcess_setThreadPoolMaxThreadCount(0);
|
||||
ABinderProcess_joinThreadPool();
|
||||
|
||||
return EXIT_FAILURE; // should not reach
|
||||
}
|
35
vibrator/cs40l26/tests/Android.bp
Normal file
35
vibrator/cs40l26/tests/Android.bp
Normal file
|
@ -0,0 +1,35 @@
|
|||
//
|
||||
// Copyright (C) 2022 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.
|
||||
|
||||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
cc_test {
|
||||
name: "VibratorHalCs40l26TestSuiteAkita",
|
||||
defaults: ["VibratorHalCs40l26TestDefaultsAkita"],
|
||||
srcs: [
|
||||
"test-hwcal.cpp",
|
||||
"test-hwapi.cpp",
|
||||
"test-vibrator.cpp",
|
||||
],
|
||||
static_libs: [
|
||||
"libc++fs",
|
||||
"libgmock",
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
],
|
||||
}
|
80
vibrator/cs40l26/tests/mocks.h
Normal file
80
vibrator/cs40l26/tests/mocks.h
Normal file
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (C) 2022 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_VIBRATOR_TEST_MOCKS_H
|
||||
#define ANDROID_HARDWARE_VIBRATOR_TEST_MOCKS_H
|
||||
|
||||
#include <aidl/android/hardware/vibrator/BnVibratorCallback.h>
|
||||
|
||||
#include "Vibrator.h"
|
||||
|
||||
class MockApi : public ::aidl::android::hardware::vibrator::Vibrator::HwApi {
|
||||
public:
|
||||
MOCK_METHOD0(destructor, void());
|
||||
MOCK_METHOD1(setF0, bool(std::string value));
|
||||
MOCK_METHOD1(setF0Offset, bool(uint32_t value));
|
||||
MOCK_METHOD1(setRedc, bool(std::string value));
|
||||
MOCK_METHOD1(setQ, bool(std::string value));
|
||||
MOCK_METHOD1(getEffectCount, bool(uint32_t *value));
|
||||
MOCK_METHOD2(pollVibeState, bool(uint32_t value, int32_t timeoutMs));
|
||||
MOCK_METHOD0(hasOwtFreeSpace, bool());
|
||||
MOCK_METHOD1(getOwtFreeSpace, bool(uint32_t *value));
|
||||
MOCK_METHOD1(setF0CompEnable, bool(bool value));
|
||||
MOCK_METHOD1(setRedcCompEnable, bool(bool value));
|
||||
MOCK_METHOD1(setMinOnOffInterval, bool(uint32_t value));
|
||||
MOCK_METHOD2(setFFGain, bool(int fd, uint16_t value));
|
||||
MOCK_METHOD3(setFFEffect, bool(int fd, struct ff_effect *effect, uint16_t timeoutMs));
|
||||
MOCK_METHOD3(setFFPlay, bool(int fd, int8_t index, bool value));
|
||||
MOCK_METHOD2(getHapticAlsaDevice, bool(int *card, int *device));
|
||||
MOCK_METHOD4(setHapticPcmAmp, bool(struct pcm **haptic_pcm, bool enable, int card, int device));
|
||||
MOCK_METHOD6(uploadOwtEffect,
|
||||
bool(int fd, uint8_t *owtData, uint32_t numBytes, struct ff_effect *effect,
|
||||
uint32_t *outEffectIndex, int *status));
|
||||
MOCK_METHOD3(eraseOwtEffect, bool(int fd, int8_t effectIndex, std::vector<ff_effect> *effect));
|
||||
MOCK_METHOD1(debug, void(int fd));
|
||||
|
||||
~MockApi() override { destructor(); };
|
||||
};
|
||||
|
||||
class MockCal : public ::aidl::android::hardware::vibrator::Vibrator::HwCal {
|
||||
public:
|
||||
MOCK_METHOD0(destructor, void());
|
||||
MOCK_METHOD1(getVersion, bool(uint32_t *value));
|
||||
MOCK_METHOD1(getF0, bool(std::string &value));
|
||||
MOCK_METHOD1(getRedc, bool(std::string &value));
|
||||
MOCK_METHOD1(getQ, bool(std::string &value));
|
||||
MOCK_METHOD1(getLongFrequencyShift, bool(int32_t *value));
|
||||
MOCK_METHOD1(getTickVolLevels, bool(std::array<uint32_t, 2> *value));
|
||||
MOCK_METHOD1(getClickVolLevels, bool(std::array<uint32_t, 2> *value));
|
||||
MOCK_METHOD1(getLongVolLevels, bool(std::array<uint32_t, 2> *value));
|
||||
MOCK_METHOD0(isChirpEnabled, bool());
|
||||
MOCK_METHOD1(getSupportedPrimitives, bool(uint32_t *value));
|
||||
MOCK_METHOD1(getDeviceMass, bool(float *value));
|
||||
MOCK_METHOD1(getLocCoeff, bool(float *value));
|
||||
MOCK_METHOD1(debug, void(int fd));
|
||||
|
||||
~MockCal() override { destructor(); };
|
||||
// b/132668253: Workaround gMock Compilation Issue
|
||||
bool getF0(std::string *value) { return getF0(*value); }
|
||||
bool getRedc(std::string *value) { return getRedc(*value); }
|
||||
bool getQ(std::string *value) { return getQ(*value); }
|
||||
};
|
||||
|
||||
class MockVibratorCallback : public aidl::android::hardware::vibrator::BnVibratorCallback {
|
||||
public:
|
||||
MOCK_METHOD(ndk::ScopedAStatus, onComplete, ());
|
||||
};
|
||||
|
||||
#endif // ANDROID_HARDWARE_VIBRATOR_TEST_MOCKS_H
|
288
vibrator/cs40l26/tests/test-hwapi.cpp
Normal file
288
vibrator/cs40l26/tests/test-hwapi.cpp
Normal file
|
@ -0,0 +1,288 @@
|
|||
/*
|
||||
* Copyright (C) 2022 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.
|
||||
*/
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <cutils/fs.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <fstream>
|
||||
|
||||
#include "Hardware.h"
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
|
||||
using ::testing::Test;
|
||||
using ::testing::TestParamInfo;
|
||||
using ::testing::ValuesIn;
|
||||
using ::testing::WithParamInterface;
|
||||
|
||||
class HwApiTest : public Test {
|
||||
private:
|
||||
static constexpr const char *FILE_NAMES[]{
|
||||
"calibration/f0_stored",
|
||||
"default/f0_offset",
|
||||
"calibration/redc_stored",
|
||||
"calibration/q_stored",
|
||||
"default/f0_comp_enable",
|
||||
"default/redc_comp_enable",
|
||||
"default/owt_free_space",
|
||||
"default/num_waves",
|
||||
"default/delay_before_stop_playback_us",
|
||||
};
|
||||
|
||||
public:
|
||||
void SetUp() override {
|
||||
std::string prefix;
|
||||
for (auto n : FILE_NAMES) {
|
||||
auto name = std::filesystem::path(n);
|
||||
auto path = std::filesystem::path(mFilesDir.path) / name;
|
||||
fs_mkdirs(path.c_str(), S_IRWXU);
|
||||
std::ofstream touch{path};
|
||||
mFileMap[name] = path;
|
||||
}
|
||||
prefix = std::filesystem::path(mFilesDir.path) / "";
|
||||
setenv("HWAPI_PATH_PREFIX", prefix.c_str(), true);
|
||||
mHwApi = std::make_unique<HwApi>();
|
||||
|
||||
for (auto n : FILE_NAMES) {
|
||||
auto name = std::filesystem::path(n);
|
||||
auto path = std::filesystem::path(mEmptyDir.path) / name;
|
||||
}
|
||||
prefix = std::filesystem::path(mEmptyDir.path) / "";
|
||||
setenv("HWAPI_PATH_PREFIX", prefix.c_str(), true);
|
||||
mNoApi = std::make_unique<HwApi>();
|
||||
}
|
||||
|
||||
void TearDown() override { verifyContents(); }
|
||||
|
||||
static auto ParamNameFixup(std::string str) {
|
||||
std::replace(str.begin(), str.end(), '/', '_');
|
||||
return str;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Set expected file content for a test.
|
||||
template <typename T>
|
||||
void expectContent(const std::string &name, const T &value) {
|
||||
mExpectedContent[name] << value << std::endl;
|
||||
}
|
||||
|
||||
// Set actual file content for an input test.
|
||||
template <typename T>
|
||||
void updateContent(const std::string &name, const T &value) {
|
||||
std::ofstream(mFileMap[name]) << value << std::endl;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void expectAndUpdateContent(const std::string &name, const T &value) {
|
||||
expectContent(name, value);
|
||||
updateContent(name, value);
|
||||
}
|
||||
|
||||
// Compare all file contents against expected contents.
|
||||
void verifyContents() {
|
||||
for (auto &a : mFileMap) {
|
||||
std::ifstream file{a.second};
|
||||
std::string expect = mExpectedContent[a.first].str();
|
||||
std::string actual = std::string(std::istreambuf_iterator<char>(file),
|
||||
std::istreambuf_iterator<char>());
|
||||
EXPECT_EQ(expect, actual) << a.first;
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
std::unique_ptr<Vibrator::HwApi> mHwApi;
|
||||
std::unique_ptr<Vibrator::HwApi> mNoApi;
|
||||
std::map<std::string, std::string> mFileMap;
|
||||
TemporaryDir mFilesDir;
|
||||
TemporaryDir mEmptyDir;
|
||||
std::map<std::string, std::stringstream> mExpectedContent;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class HwApiTypedTest : public HwApiTest,
|
||||
public WithParamInterface<std::tuple<std::string, std::function<T>>> {
|
||||
public:
|
||||
static auto PrintParam(const TestParamInfo<typename HwApiTypedTest::ParamType> &info) {
|
||||
return ParamNameFixup(std::get<0>(info.param));
|
||||
}
|
||||
static auto MakeParam(std::string name, std::function<T> func) {
|
||||
return std::make_tuple(name, func);
|
||||
}
|
||||
};
|
||||
|
||||
using HasTest = HwApiTypedTest<bool(Vibrator::HwApi &)>;
|
||||
|
||||
TEST_P(HasTest, success_returnsTrue) {
|
||||
auto param = GetParam();
|
||||
auto func = std::get<1>(param);
|
||||
|
||||
EXPECT_TRUE(func(*mHwApi));
|
||||
}
|
||||
|
||||
TEST_P(HasTest, success_returnsFalse) {
|
||||
auto param = GetParam();
|
||||
auto func = std::get<1>(param);
|
||||
|
||||
EXPECT_FALSE(func(*mNoApi));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(HwApiTests, HasTest,
|
||||
ValuesIn({
|
||||
HasTest::MakeParam("default/owt_free_space",
|
||||
&Vibrator::HwApi::hasOwtFreeSpace),
|
||||
}),
|
||||
HasTest::PrintParam);
|
||||
|
||||
using GetUint32Test = HwApiTypedTest<bool(Vibrator::HwApi &, uint32_t *)>;
|
||||
|
||||
TEST_P(GetUint32Test, success) {
|
||||
auto param = GetParam();
|
||||
auto name = std::get<0>(param);
|
||||
auto func = std::get<1>(param);
|
||||
uint32_t expect = std::rand();
|
||||
uint32_t actual = ~expect;
|
||||
|
||||
expectAndUpdateContent(name, expect);
|
||||
|
||||
EXPECT_TRUE(func(*mHwApi, &actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_P(GetUint32Test, failure) {
|
||||
auto param = GetParam();
|
||||
auto func = std::get<1>(param);
|
||||
uint32_t value;
|
||||
|
||||
EXPECT_FALSE(func(*mNoApi, &value));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(HwApiTests, GetUint32Test,
|
||||
ValuesIn({
|
||||
GetUint32Test::MakeParam("default/num_waves",
|
||||
&Vibrator::HwApi::getEffectCount),
|
||||
GetUint32Test::MakeParam("default/owt_free_space",
|
||||
&Vibrator::HwApi::getOwtFreeSpace),
|
||||
}),
|
||||
GetUint32Test::PrintParam);
|
||||
|
||||
using SetBoolTest = HwApiTypedTest<bool(Vibrator::HwApi &, bool)>;
|
||||
|
||||
TEST_P(SetBoolTest, success_returnsTrue) {
|
||||
auto param = GetParam();
|
||||
auto name = std::get<0>(param);
|
||||
auto func = std::get<1>(param);
|
||||
|
||||
expectContent(name, "1");
|
||||
|
||||
EXPECT_TRUE(func(*mHwApi, true));
|
||||
}
|
||||
|
||||
TEST_P(SetBoolTest, success_returnsFalse) {
|
||||
auto param = GetParam();
|
||||
auto name = std::get<0>(param);
|
||||
auto func = std::get<1>(param);
|
||||
|
||||
expectContent(name, "0");
|
||||
|
||||
EXPECT_TRUE(func(*mHwApi, false));
|
||||
}
|
||||
|
||||
TEST_P(SetBoolTest, failure) {
|
||||
auto param = GetParam();
|
||||
auto func = std::get<1>(param);
|
||||
|
||||
EXPECT_FALSE(func(*mNoApi, true));
|
||||
EXPECT_FALSE(func(*mNoApi, false));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(HwApiTests, SetBoolTest,
|
||||
ValuesIn({
|
||||
SetBoolTest::MakeParam("default/f0_comp_enable",
|
||||
&Vibrator::HwApi::setF0CompEnable),
|
||||
SetBoolTest::MakeParam("default/redc_comp_enable",
|
||||
&Vibrator::HwApi::setRedcCompEnable),
|
||||
}),
|
||||
SetBoolTest::PrintParam);
|
||||
|
||||
using SetUint32Test = HwApiTypedTest<bool(Vibrator::HwApi &, uint32_t)>;
|
||||
|
||||
TEST_P(SetUint32Test, success) {
|
||||
auto param = GetParam();
|
||||
auto name = std::get<0>(param);
|
||||
auto func = std::get<1>(param);
|
||||
uint32_t value = std::rand();
|
||||
|
||||
expectContent(name, value);
|
||||
|
||||
EXPECT_TRUE(func(*mHwApi, value));
|
||||
}
|
||||
|
||||
TEST_P(SetUint32Test, failure) {
|
||||
auto param = GetParam();
|
||||
auto func = std::get<1>(param);
|
||||
uint32_t value = std::rand();
|
||||
|
||||
EXPECT_FALSE(func(*mNoApi, value));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(HwApiTests, SetUint32Test,
|
||||
ValuesIn({
|
||||
SetUint32Test::MakeParam("default/f0_offset",
|
||||
&Vibrator::HwApi::setF0Offset),
|
||||
SetUint32Test::MakeParam("default/delay_before_stop_playback_us",
|
||||
&Vibrator::HwApi::setMinOnOffInterval),
|
||||
}),
|
||||
SetUint32Test::PrintParam);
|
||||
|
||||
using SetStringTest = HwApiTypedTest<bool(Vibrator::HwApi &, std::string)>;
|
||||
|
||||
TEST_P(SetStringTest, success) {
|
||||
auto param = GetParam();
|
||||
auto name = std::get<0>(param);
|
||||
auto func = std::get<1>(param);
|
||||
std::string value = TemporaryFile().path;
|
||||
|
||||
expectContent(name, value);
|
||||
|
||||
EXPECT_TRUE(func(*mHwApi, value));
|
||||
}
|
||||
|
||||
TEST_P(SetStringTest, failure) {
|
||||
auto param = GetParam();
|
||||
auto func = std::get<1>(param);
|
||||
std::string value = TemporaryFile().path;
|
||||
|
||||
EXPECT_FALSE(func(*mNoApi, value));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
HwApiTests, SetStringTest,
|
||||
ValuesIn({
|
||||
SetStringTest::MakeParam("calibration/f0_stored", &Vibrator::HwApi::setF0),
|
||||
SetStringTest::MakeParam("calibration/redc_stored", &Vibrator::HwApi::setRedc),
|
||||
SetStringTest::MakeParam("calibration/q_stored", &Vibrator::HwApi::setQ),
|
||||
}),
|
||||
SetStringTest::PrintParam);
|
||||
|
||||
} // namespace vibrator
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
386
vibrator/cs40l26/tests/test-hwcal.cpp
Normal file
386
vibrator/cs40l26/tests/test-hwcal.cpp
Normal file
|
@ -0,0 +1,386 @@
|
|||
/*
|
||||
* Copyright (C) 2022 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.
|
||||
*/
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include "Hardware.h"
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
|
||||
using ::testing::Test;
|
||||
|
||||
class HwCalTest : public Test {
|
||||
protected:
|
||||
static constexpr std::array<uint32_t, 2> V_TICK_DEFAULT = {1, 100};
|
||||
static constexpr std::array<uint32_t, 2> V_CLICK_DEFAULT = {1, 100};
|
||||
static constexpr std::array<uint32_t, 2> V_LONG_DEFAULT = {1, 100};
|
||||
|
||||
public:
|
||||
void SetUp() override { setenv("CALIBRATION_FILEPATH", mCalFile.path, true); }
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
static void pack(std::ostream &stream, const T &value, std::string lpad, std::string rpad) {
|
||||
stream << lpad << value << rpad;
|
||||
}
|
||||
|
||||
template <typename T, typename std::array<T, 0>::size_type N>
|
||||
static void pack(std::ostream &stream, const std::array<T, N> &value, std::string lpad,
|
||||
std::string rpad) {
|
||||
for (auto &entry : value) {
|
||||
pack(stream, entry, lpad, rpad);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
void createHwCal() { mHwCal = std::make_unique<HwCal>(); }
|
||||
|
||||
template <typename T>
|
||||
void write(const std::string key, const T &value, std::string lpad = " ",
|
||||
std::string rpad = "") {
|
||||
std::ofstream calfile{mCalFile.path, std::ios_base::app};
|
||||
calfile << key << ":";
|
||||
pack(calfile, value, lpad, rpad);
|
||||
calfile << std::endl;
|
||||
}
|
||||
|
||||
void unlink() { ::unlink(mCalFile.path); }
|
||||
|
||||
protected:
|
||||
std::unique_ptr<Vibrator::HwCal> mHwCal;
|
||||
TemporaryFile mCalFile;
|
||||
};
|
||||
|
||||
TEST_F(HwCalTest, f0_measured) {
|
||||
uint32_t randInput = std::rand();
|
||||
std::string expect = std::to_string(randInput);
|
||||
std::string actual = std::to_string(~randInput);
|
||||
|
||||
write("f0_measured", expect);
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getF0(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, f0_missing) {
|
||||
std::string actual;
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_FALSE(mHwCal->getF0(&actual));
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, redc_measured) {
|
||||
uint32_t randInput = std::rand();
|
||||
std::string expect = std::to_string(randInput);
|
||||
std::string actual = std::to_string(~randInput);
|
||||
|
||||
write("redc_measured", expect);
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getRedc(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, redc_missing) {
|
||||
std::string actual;
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_FALSE(mHwCal->getRedc(&actual));
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, q_measured) {
|
||||
uint32_t randInput = std::rand();
|
||||
std::string expect = std::to_string(randInput);
|
||||
std::string actual = std::to_string(~randInput);
|
||||
|
||||
write("q_measured", expect);
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getQ(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, q_missing) {
|
||||
std::string actual;
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_FALSE(mHwCal->getQ(&actual));
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, v_levels) {
|
||||
std::array<uint32_t, 2> expect;
|
||||
std::array<uint32_t, 2> actual;
|
||||
|
||||
// voltage for tick effects
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
|
||||
write("v_tick", expect);
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getTickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
// voltage for click effects
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
|
||||
write("v_click", expect);
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getClickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
// voltage for long effects
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
|
||||
write("v_long", expect);
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getLongVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, v_missing) {
|
||||
std::array<uint32_t, 2> expect = V_TICK_DEFAULT;
|
||||
std::array<uint32_t, 2> actual;
|
||||
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; });
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getTickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
expect = V_CLICK_DEFAULT;
|
||||
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; });
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getClickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
expect = V_LONG_DEFAULT;
|
||||
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; });
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getLongVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, v_short) {
|
||||
std::array<uint32_t, 2> expect = V_TICK_DEFAULT;
|
||||
std::array<uint32_t, 2> actual;
|
||||
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; });
|
||||
|
||||
write("v_tick", std::array<uint32_t, expect.size() - 1>());
|
||||
write("v_click", std::array<uint32_t, expect.size() - 1>());
|
||||
write("v_long", std::array<uint32_t, expect.size() - 1>());
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getTickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
expect = V_CLICK_DEFAULT;
|
||||
EXPECT_TRUE(mHwCal->getClickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
expect = V_LONG_DEFAULT;
|
||||
EXPECT_TRUE(mHwCal->getLongVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, v_long) {
|
||||
std::array<uint32_t, 2> expect = V_TICK_DEFAULT;
|
||||
std::array<uint32_t, 2> actual;
|
||||
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; });
|
||||
|
||||
write("v_tick", std::array<uint32_t, expect.size() + 1>());
|
||||
write("v_click", std::array<uint32_t, expect.size() + 1>());
|
||||
write("v_long", std::array<uint32_t, expect.size() + 1>());
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getTickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
expect = V_CLICK_DEFAULT;
|
||||
EXPECT_TRUE(mHwCal->getClickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
expect = V_LONG_DEFAULT;
|
||||
EXPECT_TRUE(mHwCal->getLongVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, v_nofile) {
|
||||
std::array<uint32_t, 2> expect = V_TICK_DEFAULT;
|
||||
std::array<uint32_t, 2> actual;
|
||||
|
||||
std::transform(expect.begin(), expect.end(), actual.begin(), [](uint32_t &e) { return ~e; });
|
||||
|
||||
write("v_tick", actual);
|
||||
write("v_click", actual);
|
||||
write("v_long", actual);
|
||||
unlink();
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getTickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
expect = V_CLICK_DEFAULT;
|
||||
EXPECT_TRUE(mHwCal->getClickVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
|
||||
expect = V_LONG_DEFAULT;
|
||||
EXPECT_TRUE(mHwCal->getLongVolLevels(&actual));
|
||||
EXPECT_EQ(expect, actual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, multiple) {
|
||||
uint32_t randInput = std::rand();
|
||||
std::string f0Expect = std::to_string(randInput);
|
||||
std::string f0Actual = std::to_string(~randInput);
|
||||
randInput = std::rand();
|
||||
std::string redcExpect = std::to_string(randInput);
|
||||
std::string redcActual = std::to_string(~randInput);
|
||||
randInput = std::rand();
|
||||
std::string qExpect = std::to_string(randInput);
|
||||
std::string qActual = std::to_string(~randInput);
|
||||
std::array<uint32_t, 2> volTickExpect, volClickExpect, volLongExpect;
|
||||
std::array<uint32_t, 2> volActual;
|
||||
|
||||
std::transform(volTickExpect.begin(), volTickExpect.end(), volActual.begin(), [](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
|
||||
write("f0_measured", f0Expect);
|
||||
write("redc_measured", redcExpect);
|
||||
write("q_measured", qExpect);
|
||||
write("v_tick", volTickExpect);
|
||||
std::transform(volClickExpect.begin(), volClickExpect.end(), volActual.begin(),
|
||||
[](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
write("v_click", volClickExpect);
|
||||
std::transform(volLongExpect.begin(), volLongExpect.end(), volActual.begin(), [](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
write("v_long", volLongExpect);
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getF0(&f0Actual));
|
||||
EXPECT_EQ(f0Expect, f0Actual);
|
||||
EXPECT_TRUE(mHwCal->getRedc(&redcActual));
|
||||
EXPECT_EQ(redcExpect, redcActual);
|
||||
EXPECT_TRUE(mHwCal->getQ(&qActual));
|
||||
EXPECT_EQ(qExpect, qActual);
|
||||
EXPECT_TRUE(mHwCal->getTickVolLevels(&volActual));
|
||||
EXPECT_EQ(volTickExpect, volActual);
|
||||
EXPECT_TRUE(mHwCal->getClickVolLevels(&volActual));
|
||||
EXPECT_EQ(volClickExpect, volActual);
|
||||
EXPECT_TRUE(mHwCal->getLongVolLevels(&volActual));
|
||||
EXPECT_EQ(volLongExpect, volActual);
|
||||
}
|
||||
|
||||
TEST_F(HwCalTest, trimming) {
|
||||
uint32_t randInput = std::rand();
|
||||
std::string f0Expect = std::to_string(randInput);
|
||||
std::string f0Actual = std::to_string(~randInput);
|
||||
randInput = std::rand();
|
||||
std::string redcExpect = std::to_string(randInput);
|
||||
std::string redcActual = std::to_string(randInput);
|
||||
randInput = std::rand();
|
||||
std::string qExpect = std::to_string(randInput);
|
||||
std::string qActual = std::to_string(randInput);
|
||||
std::array<uint32_t, 2> volTickExpect, volClickExpect, volLongExpect;
|
||||
std::array<uint32_t, 2> volActual;
|
||||
|
||||
std::transform(volTickExpect.begin(), volTickExpect.end(), volActual.begin(), [](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
|
||||
write("f0_measured", f0Expect, " \t", "\t ");
|
||||
write("redc_measured", redcExpect, " \t", "\t ");
|
||||
write("q_measured", qExpect, " \t", "\t ");
|
||||
write("v_tick", volTickExpect, " \t", "\t ");
|
||||
std::transform(volClickExpect.begin(), volClickExpect.end(), volActual.begin(),
|
||||
[](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
write("v_click", volClickExpect, " \t", "\t ");
|
||||
std::transform(volLongExpect.begin(), volLongExpect.end(), volActual.begin(), [](uint32_t &e) {
|
||||
e = std::rand();
|
||||
return ~e;
|
||||
});
|
||||
write("v_long", volLongExpect, " \t", "\t ");
|
||||
|
||||
createHwCal();
|
||||
|
||||
EXPECT_TRUE(mHwCal->getF0(&f0Actual));
|
||||
EXPECT_EQ(f0Expect, f0Actual);
|
||||
EXPECT_TRUE(mHwCal->getRedc(&redcActual));
|
||||
EXPECT_EQ(redcExpect, redcActual);
|
||||
EXPECT_TRUE(mHwCal->getQ(&qActual));
|
||||
EXPECT_EQ(qExpect, qActual);
|
||||
EXPECT_TRUE(mHwCal->getTickVolLevels(&volActual));
|
||||
EXPECT_EQ(volTickExpect, volActual);
|
||||
EXPECT_TRUE(mHwCal->getClickVolLevels(&volActual));
|
||||
EXPECT_EQ(volClickExpect, volActual);
|
||||
EXPECT_TRUE(mHwCal->getLongVolLevels(&volActual));
|
||||
EXPECT_EQ(volLongExpect, volActual);
|
||||
}
|
||||
|
||||
} // namespace vibrator
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
742
vibrator/cs40l26/tests/test-vibrator.cpp
Normal file
742
vibrator/cs40l26/tests/test-vibrator.cpp
Normal file
|
@ -0,0 +1,742 @@
|
|||
/*
|
||||
* Copyright (C) 2022 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.
|
||||
*/
|
||||
|
||||
#include <aidl/android/hardware/vibrator/BnVibratorCallback.h>
|
||||
#include <android-base/logging.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/uinput.h>
|
||||
|
||||
#include <future>
|
||||
|
||||
#include "Vibrator.h"
|
||||
#include "mocks.h"
|
||||
#include "types.h"
|
||||
#include "utils.h"
|
||||
|
||||
namespace aidl {
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace vibrator {
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::AnyNumber;
|
||||
using ::testing::Assign;
|
||||
using ::testing::AtLeast;
|
||||
using ::testing::AtMost;
|
||||
using ::testing::Combine;
|
||||
using ::testing::DoAll;
|
||||
using ::testing::DoDefault;
|
||||
using ::testing::Exactly;
|
||||
using ::testing::Expectation;
|
||||
using ::testing::ExpectationSet;
|
||||
using ::testing::Ge;
|
||||
using ::testing::Mock;
|
||||
using ::testing::MockFunction;
|
||||
using ::testing::Range;
|
||||
using ::testing::Return;
|
||||
using ::testing::Sequence;
|
||||
using ::testing::SetArgPointee;
|
||||
using ::testing::SetArgReferee;
|
||||
using ::testing::Test;
|
||||
using ::testing::TestParamInfo;
|
||||
using ::testing::ValuesIn;
|
||||
using ::testing::WithParamInterface;
|
||||
|
||||
// Forward Declarations
|
||||
|
||||
static EffectQueue Queue(const QueueEffect &effect);
|
||||
static EffectQueue Queue(const QueueDelay &delay);
|
||||
template <typename T, typename U, typename... Args>
|
||||
static EffectQueue Queue(const T &first, const U &second, Args... rest);
|
||||
|
||||
static EffectLevel Level(float intensity, float levelLow, float levelHigh);
|
||||
static EffectScale Scale(float intensity, float levelLow, float levelHigh);
|
||||
|
||||
// Constants With Arbitrary Values
|
||||
|
||||
static constexpr uint32_t CAL_VERSION = 2;
|
||||
static constexpr std::array<EffectLevel, 2> V_TICK_DEFAULT = {1, 100};
|
||||
static constexpr std::array<EffectLevel, 2> V_CLICK_DEFAULT{1, 100};
|
||||
static constexpr std::array<EffectLevel, 2> V_LONG_DEFAULT{1, 100};
|
||||
static constexpr std::array<EffectDuration, 14> EFFECT_DURATIONS{
|
||||
0, 100, 30, 1000, 300, 130, 150, 500, 100, 15, 20, 1000, 1000, 1000};
|
||||
|
||||
// Constants With Prescribed Values
|
||||
|
||||
static const std::map<Effect, EffectIndex> EFFECT_INDEX{
|
||||
{Effect::CLICK, 2},
|
||||
{Effect::TICK, 2},
|
||||
{Effect::HEAVY_CLICK, 2},
|
||||
{Effect::TEXTURE_TICK, 9},
|
||||
};
|
||||
static constexpr uint32_t MIN_ON_OFF_INTERVAL_US = 8500;
|
||||
static constexpr uint8_t VOLTAGE_SCALE_MAX = 100;
|
||||
static constexpr int8_t MAX_COLD_START_LATENCY_MS = 6; // I2C Transaction + DSP Return-From-Standby
|
||||
static constexpr auto POLLING_TIMEOUT = 20;
|
||||
enum WaveformIndex : uint16_t {
|
||||
/* Physical waveform */
|
||||
WAVEFORM_LONG_VIBRATION_EFFECT_INDEX = 0,
|
||||
WAVEFORM_RESERVED_INDEX_1 = 1,
|
||||
WAVEFORM_CLICK_INDEX = 2,
|
||||
WAVEFORM_SHORT_VIBRATION_EFFECT_INDEX = 3,
|
||||
WAVEFORM_THUD_INDEX = 4,
|
||||
WAVEFORM_SPIN_INDEX = 5,
|
||||
WAVEFORM_QUICK_RISE_INDEX = 6,
|
||||
WAVEFORM_SLOW_RISE_INDEX = 7,
|
||||
WAVEFORM_QUICK_FALL_INDEX = 8,
|
||||
WAVEFORM_LIGHT_TICK_INDEX = 9,
|
||||
WAVEFORM_LOW_TICK_INDEX = 10,
|
||||
WAVEFORM_RESERVED_MFG_1,
|
||||
WAVEFORM_RESERVED_MFG_2,
|
||||
WAVEFORM_RESERVED_MFG_3,
|
||||
WAVEFORM_MAX_PHYSICAL_INDEX,
|
||||
/* OWT waveform */
|
||||
WAVEFORM_COMPOSE = WAVEFORM_MAX_PHYSICAL_INDEX,
|
||||
WAVEFORM_PWLE,
|
||||
/*
|
||||
* Refer to <linux/input.h>, the WAVEFORM_MAX_INDEX must not exceed 96.
|
||||
* #define FF_GAIN 0x60 // 96 in decimal
|
||||
* #define FF_MAX_EFFECTS FF_GAIN
|
||||
*/
|
||||
WAVEFORM_MAX_INDEX,
|
||||
};
|
||||
|
||||
static const EffectScale ON_GLOBAL_SCALE{levelToScale(V_LONG_DEFAULT[1])};
|
||||
static const EffectIndex ON_EFFECT_INDEX{0};
|
||||
|
||||
static const std::map<EffectTuple, EffectScale> EFFECT_SCALE{
|
||||
{{Effect::TICK, EffectStrength::LIGHT},
|
||||
Scale(0.5f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::TICK, EffectStrength::MEDIUM},
|
||||
Scale(0.5f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::TICK, EffectStrength::STRONG},
|
||||
Scale(0.5f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::CLICK, EffectStrength::LIGHT},
|
||||
Scale(0.7f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::CLICK, EffectStrength::MEDIUM},
|
||||
Scale(0.7f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::CLICK, EffectStrength::STRONG},
|
||||
Scale(0.7f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::HEAVY_CLICK, EffectStrength::LIGHT},
|
||||
Scale(1.0f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::HEAVY_CLICK, EffectStrength::MEDIUM},
|
||||
Scale(1.0f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::HEAVY_CLICK, EffectStrength::STRONG},
|
||||
Scale(1.0f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
{{Effect::TEXTURE_TICK, EffectStrength::LIGHT},
|
||||
Scale(0.5f * 0.5f, V_TICK_DEFAULT[0], V_TICK_DEFAULT[1])},
|
||||
{{Effect::TEXTURE_TICK, EffectStrength::MEDIUM},
|
||||
Scale(0.5f * 0.7f, V_TICK_DEFAULT[0], V_TICK_DEFAULT[1])},
|
||||
{{Effect::TEXTURE_TICK, EffectStrength::STRONG},
|
||||
Scale(0.5f * 1.0f, V_TICK_DEFAULT[0], V_TICK_DEFAULT[1])},
|
||||
};
|
||||
|
||||
static const std::map<EffectTuple, EffectQueue> EFFECT_QUEUE{
|
||||
{{Effect::DOUBLE_CLICK, EffectStrength::LIGHT},
|
||||
Queue(QueueEffect{EFFECT_INDEX.at(Effect::CLICK),
|
||||
Level(0.7f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
100,
|
||||
QueueEffect{EFFECT_INDEX.at(Effect::CLICK),
|
||||
Level(1.0f * 0.5f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])})},
|
||||
{{Effect::DOUBLE_CLICK, EffectStrength::MEDIUM},
|
||||
Queue(QueueEffect{EFFECT_INDEX.at(Effect::CLICK),
|
||||
Level(0.7f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
100,
|
||||
QueueEffect{EFFECT_INDEX.at(Effect::CLICK),
|
||||
Level(1.0f * 0.7f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])})},
|
||||
{{Effect::DOUBLE_CLICK, EffectStrength::STRONG},
|
||||
Queue(QueueEffect{EFFECT_INDEX.at(Effect::CLICK),
|
||||
Level(0.7f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])},
|
||||
100,
|
||||
QueueEffect{EFFECT_INDEX.at(Effect::CLICK),
|
||||
Level(1.0f * 1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])})},
|
||||
};
|
||||
|
||||
EffectQueue Queue(const QueueEffect &effect) {
|
||||
auto index = std::get<0>(effect);
|
||||
auto level = std::get<1>(effect);
|
||||
auto string = std::to_string(index) + "." + std::to_string(level);
|
||||
auto duration = EFFECT_DURATIONS[index];
|
||||
return {string, duration};
|
||||
}
|
||||
|
||||
EffectQueue Queue(const QueueDelay &delay) {
|
||||
auto string = std::to_string(delay);
|
||||
return {string, delay};
|
||||
}
|
||||
|
||||
template <typename T, typename U, typename... Args>
|
||||
EffectQueue Queue(const T &first, const U &second, Args... rest) {
|
||||
auto head = Queue(first);
|
||||
auto tail = Queue(second, rest...);
|
||||
auto string = std::get<0>(head) + "," + std::get<0>(tail);
|
||||
auto duration = std::get<1>(head) + std::get<1>(tail);
|
||||
return {string, duration};
|
||||
}
|
||||
|
||||
static EffectLevel Level(float intensity, float levelLow, float levelHigh) {
|
||||
return std::lround(intensity * (levelHigh - levelLow)) + levelLow;
|
||||
}
|
||||
|
||||
static EffectScale Scale(float intensity, float levelLow, float levelHigh) {
|
||||
return levelToScale(Level(intensity, levelLow, levelHigh));
|
||||
}
|
||||
|
||||
class VibratorTest : public Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
setenv("INPUT_EVENT_NAME", "CS40L26TestSuite", true);
|
||||
std::unique_ptr<MockApi> mockapi;
|
||||
std::unique_ptr<MockCal> mockcal;
|
||||
|
||||
createMock(&mockapi, &mockcal);
|
||||
createVibrator(std::move(mockapi), std::move(mockcal));
|
||||
}
|
||||
|
||||
void TearDown() override { deleteVibrator(); }
|
||||
|
||||
protected:
|
||||
void createMock(std::unique_ptr<MockApi> *mockapi, std::unique_ptr<MockCal> *mockcal) {
|
||||
*mockapi = std::make_unique<MockApi>();
|
||||
*mockcal = std::make_unique<MockCal>();
|
||||
|
||||
mMockApi = mockapi->get();
|
||||
mMockCal = mockcal->get();
|
||||
|
||||
ON_CALL(*mMockApi, destructor()).WillByDefault(Assign(&mMockApi, nullptr));
|
||||
|
||||
ON_CALL(*mMockApi, setFFGain(_, _)).WillByDefault(Return(true));
|
||||
ON_CALL(*mMockApi, setFFEffect(_, _, _)).WillByDefault(Return(true));
|
||||
ON_CALL(*mMockApi, setFFPlay(_, _, _)).WillByDefault(Return(true));
|
||||
ON_CALL(*mMockApi, pollVibeState(_, _)).WillByDefault(Return(true));
|
||||
ON_CALL(*mMockApi, uploadOwtEffect(_, _, _, _, _, _)).WillByDefault(Return(true));
|
||||
ON_CALL(*mMockApi, eraseOwtEffect(_, _, _)).WillByDefault(Return(true));
|
||||
|
||||
ON_CALL(*mMockApi, getOwtFreeSpace(_))
|
||||
.WillByDefault(DoAll(SetArgPointee<0>(11504), Return(true)));
|
||||
|
||||
ON_CALL(*mMockCal, destructor()).WillByDefault(Assign(&mMockCal, nullptr));
|
||||
|
||||
ON_CALL(*mMockCal, getVersion(_))
|
||||
.WillByDefault(DoAll(SetArgPointee<0>(CAL_VERSION), Return(true)));
|
||||
|
||||
ON_CALL(*mMockCal, getTickVolLevels(_))
|
||||
.WillByDefault(DoAll(SetArgPointee<0>(V_TICK_DEFAULT), Return(true)));
|
||||
ON_CALL(*mMockCal, getClickVolLevels(_))
|
||||
.WillByDefault(DoAll(SetArgPointee<0>(V_CLICK_DEFAULT), Return(true)));
|
||||
ON_CALL(*mMockCal, getLongVolLevels(_))
|
||||
.WillByDefault(DoAll(SetArgPointee<0>(V_LONG_DEFAULT), Return(true)));
|
||||
|
||||
relaxMock(false);
|
||||
}
|
||||
|
||||
void createVibrator(std::unique_ptr<MockApi> mockapi, std::unique_ptr<MockCal> mockcal,
|
||||
bool relaxed = true) {
|
||||
if (relaxed) {
|
||||
relaxMock(true);
|
||||
}
|
||||
mVibrator = ndk::SharedRefBase::make<Vibrator>(std::move(mockapi), std::move(mockcal));
|
||||
if (relaxed) {
|
||||
relaxMock(false);
|
||||
}
|
||||
}
|
||||
|
||||
void deleteVibrator(bool relaxed = true) {
|
||||
if (relaxed) {
|
||||
relaxMock(true);
|
||||
}
|
||||
mVibrator.reset();
|
||||
}
|
||||
|
||||
private:
|
||||
void relaxMock(bool relax) {
|
||||
auto times = relax ? AnyNumber() : Exactly(0);
|
||||
|
||||
Mock::VerifyAndClearExpectations(mMockApi);
|
||||
Mock::VerifyAndClearExpectations(mMockCal);
|
||||
|
||||
EXPECT_CALL(*mMockApi, destructor()).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setF0(_)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setF0Offset(_)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setRedc(_)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setQ(_)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).Times(times);
|
||||
EXPECT_CALL(*mMockApi, getOwtFreeSpace(_)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setF0CompEnable(_)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setRedcCompEnable(_)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, pollVibeState(_, _)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setFFGain(_, _)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setFFEffect(_, _, _)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setFFPlay(_, _, _)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setMinOnOffInterval(_)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).Times(times);
|
||||
EXPECT_CALL(*mMockApi, setHapticPcmAmp(_, _, _, _)).Times(times);
|
||||
|
||||
EXPECT_CALL(*mMockApi, debug(_)).Times(times);
|
||||
|
||||
EXPECT_CALL(*mMockCal, destructor()).Times(times);
|
||||
EXPECT_CALL(*mMockCal, getF0(_)).Times(times);
|
||||
EXPECT_CALL(*mMockCal, getRedc(_)).Times(times);
|
||||
EXPECT_CALL(*mMockCal, getQ(_)).Times(times);
|
||||
EXPECT_CALL(*mMockCal, getTickVolLevels(_)).Times(times);
|
||||
EXPECT_CALL(*mMockCal, getClickVolLevels(_)).Times(times);
|
||||
EXPECT_CALL(*mMockCal, getLongVolLevels(_)).Times(times);
|
||||
EXPECT_CALL(*mMockCal, isChirpEnabled()).Times(times);
|
||||
EXPECT_CALL(*mMockCal, getLongFrequencyShift(_)).Times(times);
|
||||
EXPECT_CALL(*mMockCal, debug(_)).Times(times);
|
||||
}
|
||||
|
||||
protected:
|
||||
MockApi *mMockApi;
|
||||
MockCal *mMockCal;
|
||||
std::shared_ptr<IVibrator> mVibrator;
|
||||
uint32_t mEffectIndex;
|
||||
};
|
||||
|
||||
TEST_F(VibratorTest, Constructor) {
|
||||
std::unique_ptr<MockApi> mockapi;
|
||||
std::unique_ptr<MockCal> mockcal;
|
||||
std::string f0Val = std::to_string(std::rand());
|
||||
std::string redcVal = std::to_string(std::rand());
|
||||
std::string qVal = std::to_string(std::rand());
|
||||
uint32_t calVer;
|
||||
uint32_t supportedPrimitivesBits = 0x0;
|
||||
Expectation volGet;
|
||||
Sequence f0Seq, redcSeq, qSeq, supportedPrimitivesSeq;
|
||||
|
||||
EXPECT_CALL(*mMockApi, destructor()).WillOnce(DoDefault());
|
||||
EXPECT_CALL(*mMockCal, destructor()).WillOnce(DoDefault());
|
||||
|
||||
deleteVibrator(false);
|
||||
|
||||
createMock(&mockapi, &mockcal);
|
||||
|
||||
EXPECT_CALL(*mMockCal, getF0(_))
|
||||
.InSequence(f0Seq)
|
||||
.WillOnce(DoAll(SetArgReferee<0>(f0Val), Return(true)));
|
||||
EXPECT_CALL(*mMockApi, setF0(f0Val)).InSequence(f0Seq).WillOnce(Return(true));
|
||||
|
||||
EXPECT_CALL(*mMockCal, getRedc(_))
|
||||
.InSequence(redcSeq)
|
||||
.WillOnce(DoAll(SetArgReferee<0>(redcVal), Return(true)));
|
||||
EXPECT_CALL(*mMockApi, setRedc(redcVal)).InSequence(redcSeq).WillOnce(Return(true));
|
||||
|
||||
EXPECT_CALL(*mMockCal, getQ(_))
|
||||
.InSequence(qSeq)
|
||||
.WillOnce(DoAll(SetArgReferee<0>(qVal), Return(true)));
|
||||
EXPECT_CALL(*mMockApi, setQ(qVal)).InSequence(qSeq).WillOnce(Return(true));
|
||||
|
||||
EXPECT_CALL(*mMockCal, getLongFrequencyShift(_)).WillOnce(Return(true));
|
||||
|
||||
mMockCal->getVersion(&calVer);
|
||||
if (calVer == 2) {
|
||||
volGet = EXPECT_CALL(*mMockCal, getTickVolLevels(_)).WillOnce(DoDefault());
|
||||
volGet = EXPECT_CALL(*mMockCal, getClickVolLevels(_)).WillOnce(DoDefault());
|
||||
volGet = EXPECT_CALL(*mMockCal, getLongVolLevels(_)).WillOnce(DoDefault());
|
||||
}
|
||||
|
||||
EXPECT_CALL(*mMockApi, setF0CompEnable(true)).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, setRedcCompEnable(true)).WillOnce(Return(true));
|
||||
|
||||
EXPECT_CALL(*mMockCal, isChirpEnabled()).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockCal, getSupportedPrimitives(_))
|
||||
.InSequence(supportedPrimitivesSeq)
|
||||
.WillOnce(DoAll(SetArgPointee<0>(supportedPrimitivesBits), Return(true)));
|
||||
|
||||
EXPECT_CALL(*mMockApi, setMinOnOffInterval(MIN_ON_OFF_INTERVAL_US)).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(true));
|
||||
createVibrator(std::move(mockapi), std::move(mockcal), false);
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, on) {
|
||||
Sequence s1, s2;
|
||||
uint16_t duration = std::rand() + 1;
|
||||
|
||||
EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE)).InSequence(s1).WillOnce(DoDefault());
|
||||
EXPECT_CALL(*mMockApi, setFFEffect(_, _, duration + MAX_COLD_START_LATENCY_MS))
|
||||
.InSequence(s2)
|
||||
.WillOnce(DoDefault());
|
||||
EXPECT_CALL(*mMockApi, setFFPlay(_, ON_EFFECT_INDEX, true))
|
||||
.InSequence(s1, s2)
|
||||
.WillOnce(DoDefault());
|
||||
EXPECT_TRUE(mVibrator->on(duration, nullptr).isOk());
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, off) {
|
||||
EXPECT_TRUE(mVibrator->off().isOk());
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, supportsAmplitudeControl_supported) {
|
||||
int32_t capabilities;
|
||||
EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(true));
|
||||
|
||||
EXPECT_TRUE(mVibrator->getCapabilities(&capabilities).isOk());
|
||||
EXPECT_GT(capabilities & IVibrator::CAP_AMPLITUDE_CONTROL, 0);
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, supportsExternalAmplitudeControl_unsupported) {
|
||||
int32_t capabilities;
|
||||
EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(true));
|
||||
|
||||
EXPECT_TRUE(mVibrator->getCapabilities(&capabilities).isOk());
|
||||
EXPECT_EQ(capabilities & IVibrator::CAP_EXTERNAL_AMPLITUDE_CONTROL, 0);
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, setAmplitude_supported) {
|
||||
EffectAmplitude amplitude = static_cast<float>(std::rand()) / RAND_MAX ?: 1.0f;
|
||||
|
||||
EXPECT_CALL(*mMockApi, setFFGain(_, amplitudeToScale(amplitude))).WillOnce(Return(true));
|
||||
|
||||
EXPECT_TRUE(mVibrator->setAmplitude(amplitude).isOk());
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, supportsExternalControl_supported) {
|
||||
int32_t capabilities;
|
||||
EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(true));
|
||||
|
||||
EXPECT_TRUE(mVibrator->getCapabilities(&capabilities).isOk());
|
||||
EXPECT_GT(capabilities & IVibrator::CAP_EXTERNAL_CONTROL, 0);
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, supportsExternalControl_unsupported) {
|
||||
int32_t capabilities;
|
||||
EXPECT_CALL(*mMockApi, hasOwtFreeSpace()).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).WillOnce(Return(false));
|
||||
|
||||
EXPECT_TRUE(mVibrator->getCapabilities(&capabilities).isOk());
|
||||
EXPECT_EQ(capabilities & IVibrator::CAP_EXTERNAL_CONTROL, 0);
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, setExternalControl_enable) {
|
||||
Sequence s1, s2;
|
||||
EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE)).InSequence(s1).WillOnce(DoDefault());
|
||||
EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).InSequence(s2).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, setHapticPcmAmp(_, true, _, _))
|
||||
.InSequence(s1, s2)
|
||||
.WillOnce(Return(true));
|
||||
|
||||
EXPECT_TRUE(mVibrator->setExternalControl(true).isOk());
|
||||
}
|
||||
|
||||
TEST_F(VibratorTest, setExternalControl_disable) {
|
||||
Sequence s1, s2, s3, s4;
|
||||
|
||||
// The default mIsUnderExternalControl is false, so it needs to turn on the External Control
|
||||
// to make mIsUnderExternalControl become true.
|
||||
EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE))
|
||||
.InSequence(s1)
|
||||
.InSequence(s1)
|
||||
.WillOnce(DoDefault());
|
||||
EXPECT_CALL(*mMockApi, getHapticAlsaDevice(_, _)).InSequence(s2).WillOnce(Return(true));
|
||||
EXPECT_CALL(*mMockApi, setHapticPcmAmp(_, true, _, _)).InSequence(s3).WillOnce(Return(true));
|
||||
|
||||
EXPECT_TRUE(mVibrator->setExternalControl(true).isOk());
|
||||
|
||||
EXPECT_CALL(*mMockApi, setFFGain(_, levelToScale(VOLTAGE_SCALE_MAX)))
|
||||
.InSequence(s4)
|
||||
.WillOnce(DoDefault());
|
||||
EXPECT_CALL(*mMockApi, setHapticPcmAmp(_, false, _, _))
|
||||
.InSequence(s1, s2, s3, s4)
|
||||
.WillOnce(Return(true));
|
||||
|
||||
EXPECT_TRUE(mVibrator->setExternalControl(false).isOk());
|
||||
}
|
||||
|
||||
class EffectsTest : public VibratorTest, public WithParamInterface<EffectTuple> {
|
||||
public:
|
||||
static auto PrintParam(const TestParamInfo<ParamType> &info) {
|
||||
auto param = info.param;
|
||||
auto effect = std::get<0>(param);
|
||||
auto strength = std::get<1>(param);
|
||||
return toString(effect) + "_" + toString(strength);
|
||||
}
|
||||
};
|
||||
|
||||
TEST_P(EffectsTest, perform) {
|
||||
auto param = GetParam();
|
||||
auto effect = std::get<0>(param);
|
||||
auto strength = std::get<1>(param);
|
||||
auto scale = EFFECT_SCALE.find(param);
|
||||
auto queue = EFFECT_QUEUE.find(param);
|
||||
EffectDuration duration;
|
||||
auto callback = ndk::SharedRefBase::make<MockVibratorCallback>();
|
||||
std::promise<void> promise;
|
||||
std::future<void> future{promise.get_future()};
|
||||
auto complete = [&promise] {
|
||||
promise.set_value();
|
||||
return ndk::ScopedAStatus::ok();
|
||||
};
|
||||
bool composeEffect;
|
||||
|
||||
ExpectationSet eSetup;
|
||||
Expectation eActivate, ePollHaptics, ePollStop, eEraseDone;
|
||||
|
||||
if (scale != EFFECT_SCALE.end()) {
|
||||
EffectIndex index = EFFECT_INDEX.at(effect);
|
||||
duration = EFFECT_DURATIONS[index];
|
||||
|
||||
eSetup += EXPECT_CALL(*mMockApi, setFFGain(_, levelToScale(scale->second)))
|
||||
.WillOnce(DoDefault());
|
||||
eActivate = EXPECT_CALL(*mMockApi, setFFPlay(_, index, true))
|
||||
.After(eSetup)
|
||||
.WillOnce(DoDefault());
|
||||
} else if (queue != EFFECT_QUEUE.end()) {
|
||||
duration = std::get<1>(queue->second);
|
||||
eSetup += EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE))
|
||||
.After(eSetup)
|
||||
.WillOnce(DoDefault());
|
||||
eSetup += EXPECT_CALL(*mMockApi, getOwtFreeSpace(_)).WillOnce(DoDefault());
|
||||
eSetup += EXPECT_CALL(*mMockApi, uploadOwtEffect(_, _, _, _, _, _))
|
||||
.After(eSetup)
|
||||
.WillOnce(DoDefault());
|
||||
eActivate = EXPECT_CALL(*mMockApi, setFFPlay(_, WAVEFORM_COMPOSE, true))
|
||||
.After(eSetup)
|
||||
.WillOnce(DoDefault());
|
||||
composeEffect = true;
|
||||
} else {
|
||||
duration = 0;
|
||||
}
|
||||
|
||||
if (duration) {
|
||||
ePollHaptics = EXPECT_CALL(*mMockApi, pollVibeState(1, POLLING_TIMEOUT))
|
||||
.After(eActivate)
|
||||
.WillOnce(DoDefault());
|
||||
ePollStop = EXPECT_CALL(*mMockApi, pollVibeState(0, -1))
|
||||
.After(ePollHaptics)
|
||||
.WillOnce(DoDefault());
|
||||
if (composeEffect) {
|
||||
eEraseDone = EXPECT_CALL(*mMockApi, eraseOwtEffect(_, _, _))
|
||||
.After(ePollStop)
|
||||
.WillOnce(DoDefault());
|
||||
EXPECT_CALL(*callback, onComplete()).After(eEraseDone).WillOnce(complete);
|
||||
} else {
|
||||
EXPECT_CALL(*callback, onComplete()).After(ePollStop).WillOnce(complete);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t lengthMs;
|
||||
ndk::ScopedAStatus status = mVibrator->perform(effect, strength, callback, &lengthMs);
|
||||
if (status.isOk()) {
|
||||
EXPECT_LE(duration, lengthMs);
|
||||
} else {
|
||||
EXPECT_EQ(EX_UNSUPPORTED_OPERATION, status.getExceptionCode());
|
||||
EXPECT_EQ(0, lengthMs);
|
||||
}
|
||||
|
||||
if (duration) {
|
||||
EXPECT_EQ(future.wait_for(std::chrono::milliseconds(100)), std::future_status::ready);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_P(EffectsTest, alwaysOnEnable) {
|
||||
// No real function now in P22+
|
||||
auto param = GetParam();
|
||||
auto effect = std::get<0>(param);
|
||||
auto strength = std::get<1>(param);
|
||||
auto scale = EFFECT_SCALE.find(param);
|
||||
bool supported = (scale != EFFECT_SCALE.end());
|
||||
|
||||
if (supported) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus status = mVibrator->alwaysOnEnable(0, effect, strength);
|
||||
if (supported) {
|
||||
EXPECT_EQ(EX_NONE, status.getExceptionCode());
|
||||
} else {
|
||||
EXPECT_EQ(EX_UNSUPPORTED_OPERATION, status.getExceptionCode());
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<Effect> kEffects{ndk::enum_range<Effect>().begin(),
|
||||
ndk::enum_range<Effect>().end()};
|
||||
const std::vector<EffectStrength> kEffectStrengths{ndk::enum_range<EffectStrength>().begin(),
|
||||
ndk::enum_range<EffectStrength>().end()};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VibratorTests, EffectsTest,
|
||||
Combine(ValuesIn(kEffects.begin(), kEffects.end()),
|
||||
ValuesIn(kEffectStrengths.begin(), kEffectStrengths.end())),
|
||||
EffectsTest::PrintParam);
|
||||
|
||||
struct PrimitiveParam {
|
||||
CompositePrimitive primitive;
|
||||
EffectIndex index;
|
||||
};
|
||||
|
||||
class PrimitiveTest : public VibratorTest, public WithParamInterface<PrimitiveParam> {
|
||||
public:
|
||||
static auto PrintParam(const TestParamInfo<ParamType> &info) {
|
||||
return toString(info.param.primitive);
|
||||
}
|
||||
};
|
||||
|
||||
const std::vector<PrimitiveParam> kPrimitiveParams = {
|
||||
{CompositePrimitive::CLICK, 2}, {CompositePrimitive::THUD, 4},
|
||||
{CompositePrimitive::SPIN, 5}, {CompositePrimitive::QUICK_RISE, 6},
|
||||
{CompositePrimitive::SLOW_RISE, 7}, {CompositePrimitive::QUICK_FALL, 8},
|
||||
{CompositePrimitive::LIGHT_TICK, 9}, {CompositePrimitive::LOW_TICK, 10},
|
||||
};
|
||||
|
||||
TEST_P(PrimitiveTest, getPrimitiveDuration) {
|
||||
auto param = GetParam();
|
||||
auto primitive = param.primitive;
|
||||
auto index = param.index;
|
||||
int32_t duration;
|
||||
|
||||
EXPECT_EQ(EX_NONE, mVibrator->getPrimitiveDuration(primitive, &duration).getExceptionCode());
|
||||
EXPECT_EQ(EFFECT_DURATIONS[index], duration);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VibratorTests, PrimitiveTest,
|
||||
ValuesIn(kPrimitiveParams.begin(), kPrimitiveParams.end()),
|
||||
PrimitiveTest::PrintParam);
|
||||
|
||||
struct ComposeParam {
|
||||
std::string name;
|
||||
std::vector<CompositeEffect> composite;
|
||||
EffectQueue queue;
|
||||
};
|
||||
|
||||
class ComposeTest : public VibratorTest, public WithParamInterface<ComposeParam> {
|
||||
public:
|
||||
static auto PrintParam(const TestParamInfo<ParamType> &info) { return info.param.name; }
|
||||
};
|
||||
|
||||
TEST_P(ComposeTest, compose) {
|
||||
auto param = GetParam();
|
||||
auto composite = param.composite;
|
||||
auto queue = std::get<0>(param.queue);
|
||||
ExpectationSet eSetup;
|
||||
Expectation eActivate, ePollHaptics, ePollStop, eEraseDone;
|
||||
auto callback = ndk::SharedRefBase::make<MockVibratorCallback>();
|
||||
std::promise<void> promise;
|
||||
std::future<void> future{promise.get_future()};
|
||||
auto complete = [&promise] {
|
||||
promise.set_value();
|
||||
return ndk::ScopedAStatus::ok();
|
||||
};
|
||||
|
||||
eSetup += EXPECT_CALL(*mMockApi, setFFGain(_, ON_GLOBAL_SCALE))
|
||||
.After(eSetup)
|
||||
.WillOnce(DoDefault());
|
||||
eSetup += EXPECT_CALL(*mMockApi, getOwtFreeSpace(_)).WillOnce(DoDefault());
|
||||
eSetup += EXPECT_CALL(*mMockApi, uploadOwtEffect(_, _, _, _, _, _))
|
||||
.After(eSetup)
|
||||
.WillOnce(DoDefault());
|
||||
eActivate = EXPECT_CALL(*mMockApi, setFFPlay(_, WAVEFORM_COMPOSE, true))
|
||||
.After(eSetup)
|
||||
.WillOnce(DoDefault());
|
||||
|
||||
ePollHaptics = EXPECT_CALL(*mMockApi, pollVibeState(1, POLLING_TIMEOUT))
|
||||
.After(eActivate)
|
||||
.WillOnce(DoDefault());
|
||||
ePollStop =
|
||||
EXPECT_CALL(*mMockApi, pollVibeState(0, -1)).After(ePollHaptics).WillOnce(DoDefault());
|
||||
eEraseDone =
|
||||
EXPECT_CALL(*mMockApi, eraseOwtEffect(_, _, _)).After(ePollStop).WillOnce(DoDefault());
|
||||
EXPECT_CALL(*callback, onComplete()).After(eEraseDone).WillOnce(complete);
|
||||
|
||||
EXPECT_EQ(EX_NONE, mVibrator->compose(composite, callback).getExceptionCode());
|
||||
|
||||
EXPECT_EQ(future.wait_for(std::chrono::milliseconds(100)), std::future_status::ready);
|
||||
}
|
||||
|
||||
const std::vector<ComposeParam> kComposeParams = {
|
||||
{"click",
|
||||
{{0, CompositePrimitive::CLICK, 1.0f}},
|
||||
Queue(QueueEffect(2, Level(1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)},
|
||||
{"thud",
|
||||
{{1, CompositePrimitive::THUD, 0.8f}},
|
||||
Queue(1, QueueEffect(4, Level(0.8f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)},
|
||||
{"spin",
|
||||
{{2, CompositePrimitive::SPIN, 0.6f}},
|
||||
Queue(2, QueueEffect(5, Level(0.6f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)},
|
||||
{"quick_rise",
|
||||
{{3, CompositePrimitive::QUICK_RISE, 0.4f}},
|
||||
Queue(3, QueueEffect(6, Level(0.4f, V_LONG_DEFAULT[0], V_LONG_DEFAULT[1])), 0)},
|
||||
{"slow_rise",
|
||||
{{4, CompositePrimitive::SLOW_RISE, 0.0f}},
|
||||
Queue(4, QueueEffect(7, Level(0.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)},
|
||||
{"quick_fall",
|
||||
{{5, CompositePrimitive::QUICK_FALL, 1.0f}},
|
||||
Queue(5, QueueEffect(8, Level(1.0f, V_LONG_DEFAULT[0], V_LONG_DEFAULT[1])), 0)},
|
||||
{"pop",
|
||||
{{6, CompositePrimitive::SLOW_RISE, 1.0f}, {50, CompositePrimitive::THUD, 1.0f}},
|
||||
Queue(6, QueueEffect(7, Level(1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 50,
|
||||
QueueEffect(4, Level(1.0f, V_CLICK_DEFAULT[0], V_CLICK_DEFAULT[1])), 0)},
|
||||
{"snap",
|
||||
{{7, CompositePrimitive::QUICK_RISE, 1.0f}, {0, CompositePrimitive::QUICK_FALL, 1.0f}},
|
||||
Queue(7, QueueEffect(6, Level(1.0f, V_LONG_DEFAULT[0], V_LONG_DEFAULT[1])),
|
||||
QueueEffect(8, Level(1.0f, V_LONG_DEFAULT[0], V_LONG_DEFAULT[1])), 0)},
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VibratorTests, ComposeTest,
|
||||
ValuesIn(kComposeParams.begin(), kComposeParams.end()),
|
||||
ComposeTest::PrintParam);
|
||||
|
||||
class AlwaysOnTest : public VibratorTest, public WithParamInterface<int32_t> {
|
||||
public:
|
||||
static auto PrintParam(const TestParamInfo<ParamType> &info) {
|
||||
return std::to_string(info.param);
|
||||
}
|
||||
};
|
||||
|
||||
TEST_P(AlwaysOnTest, alwaysOnEnable) {
|
||||
auto param = GetParam();
|
||||
auto scale = EFFECT_SCALE.begin();
|
||||
|
||||
std::advance(scale, std::rand() % EFFECT_SCALE.size());
|
||||
|
||||
auto effect = std::get<0>(scale->first);
|
||||
auto strength = std::get<1>(scale->first);
|
||||
|
||||
switch (param) {
|
||||
case 0:
|
||||
case 1:
|
||||
// Do nothing
|
||||
break;
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus status = mVibrator->alwaysOnEnable(param, effect, strength);
|
||||
EXPECT_EQ(EX_NONE, status.getExceptionCode());
|
||||
}
|
||||
|
||||
TEST_P(AlwaysOnTest, alwaysOnDisable) {
|
||||
auto param = GetParam();
|
||||
|
||||
switch (param) {
|
||||
case 0:
|
||||
case 1:
|
||||
// Do nothing
|
||||
break;
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus status = mVibrator->alwaysOnDisable(param);
|
||||
EXPECT_EQ(EX_NONE, status.getExceptionCode());
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(VibratorTests, AlwaysOnTest, Range(0, 1), AlwaysOnTest::PrintParam);
|
||||
|
||||
} // namespace vibrator
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
} // namespace aidl
|
33
vibrator/cs40l26/tests/types.h
Normal file
33
vibrator/cs40l26/tests/types.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (C) 2022 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_VIBRATOR_TEST_TYPES_H
|
||||
#define ANDROID_HARDWARE_VIBRATOR_TEST_TYPES_H
|
||||
|
||||
#include <aidl/android/hardware/vibrator/IVibrator.h>
|
||||
|
||||
using EffectIndex = uint16_t;
|
||||
using EffectLevel = uint32_t;
|
||||
using EffectAmplitude = float;
|
||||
using EffectScale = uint16_t;
|
||||
using EffectDuration = uint32_t;
|
||||
using EffectQueue = std::tuple<std::string, EffectDuration>;
|
||||
using EffectTuple = std::tuple<::aidl::android::hardware::vibrator::Effect,
|
||||
::aidl::android::hardware::vibrator::EffectStrength>;
|
||||
|
||||
using QueueEffect = std::tuple<EffectIndex, EffectLevel>;
|
||||
using QueueDelay = uint32_t;
|
||||
|
||||
#endif // ANDROID_HARDWARE_VIBRATOR_TEST_TYPES_H
|
46
vibrator/cs40l26/tests/utils.h
Normal file
46
vibrator/cs40l26/tests/utils.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright (C) 2022 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_VIBRATOR_TEST_UTILS_H
|
||||
#define ANDROID_HARDWARE_VIBRATOR_TEST_UTILS_H
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
static inline EffectScale toScale(float amplitude, float maximum) {
|
||||
float ratio = 100; /* Unit: % */
|
||||
if (maximum != 0)
|
||||
ratio = amplitude / maximum * 100;
|
||||
|
||||
if (maximum == 0 || ratio > 100)
|
||||
ratio = 100;
|
||||
|
||||
return std::round(ratio);
|
||||
}
|
||||
|
||||
static inline EffectScale levelToScale(EffectLevel level) {
|
||||
return toScale(level, 100);
|
||||
}
|
||||
|
||||
static inline EffectScale amplitudeToScale(EffectAmplitude amplitude) {
|
||||
return toScale(amplitude, 1.0f);
|
||||
}
|
||||
|
||||
static inline uint32_t msToCycles(EffectDuration ms) {
|
||||
return ms * 48;
|
||||
}
|
||||
|
||||
#endif // ANDROID_HARDWARE_VIBRATOR_TEST_UTILS_H
|
38
wifi/BoardConfig-wifi.mk
Normal file
38
wifi/BoardConfig-wifi.mk
Normal file
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# WiFi
|
||||
BOARD_WLAN_DEVICE := bcmdhd
|
||||
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
|
||||
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
|
||||
WPA_SUPPLICANT_VERSION := VER_0_8_X
|
||||
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
||||
BOARD_HOSTAPD_DRIVER := NL80211
|
||||
# Wifi interface combination - {1 STA + 1 AP} or {1 STA + 1 AP_BRIDGED} or {1 STA + 1 P2P}
|
||||
# or {1 STA + 1 NAN} or {2 STA}
|
||||
WIFI_HAL_INTERFACE_COMBINATIONS := {{{STA}, 1}, {{P2P, NAN, AP, AP_BRIDGED}, 1}}, {{{STA}, 2}}
|
||||
WIFI_FEATURE_WIFI_EXT_HAL := true
|
||||
WIFI_FEATURE_IMU_DETECTION := true
|
||||
# Avoid Wifi reset on MAC Address change
|
||||
WIFI_AVOID_IFACE_RESET_MAC_CHANGE := true
|
||||
WIFI_FEATURE_HOSTAPD_11AX := true
|
||||
BOARD_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL := true
|
||||
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/akita/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \
|
||||
device/google/akita/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf
|
||||
|
9
wifi/p2p_supplicant_overlay.conf
Normal file
9
wifi/p2p_supplicant_overlay.conf
Normal file
|
@ -0,0 +1,9 @@
|
|||
driver_param=use_p2p_group_interface=1p2p_device=1
|
||||
update_config=1
|
||||
eapol_version=1
|
||||
ap_scan=1
|
||||
fast_reauth=1
|
||||
pmf=1
|
||||
p2p_add_cli_chan=1
|
||||
disable_scan_offload=1
|
||||
p2p_go_vht=1
|
10
wifi/wpa_supplicant_overlay.conf
Normal file
10
wifi/wpa_supplicant_overlay.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
sae_pwe=2
|
||||
driver_param=use_p2p_group_interface=1p2p_device=1
|
||||
disable_scan_offload=1
|
||||
wowlan_triggers=any
|
||||
bss_max_count=512
|
||||
interworking=1
|
||||
hs20=1
|
||||
auto_interworking=0
|
||||
bss_no_flush_when_down=1
|
||||
btm_offload=1
|
Loading…
Add table
Add a link
Reference in a new issue