Skip to content

Commit b4e9b24

Browse files
Jack Yuperexg
authored andcommitted
ucm2: sof-soundwire: add rt721 ucm support
Closes: #600 Signed-off-by: Jack Yu <jack.yu@realtek.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
1 parent ca76771 commit b4e9b24

3 files changed

Lines changed: 110 additions & 1 deletion

File tree

ucm2/codecs/rt721/init.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# RT721-sdca specific volume control settings
2+
3+
BootSequence [
4+
cset "name='rt721 ADC 07 R Mux' 'DMIC1 FE'"
5+
cset "name='rt721 ADC 07 L Mux' 'DMIC1 RE'"
6+
cset "name='rt721 ADC 10 R Mux' 'DMIC2 FE'"
7+
cset "name='rt721 ADC 10 L Mux' 'DMIC2 RE'"
8+
cset "name='rt721 ADC 09 Mux' 'MIC2'"
9+
cset "name='rt721 FU1E Capture Volume' 63"
10+
cset "name='rt721 FU06 Playback Volume' 87"
11+
cset "name='rt721 FU05 Playback Volume' 87"
12+
cset "name='rt721 FU0F Capture Volume' 63"
13+
cset "name='rt721 FU33 Boost Volume' 1"
14+
]

ucm2/sof-soundwire/rt721.conf

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Use case Configuration for sof-soundwire card
2+
3+
If.codecmic {
4+
Condition {
5+
Type RegexMatch
6+
Regex "(rt721(-sdca)?)"
7+
String "${var:MultiMicShadow}"
8+
}
9+
True {
10+
SectionDevice."Mic" {
11+
Comment "SoundWire microphones"
12+
13+
EnableSequence [
14+
cset "name='rt721 FU1E Capture Switch' 1"
15+
]
16+
17+
DisableSequence [
18+
cset "name='rt721 FU1E Capture Switch' 0"
19+
]
20+
21+
Value {
22+
CapturePriority 100
23+
CapturePCM "hw:${CardId},4"
24+
CaptureSwitch "rt721 FU1E Capture Switch"
25+
CaptureVolume "rt721 FU1E Capture Volume"
26+
CaptureMixerElem "rt721 FU1E"
27+
}
28+
}
29+
}
30+
}
31+
32+
If.codecspk {
33+
Condition {
34+
Type RegexMatch
35+
Regex "(rt721(-sdca)?)"
36+
String "${var:MultiSpeakerShadow}"
37+
}
38+
True {
39+
SectionDevice."Speaker" {
40+
Comment "Speaker"
41+
42+
EnableSequence [
43+
cset "name='Speaker Switch' on"
44+
]
45+
46+
DisableSequence [
47+
cset "name='Speaker Switch' off"
48+
]
49+
50+
Value {
51+
PlaybackPriority 100
52+
PlaybackPCM "hw:${CardId},2"
53+
}
54+
}
55+
}
56+
}
57+
58+
SectionDevice."Headphones" {
59+
Comment "Headphones"
60+
61+
EnableSequence [
62+
cset "name='Headphone Switch' on"
63+
]
64+
65+
DisableSequence [
66+
cset "name='Headphone Switch' off"
67+
]
68+
69+
Value {
70+
PlaybackPriority 200
71+
PlaybackPCM "hw:${CardId}"
72+
JackControl "Headphone Jack"
73+
}
74+
}
75+
76+
SectionDevice."Headset" {
77+
Comment "Headset Microphone"
78+
79+
EnableSequence [
80+
cset "name='rt721 FU0F Capture Switch' 1"
81+
]
82+
83+
DisableSequence [
84+
cset "name='rt721 FU0F Capture Switch' 0"
85+
]
86+
87+
Value {
88+
CapturePriority 200
89+
CapturePCM "hw:${CardId},1"
90+
JackControl "Headset Mic Jack"
91+
CaptureSwitch "rt721 FU0F Capture Switch"
92+
CaptureVolume "rt721 FU0F Capture Volume"
93+
CaptureMixerElem "rt721 FU0F"
94+
}
95+
}

ucm2/sof-soundwire/sof-soundwire.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ DefineRegex {
5050
String "${CardComponents}"
5151
}
5252
MultiCodec {
53-
Regex "(rt712|rt722(-sdca)?)"
53+
Regex "(rt712|rt721|rt722(-sdca)?)"
5454
String "${var:SpeakerCodec1} ${var:HeadsetCodec1} ${var:MicCodec1}"
5555
}
5656
}

0 commit comments

Comments
 (0)