OSDN Git Service

codecs/rt5640: Move out BayTrail-specific pin switches
[android-x86/external-alsa-ucm-conf.git] / ucm2 / bytcr-rt5640 / HiFi-LongName.conf
1 Define.HaveSpeaker ""
2 Define.HaveInternalMic ""
3
4 If.spk {
5         Condition {
6                 Type String
7                 Haystack "${CardLongName}"
8                 Needle "-stereo-spk"
9         }
10         True {
11                 Include.spk.File "/codecs/rt5640/Speaker.conf"
12                 Define.HaveSpeaker "yes"
13
14                 SectionDevice."Speaker" {
15                         EnableSequence [
16                                 cset "name='Speaker Switch' on"
17                         ]
18
19                         DisableSequence [
20                                 cset "name='Speaker Switch' off"
21                         ]
22                 }
23         }
24 }
25
26 If.mono {
27         Condition {
28                 Type String
29                 Haystack "${CardLongName}"
30                 Needle "-mono-spk"
31         }
32         True {
33                 Include.mspk.File "/codecs/rt5640/MonoSpeaker.conf"
34                 Define.HaveSpeaker "yes"
35
36                 SectionDevice."Speaker" {
37                         EnableSequence [
38                                 cset "name='Speaker Switch' on"
39                         ]
40
41                         DisableSequence [
42                                 cset "name='Speaker Switch' off"
43                         ]
44                 }
45         }
46 }
47
48 If.hp {
49         Condition { Type String Empty "" }
50         True.Include.hs.File "/codecs/rt5640/HeadPhones.conf"
51
52         SectionDevice."Headphones" {
53                 EnableSequence [
54                         cset "name='Headphone Switch' on"
55                 ]
56
57                 DisableSequence [
58                         cset "name='Headphone Switch' off"
59                 ]
60         }
61 }
62
63 If.dmic1 {
64         Condition {
65                 Type String
66                 Haystack "${CardLongName}"
67                 Needle "-dmic1-mic"
68         }
69         True {
70                 Include.dmic.File "/codecs/rt5640/DigitalMics.conf"
71                 Define.HaveInternalMic "yes"
72
73                 SectionDevice."Mic" {
74                         EnableSequence [
75                                 cset "name='Internal Mic Switch' on"
76                         ]
77
78                         DisableSequence [
79                                 cset "name='Internal Mic Switch' off"
80                         ]
81                 }
82         }
83 }
84
85 If.in1 {
86         Condition {
87                 Type String
88                 Haystack "${CardLongName}"
89                 Needle "-in1-mic"
90         }
91         True {
92                 Include.mic1.File "/codecs/rt5640/IN1-InternalMic.conf"
93                 Define.HaveInternalMic "yes"
94
95                 SectionDevice."Mic" {
96                         EnableSequence [
97                                 cset "name='Internal Mic Switch' on"
98                         ]
99
100                         DisableSequence [
101                                 cset "name='Internal Mic Switch' off"
102                         ]
103                 }
104         }
105 }
106
107 If.in3 {
108         Condition {
109                 Type String
110                 Haystack "${CardLongName}"
111                 Needle "-in3-mic"
112         }
113         True {
114                 Include.mic3.File "/codecs/rt5640/IN3-InternalMic.conf"
115                 Define.HaveInternalMic "yes"
116
117                 SectionDevice."Mic" {
118                         EnableSequence [
119                                 cset "name='Internal Mic Switch' on"
120                         ]
121
122                         DisableSequence [
123                                 cset "name='Internal Mic Switch' off"
124                         ]
125                 }
126         }
127 }
128
129 If.hsmic {
130         Condition { Type String Empty "" }
131         True.Include.hsmic.File "/codecs/rt5640/HeadsetMic.conf"
132
133         SectionDevice."Headset" {
134                 EnableSequence [
135                         cset "name='Headset Mic Switch' on"
136                 ]
137
138                 DisableSequence [
139                         cset "name='Headset Mic Switch' off"
140                 ]
141         }
142 }