jsl: Update Magpie UCM

Add every variant, use DMI matching, and update the UCM to include the
latest changes
pull/4/head
WeirdTreeThing 2023-08-22 22:21:12 -04:00
parent ae18d8c46d
commit 402b6b6f54
No known key found for this signature in database
GPG Key ID: 1F56A4B52998B851
7 changed files with 566 additions and 61 deletions

View File

@ -1,8 +0,0 @@
Syntax 6
Comment "Waddledee internal card"
SectionUseCase."HiFi" {
File "HiFi-Magpie.conf"
Comment "Default"
}

View File

@ -1,34 +1,54 @@
SectionVerb {
EnableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='HPOL Playback Switch' off"
cset "name='HPOR Playback Switch' off"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 0"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 0"
cset "name='Headset Mic Switch' off"
cset "name='CBJ Boost Volume' 3"
cset "name='RECMIX1L CBJ Switch' 1"
cset "name='Stereo1 ADC L Mux' 0"
cset "name='STO1 ADC Capture Switch' on"
cset "name='RECMIX1L CBJ Switch' 1"
cset "name='IF1 01 ADC Swap Mux' 2"
cset "name='CBJ Boost Volume' 3"
cset "name='Stereo1 ADC L1 Mux' 1"
cset "name='Stereo1 ADC R1 Mux' 1"
cset "name='IF1 01 ADC Swap Mux' 2"
cset "name='Stereo1 ADC MIXL ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXR ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
cset "name='Left Spk Switch' off"
cset "name='Right Spk Switch' off"
cset "name='Left Bypass Boost' 1"
cset "name='Right Bypass Boost' 1"
cset "name='Left Mono LR Select' Left"
cset "name='Right Mono LR Select' Right"
]
DisableSequence [
]
}
# Split 4ch dmic into 2 virtual 2ch mics
Include.pcm_split.File "/conf.d/dmic-common/split.conf"
Macro [
{
SplitPCM {
Name "jsl_stereo_in"
Direction Capture
Format S32_LE
Channels 2
HWChannels 4
HWChannelPos0 FL
HWChannelPos1 FR
HWChannelPos2 FL
HWChannelPos3 FR
}
}
]
SectionDevice."Speaker" {
Comment "Speaker"
Value {
PlaybackPriority 100
PlaybackPCM "hw:sofrt5682,0"
DspName "speaker_eq"
PlaybackPCM "hw:${CardId},0"
}
EnableSequence [
cset "name='Left Spk Switch' on"
@ -45,14 +65,16 @@ SectionDevice."Headphones" {
Value {
PlaybackPriority 200
PlaybackPCM "hw:sofrt5682,1"
PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "DAC1"
JackControl "Headphone Jack"
}
EnableSequence [
cset "name='Headphone Jack Switch' on"
cset "name='HPOL Playback Switch' 1"
cset "name='HPOR Playback Switch' 1"
cset "name='Headphone Jack Switch' on"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 1"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 1"
]
DisableSequence [
cset "name='Headphone Jack Switch' off"
@ -61,35 +83,42 @@ SectionDevice."Headphones" {
]
}
SectionDevice."Headset" {
Comment "Headset Microphone"
Value {
CapturePriority 200
CapturePCM "hw:sofrt5682,1"
CaptureMixerElem "Headset Mic"
JackDev "sof-rt5682 Headset Jack"
}
EnableSequence [
cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
cset "name='Stereo1 ADC MIXL ADC1 Switch' 0"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 0"
]
}
SectionDevice."Mic" {
Comment "Internal Microphone"
Value {
CapturePriority 100
CapturePCM "hw:sofrt5682,5"
CapturePCM "hw:${CardId},5"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "jsl_stereo_in"
Direction Capture
Device 5
HWChannels 4
Channels 2
Channel0 0
Channel1 1
ChannelPos0 FL
ChannelPos1 FR
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
Value {
CapturePriority 200
CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic"
JackControl "Headset Mic Jack"
}
EnableSequence [
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
]
}
Include.hdmi.File "/conf.d/hdmi-common/hdmi234.conf"

View File

@ -0,0 +1,116 @@
SectionVerb {
EnableSequence [
cdev "hw:sofrt5682"
cset "name='Headphone Jack Switch' off"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 0"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 0"
cset "name='Headset Mic Switch' off"
cset "name='Stereo1 ADC L Mux' 0"
cset "name='RECMIX1L CBJ Switch' 1"
cset "name='IF1 01 ADC Swap Mux' 2"
cset "name='CBJ Boost Volume' 28"
cset "name='Stereo1 ADC L1 Mux' 1"
cset "name='Stereo1 ADC R1 Mux' 1"
cset "name='Stereo1 ADC MIXL ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXR ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
]
}
# Split 4ch dmic into 2 virtual 2ch mics
Include.pcm_split.File "/conf.d/dmic-common/split.conf"
Macro [
{
SplitPCM {
Name "jsl_stereo_in"
Direction Capture
Format S32_LE
Channels 2
HWChannels 4
HWChannelPos0 FL
HWChannelPos1 FR
HWChannelPos2 FL
HWChannelPos3 FR
}
}
]
SectionDevice."Speaker" {
Comment "Speaker"
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},0"
}
EnableSequence [
cset "name='Left Spk Switch' on"
cset "name='Right Spk Switch' on"
]
DisableSequence [
cset "name='Left Spk Switch' off"
cset "name='Right Spk Switch' off"
]
}
SectionDevice."Headphones" {
Comment "Headphones"
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "DAC1"
JackControl "Headphone Jack"
}
EnableSequence [
cset "name='Headphone Jack Switch' on"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 1"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 1"
]
DisableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 0"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 0"
]
}
SectionDevice."Mic" {
Comment "Internal Microphone"
Value {
CapturePriority 100
CapturePCM "hw:${CardId},5"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "jsl_stereo_in"
Direction Capture
Device 5
HWChannels 4
Channels 2
Channel0 0
Channel1 1
ChannelPos0 FL
ChannelPos1 FR
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
Value {
CapturePriority 200
CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic"
JackControl "Headset Mic Jack"
}
EnableSequence [
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
]
}
Include.hdmi.File "/conf.d/hdmi-common/hdmi234.conf"

View File

@ -0,0 +1,145 @@
SectionVerb {
EnableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='HPOL Playback Switch' off"
cset "name='HPOR Playback Switch' off"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 0"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 0"
cset "name='Stereo1 ADC L Mux' 0"
cset "name='STO1 ADC Capture Switch' on"
cset "name='RECMIX1L CBJ Switch' 1"
cset "name='IF1 01 ADC Swap Mux' 2"
cset "name='CBJ Boost Volume' 3"
cset "name='Stereo1 ADC L1 Mux' 1"
cset "name='Stereo1 ADC R1 Mux' 1"
cset "name='Stereo1 ADC MIXL ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXR ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
cset "name='Left Bypass Boost' 1"
cset "name='Right Bypass Boost' 1"
cset "name='Left Mono LR Select' Left"
cset "name='Right Mono LR Select' Right"
]
}
# Split 4ch dmic into 2 virtual 2ch mics
Include.pcm_split.File "/conf.d/dmic-common/split.conf"
Macro [
{
SplitPCM {
Name "jsl_stereo_in"
Direction Capture
Format S32_LE
Channels 2
HWChannels 4
HWChannelPos0 FL
HWChannelPos1 FR
HWChannelPos2 FL
HWChannelPos3 FR
}
}
]
SectionDevice."Speaker" {
Comment "Speaker"
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},0"
}
EnableSequence [
cset "name='Left Spk Switch' on"
cset "name='Right Spk Switch' on"
]
DisableSequence [
cset "name='Left Spk Switch' off"
cset "name='Right Spk Switch' off"
]
}
SectionDevice."Headphones" {
Comment "Headphones"
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "DAC1"
JackControl "Headphone Jack"
}
EnableSequence [
cset "name='Headphone Jack Switch' on"
cset "name='HPOL Playback Switch' 1"
cset "name='HPOR Playback Switch' 1"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 1"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 1"
]
DisableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='HPOL Playback Switch' 0"
cset "name='HPOR Playback Switch' 0"
]
}
SectionDevice."Mic" {
Comment "Front Microphone"
Value {
CapturePriority 100
CapturePCM "hw:${CardId},5"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "jsl_stereo_in"
Direction Capture
Device 5
HWChannels 4
Channels 2
Channel0 0
Channel1 1
ChannelPos0 FL
ChannelPos1 FR
}
}
SectionDevice."Mic 1" {
Comment "Rear Microphone"
Value {
CapturePriority 200
CapturePCM "hw:${CardId},5"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "jsl_stereo_in"
Direction Capture
Device 5
HWChannels 4
Channels 2
Channel0 3
Channel1 3
ChannelPos0 FL
ChannelPos1 FR
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
Value {
CapturePriority 300
CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic"
JackControl "Headset Mic Jack"
}
EnableSequence [
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
]
}
Include.hdmi.File "/conf.d/hdmi-common/hdmi234.conf"

View File

@ -17,17 +17,33 @@ SectionVerb {
cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
]
DisableSequence [
]
}
# Split 4ch dmic into 2 virtual 2ch mics
Include.pcm_split.File "/conf.d/dmic-common/split.conf"
Macro [
{
SplitPCM {
Name "jsl_stereo_in"
Direction Capture
Format S32_LE
Channels 2
HWChannels 4
HWChannelPos0 FL
HWChannelPos1 FR
HWChannelPos2 FL
HWChannelPos3 FR
}
}
]
SectionDevice."Speaker" {
Comment "Speaker"
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},0"
DspName "speaker_eq"
}
EnableSequence [
cset "name='Left Spk Switch' on"
@ -62,6 +78,27 @@ SectionDevice."Headphones" {
]
}
SectionDevice."Mic" {
Comment "Internal Microphone"
Value {
CapturePriority 100
CapturePCM "hw:${CardId},5"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "jsl_stereo_in"
Direction Capture
Device 5
HWChannels 4
Channels 2
Channel0 0
Channel1 1
ChannelPos0 FL
ChannelPos1 FR
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
@ -69,7 +106,7 @@ SectionDevice."Headset" {
CapturePriority 200
CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic"
JackDev "sof-rt5682 Headset Jack"
JackControl "Headset Mic Jack"
}
EnableSequence [
cset "name='Headset Mic Switch' on"
@ -79,14 +116,4 @@ SectionDevice."Headset" {
]
}
SectionDevice."Mic" {
Comment "Internal Microphone"
Value {
CapturePriority 100
CapturePCM "hw:${CardId},5"
CaptureChannels 4
}
}
Include.hdmi.File "/conf.d/hdmi-common/hdmi234.conf"

View File

@ -0,0 +1,138 @@
SectionVerb {
EnableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='HPOL Playback Switch' off"
cset "name='HPOR Playback Switch' off"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 0"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 0"
cset "name='Stereo1 ADC L Mux' 0"
cset "name='STO1 ADC Capture Switch' on"
cset "name='RECMIX1L CBJ Switch' 1"
cset "name='IF1 01 ADC Swap Mux' 2"
cset "name='CBJ Boost Volume' 3"
cset "name='Stereo1 ADC L1 Mux' 1"
cset "name='Stereo1 ADC R1 Mux' 1"
cset "name='Stereo1 ADC MIXL ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXR ADC2 Switch' 0"
cset "name='Stereo1 ADC MIXL ADC1 Switch' 1"
cset "name='Stereo1 ADC MIXR ADC1 Switch' 1"
]
}
# Split 4ch dmic into 2 virtual 2ch mics
Include.pcm_split.File "/conf.d/dmic-common/split.conf"
Macro [
{
SplitPCM {
Name "jsl_stereo_in"
Direction Capture
Format S32_LE
Channels 2
HWChannels 4
HWChannelPos0 FL
HWChannelPos1 FR
HWChannelPos2 FL
HWChannelPos3 FR
}
}
]
SectionDevice."Speaker" {
Comment "Speaker"
Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},0"
}
EnableSequence [
cset "name='Left Spk Switch' on"
cset "name='Right Spk Switch' on"
]
DisableSequence [
cset "name='Left Spk Switch' off"
cset "name='Right Spk Switch' off"
]
}
SectionDevice."Headphones" {
Comment "Headphones"
Value {
PlaybackPriority 200
PlaybackPCM "hw:${CardId},1"
PlaybackMixerElem "DAC1"
JackControl "Headphone Jack"
}
EnableSequence [
cset "name='Headphone Jack Switch' on"
cset "name='HPOL Playback Switch' 1"
cset "name='HPOR Playback Switch' 1"
cset "name='Stereo1 DAC MIXL DAC L1 Switch' 1"
cset "name='Stereo1 DAC MIXR DAC R1 Switch' 1"
]
DisableSequence [
cset "name='Headphone Jack Switch' off"
cset "name='HPOL Playback Switch' 0"
cset "name='HPOR Playback Switch' 0"
]
}
SectionDevice."Mic" {
Comment "Front Microphone"
Value {
CapturePriority 100
CapturePCM "hw:${CardId},5"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "jsl_stereo_in"
Direction Capture
Device 5
HWChannels 4
Channels 2
Channel0 0
Channel1 1
ChannelPos0 FL
ChannelPos1 FR
}
}
SectionDevice."Mic 1" {
Value {
CapturePriority 200
CapturePCM "hw:${CardId},5"
CaptureChannels 4
}
Macro.pcm_split.SplitPCMDevice {
Name "jsl_stereo_in"
Direction Capture
Device 5
HWChannels 4
Channels 2
Channel0 3
Channel1 3
ChannelPos0 FL
ChannelPos1 FR
}
}
SectionDevice."Headset" {
Comment "Headset Microphone"
Value {
CapturePriority 300
CapturePCM "hw:${CardId},1"
CaptureMixerElem "Headset Mic"
JackControl "Headset Mic Jack"
}
EnableSequence [
cset "name='Headset Mic Switch' on"
]
DisableSequence [
cset "name='Headset Mic Switch' off"
]
}
Include.hdmi.File "/conf.d/hdmi-common/hdmi234.conf"

