aboutsummaryrefslogtreecommitdiff
path: root/ucm2/sof-hda-dsp/HiFi.conf
blob: 392dff867eb44ba8beadc33c6f95dee04b1828a7 (plain)
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
# Use case Configuration for sof-hda-dsp

SectionVerb {
	EnableSequence [
		cset "name='Auto-Mute Mode' 'Disabled'"
	]
}

SectionDevice."Headphone" {
	Comment "Headphone"

	EnableSequence [
		cset "name='Headphone Playback Switch' on"
	]

	DisableSequence [
		cset "name='Headphone Playback Switch' off"
	]

	Value {
		PlaybackPriority 200
		PlaybackPCM "hw:${CardId},0"
		PlaybackMixerElem "Headphone"
		PlaybackMixerMaster "Master"
		PlaybackVolume "Headphone Playback Volume"
		PlaybackSwitch "Headphone Playback Switch"
		PlaybackChannels "2"
		If.jack {
			Condition {
				Type ControlExists
				Control "iface=CARD,name='Headphone Mic Jack'"
			}
			True {
				JackControl "Headphone Mic Jack"
			}
			False {
				JackControl "Headphone Jack"
			}
		}
	}
}

SectionDevice."Speaker" {
	Comment "Speaker"

	If.seq {
		Condition {
			Type ControlExists
			Control "name='Bass Speaker Playback Switch'"
		}
		True {
			EnableSequence [
				cset "name='Speaker Playback Switch' on"
				cset "name='Bass Speaker Playback Switch' on"
			]

			DisableSequence [
				cset "name='Speaker Playback Switch' off"
				cset "name='Bass Speaker Playback Switch' off"
			]
		}
		False {
			EnableSequence [
				cset "name='Speaker Playback Switch' on"
			]

			DisableSequence [
				cset "name='Speaker Playback Switch' off"
			]
		}
	}

	Value {
		PlaybackPriority 100
		PlaybackPCM "hw:${CardId},0"
		PlaybackMixerElem "Speaker"
		PlaybackMasterElem "Master"
		PlaybackVolume "Speaker Playback Volume"
		PlaybackSwitch "Speaker Playback Switch"
		PlaybackChannels "2"
	}
}

If.monomic {
	Condition {
		Type ControlExists
		Control "name='Input Source'"
		ControlEnum "Headphone Mic"
	}
	True {
		SectionDevice."HeadphoneMic" {
			Comment "Headphone Stereo Microphone"

			ConflictingDevice [
				"HeadsetMic"
			]

			EnableSequence [
				cset "name='Input Source' 'Headphone Mic'"
			]

			Value {
				CapturePriority 200
				<sof-hda-dsp/HDA-Capture-value.conf>
				JackControl "Headphone Mic Jack"
			}
		}

		SectionDevice."HeadsetMic" {
			Comment "Headset Mono Microphone"

			EnableSequence [
				cset "name='Input Source' Headset Mic"
			]

			Value {
				CapturePriority 300
				<sof-hda-dsp/HDA-Capture-value.conf>
				JackControl "Headphone Mic Jack"
			}
		}
	}
	False {
		SectionDevice."HeadphoneMic" {
			Comment "Headphone Stereo Microphone"

			Value {
				CapturePriority 200
				<sof-hda-dsp/HDA-Capture-value.conf>
				JackControl "Mic Jack"
			}
		}
	}
}

SectionDevice."DigitalMic" {
	Comment "Digital Microphone"

	ConflictingDevice [
		"HeadsetMic"
	]

	Value {
		CapturePriority 100
		CapturePCM "hw:${CardId},6"
		If.chn {
			Condition {
				Type String
				Haystack "${CardComponents}"
				Needle "cfg-dmics:4"
			}
			True {
				CaptureChannels "4"
			}
			False {
				CaptureChannels "2"
			}
		}
		If.vol {
			Condition {
				Type ControlExists
				Control "name='Dmic0 Capture Switch'"
			}
			True {
				CaptureMixerElem "Dmic0 Capture"
				CaptureVolume "Dmic0 Capture Volume"
				CaptureSwitch "Dmic0 Capture Switch"
			}
			False {
				# v1.3 SOF firmware
				CaptureMixerElem "PGA10.0 10 Master"
				CaptureVolume "PGA10.0 10 Master Capture Volume"
			}
		}
	}
}

<sof-hda-dsp/Hdmi.conf>