File: HiFi

package info (click to toggle)
alsa-lib 1.0.28-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,228 kB
  • ctags: 10,077
  • sloc: ansic: 77,234; sh: 11,192; makefile: 625
file content (211 lines) | stat: -rw-r--r-- 4,612 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# By David Henningsson <david.henningsson@canonical.com>
# Translated from mixer_paths.xml in Manta repository

SectionVerb {

	EnableSequence [
		cdev "hw:MantaI2S"

		# A lot of defaults
		cset "name='DAC2 Switch' 0"
		cset "name='AIF1DRC1 Mode' Default"
		cset "name='AIF1DAC1 DRC Switch' 0"
		cset "name='Speaker Switch' 0"
		cset "name='SPKR DAC1 Switch' 0"
		cset "name='SPKL DAC1 Switch' 0"
		cset "name='Speaker Mixer Volume' 0"

		cset "name='Headphone Switch' 0"
		cset "name='Left Output Mixer DAC Switch' 0"
		cset "name='Right Output Mixer DAC Switch' 0"

		cset "name='MIXINL IN1L Switch' 0"
		cset "name='IN1L Switch' 0"
		cset "name='IN1L PGA IN1LP Switch' 0"
		cset "name='IN1L PGA IN1LN Switch' 1"

		cset "name='MIXINL IN2L Switch' 0"
		cset "name='IN2L Switch' 0"
		cset "name='IN2L PGA IN2LP Switch' 0"
		cset "name='IN2L PGA IN2LN Switch' 1"

		cset "name='MIXINR IN1R Switch' 0"
		cset "name='IN1R Switch' 0"
		cset "name='IN1R PGA IN1RP Switch' 0"
		cset "name='IN1R PGA IN1RN Switch' 1"

		cset "name='MIXINR IN2R Switch' 0"
		cset "name='IN2R Switch' 0"
		cset "name='IN2R PGA IN2RP Switch' 0"
		cset "name='IN2R PGA IN2RN Switch' 1"

		cset "name='AIF2DACL Mux' AIF3"
		cset "name='AIF2DACR Mux' AIF3"
		cset "name='AIF2DAC Mux' AIF3DACDAT"
		cset "name='AIF3ADC Mux' AIF2ADCDAT"

		cset "name='AIF1ADC1L Mixer AIF2 Switch' 0"
		cset "name='AIF1ADC1R Mixer AIF2 Switch' 0"
		cset "name='AIF1ADC2L Mixer AIF2 Switch' 0"
		cset "name='AIF1ADC2R Mixer AIF2 Switch' 0"

		# Enable dac1
		cset "name='DAC1R Mixer AIF1.1 Switch' 1"
		cset "name='DAC1L Mixer AIF1.1 Switch' 1"
		cset "name='DAC1 Switch' 1"

		# Enable adc to aif1adc
		cset "name='AIF1ADC1L Mixer ADC/DMIC Switch' 1"
		cset "name='AIF1ADC1R Mixer ADC/DMIC Switch' 1"
	]

	DisableSequence [
		cdev "hw:MantaI2S"

		# Disable dac1
		cset "name='DAC1R Mixer AIF1.1 Switch' 0"
		cset "name='DAC1L Mixer AIF1.1 Switch' 0"
		cset "name='DAC1 Switch' 0"

		# Disable adc to aif1adc
		cset "name='AIF1ADC1L Mixer ADC/DMIC Switch' 0"
		cset "name='AIF1ADC1R Mixer ADC/DMIC Switch' 0"
	]

	# ALSA PCM
	Value {

		TQ "HiFi"

		# ALSA PCM device for HiFi
		PlaybackPCM "hw:MantaI2S,0"
		CapturePCM "hw:MantaI2S,0"
	}

}

SectionDevice."Speaker" {
	Comment "Main speaker"

	EnableSequence [
		cdev "hw:MantaI2S"

		# Enable speaker
		cset "name='Speaker Switch' 1"
		cset "name='SPKR DAC1 Switch' 1"
		cset "name='SPKL DAC1 Switch' 1"
		cset "name='Speaker Mixer Volume' 3"
		cset "name='Speaker Boost Volume' 5"
		cset "name='AIF1DRC1 Mode' 'Speakers Media'"
		cset "name='AIF1DAC1 DRC Switch' 1"

		# Set EQ for speaker
		cset "name='AIF1DAC1 EQ Switch' 1"
		cset "name='AIF1DAC1 EQ1 Volume' 3"
		cset "name='AIF1DAC1 EQ2 Volume' 8"
		cset "name='AIF1DAC1 EQ3 Volume' 16"
		cset "name='AIF1DAC1 EQ4 Volume' 10"
		cset "name='AIF1DAC1 EQ5 Volume' 11"

		# Set Volume for speaker
		cset "name='Speaker Volume' 61,62"
	]

	DisableSequence [
		cdev "hw:MantaI2S"

		cset "name='Speaker Switch' 0"
		cset "name='AIF1DAC1 EQ Switch' 0"
	]

	Value {
		PlaybackChannels "2"
		PlaybackPriority "150"
	}
}

SectionDevice."Headphones" {
	Comment "Headphone jack"

	EnableSequence [
		cdev "hw:MantaI2S"

		cset "name='Headphone Switch' 1"
		cset "name='AIF1DAC1 EQ Switch' 0"
		cset "name='Headphone Volume' 55,55"
		cset "name='Left Headphone Mux' 'DAC'"
		cset "name='Right Headphone Mux' 'DAC'"
	]

	DisableSequence [
		cdev "hw:MantaI2S"

		cset "name='Headphone Switch' 0"
	]

	Value {
		PlaybackChannels "2"
	}
}

SectionDevice."Microphone" {
	Comment "Internal microphone"

	EnableSequence [
		cdev "hw:MantaI2S"

		# Main mic
		cset "name='MIXINR IN2R Switch' 1"
		cset "name='MIXINR IN2R Volume' 1"
		cset "name='IN2R Switch' 1"
		cset "name='AIF1ADCL Source' Right"

		# Second mic right
		cset "name='MIXINL IN2L Switch' 1"
		cset "name='MIXINL IN2L Volume' 1"
		cset "name='IN2L Switch' 1"
		cset "name='AIF1ADCR Source' Left"

		# Volume
		cset "name='IN2R Volume' 16"
		cset "name='IN2L Volume' 16"
		cset "name='AIF1ADC1 HPF Switch' 1"
		cset "name='AIF1ADC1 HPF Mode' HiFi"
	]

	DisableSequence [
		cdev "hw:MantaI2S"

	]

	Value {
		CaptureChannels "2"
	}
}

SectionDevice."HeadsetMic" {
	Comment "Headset microphone"

	EnableSequence [
		cdev "hw:MantaI2S"

		# Headset Mic
		# Is this really correct? It looks a lot like main mic
		cset "name='MIXINR IN2R Switch' 1"
		cset "name='MIXINR IN2R Volume' 1"
		cset "name='IN2R Switch' 1"
		cset "name='AIF1ADCL Source' Right"

		cset "name='IN2R Volume' 16"
		cset "name='AIF1ADC1 HPF Mode' HiFi"
	]

	DisableSequence [
		cdev "hw:MantaI2S"

	]

	Value {
		CaptureChannels "1"
	}
}