View File

@ -1,8 +1,66 @@
Syntax 6
Comment "Boten internal card"
SectionUseCase."HiFi" {
File "HiFi.conf"
Comment "Default"
If.magpie {
Condition {
Type String
Haystack "${sys:devices/virtual/dmi/id/product_name}"
Needle "Magpie"
}
True {
If.1mic {
Condition {
Type RegexMatch
Regex "^sku(720896|720897|721152|721153)$"
String "${sys:devices/virtual/dmi/id/product_sku}"
}
True.SectionUseCase."HiFi" {
File "Magpie/HiFi.magpie.1mic.conf"
Comment "Default"
}
}
If.2mic {
Condition {
Type RegexMatch
Regex "^sku(720898|720899|721154|721155)$"
String "${sys:devices/virtual/dmi/id/product_sku}"
}
True.SectionUseCase."HiFi" {
File "Magpie/HiFi.magpie.2mic.conf"
Comment "Default"
}
}
If.1mic_rt5682vs {
Condition {
Type RegexMatch
Regex "^sku(720912|720913|720914|720915|721168|721169|721170|721171)$"
String "${sys:devices/virtual/dmi/id/product_sku}"
}
True.SectionUseCase."HiFi" {
File "Magpie/HiFi.magpie.1mic.rt5682vs.conf"
Comment "Default"
}
}
If.rt1015p_1mic {
Condition {
Type RegexMatch
Regex "^sku(720928|720929|721184|721185)$"
String "${sys:devices/virtual/dmi/id/product_sku}"
}
True.SectionUseCase."HiFi" {
File "Magpie/HiFi.magpie.rt1015p.1mic.conf"
Comment "Default"
}
}
If.rt1015p_2mic {
Condition {
Type RegexMatch
Regex "^sku(720930|720931|721186|721187)$"
String "${sys:devices/virtual/dmi/id/product_sku}"
}
True.SectionUseCase."HiFi" {
File "Magpie/HiFi.magpie.rt1015p.2mic.conf"
Comment "Default"
}
}
}
}