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

SectionVerb {
	EnableSequence [
		cset "name='Master Playback Switch' on"
		cset "name='Capture Switch' on"
	]
}

SectionDevice."Headphone" {
	Comment "Headphone"

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

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

	Value {
		PlaybackPCM "hw:${CardId},0"
		PlaybackMixerID "Headphone"
		PlaybackVolume "Headphone Playback Volume"
		PlaybackSwitch "Headphone Playback Switch"
		PlaybackChannels "2"
		JackName "SOF HDA DSP Headphone"
		JackType "gpio"
		JackSwitch "12"
		If.1 {
			Condition {
				Type ControlExists
				Control "name='Bass Speaker Playback Switch'"
			}
			True {
				JackHWMute "Speaker BassSpeaker"
			}
			False {
				JackHWMute "Speaker"
			}
		}
		If.2 {
			Condition {
				Type ControlExists
				Control "iface=CARD,name='Headphone Mic Jack'"
			}
			True {
				JackControl "Headphone Mic Jack"
			}
			False {
				JackControl "Headphone Jack"
			}
		}
	}
}

SectionDevice."Speaker" {
	Comment "Speaker"

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

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

	Value {
		PlaybackPCM "hw:${CardId},0"
		PlaybackMixerID "Speaker"
		PlaybackVolume "Speaker Playback Volume"
		PlaybackSwitch "Speaker Playback Switch"
		PlaybackChannels "2"
	}
}

If.1 {
	After.SectionDevice "Speaker"
	Condition {
		Type ControlExists
		Control "name='Bass Speaker Playback Switch'"
	}
	True {
		SectionDevice."BassSpeaker" {
			Comment "Bass Speaker"

			ConflictingDevice [
				"Speaker"
			]

			EnableSequence [
				cset "name='Bass Speaker Playback Switch' on"
				cset "name='Speaker Playback Switch' on"
			]

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

			Value {
				PlaybackPCM "hw:${CardId},0"
				PlaybackMixerID "Speaker"
				PlaybackVolume "Speaker Playback Volume"
				PlaybackSwitch "Speaker Playback Switch"
				PlaybackChannels "2"
			}
		}
	}
}

SectionDevice."HeadsetMic" {
	Comment "Headset Microphone"

	Value {
		CapturePCM "hw:${CardId},0"
		CaptureMixerID "Capture"
		CaptureVolume "Capture Volume"
		CaptureSwitch "Capture Switch"
		CaptureChannels "2"
		JackControl "Mic Jack"
	}
}

SectionDevice."DigitalMic" {
	Comment "Digital Microphone"

	ConflictingDevice [
		"HeadsetMic"
	]

	Value {
		CapturePCM "hw:${CardId},6"
		CaptureMixerID "Dmic0 Capture"
		CaptureVolume "Dmic0 Capture Volume"
		CaptureSwitch "Dmic0 Capture Switch"
		CaptureChannels "2"
	}
}