-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This does the initial move to the newly "generic" yukawa audio HAL. The HAL supports loading the mixer_paths.xml file based on some runtime property (vendor.hw), this is used for dragonboard where the db845c and rb5 use the same lunch target. However because we use different lunch targets I've hardcoded vendor.hw to "sdm845", the mixer_paths.xml is packaged from the device specific directory to /vendor/etc/mixer_paths.sdm845.xml. This depends on a new patch to system/media/ to support specifying the output device in the mixer paths xml file: https://android-review.googlesource.com/c/platform/system/media/+/2036767 I'll update our local_manifests to include this change in the mean time before it's merged. The beryllium and axolotl mixer paths are basically placeholder and will need to be fixed. The enchilada paths *should* work, but for some reason the speaker is broken, I suspect a kernel issue here. Headphone detection and auto-switching works, on enchilada I'm able to hear audio through headphones. Signed-off-by: Caleb Connolly <[email protected]>
- Loading branch information
Showing
22 changed files
with
2,819 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<mixer> | ||
<!-- Enable Internal speaker --> | ||
<ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia1" value="1" /> | ||
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia2" value="1" /> | ||
<ctl name="MultiMedia3 Mixer SLIMBUS_0_TX" value="1" /> | ||
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" /> | ||
<ctl name="SLIM RX0 MUX" value="AIF1_PB" /> | ||
<ctl name="SLIM RX1 MUX" value="AIF1_PB" /> | ||
<ctl name="SLIM RX2 MUX" value="ZERO" /> | ||
<ctl name="SLIM RX3 MUX" value="ZERO" /> | ||
<ctl name="SLIM RX4 MUX" value="ZERO" /> | ||
<ctl name="SLIM RX5 MUX" value="ZERO" /> | ||
<ctl name="SLIM RX6 MUX" value="ZERO" /> | ||
<ctl name="SLIM RX7 MUX" value="ZERO" /> | ||
<ctl name="AIF1_CAP Mixer SLIM TX0" value="1" /> | ||
<ctl name="RX INT7_1 MIX1 INP0" value="RX1" /> | ||
<ctl name="RX INT8_1 MIX1 INP0" value="RX2" /> | ||
<ctl name="RX INT1_2 MUX" value="RX0" /> | ||
<ctl name="RX INT2_2 MUX" value="RX1" /> | ||
<ctl name="CDC_IF TX0 MUX" value="DEC0" /> | ||
|
||
<ctl name="COMP1 Switch" value="1" /> | ||
<ctl name="COMP2 Switch" value="1" /> | ||
<ctl name="COMP7 Switch" value="0" /> | ||
<ctl name="COMP8 Switch" value="0" /> | ||
|
||
<!-- Default speaker --> | ||
<!-- <ctl name="Amp DSP Switch" value="0" /> --> | ||
|
||
<!-- Default headphones --> | ||
<!-- <ctl name="RX INT1_1 MIX1 INP0" value="ZERO" /> | ||
<ctl name="RX INT2_1 MIX1 INP0" value="ZERO" /> | ||
<ctl name="RX INT1_1 INTERP" value="ZERO" /> | ||
<ctl name="RX INT2_1 INTERP" value="ZERO" /> | ||
<ctl name="RX INT1 DEM MUX" value="NORMAL_DSM_OUT" /> | ||
<ctl name="RX INT2 DEM MUX" value="NORMAL_DSM_OUT" /> | ||
<ctl name="COMP1 Switch" value="0" /> | ||
<ctl name="COMP2 Switch" value="0" /> | ||
<ctl name="RX1 Digital Volume" value="0" /> | ||
<ctl name="RX2 Digital Volume" value="0" /> --> | ||
|
||
<path name="speaker"> | ||
<ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia1" value="1" /> | ||
<ctl name="COMP7 Switch" value="1" /> | ||
<ctl name="COMP8 Switch" value="1" /> | ||
<ctl name="Amp DSP Switch" value="1" /> | ||
<ctl name="RX7 Digital Volume" value="84" /> | ||
<ctl name="RX8 Digital Volume" value="84" /> | ||
</path> | ||
|
||
<path name="headset"> | ||
<!-- <ctl name="SLIM RX2 MUX" value="AIF4_PB" /> | ||
<ctl name="SLIM RX3 MUX" value="AIF4_PB" /> | ||
<ctl name="SLIM_6_RX Channels" value="Two" /> | ||
<ctl name="RX INT1_2 MUX" value="RX2" /> | ||
<ctl name="RX INT2_2 MUX" value="RX3" /> --> | ||
|
||
<!-- <ctl name="RX INT1_1 MIX1 INP0" value="RX0" /> | ||
<ctl name="RX INT2_1 MIX1 INP0" value="RX1" /> | ||
<ctl name="RX INT1_1 INTERP" value="RX INT1_1 MIX1" /> | ||
<ctl name="RX INT2_1 INTERP" value="RX INT2_1 MIX1" /> --> | ||
|
||
<ctl name="COMP1 Switch" value="1" /> | ||
<ctl name="COMP2 Switch" value="1" /> | ||
<ctl name="RX INT1 DEM MUX" value="CLSH_DSM_OUT" /> | ||
<ctl name="RX INT2 DEM MUX" value="CLSH_DSM_OUT" /> | ||
<ctl name="RX1 Digital Volume" value="84" /> | ||
<ctl name="RX2 Digital Volume" value="84" /> | ||
</path> | ||
</mixer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<mixer> | ||
<!-- MultiMedia 1 is the speaker --> | ||
<ctl name="QUAT_MI2S_RX Audio Mixer MultiMedia1" value="1" /> | ||
<!-- Multimedia 2 is for headphones(/earpiece?) --> | ||
<ctl name="SLIMBUS_0_RX Audio Mixer MultiMedia2" value="1" /> | ||
<ctl name="MultiMedia3 Mixer SLIMBUS_0_TX" value="1" /> | ||
<ctl name="AIF1_CAP Mixer SLIM TX7" value="1" /> | ||
<ctl name="CDC_IF TX7 MUX" value="DEC7" /> | ||
<ctl name="SLIM RX0 MUX" value="AIF1_PB" /> | ||
<ctl name="SLIM RX1 MUX" value="AIF1_PB" /> | ||
<ctl name="SLIM RX2 MUX" value="AIF1_PB" /> | ||
<ctl name="SLIM RX3 MUX" value="AIF1_PB" /> | ||
<ctl name="SLIM RX4 MUX" value="ZERO" /> | ||
<ctl name="SLIM RX5 MUX" value="ZERO" /> | ||
<ctl name="SLIM RX6 MUX" value="ZERO" /> | ||
<ctl name="SLIM RX7 MUX" value="ZERO" /> | ||
<ctl name="RX INT7_1 MIX1 INP0" value="RX0" /> | ||
<ctl name="RX INT8_1 MIX1 INP0" value="RX1" /> | ||
<ctl name="RX INT1_2 MUX" value="RX0" /> | ||
<ctl name="RX INT2_2 MUX" value="RX1" /> | ||
|
||
<!-- Headphones configuration, some of this maybe needed for speaker? --> | ||
<ctl name="RX INT1 DEM MUX" value="CLSH_DSM_OUT" /> | ||
<ctl name="RX INT2 DEM MUX" value="CLSH_DSM_OUT" /> | ||
<ctl name="RX INT1_1 MIX1 INP0" value="RX2" /> | ||
<ctl name="RX INT2_1 MIX1 INP0" value="RX3" /> | ||
<ctl name="RX INT1_1 INTERP" value="RX INT1_1 MIX1" /> | ||
<ctl name="RX INT2_1 INTERP" value="RX INT2_1 MIX1" /> | ||
<!-- Earpiece volume, earpiece and headphones both use device 1 | ||
so the earpiece must be muted when headphones are selected | ||
at least, that's the running theory --> | ||
<ctl name="RX0 Digital Volume" value="0" /> | ||
|
||
<path name="speaker" device="0"> | ||
<ctl name="Amp DSP Switch" value="1" /> | ||
</path> | ||
|
||
<path name="headset" device="1"> | ||
</path> | ||
</mixer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Copyright (C) 2016 The Android Open Source Project | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
LOCAL_PATH := $(call my-dir) | ||
|
||
# The default audio HAL module, which is a stub, that is loaded if no other | ||
# device specific modules are present. The exact load order can be seen in | ||
# libhardware/hardware.c | ||
# | ||
# The format of the name is audio.<type>.<hardware/etc>.so where the only | ||
# required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc. | ||
include $(CLEAR_VARS) | ||
|
||
LOCAL_HEADER_LIBRARIES += libhardware_headers | ||
LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) | ||
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 | ||
LOCAL_LICENSE_CONDITIONS := notice | ||
LOCAL_MODULE_RELATIVE_PATH := hw | ||
LOCAL_VENDOR_MODULE := true | ||
|
||
LOCAL_SRC_FILES := audio_hw.c \ | ||
audio_aec.c \ | ||
fifo_wrapper.cpp \ | ||
fir_filter.c | ||
LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa libaudioroute \ | ||
libaudioutils | ||
LOCAL_CFLAGS := -Wno-unused-parameter | ||
LOCAL_C_INCLUDES += \ | ||
external/tinyalsa/include \ | ||
external/expat/lib \ | ||
$(call include-path-for, audio-route) \ | ||
system/media/audio_utils/include \ | ||
system/media/audio_effects/include | ||
|
||
include $(BUILD_SHARED_LIBRARY) |
Oops, something went wrong.