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