gistfile1.txt
· 4.4 KiB · Text
Raw
# Use case configuration for Nothing Phone (1)
# Author: Danila Tikhonov <[email protected]>
# Based on:
# https://github.com/LineageOS/android_device_nothing_Spacewar/blob/lineage-22.1/configs/audio/mixer_paths_yupikqrd.xml
SectionVerb {
EnableSequence [
# Speaker & Earpiece playback
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1"
# wcd9385
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1"
cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1"
]
DisableSequence [
# Speaker & Earpiece playback
cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0"
cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0"
cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 0"
]
Value {
TQ "HiFi"
}
}
SectionDevice."Speakers" {
Comment "Speaker & Earpiece playback"
Value {
PlaybackChannels 2
PlaybackPriority 100
PlaybackPCM "hw:${CardId},0" # MultiMedia1
PlaybackMixer "default:${CardId}"
}
}
SectionDevice."Headphones" {
Comment "Headphones Playback"
Include.wcdhpe.File "/codecs/wcd938x/HeadphoneEnableSeq.conf"
Include.wcdhpd.File "/codecs/wcd938x/HeadphoneDisableSeq.conf"
Include.rxmhpe.File "/codecs/qcom-lpass/rx-macro/HeadphoneEnableSeq.conf"
Include.rxmhpd.File "/codecs/qcom-lpass/rx-macro/HeadphoneDisableSeq.conf"
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1" # MultiMedia2
PlaybackMixer "default:${CardId}"
PlaybackMixerElem "HP Digital"
JackControl "Headphone Jack"
JackHWMute "Speaker"
}
}
SectionDevice."Mic1" {
Comment "Top Microphone"
EnableSequence [
cset "name='TX DEC1 MUX' SWR_MIC"
cset "name='TX SMIC MUX1' SWR_MIC0"
cset "name='TX_AIF1_CAP Mixer DEC1' 1"
cset "name='TX_DEC1 Volume' 100" // ?
cset "name='ADC1_MIXER Switch' 1"
cset "name='ADC1 Switch' 1"
cset "name='TX0 MODE' ADC_NORMAL" // TX1_CH1?
]
DisableSequence [
cset "name='TX SMIC MUX1' ZERO"
cset "name='TX_AIF1_CAP Mixer DEC1' 0"
cset "name='ADC1_MIXER Switch' 0"
cset "name='ADC1 Switch' 0"
cset "name='TX0 MODE' ADC_INVALID" // TX1_CH1?
]
Value {
CaptureChannels 1
CapturePriority 200
CapturePCM "hw:${CardId},2" # MultiMedia3
CaptureMixerElem "ADC1"
}
}
SectionDevice."Mic2" {
Comment "Headphone Microphone"
EnableSequence [
cset "name='TX DEC0 MUX' SWR_MIC"
cset "name='TX SMIC MUX0' SWR_MIC1"
cset "name='TX_AIF2_CAP Mixer DEC0' 1"
#cset "name='DEC0 MODE' ADC_DEFAULT" // ?
cset "name='TX_DEC0 Volume' 110" // ?
cset "name='ADC2_MIXER Switch' 1"
cset "name='HDR12 MUX' NO_HDR12"
cset "name='ADC2 MUX' INP2"
cset "name='ADC2 Switch' 1"
cset "name='TX1 MODE' ADC_NORMAL" // TX2_CH3?
]
DisableSequence [
cset "name='TX SMIC MUX0' ZERO"
cset "name='TX_AIF2_CAP Mixer DEC0' 0"
cset "name='ADC2_MIXER Switch' 0"
cset "name='ADC2 Switch' 0"
cset "name='TX1 MODE' ADC_INVALID" // TX2_CH3?
]
Value {
CaptureChannels 1
CapturePriority 150
CapturePCM "hw:${CardId},2" # MultiMedia3
CaptureMixerElem "ADC2"
}
}
SectionDevice."Mic4" {
Comment "Bottom Microphone"
EnableSequence [
cset "name='TX DEC1 MUX' SWR_MIC"
cset "name='TX SMIC MUX1' SWR_MIC4"
cset "name='TX_AIF1_CAP Mixer DEC1' 1"
#cset "name='DEC0 MODE' ADC_DEFAULT" // ?
cset "name='TX_DEC1 Volume' 110" // ?
cset "name='ADC3_MIXER Switch' 1"
cset "name='HDR34 MUX' NO_HDR34"
cset "name='ADC3 MUX' INP5"
cset "name='ADC3 Switch' 1"
cset "name='TX3 MODE' ADC_NORMAL" // TX2_CH1?
]
DisableSequence [
cset "name='TX SMIC MUX1' ZERO"
cset "name='TX_AIF1_CAP Mixer DEC1' 0"
cset "name='ADC3_MIXER Switch' 0"
cset "name='ADC3 Switch' 0"
cset "name='TX3 MODE' ADC_INVALID" // TX2_CH1?
]
Value {
CaptureChannels 1
CapturePriority 100
CapturePCM "hw:${CardId},2" # MultiMedia3
CaptureMixerElem "ADC4"
}
}
SectionDevice."Mic5" {
Comment "Back Microphone"
EnableSequence [
cset "name='TX DEC1 MUX' SWR_MIC"
cset "name='TX SMIC MUX1' SWR_MIC5"
cset "name='TX_AIF1_CAP Mixer DEC1' 1"
#cset "name='DEC1 MODE' ADC_DEFAULT" // ?
cset "name='TX_DEC1 Volume' 110" // ?
cset "name='ADC4_MIXER Switch' 1"
cset "name='ADC4 MUX' INP5"
cset "name='ADC4 Switch' 1"
cset "name='TX2 MODE' ADC_NORMAL" // TX2_CH2?
]
DisableSequence [
cset "name='TX SMIC MUX1' ZERO"
cset "name='TX_AIF1_CAP Mixer DEC1' 0"
cset "name='ADC4_MIXER Switch' 0"
cset "name='ADC4 Switch' 0"
cset "name='TX2 MODE' ADC_INVALID" // TX2_CH2?
]
Value {
CaptureChannels 1
CapturePriority 50
CapturePCM "hw:${CardId},2" # MultiMedia3
CaptureMixerElem "ADC4"
}
}
1 | # Use case configuration for Nothing Phone (1) |
2 | # Author: Danila Tikhonov <[email protected]> |
3 | # Based on: |
4 | # https://github.com/LineageOS/android_device_nothing_Spacewar/blob/lineage-22.1/configs/audio/mixer_paths_yupikqrd.xml |
5 | |
6 | SectionVerb { |
7 | EnableSequence [ |
8 | # Speaker & Earpiece playback |
9 | cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 1" |
10 | # wcd9385 |
11 | cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 1" |
12 | cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 1" |
13 | ] |
14 | |
15 | DisableSequence [ |
16 | # Speaker & Earpiece playback |
17 | cset "name='PRI_MI2S_RX Audio Mixer MultiMedia1' 0" |
18 | |
19 | cset "name='RX_CODEC_DMA_RX_0 Audio Mixer MultiMedia2' 0" |
20 | cset "name='MultiMedia3 Mixer TX_CODEC_DMA_TX_3' 0" |
21 | ] |
22 | |
23 | Value { |
24 | TQ "HiFi" |
25 | } |
26 | } |
27 | |
28 | SectionDevice."Speakers" { |
29 | Comment "Speaker & Earpiece playback" |
30 | Value { |
31 | PlaybackChannels 2 |
32 | PlaybackPriority 100 |
33 | PlaybackPCM "hw:${CardId},0" # MultiMedia1 |
34 | PlaybackMixer "default:${CardId}" |
35 | } |
36 | } |
37 | |
38 | SectionDevice."Headphones" { |
39 | Comment "Headphones Playback" |
40 | |
41 | Include.wcdhpe.File "/codecs/wcd938x/HeadphoneEnableSeq.conf" |
42 | Include.wcdhpd.File "/codecs/wcd938x/HeadphoneDisableSeq.conf" |
43 | Include.rxmhpe.File "/codecs/qcom-lpass/rx-macro/HeadphoneEnableSeq.conf" |
44 | Include.rxmhpd.File "/codecs/qcom-lpass/rx-macro/HeadphoneDisableSeq.conf" |
45 | |
46 | Value { |
47 | PlaybackPriority 200 |
48 | PlaybackPCM "hw:${CardId},1" # MultiMedia2 |
49 | PlaybackMixer "default:${CardId}" |
50 | PlaybackMixerElem "HP Digital" |
51 | JackControl "Headphone Jack" |
52 | JackHWMute "Speaker" |
53 | } |
54 | } |
55 | |
56 | SectionDevice."Mic1" { |
57 | Comment "Top Microphone" |
58 | |
59 | EnableSequence [ |
60 | cset "name='TX DEC1 MUX' SWR_MIC" |
61 | cset "name='TX SMIC MUX1' SWR_MIC0" |
62 | cset "name='TX_AIF1_CAP Mixer DEC1' 1" |
63 | cset "name='TX_DEC1 Volume' 100" // ? |
64 | |
65 | cset "name='ADC1_MIXER Switch' 1" |
66 | cset "name='ADC1 Switch' 1" |
67 | cset "name='TX0 MODE' ADC_NORMAL" // TX1_CH1? |
68 | ] |
69 | |
70 | DisableSequence [ |
71 | cset "name='TX SMIC MUX1' ZERO" |
72 | cset "name='TX_AIF1_CAP Mixer DEC1' 0" |
73 | |
74 | cset "name='ADC1_MIXER Switch' 0" |
75 | cset "name='ADC1 Switch' 0" |
76 | cset "name='TX0 MODE' ADC_INVALID" // TX1_CH1? |
77 | ] |
78 | |
79 | Value { |
80 | CaptureChannels 1 |
81 | CapturePriority 200 |
82 | CapturePCM "hw:${CardId},2" # MultiMedia3 |
83 | CaptureMixerElem "ADC1" |
84 | } |
85 | } |
86 | |
87 | SectionDevice."Mic2" { |
88 | Comment "Headphone Microphone" |
89 | |
90 | EnableSequence [ |
91 | cset "name='TX DEC0 MUX' SWR_MIC" |
92 | cset "name='TX SMIC MUX0' SWR_MIC1" |
93 | cset "name='TX_AIF2_CAP Mixer DEC0' 1" |
94 | #cset "name='DEC0 MODE' ADC_DEFAULT" // ? |
95 | cset "name='TX_DEC0 Volume' 110" // ? |
96 | |
97 | cset "name='ADC2_MIXER Switch' 1" |
98 | cset "name='HDR12 MUX' NO_HDR12" |
99 | cset "name='ADC2 MUX' INP2" |
100 | cset "name='ADC2 Switch' 1" |
101 | cset "name='TX1 MODE' ADC_NORMAL" // TX2_CH3? |
102 | ] |
103 | |
104 | DisableSequence [ |
105 | cset "name='TX SMIC MUX0' ZERO" |
106 | cset "name='TX_AIF2_CAP Mixer DEC0' 0" |
107 | |
108 | cset "name='ADC2_MIXER Switch' 0" |
109 | cset "name='ADC2 Switch' 0" |
110 | cset "name='TX1 MODE' ADC_INVALID" // TX2_CH3? |
111 | ] |
112 | |
113 | Value { |
114 | CaptureChannels 1 |
115 | CapturePriority 150 |
116 | CapturePCM "hw:${CardId},2" # MultiMedia3 |
117 | CaptureMixerElem "ADC2" |
118 | } |
119 | } |
120 | |
121 | SectionDevice."Mic4" { |
122 | Comment "Bottom Microphone" |
123 | |
124 | EnableSequence [ |
125 | cset "name='TX DEC1 MUX' SWR_MIC" |
126 | cset "name='TX SMIC MUX1' SWR_MIC4" |
127 | cset "name='TX_AIF1_CAP Mixer DEC1' 1" |
128 | #cset "name='DEC0 MODE' ADC_DEFAULT" // ? |
129 | cset "name='TX_DEC1 Volume' 110" // ? |
130 | |
131 | cset "name='ADC3_MIXER Switch' 1" |
132 | cset "name='HDR34 MUX' NO_HDR34" |
133 | cset "name='ADC3 MUX' INP5" |
134 | cset "name='ADC3 Switch' 1" |
135 | cset "name='TX3 MODE' ADC_NORMAL" // TX2_CH1? |
136 | ] |
137 | |
138 | DisableSequence [ |
139 | cset "name='TX SMIC MUX1' ZERO" |
140 | cset "name='TX_AIF1_CAP Mixer DEC1' 0" |
141 | |
142 | cset "name='ADC3_MIXER Switch' 0" |
143 | cset "name='ADC3 Switch' 0" |
144 | cset "name='TX3 MODE' ADC_INVALID" // TX2_CH1? |
145 | ] |
146 | |
147 | Value { |
148 | CaptureChannels 1 |
149 | CapturePriority 100 |
150 | CapturePCM "hw:${CardId},2" # MultiMedia3 |
151 | CaptureMixerElem "ADC4" |
152 | } |
153 | } |
154 | |
155 | SectionDevice."Mic5" { |
156 | Comment "Back Microphone" |
157 | |
158 | EnableSequence [ |
159 | cset "name='TX DEC1 MUX' SWR_MIC" |
160 | cset "name='TX SMIC MUX1' SWR_MIC5" |
161 | cset "name='TX_AIF1_CAP Mixer DEC1' 1" |
162 | #cset "name='DEC1 MODE' ADC_DEFAULT" // ? |
163 | cset "name='TX_DEC1 Volume' 110" // ? |
164 | |
165 | cset "name='ADC4_MIXER Switch' 1" |
166 | cset "name='ADC4 MUX' INP5" |
167 | cset "name='ADC4 Switch' 1" |
168 | cset "name='TX2 MODE' ADC_NORMAL" // TX2_CH2? |
169 | ] |
170 | |
171 | DisableSequence [ |
172 | cset "name='TX SMIC MUX1' ZERO" |
173 | cset "name='TX_AIF1_CAP Mixer DEC1' 0" |
174 | |
175 | cset "name='ADC4_MIXER Switch' 0" |
176 | cset "name='ADC4 Switch' 0" |
177 | cset "name='TX2 MODE' ADC_INVALID" // TX2_CH2? |
178 | ] |
179 | |
180 | Value { |
181 | CaptureChannels 1 |
182 | CapturePriority 50 |
183 | CapturePCM "hw:${CardId},2" # MultiMedia3 |
184 | CaptureMixerElem "ADC4" |
185 | } |
186 | } |