Add common sof-rt5682 ucm
parent
72a27934e2
commit
721aac134d
|
@ -0,0 +1,132 @@
|
|||
# TODO: deal with the pcm numbers on cml being different
|
||||
|
||||
# headset codecs
|
||||
|
||||
If.rt5682 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:rt5682}"
|
||||
}
|
||||
False.Include.headset.File "rt5682-headset.conf"
|
||||
}
|
||||
|
||||
If.rt5682s {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:rt5682s}"
|
||||
}
|
||||
False.Include.headset.File "/codecs/rt5682s/headset.conf"
|
||||
}
|
||||
|
||||
# speaker amps
|
||||
|
||||
If.max98357a {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:max98357a}"
|
||||
}
|
||||
False.Include.speaker.File "/codecs/max98357a/speaker.conf"
|
||||
}
|
||||
|
||||
If.max98360a {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:max98360a}"
|
||||
}
|
||||
False.Include.speaker.File "/codecs/max98357a/speaker.conf"
|
||||
}
|
||||
|
||||
|
||||
If.max98373 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:max98373}"
|
||||
}
|
||||
False.Include.speaker.File "/codecs/max98373/speaker.conf"
|
||||
}
|
||||
|
||||
If.max98390 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:max98390}"
|
||||
}
|
||||
False.Include.speaker.File "/codecs/max98390/speaker.conf"
|
||||
}
|
||||
|
||||
If.rt1011 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:rt1011}"
|
||||
}
|
||||
False.Include.speaker.File "/codecs/rt1011/speaker.conf"
|
||||
}
|
||||
|
||||
If.rt1015 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:rt1015}"
|
||||
}
|
||||
False.Include.speaker.File "/codecs/rt1015/speaker.conf"
|
||||
}
|
||||
|
||||
If.rt1015p {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:rt1015p}"
|
||||
}
|
||||
False.Include.speaker.File "/codecs/rt1015p/speaker.conf"
|
||||
}
|
||||
|
||||
If.rt1019p {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "$${var:rt1019p}"
|
||||
}
|
||||
False.Include.speaker.File "/codecs/rt1019p/speaker.conf"
|
||||
}
|
||||
|
||||
# DMIC
|
||||
# TODO: set mic pcm based on platform, detect channel configuration from skuid?
|
||||
|
||||
Include.pcm_split.File "/common/pcm/split.conf"
|
||||
|
||||
Macro [
|
||||
{
|
||||
SplitPCM {
|
||||
Name "dmic_stereo_in"
|
||||
Direction Capture
|
||||
Format S32_LE
|
||||
Channels 2
|
||||
HWChannels 4
|
||||
HWChannelPos0 FL
|
||||
HWChannelPos1 FR
|
||||
HWChannelPos2 FL
|
||||
HWChannelPos3 FR
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
#SectionDevice."Mic" {
|
||||
# Comment "Internal Microphone"
|
||||
#
|
||||
# Value {
|
||||
# CapturePrioirty 100
|
||||
# CapturePCM "hw:${CardId},99"
|
||||
# CaptureChannels 4
|
||||
# }
|
||||
# Macro.pcm_split.SplitPCMDevice {
|
||||
# Name "dmic_stereo_in"
|
||||
# Direction Capture
|
||||
# Device 99
|
||||
# HWChannels 4
|
||||
# Channels 2
|
||||
# Channel0 2
|
||||
# Channel1 3
|
||||
# ChannelPos0 FL
|
||||
# ChannelPos1 FR
|
||||
# }
|
||||
#}
|
||||
|
||||
# TODO: detect hdmi configuration
|
||||
|
||||
#Include.hdmi.File "/common/hdmi/hdmi2345.conf"
|
|
@ -0,0 +1,86 @@
|
|||
# codec probing
|
||||
|
||||
# headset codecs
|
||||
|
||||
If.rt5682 {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/i2c/devices/i2c-10EC5682:00/modalias}"
|
||||
String2 "acpi:10EC5682:"
|
||||
}
|
||||
True.Define.rt5682 y
|
||||
}
|
||||
|
||||
If.rt5682s {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/i2c/devices/i2c-RTL5682:00/modalias}"
|
||||
String2 "acpi:RTL5682:"
|
||||
}
|
||||
True.Define.rt5682s y
|
||||
}
|
||||
|
||||
# speaker amps
|
||||
|
||||
If.max98357a {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/platform/devices/MX98357A:00/modalias}"
|
||||
String2 "acpi:MX98357A:"
|
||||
}
|
||||
True.Define.max98357a y
|
||||
}
|
||||
|
||||
If.max98360a {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/platform/devices/MX98360A:00/modalias}"
|
||||
String2 "acpi:MX98360A:"
|
||||
}
|
||||
True.Define.max98357a y
|
||||
}
|
||||
|
||||
If.max98373 {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/i2c/devices/i2c-MX98373:00/modalias}"
|
||||
String2 "acpi:MX98373:"
|
||||
}
|
||||
True.Define.max98373 y
|
||||
}
|
||||
|
||||
If.rt1011 {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/i2c/devices/i2c-10EC1011:00/modalias}"
|
||||
String2 "acpi:10EC1011:"
|
||||
}
|
||||
True.Define.rt1011 y
|
||||
}
|
||||
|
||||
If.rt1015 {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/i2c/devices/i2c-10EC1015:00/modalias}"
|
||||
String2 "acpi:10EC1015:"
|
||||
}
|
||||
True.Define.rt1015 y
|
||||
}
|
||||
|
||||
If.rt1015p {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/platform/devices/RTL1015:00/modalias}"
|
||||
String2 "acpi:RTL1015:"
|
||||
}
|
||||
True.Define.rt1015p y
|
||||
}
|
||||
|
||||
If.rt1019p {
|
||||
Condition {
|
||||
Type String
|
||||
String1 "$${sys:bus/i2c/devices/i2c-RTL1019:00/modalias}"
|
||||
String2 "acpi:RTL1019:"
|
||||
}
|
||||
True.Define.rt1019p y
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
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"
|
||||
]
|
||||
DisableSequence [
|
||||
cset "name='Headphone Jack Switch' off"
|
||||
cset "name='HPOL Playback Switch' 0"
|
||||
cset "name='HPOR Playback Switch' 0"
|
||||
|
||||
]
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
# RT5682 specific volume control settings
|
||||
# Upstream one is for soundwire
|
||||
|
||||
BootSequence [
|
||||
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='RECMIX1L CBJ Switch' 0"
|
||||
cset "name='Stereo1 ADC L Mux' 0"
|
||||
cset "name='Stereo1 ADC MIXL ADC1 Switch' 0"
|
||||
cset "name='Stereo1 ADC MIXR ADC1 Switch' 0"
|
||||
]
|
|
@ -0,0 +1,50 @@
|
|||
Syntax 6
|
||||
|
||||
SectionUseCase."HiFi" {
|
||||
File "HiFi.conf"
|
||||
Comment "Default"
|
||||
}
|
||||
|
||||
# headphone codecs
|
||||
|
||||
If.rt5682 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "${var:rt5682}"
|
||||
}
|
||||
False.Include.rt5682-init.File "rt5682-init.conf"
|
||||
}
|
||||
|
||||
If.rt5682s {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "${var:rt5682s}"
|
||||
}
|
||||
False.Include.rt5682s-init.File "/codecs/rt5682s/init.conf"
|
||||
}
|
||||
|
||||
# speaker amps
|
||||
|
||||
If.max98373 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "${var:max98373}"
|
||||
}
|
||||
False.Include.max98373-init.File "/codecs/max98373/init.conf"
|
||||
}
|
||||
|
||||
If.rt1011 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "${var:rt1011}"
|
||||
}
|
||||
False.Include.rt1011-init.File "/codecs/rt1011/init.conf"
|
||||
}
|
||||
|
||||
If.rt1015 {
|
||||
Condition {
|
||||
Type String
|
||||
Empty "${var:rt1015}"
|
||||
}
|
||||
False.Include.rt1015-init.File "/codecs/rt1015/init.conf"
|
||||
}
|
Loading…
Reference in New Issue