Last active 1741727740

gistfile1.txt Raw
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
6SectionVerb {
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
28SectionDevice."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
38SectionDevice."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
56SectionDevice."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
87SectionDevice."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
121SectionDevice."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
155SectionDevice."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}