conf/ucm: Add UCM profile for cht-bsw-rt5672 boards
Add an UCM profile for Intel boards with a RT5672 codec. Re-use the existing platform enable and disable sequences for BYT/CHT SST support and add a codecs/rt5672 dir with codec specific enable / disable sequences for the various inputs and outputs. This is partly based on earlier work done here: https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
0789dd5b87
commit
be6c228ffc
9 changed files with 246 additions and 0 deletions
27
ucm/cht-bsw-rt5672/HiFi.conf
Normal file
27
ucm/cht-bsw-rt5672/HiFi.conf
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# Adapted from https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672
|
||||
|
||||
SectionVerb {
|
||||
EnableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
<platforms/bytcr/PlatformEnableSeq.conf>
|
||||
<codecs/rt5672/EnableSeq.conf>
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
<platforms/bytcr/PlatformDisableSeq.conf>
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackPCM "hw:chtbswrt5672"
|
||||
CapturePCM "hw:chtbswrt5672"
|
||||
}
|
||||
}
|
||||
|
||||
<codecs/rt5672/Speaker.conf>
|
||||
<codecs/rt5672/MonoSpeaker.conf>
|
||||
<codecs/rt5672/HeadPhones.conf>
|
||||
|
||||
<codecs/rt5672/DMIC1.conf>
|
||||
<codecs/rt5672/DMIC2.conf>
|
||||
<codecs/rt5672/HeadsetMic.conf>
|
||||
6
ucm/cht-bsw-rt5672/cht-bsw-rt5672.conf
Normal file
6
ucm/cht-bsw-rt5672/cht-bsw-rt5672.conf
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Adapted from https://github.com/plbossart/UCM/tree/master/cht-bsw-rt5672
|
||||
|
||||
SectionUseCase."HiFi" {
|
||||
File "HiFi.conf"
|
||||
Comment "Play HiFi quality Music"
|
||||
}
|
||||
28
ucm/codecs/rt5672/DMIC1.conf
Normal file
28
ucm/codecs/rt5672/DMIC1.conf
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
SectionDevice."DigitalMic-DMIC1" {
|
||||
Comment "Internal Digital Microphone on DMIC1"
|
||||
|
||||
ConflictingDevice [
|
||||
"DigitalMic-DMIC2"
|
||||
"HeadsetMic"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Int Mic Switch' on"
|
||||
cset "name='Stereo1 DMIC Mux' DMIC1"
|
||||
cset "name='Stereo1 ADC 2 Mux' DMIC"
|
||||
cset "name='Sto1 ADC MIXL ADC2 Switch' on"
|
||||
cset "name='Sto1 ADC MIXR ADC2 Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Int Mic Switch' off"
|
||||
cset "name='Sto1 ADC MIXL ADC2 Switch' off"
|
||||
cset "name='Sto1 ADC MIXR ADC2 Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
CaptureChannels 2
|
||||
}
|
||||
}
|
||||
28
ucm/codecs/rt5672/DMIC2.conf
Normal file
28
ucm/codecs/rt5672/DMIC2.conf
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
SectionDevice."DigitalMic-DMIC2" {
|
||||
Comment "Internal Digital Microphone on DMIC2"
|
||||
|
||||
ConflictingDevice [
|
||||
"DigitalMic-DMIC1"
|
||||
"HeadsetMic"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Int Mic Switch' on"
|
||||
cset "name='Stereo1 DMIC Mux' DMIC2"
|
||||
cset "name='Stereo1 ADC 2 Mux' DMIC"
|
||||
cset "name='Sto1 ADC MIXL ADC2 Switch' on"
|
||||
cset "name='Sto1 ADC MIXR ADC2 Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Int Mic Switch' off"
|
||||
cset "name='Sto1 ADC MIXL ADC2 Switch' off"
|
||||
cset "name='Sto1 ADC MIXR ADC2 Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
CaptureChannels 2
|
||||
}
|
||||
}
|
||||
48
ucm/codecs/rt5672/EnableSeq.conf
Normal file
48
ucm/codecs/rt5672/EnableSeq.conf
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Playback (I2S1)
|
||||
|
||||
# common
|
||||
cset "name='DAC1 L Mux' IF1 DAC"
|
||||
cset "name='DAC1 R Mux' IF1 DAC"
|
||||
cset "name='DAC1 MIXL DAC1 Switch' on"
|
||||
cset "name='DAC1 MIXR DAC1 Switch' on"
|
||||
cset "name='Stereo DAC MIXL DAC L1 Switch' on"
|
||||
cset "name='Stereo DAC MIXL DAC R1 Switch' off"
|
||||
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
|
||||
cset "name='Stereo DAC MIXR DAC L1 Switch' off"
|
||||
|
||||
# speaker
|
||||
cset "name='PDM1 L Mux' Stereo DAC"
|
||||
cset "name='PDM1 R Mux' Stereo DAC"
|
||||
|
||||
# headphone
|
||||
cset "name='HPOVOL MIXL DAC1 Switch' on"
|
||||
cset "name='HPOVOL MIXR DAC1 Switch' on"
|
||||
cset "name='HPO MIX HPVOL Switch' on"
|
||||
|
||||
# line out
|
||||
# cset "name='OUT MIXL DAC L1 Switch' on"
|
||||
# cset "name='OUT MIXR DAC R1 Switch' on"
|
||||
# cset "name='LOUT MIX OUTMIX L Switch' on"
|
||||
# cset "name='LOUT MIX OUTMIX R Switch' on"
|
||||
|
||||
# 47=0dB, 0.375 dB/step
|
||||
cset "name='ADC Capture Volume' 47"
|
||||
cset "name='ADC Capture Switch' on"
|
||||
|
||||
# Headset mic is quite soft, boost it a bit, 1 = 20dB which is the first
|
||||
# available boost step
|
||||
cset "name='IN1 Boost Volume' 1"
|
||||
|
||||
# Start with all outputs / inputs disabled
|
||||
cset "name='Ext Spk Switch' off"
|
||||
cset "name='Headphone Switch' off"
|
||||
cset "name='Int Mic Switch' off"
|
||||
cset "name='Headset Mic Switch' off"
|
||||
cset "name='Sto1 ADC MIXL ADC1 Switch' off"
|
||||
cset "name='Sto1 ADC MIXR ADC1 Switch' off"
|
||||
cset "name='Sto1 ADC MIXL ADC2 Switch' off"
|
||||
cset "name='Sto1 ADC MIXR ADC2 Switch' off"
|
||||
cset "name='RECMIXL BST1 Switch' off"
|
||||
cset "name='RECMIXR BST1 Switch' off"
|
||||
cset "name='RECMIXL BST2 Switch' off"
|
||||
cset "name='RECMIXR BST2 Switch' off"
|
||||
23
ucm/codecs/rt5672/HeadPhones.conf
Normal file
23
ucm/codecs/rt5672/HeadPhones.conf
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
SectionDevice."Headphones" {
|
||||
Comment "Headphones"
|
||||
|
||||
ConflictingDevice [
|
||||
"Speaker"
|
||||
"MonoSpeaker"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Headphone Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Headphone Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
JackControl "Headphone Jack"
|
||||
}
|
||||
}
|
||||
38
ucm/codecs/rt5672/HeadsetMic.conf
Normal file
38
ucm/codecs/rt5672/HeadsetMic.conf
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
SectionDevice."HeadsetMic" {
|
||||
Comment "Headset Microphone"
|
||||
|
||||
ConflictingDevice [
|
||||
"DigitalMic-DMIC1"
|
||||
"DigitalMic-DMIC2"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Headset Mic Switch' on"
|
||||
cset "name='RECMIXL BST1 Switch' on"
|
||||
cset "name='RECMIXR BST1 Switch' on"
|
||||
cset "name='Sto1 ADC MIXL ADC1 Switch' on"
|
||||
cset "name='Sto1 ADC MIXR ADC1 Switch' on"
|
||||
# For unknown reasons the headset mic sound is only recorded
|
||||
# on the left channel, we tweak the data-stream reception to
|
||||
# use the left samples for both slots, so that we get a stereo
|
||||
# stream with the mic sound on both channels
|
||||
cset "name='codec_in rx deinterleaver codec_in0_1' 1"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Headset Mic Switch' off"
|
||||
cset "name='RECMIXL BST1 Switch' off"
|
||||
cset "name='RECMIXR BST1 Switch' off"
|
||||
cset "name='Sto1 ADC MIXL ADC1 Switch' off"
|
||||
cset "name='Sto1 ADC MIXR ADC1 Switch' off"
|
||||
# Undo data-stream reception mono-mix workaround
|
||||
cset "name='codec_in rx deinterleaver codec_in0_1' 2"
|
||||
]
|
||||
|
||||
Value {
|
||||
CaptureChannels "2"
|
||||
JackControl "Headset Mic Jack"
|
||||
}
|
||||
}
|
||||
26
ucm/codecs/rt5672/MonoSpeaker.conf
Normal file
26
ucm/codecs/rt5672/MonoSpeaker.conf
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
SectionDevice."MonoSpeaker" {
|
||||
Comment "Mono Speaker"
|
||||
|
||||
ConflictingDevice [
|
||||
"Speaker"
|
||||
"Headphones"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Stereo DAC MIXR DAC R1 Switch' off"
|
||||
cset "name='Stereo DAC MIXL DAC R1 Switch' on"
|
||||
cset "name='Ext Spk Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Ext Spk Switch' off"
|
||||
cset "name='Stereo DAC MIXL DAC R1 Switch' off"
|
||||
cset "name='Stereo DAC MIXR DAC R1 Switch' on"
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
}
|
||||
}
|
||||
22
ucm/codecs/rt5672/Speaker.conf
Normal file
22
ucm/codecs/rt5672/Speaker.conf
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
SectionDevice."Speaker" {
|
||||
Comment "Speakers"
|
||||
|
||||
ConflictingDevice [
|
||||
"MonoSpeaker"
|
||||
"Headphones"
|
||||
]
|
||||
|
||||
EnableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Ext Spk Switch' on"
|
||||
]
|
||||
|
||||
DisableSequence [
|
||||
cdev "hw:chtbswrt5672"
|
||||
cset "name='Ext Spk Switch' off"
|
||||
]
|
||||
|
||||
Value {
|
||||
PlaybackChannels "2"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue