Skip to content

Commit

Permalink
ucm2: soundwire: add basic settings for SDCA devices
Browse files Browse the repository at this point in the history
Add support for rt711-sdca, rt1316 and rt715-sdca (aka rt714).

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
libinyang authored and perexg committed Apr 15, 2021
1 parent e4fc252 commit 1970256
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 5 deletions.
8 changes: 8 additions & 0 deletions ucm2/codecs/rt711-sdca/init.conf
@@ -0,0 +1,8 @@
# RT711-sdca specific volume control settings

BootSequence [
cset "name='rt711 FU05 Playback Volume' 87"
cset "name='rt711 ADC 22 Mux' 'MIC2'"
cset "name='rt711 FU0F Capture Volume' 57"
cset "name='rt711 FU0F Capture Switch' 1"
]
9 changes: 9 additions & 0 deletions ucm2/codecs/rt715-sdca/init.conf
@@ -0,0 +1,9 @@
+# RT715-sdca (aka RT714) specific volume control settings

BootSequence [
cset "name='rt714 FU0A Capture Switch' 0"
cset "name='rt714 ADC 22 Mux' 'DMIC3'"
cset "name='rt714 ADC 23 Mux' 'DMIC4'"
cset "name='rt714 FU02 Capture Switch' 1"
cset "name='rt714 FU02 Capture Volume' 124"
]
22 changes: 22 additions & 0 deletions ucm2/sof-soundwire/rt1316-1.conf
@@ -0,0 +1,22 @@
# Use case Configuration for sof-soundwire card

SectionDevice."Speaker" {
Comment "Speaker"

EnableSequence [
cset "name='rt1316-1 DAC L Switch' 1"
cset "name='rt1316-1 DAC R Switch' 1"
cset "name='Speaker Switch' on"
]

DisableSequence [
cset "name='rt1316-1 DAC L Switch' 0"
cset "name='rt1316-1 DAC R Switch' 0"
cset "name='Speaker Switch' off"
]

Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},2"
}
}
29 changes: 29 additions & 0 deletions ucm2/sof-soundwire/rt1316-2.conf
@@ -0,0 +1,29 @@
# Use case Configuration for sof-soundwire card

SectionDevice."Speaker" {
Comment "Speaker"

EnableSequence [
cset "name='rt1316-1 RX Channel Select' L,L"
cset "name='rt1316-2 RX Channel Select' R,R"

cset "name='rt1316-1 DAC L Switch' 1"
cset "name='rt1316-1 DAC R Switch' 1"
cset "name='rt1316-2 DAC L Switch' 1"
cset "name='rt1316-2 DAC R Switch' 1"
cset "name='Speaker Switch' on"
]

DisableSequence [
cset "name='rt1316-1 DAC L Switch' 0"
cset "name='rt1316-1 DAC R Switch' 0"
cset "name='rt1316-2 DAC L Switch' 0"
cset "name='rt1316-2 DAC R Switch' 0"
cset "name='Speaker Switch' off"
]

Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},2"
}
}
40 changes: 40 additions & 0 deletions ucm2/sof-soundwire/rt711-sdca.conf
@@ -0,0 +1,40 @@
# Use case Configuration for sof-soundwire card

SectionDevice."Headphones" {
Comment "Headphones"

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

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

Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId}"
JackControl "Headphone Jack"
}
}

SectionDevice."Headset" {
Comment "Headset Microphone"

EnableSequence [
cset "name='PGA2.0 2 Master Capture Switch' 1"
]

DisableSequence [
cset "name='PGA2.0 2 Master Capture Switch' 0"
]

Value {
CapturePriority 200
CapturePCM "hw:${CardId},1"
JackControl "Headset Mic Jack"
CaptureSwitch "PGA2.0 2 Master Capture Switch"
CaptureVolume "PGA2.0 2 Master Capture Volume"
CaptureMixerElem "PGA2.0 2 Master"
}
}
21 changes: 21 additions & 0 deletions ucm2/sof-soundwire/rt715-sdca.conf
@@ -0,0 +1,21 @@
# Use case Configuration for sof-soundwire card

SectionDevice."Mic" {
Comment "SoundWire microphones"

EnableSequence [
cset "name='rt714 FU02 Capture Switch' 1"
]

DisableSequence [
cset "name='rt714 FU02 Capture Switch' 0"
]

Value {
CapturePriority 100
CapturePCM "hw:${CardId},4"
CaptureSwitch "rt714 FU02 Capture Switch"
CaptureVolume "rt714 FU02 Capture Volume"
CaptureMixerElem "rt714 FU02"
}
}
10 changes: 5 additions & 5 deletions ucm2/sof-soundwire/sof-soundwire.conf
Expand Up @@ -16,7 +16,7 @@ Define {

DefineRegex {
SpeakerCodec {
Regex " spk:([a-z0-9]+)"
Regex " spk:([a-z0-9]+(-sdca)?)"
String "${CardComponents}"
}
SpeakerChannels {
Expand All @@ -28,11 +28,11 @@ DefineRegex {
String "${CardComponents}"
}
HeadsetCodec {
Regex " hs:([a-z0-9]+)"
Regex " hs:([a-z0-9]+(-sdca)?)"
String "${CardComponents}"
}
MicCodec {
Regex " mic:([a-z0-9]+)"
Regex " mic:([a-z0-9]+(-sdca)?)"
String "${CardComponents}"
}
Mics {
Expand All @@ -44,7 +44,7 @@ DefineRegex {
If.hs_init {
Condition {
Type RegexMatch
Regex "(rt5682|rt700|rt711)"
Regex "(rt5682|rt700|rt711(-sdca)?)"
String "${var:HeadsetCodec1}"
}
True.Include.hs_init.File "/codecs/${var:HeadsetCodec1}/init.conf"
Expand All @@ -53,7 +53,7 @@ If.hs_init {
If.mic_init {
Condition {
Type RegexMatch
Regex "(rt715)"
Regex "(rt715(-sdca)?)"
String "${var:MicCodec1}"
}
True.Include.mic_init.File "/codecs/${var:MicCodec1}/init.conf"
Expand Down

0 comments on commit 1970256

Please sign in to comment.