[alsa-devel] [PATCH ucm/conf: 0/5] Factor out rt5645 + rt5650 shared UCM sequences
Hi,
When I submitted a patch to create a UCM config for chtrt5650 it was suggested that I also factor out command sequences that it shares with chtrt5645. The following patchset introduces a new component directory codecs/rt5645-common/ and refactors UCM profiles in:
- chtrt5645 - chtrt5645-mono-speaker-analog-mic - chtrt5650 - ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN - LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216
I compiled and tested playback with the rt5650 configs but I don't have the devices to test the other configurations. Suggestions and feedback are welcome, I'm not very familiar with UCM configuration so there may definitely be better approaches for some of these changes.
- Russell
From: Russell Parker russell.parker7@gmail.com
The Lenovo Ideapad Miix 320, Asus T100HA, and chtrt5645 mono variant UCM configurations have not been updated to make use of the shared bytcr/PlatfromEnableSeq.conf sequence. This commit deletes those command sequences and loads the shared component directly.
Signed-off-by: Russell Parker russell.parker7@gmail.com
diff --git a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf index 78bf9823..61848358 100644 --- a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf +++ b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf @@ -11,121 +11,7 @@ SectionVerb { EnableSequence [ cdev "hw:chtrt5645"
- # media mixer settings - # compress - cset "name='media0_in Gain 0 Switch' on" - cset "name='media0_in Gain 0 Volume' 0" - - # normal - cset "name='media1_in Gain 0 Switch' on" - cset "name='media1_in Gain 0 Volume' 0" - # swm loopback - cset "name='media2_in Gain 0 Switch' off" - cset "name='media2_in Gain 0 Volume' 0%" - # deep buffer - cset "name='media3_in Gain 0 Switch' on" - cset "name='media3_in Gain 0 Volume' 0" - - cset "name='media0_out mix 0 media0_in Switch' on" - cset "name='media0_out mix 0 media1_in Switch' on" - cset "name='media0_out mix 0 media2_in Switch' off" - cset "name='media0_out mix 0 media3_in Switch' on" - - cset "name='media1_out mix 0 media0_in Switch' off" - cset "name='media1_out mix 0 media1_in Switch' off" - cset "name='media1_out mix 0 media2_in Switch' off" - cset "name='media1_out mix 0 media3_in Switch' off" - - cset "name='pcm0_in Gain 0 Switch' on" - cset "name='pcm0_in Gain 0 Volume' 0" - - cset "name='pcm1_in Gain 0 Switch' off" - cset "name='pcm1_in Gain 0 Volume' 0%" - - # codec0_out settings (used if ssp2 is connected to aif1) - cset "name='codec_out0 mix 0 codec_in0 Switch' off" - cset "name='codec_out0 mix 0 codec_in1 Switch' off" - cset "name='codec_out0 mix 0 media_loop1_in Switch' off" - cset "name='codec_out0 mix 0 media_loop2_in Switch' off" - cset "name='codec_out0 mix 0 pcm0_in Switch' on" - cset "name='codec_out0 mix 0 pcm1_in Switch' off" - cset "name='codec_out0 mix 0 sprot_loop_in Switch' off" - cset "name='codec_out0 Gain 0 Switch' on" - cset "name='codec_out0 Gain 0 Volume' 0" - - # modem_out settings (used if ssp0 is connected to aif2) - cset "name='modem_out mix 0 codec_in0 Switch' off" - cset "name='modem_out mix 0 codec_in1 Switch' off" - cset "name='modem_out mix 0 media_loop1_in Switch' off" - cset "name='modem_out mix 0 media_loop2_in Switch' off" - cset "name='modem_out mix 0 pcm0_in Switch' on" - cset "name='modem_out mix 0 pcm1_in Switch' off" - cset "name='modem_out mix 0 sprot_loop_in Switch' off" - cset "name='modem_out Gain 0 Switch' on" - cset "name='modem_out Gain 0 Volume' 0" - - # input settings - # pcm1_out settings - - # input used when SSP2 is connected - cset "name='codec_in0 Gain 0 Switch' on" - cset "name='codec_in0 Gain 0 Volume' 0" - - # input used when SSP0 is connected - cset "name='modem_in Gain 0 Switch' on" - cset "name='modem_in Gain 0 Volume' 0" - - cset "name='pcm1_out mix 0 codec_in0 Switch' on" - cset "name='pcm1_out mix 0 modem_in Switch' on" - cset "name='pcm1_out mix 0 codec_in1 Switch' off" - cset "name='pcm1_out mix 0 media_loop1_in Switch' off" - cset "name='pcm1_out mix 0 media_loop2_in Switch' off" - cset "name='pcm1_out mix 0 pcm0_in Switch' off" - cset "name='pcm1_out mix 0 pcm1_in Switch' off" - cset "name='pcm1_out mix 0 sprot_loop_in Switch' off" - - cset "name='pcm1_out Gain 0 Switch' on" - cset "name='pcm1_out Gain 0 Volume' 0" - - # disable codec_out1 - cset "name='codec_out1 mix 0 codec_in0 Switch' off" - cset "name='codec_out1 mix 0 codec_in1 Switch' off" - cset "name='codec_out1 mix 0 media_loop1_in Switch' off" - cset "name='codec_out1 mix 0 media_loop2_in Switch' off" - cset "name='codec_out1 mix 0 pcm0_in Switch' off" - cset "name='codec_out1 mix 0 pcm1_in Switch' off" - cset "name='codec_out1 mix 0 sprot_loop_in Switch' off" - cset "name='codec_out1 Gain 0 Switch' off" - cset "name='codec_out1 Gain 0 Volume' 0%" - - # disable codec_in1 - cset "name='codec_in1 Gain 0 Switch' off" - cset "name='codec_in1 Gain 0 Volume' 0%" - - # disable all loops - cset "name='media_loop1_out mix 0 codec_in0 Switch' off" - cset "name='media_loop1_out mix 0 codec_in1 Switch' off" - cset "name='media_loop1_out mix 0 media_loop1_in Switch' off" - cset "name='media_loop1_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop1_out mix 0 pcm0_in Switch' off" - cset "name='media_loop1_out mix 0 pcm1_in Switch' off" - cset "name='media_loop1_out mix 0 sprot_loop_in Switch' off" - - cset "name='media_loop2_out mix 0 codec_in0 Switch' off" - cset "name='media_loop2_out mix 0 codec_in1 Switch' off" - cset "name='media_loop2_out mix 0 media_loop1_in Switch' off" - cset "name='media_loop2_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop2_out mix 0 pcm0_in Switch' off" - cset "name='media_loop2_out mix 0 pcm1_in Switch' off" - cset "name='media_loop2_out mix 0 sprot_loop_in Switch' off" - - cset "name='sprot_loop_out mix 0 codec_in0 Switch' off" - cset "name='sprot_loop_out mix 0 codec_in1 Switch' off" - cset "name='sprot_loop_out mix 0 media_loop1_in Switch' off" - cset "name='sprot_loop_out mix 0 media_loop2_in Switch' off" - cset "name='sprot_loop_out mix 0 pcm0_in Switch' off" - cset "name='sprot_loop_out mix 0 pcm1_in Switch' off" - cset "name='sprot_loop_out mix 0 sprot_loop_in Switch' off" + <platforms/bytcr/PlatformEnableSeq.conf>
# Output Configuration cset "name='DAC1 L Mux' IF1 DAC" diff --git a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf index 8cc9c7f2..d043f685 100644 --- a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf +++ b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf @@ -11,121 +11,7 @@ SectionVerb { EnableSequence [ cdev "hw:chtrt5645"
- # media mixer settings - # compress - cset "name='media0_in Gain 0 Switch' on" - cset "name='media0_in Gain 0 Volume' 0" - - # normal - cset "name='media1_in Gain 0 Switch' on" - cset "name='media1_in Gain 0 Volume' 0" - # swm loopback - cset "name='media2_in Gain 0 Switch' off" - cset "name='media2_in Gain 0 Volume' 0%" - # deep buffer - cset "name='media3_in Gain 0 Switch' on" - cset "name='media3_in Gain 0 Volume' 0" - - cset "name='media0_out mix 0 media0_in Switch' on" - cset "name='media0_out mix 0 media1_in Switch' on" - cset "name='media0_out mix 0 media2_in Switch' off" - cset "name='media0_out mix 0 media3_in Switch' on" - - cset "name='media1_out mix 0 media0_in Switch' off" - cset "name='media1_out mix 0 media1_in Switch' off" - cset "name='media1_out mix 0 media2_in Switch' off" - cset "name='media1_out mix 0 media3_in Switch' off" - - cset "name='pcm0_in Gain 0 Switch' on" - cset "name='pcm0_in Gain 0 Volume' 0" - - cset "name='pcm1_in Gain 0 Switch' off" - cset "name='pcm1_in Gain 0 Volume' 0%" - - # codec0_out settings (used if ssp2 is connected to aif1) - cset "name='codec_out0 mix 0 codec_in0 Switch' off" - cset "name='codec_out0 mix 0 codec_in1 Switch' off" - cset "name='codec_out0 mix 0 media_loop1_in Switch' off" - cset "name='codec_out0 mix 0 media_loop2_in Switch' off" - cset "name='codec_out0 mix 0 pcm0_in Switch' on" - cset "name='codec_out0 mix 0 pcm1_in Switch' off" - cset "name='codec_out0 mix 0 sprot_loop_in Switch' off" - cset "name='codec_out0 Gain 0 Switch' on" - cset "name='codec_out0 Gain 0 Volume' 0" - - # modem_out settings (used if ssp0 is connected to aif2) - cset "name='modem_out mix 0 codec_in0 Switch' off" - cset "name='modem_out mix 0 codec_in1 Switch' off" - cset "name='modem_out mix 0 media_loop1_in Switch' off" - cset "name='modem_out mix 0 media_loop2_in Switch' off" - cset "name='modem_out mix 0 pcm0_in Switch' on" - cset "name='modem_out mix 0 pcm1_in Switch' off" - cset "name='modem_out mix 0 sprot_loop_in Switch' off" - cset "name='modem_out Gain 0 Switch' on" - cset "name='modem_out Gain 0 Volume' 0" - - # input settings - # pcm1_out settings - - # input used when SSP2 is connected - cset "name='codec_in0 Gain 0 Switch' on" - cset "name='codec_in0 Gain 0 Volume' 0" - - # input used when SSP0 is connected - cset "name='modem_in Gain 0 Switch' on" - cset "name='modem_in Gain 0 Volume' 0" - - cset "name='pcm1_out mix 0 codec_in0 Switch' on" - cset "name='pcm1_out mix 0 modem_in Switch' on" - cset "name='pcm1_out mix 0 codec_in1 Switch' off" - cset "name='pcm1_out mix 0 media_loop1_in Switch' off" - cset "name='pcm1_out mix 0 media_loop2_in Switch' off" - cset "name='pcm1_out mix 0 pcm0_in Switch' off" - cset "name='pcm1_out mix 0 pcm1_in Switch' off" - cset "name='pcm1_out mix 0 sprot_loop_in Switch' off" - - cset "name='pcm1_out Gain 0 Switch' on" - cset "name='pcm1_out Gain 0 Volume' 0" - - # disable codec_out1 - cset "name='codec_out1 mix 0 codec_in0 Switch' off" - cset "name='codec_out1 mix 0 codec_in1 Switch' off" - cset "name='codec_out1 mix 0 media_loop1_in Switch' off" - cset "name='codec_out1 mix 0 media_loop2_in Switch' off" - cset "name='codec_out1 mix 0 pcm0_in Switch' off" - cset "name='codec_out1 mix 0 pcm1_in Switch' off" - cset "name='codec_out1 mix 0 sprot_loop_in Switch' off" - cset "name='codec_out1 Gain 0 Switch' off" - cset "name='codec_out1 Gain 0 Volume' 0%" - - # disable codec_in1 - cset "name='codec_in1 Gain 0 Switch' off" - cset "name='codec_in1 Gain 0 Volume' 0%" - - # disable all loops - cset "name='media_loop1_out mix 0 codec_in0 Switch' off" - cset "name='media_loop1_out mix 0 codec_in1 Switch' off" - cset "name='media_loop1_out mix 0 media_loop1_in Switch' off" - cset "name='media_loop1_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop1_out mix 0 pcm0_in Switch' off" - cset "name='media_loop1_out mix 0 pcm1_in Switch' off" - cset "name='media_loop1_out mix 0 sprot_loop_in Switch' off" - - cset "name='media_loop2_out mix 0 codec_in0 Switch' off" - cset "name='media_loop2_out mix 0 codec_in1 Switch' off" - cset "name='media_loop2_out mix 0 media_loop1_in Switch' off" - cset "name='media_loop2_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop2_out mix 0 pcm0_in Switch' off" - cset "name='media_loop2_out mix 0 pcm1_in Switch' off" - cset "name='media_loop2_out mix 0 sprot_loop_in Switch' off" - - cset "name='sprot_loop_out mix 0 codec_in0 Switch' off" - cset "name='sprot_loop_out mix 0 codec_in1 Switch' off" - cset "name='sprot_loop_out mix 0 media_loop1_in Switch' off" - cset "name='sprot_loop_out mix 0 media_loop2_in Switch' off" - cset "name='sprot_loop_out mix 0 pcm0_in Switch' off" - cset "name='sprot_loop_out mix 0 pcm1_in Switch' off" - cset "name='sprot_loop_out mix 0 sprot_loop_in Switch' off" + <platforms/bytcr/PlatformEnableSeq.conf>
# Output Configuration cset "name='DAC1 L Mux' IF1 DAC" diff --git a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf index 7a0cd51c..c4452a4e 100644 --- a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf +++ b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf @@ -11,121 +11,7 @@ SectionVerb { EnableSequence [ cdev "hw:chtrt5645"
- # media mixer settings - # compress - cset "name='media0_in Gain 0 Switch' on" - cset "name='media0_in Gain 0 Volume' 0" - - # normal - cset "name='media1_in Gain 0 Switch' on" - cset "name='media1_in Gain 0 Volume' 0" - # swm loopback - cset "name='media2_in Gain 0 Switch' off" - cset "name='media2_in Gain 0 Volume' 0%" - # deep buffer - cset "name='media3_in Gain 0 Switch' on" - cset "name='media3_in Gain 0 Volume' 0" - - cset "name='media0_out mix 0 media0_in Switch' on" - cset "name='media0_out mix 0 media1_in Switch' on" - cset "name='media0_out mix 0 media2_in Switch' off" - cset "name='media0_out mix 0 media3_in Switch' on" - - cset "name='media1_out mix 0 media0_in Switch' off" - cset "name='media1_out mix 0 media1_in Switch' off" - cset "name='media1_out mix 0 media2_in Switch' off" - cset "name='media1_out mix 0 media3_in Switch' off" - - cset "name='pcm0_in Gain 0 Switch' on" - cset "name='pcm0_in Gain 0 Volume' 0" - - cset "name='pcm1_in Gain 0 Switch' off" - cset "name='pcm1_in Gain 0 Volume' 0%" - - # codec0_out settings (used if ssp2 is connected to aif1) - cset "name='codec_out0 mix 0 codec_in0 Switch' off" - cset "name='codec_out0 mix 0 codec_in1 Switch' off" - cset "name='codec_out0 mix 0 media_loop1_in Switch' off" - cset "name='codec_out0 mix 0 media_loop2_in Switch' off" - cset "name='codec_out0 mix 0 pcm0_in Switch' on" - cset "name='codec_out0 mix 0 pcm1_in Switch' off" - cset "name='codec_out0 mix 0 sprot_loop_in Switch' off" - cset "name='codec_out0 Gain 0 Switch' on" - cset "name='codec_out0 Gain 0 Volume' 0" - - # modem_out settings (used if ssp0 is connected to aif2) - cset "name='modem_out mix 0 codec_in0 Switch' off" - cset "name='modem_out mix 0 codec_in1 Switch' off" - cset "name='modem_out mix 0 media_loop1_in Switch' off" - cset "name='modem_out mix 0 media_loop2_in Switch' off" - cset "name='modem_out mix 0 pcm0_in Switch' on" - cset "name='modem_out mix 0 pcm1_in Switch' off" - cset "name='modem_out mix 0 sprot_loop_in Switch' off" - cset "name='modem_out Gain 0 Switch' on" - cset "name='modem_out Gain 0 Volume' 0" - - # input settings - # pcm1_out settings - - # input used when SSP2 is connected - cset "name='codec_in0 Gain 0 Switch' on" - cset "name='codec_in0 Gain 0 Volume' 0" - - # input used when SSP0 is connected - cset "name='modem_in Gain 0 Switch' on" - cset "name='modem_in Gain 0 Volume' 0" - - cset "name='pcm1_out mix 0 codec_in0 Switch' on" - cset "name='pcm1_out mix 0 modem_in Switch' on" - cset "name='pcm1_out mix 0 codec_in1 Switch' off" - cset "name='pcm1_out mix 0 media_loop1_in Switch' off" - cset "name='pcm1_out mix 0 media_loop2_in Switch' off" - cset "name='pcm1_out mix 0 pcm0_in Switch' off" - cset "name='pcm1_out mix 0 pcm1_in Switch' off" - cset "name='pcm1_out mix 0 sprot_loop_in Switch' off" - - cset "name='pcm1_out Gain 0 Switch' on" - cset "name='pcm1_out Gain 0 Volume' 0" - - # disable codec_out1 - cset "name='codec_out1 mix 0 codec_in0 Switch' off" - cset "name='codec_out1 mix 0 codec_in1 Switch' off" - cset "name='codec_out1 mix 0 media_loop1_in Switch' off" - cset "name='codec_out1 mix 0 media_loop2_in Switch' off" - cset "name='codec_out1 mix 0 pcm0_in Switch' off" - cset "name='codec_out1 mix 0 pcm1_in Switch' off" - cset "name='codec_out1 mix 0 sprot_loop_in Switch' off" - cset "name='codec_out1 Gain 0 Switch' off" - cset "name='codec_out1 Gain 0 Volume' 0%" - - # disable codec_in1 - cset "name='codec_in1 Gain 0 Switch' off" - cset "name='codec_in1 Gain 0 Volume' 0%" - - # disable all loops - cset "name='media_loop1_out mix 0 codec_in0 Switch' off" - cset "name='media_loop1_out mix 0 codec_in1 Switch' off" - cset "name='media_loop1_out mix 0 media_loop1_in Switch' off" - cset "name='media_loop1_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop1_out mix 0 pcm0_in Switch' off" - cset "name='media_loop1_out mix 0 pcm1_in Switch' off" - cset "name='media_loop1_out mix 0 sprot_loop_in Switch' off" - - cset "name='media_loop2_out mix 0 codec_in0 Switch' off" - cset "name='media_loop2_out mix 0 codec_in1 Switch' off" - cset "name='media_loop2_out mix 0 media_loop1_in Switch' off" - cset "name='media_loop2_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop2_out mix 0 pcm0_in Switch' off" - cset "name='media_loop2_out mix 0 pcm1_in Switch' off" - cset "name='media_loop2_out mix 0 sprot_loop_in Switch' off" - - cset "name='sprot_loop_out mix 0 codec_in0 Switch' off" - cset "name='sprot_loop_out mix 0 codec_in1 Switch' off" - cset "name='sprot_loop_out mix 0 media_loop1_in Switch' off" - cset "name='sprot_loop_out mix 0 media_loop2_in Switch' off" - cset "name='sprot_loop_out mix 0 pcm0_in Switch' off" - cset "name='sprot_loop_out mix 0 pcm1_in Switch' off" - cset "name='sprot_loop_out mix 0 sprot_loop_in Switch' off" + <platforms/bytcr/PlatformEnableSeq.conf>
# Output Configuration cset "name='DAC1 L Mux' IF1 DAC" diff --git a/src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf b/src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf index b5ee2b41..6f5e899c 100644 --- a/src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf +++ b/src/conf/ucm/platforms/bytcr/PlatformEnableSeq.conf @@ -29,7 +29,7 @@ cset "name='pcm0_in Gain 0 Volume' 0" cset "name='pcm1_in Gain 0 Switch' off" cset "name='pcm1_in Gain 0 Volume' 0%"
-# codec0_out settings (used if SSP2 is connected) +# codec0_out settings (used if SSP2 is connected to aif1) cset "name='codec_out0 mix 0 codec_in0 Switch' off" cset "name='codec_out0 mix 0 codec_in1 Switch' off" cset "name='codec_out0 mix 0 media_loop1_in Switch' off" @@ -40,7 +40,7 @@ cset "name='codec_out0 mix 0 sprot_loop_in Switch' off" cset "name='codec_out0 Gain 0 Switch' on" cset "name='codec_out0 Gain 0 Volume' 0"
-# modem_out settings (used if SSP0 is connected) +# modem_out settings (used if SSP0 is connected to aif2) cset "name='modem_out mix 0 codec_in0 Switch' off" cset "name='modem_out mix 0 codec_in1 Switch' off" cset "name='modem_out mix 0 media_loop1_in Switch' off"
From: Russell Parker russell.parker7@gmail.com
Factor out the common enable and disable sequences used in rt5645 variants, including the rt5650. Move the sequences into a new compoent directory codecs/rt5645-common/ along with a Makefile.
Some lines like cset "name='Stereo1 ADC1 Mux' 1" and cset "name='I2S2 Func Switch' on" are not set set in the chtrt5650 UCM sequences and thus are not present in the new component, in order to maximize reuse.
Signed-off-by: Russell Parker russell.parker7@gmail.com
diff --git a/configure.ac b/configure.ac index a0392bfe..307e7fc7 100644 --- a/configure.ac +++ b/configure.ac @@ -761,6 +761,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ src/conf/ucm/codecs/Makefile \ src/conf/ucm/codecs/nau8824/Makefile \ src/conf/ucm/codecs/rt5640/Makefile \ + src/conf/ucm/codecs/rt5645-common/Makefile \ src/conf/ucm/codecs/rt5651/Makefile \ src/conf/ucm/platforms/Makefile \ src/conf/ucm/platforms/bytcr/Makefile \ diff --git a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf index 61848358..46508766 100644 --- a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf +++ b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf @@ -12,53 +12,9 @@ SectionVerb { cdev "hw:chtrt5645"
<platforms/bytcr/PlatformEnableSeq.conf> + <codecs/rt5645-common/EnableSeq.conf>
- # Output Configuration - cset "name='DAC1 L Mux' IF1 DAC" - cset "name='DAC1 R Mux' IF1 DAC" - cset "name='DAC1 MIXL DAC1 Switch' 1" - cset "name='DAC1 MIXR DAC1 Switch' 1" - cset "name='Stereo DAC MIXL DAC L1 Switch' 1" - cset "name='Stereo DAC MIXR DAC R1 Switch' 1" - - cset "name='DAC L2 Mux' IF2 DAC" - cset "name='DAC R2 Mux' IF2 DAC" - cset "name='Mono DAC MIXL DAC L2 Switch' on" - cset "name='Mono DAC MIXR DAC R2 Switch' on" - cset "name='DAC2 Playback Switch' on" - - cset "name='HPOVOL MIXL DAC1 Switch' on" - cset "name='HPOVOL MIXR DAC1 Switch' on" - cset "name='HPOVOL MIXL DAC2 Switch' on" - cset "name='HPOVOL MIXR DAC2 Switch' on" - cset "name='HPO MIX HPVOL Switch' on" - cset "name='HPOVOL L Switch' on" - cset "name='HPOVOL R Switch' on" - - cset "name='SPK MIXL DAC L1 Switch' on" - cset "name='SPK MIXR DAC R1 Switch' on" - cset "name='SPK MIXL DAC L2 Switch' on" - cset "name='SPK MIXR DAC R2 Switch' on" - cset "name='SPOL MIX SPKVOL L Switch' on" - cset "name='SPOR MIX SPKVOL R Switch' on" - cset "name='SPKVOL L Switch' on" - cset "name='SPKVOL R Switch' on" - - # Input Configuration - cset "name='Stereo1 DMIC Mux' 0" cset "name='Stereo1 ADC1 Mux' 1" - cset "name='Stereo1 ADC2 Mux' 1" - cset "name='ADC Capture Switch' on" - # 55/63 - cset "name='ADC Capture Volume' 55" - # set ADC Boost to 0/3, higher vals cause a lot of white noise - cset "name='ADC Boost Capture Volume' 0" - # 55/63 - cset "name='Mono ADC Capture Volume' 55" - # 0/3 - cset "name='Mono ADC Boost Capture Volume' 0" - # 27/31 - cset "name='IN Capture Volume' 27" cset "name='I2S2 Func Switch' on" # 3/12 the headphone mic tends to be quite loud cset "name='IN1 Boost' 3" @@ -69,21 +25,7 @@ SectionVerb { DisableSequence [ cdev "hw:chtrt5645"
- # Disable audio output path - cset "name='codec_out1 mix 0 pcm0_in Switch' off" - cset "name='media0_out mix 0 media1_in Switch' off" - - cset "name='media1_in Gain 0 Switch' off" - cset "name='pcm0_in Gain 0 Switch' off" - cset "name='codec_out1 Gain 0 Switch' off" - - # Disable audio input path - cset "name='pcm1_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop2_out mix 0 codec_in0 Switch' off" - - cset "name='media_loop2_out Gain 0 Switch' off" - cset "name='pcm1_out Gain 0 Switch' off" - cset "name='codec_in0 Gain 0 Switch' off" + <codecs/rt5645-common/DisableSeq.conf> ] }
diff --git a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf index d043f685..c16cceac 100644 --- a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf +++ b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf @@ -12,53 +12,9 @@ SectionVerb { cdev "hw:chtrt5645"
<platforms/bytcr/PlatformEnableSeq.conf> + <codecs/rt5645-common/EnableSeq.conf>
- # Output Configuration - cset "name='DAC1 L Mux' IF1 DAC" - cset "name='DAC1 R Mux' IF1 DAC" - cset "name='DAC1 MIXL DAC1 Switch' 1" - cset "name='DAC1 MIXR DAC1 Switch' 1" - cset "name='Stereo DAC MIXL DAC L1 Switch' 1" - cset "name='Stereo DAC MIXR DAC R1 Switch' 1" - - cset "name='DAC L2 Mux' IF2 DAC" - cset "name='DAC R2 Mux' IF2 DAC" - cset "name='Mono DAC MIXL DAC L2 Switch' on" - cset "name='Mono DAC MIXR DAC R2 Switch' on" - cset "name='DAC2 Playback Switch' on" - - cset "name='HPOVOL MIXL DAC1 Switch' on" - cset "name='HPOVOL MIXR DAC1 Switch' on" - cset "name='HPOVOL MIXL DAC2 Switch' on" - cset "name='HPOVOL MIXR DAC2 Switch' on" - cset "name='HPO MIX HPVOL Switch' on" - cset "name='HPOVOL L Switch' on" - cset "name='HPOVOL R Switch' on" - - cset "name='SPK MIXL DAC L1 Switch' on" - cset "name='SPK MIXR DAC R1 Switch' on" - cset "name='SPK MIXL DAC L2 Switch' on" - cset "name='SPK MIXR DAC R2 Switch' on" - cset "name='SPOL MIX SPKVOL L Switch' on" - cset "name='SPOR MIX SPKVOL R Switch' on" - cset "name='SPKVOL L Switch' on" - cset "name='SPKVOL R Switch' on" - - # Input Configuration - cset "name='Stereo1 DMIC Mux' 0" cset "name='Stereo1 ADC1 Mux' 1" - cset "name='Stereo1 ADC2 Mux' 1" - cset "name='ADC Capture Switch' on" - # 55/63 - cset "name='ADC Capture Volume' 55" - # set ADC Boost to 0/3, higher vals cause a lot of white noise - cset "name='ADC Boost Capture Volume' 0" - # 55/63 - cset "name='Mono ADC Capture Volume' 55" - # 0/3 - cset "name='Mono ADC Boost Capture Volume' 0" - # 27/31 - cset "name='IN Capture Volume' 27" cset "name='I2S2 Func Switch' on" # 3/12 the headphone mic tends to be quite loud cset "name='IN1 Boost' 3" @@ -69,21 +25,7 @@ SectionVerb { DisableSequence [ cdev "hw:chtrt5645"
- # Disable audio output path - cset "name='codec_out1 mix 0 pcm0_in Switch' off" - cset "name='media0_out mix 0 media1_in Switch' off" - - cset "name='media1_in Gain 0 Switch' off" - cset "name='pcm0_in Gain 0 Switch' off" - cset "name='codec_out1 Gain 0 Switch' off" - - # Disable audio input path - cset "name='pcm1_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop2_out mix 0 codec_in0 Switch' off" - - cset "name='media_loop2_out Gain 0 Switch' off" - cset "name='pcm1_out Gain 0 Switch' off" - cset "name='codec_in0 Gain 0 Switch' off" + <codecs/rt5645-common/DisableSeq.conf> ] }
diff --git a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf index c4452a4e..45cc5186 100644 --- a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf +++ b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf @@ -12,53 +12,9 @@ SectionVerb { cdev "hw:chtrt5645"
<platforms/bytcr/PlatformEnableSeq.conf> + <codecs/rt5645-common/EnableSeq.conf>
- # Output Configuration - cset "name='DAC1 L Mux' IF1 DAC" - cset "name='DAC1 R Mux' IF1 DAC" - cset "name='DAC1 MIXL DAC1 Switch' 1" - cset "name='DAC1 MIXR DAC1 Switch' 1" - cset "name='Stereo DAC MIXL DAC L1 Switch' 1" - cset "name='Stereo DAC MIXR DAC R1 Switch' 1" - - cset "name='DAC L2 Mux' IF2 DAC" - cset "name='DAC R2 Mux' IF2 DAC" - cset "name='Mono DAC MIXL DAC L2 Switch' on" - cset "name='Mono DAC MIXR DAC R2 Switch' on" - cset "name='DAC2 Playback Switch' on" - - cset "name='HPOVOL MIXL DAC1 Switch' on" - cset "name='HPOVOL MIXR DAC1 Switch' on" - cset "name='HPOVOL MIXL DAC2 Switch' on" - cset "name='HPOVOL MIXR DAC2 Switch' on" - cset "name='HPO MIX HPVOL Switch' on" - cset "name='HPOVOL L Switch' on" - cset "name='HPOVOL R Switch' on" - - cset "name='SPK MIXL DAC L1 Switch' on" - cset "name='SPK MIXR DAC R1 Switch' on" - cset "name='SPK MIXL DAC L2 Switch' on" - cset "name='SPK MIXR DAC R2 Switch' on" - cset "name='SPOL MIX SPKVOL L Switch' on" - cset "name='SPOR MIX SPKVOL R Switch' on" - cset "name='SPKVOL L Switch' on" - cset "name='SPKVOL R Switch' on" - - # Input Configuration - cset "name='Stereo1 DMIC Mux' 0" cset "name='Stereo1 ADC1 Mux' 1" - cset "name='Stereo1 ADC2 Mux' 1" - cset "name='ADC Capture Switch' on" - # 55/63 - cset "name='ADC Capture Volume' 55" - # set ADC Boost to 0/3, higher vals cause a lot of white noise - cset "name='ADC Boost Capture Volume' 0" - # 55/63 - cset "name='Mono ADC Capture Volume' 55" - # 0/3 - cset "name='Mono ADC Boost Capture Volume' 0" - # 27/31 - cset "name='IN Capture Volume' 27" cset "name='I2S2 Func Switch' on" # 3/12 the headphone mic tends to be quite loud cset "name='IN1 Boost' 3" @@ -69,21 +25,7 @@ SectionVerb { DisableSequence [ cdev "hw:chtrt5645"
- # Disable audio output path - cset "name='codec_out1 mix 0 pcm0_in Switch' off" - cset "name='media0_out mix 0 media1_in Switch' off" - - cset "name='media1_in Gain 0 Switch' off" - cset "name='pcm0_in Gain 0 Switch' off" - cset "name='codec_out1 Gain 0 Switch' off" - - # Disable audio input path - cset "name='pcm1_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop2_out mix 0 codec_in0 Switch' off" - - cset "name='media_loop2_out Gain 0 Switch' off" - cset "name='pcm1_out Gain 0 Switch' off" - cset "name='codec_in0 Gain 0 Switch' off" + <codecs/rt5645-common/DisableSeq.conf> ] }
diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf index 422f3b7e..bc4801d8 100644 --- a/src/conf/ucm/chtrt5645/HiFi.conf +++ b/src/conf/ucm/chtrt5645/HiFi.conf @@ -1,4 +1,3 @@ - SectionVerb { # ALSA PCM Value { @@ -13,53 +12,9 @@ SectionVerb { cdev "hw:chtrt5645"
<platforms/bytcr/PlatformEnableSeq.conf> + <codecs/rt5645-common/EnableSeq.conf>
- # Output Configuration - cset "name='DAC1 L Mux' IF1 DAC" - cset "name='DAC1 R Mux' IF1 DAC" - cset "name='DAC1 MIXL DAC1 Switch' 1" - cset "name='DAC1 MIXR DAC1 Switch' 1" - cset "name='Stereo DAC MIXL DAC L1 Switch' 1" - cset "name='Stereo DAC MIXR DAC R1 Switch' 1" - - cset "name='DAC L2 Mux' IF2 DAC" - cset "name='DAC R2 Mux' IF2 DAC" - cset "name='Mono DAC MIXL DAC L2 Switch' on" - cset "name='Mono DAC MIXR DAC R2 Switch' on" - cset "name='DAC2 Playback Switch' on" - - cset "name='HPOVOL MIXL DAC1 Switch' on" - cset "name='HPOVOL MIXR DAC1 Switch' on" - cset "name='HPOVOL MIXL DAC2 Switch' on" - cset "name='HPOVOL MIXR DAC2 Switch' on" - cset "name='HPO MIX HPVOL Switch' on" - cset "name='HPOVOL L Switch' on" - cset "name='HPOVOL R Switch' on" - - cset "name='SPK MIXL DAC L1 Switch' on" - cset "name='SPK MIXR DAC R1 Switch' on" - cset "name='SPK MIXL DAC L2 Switch' on" - cset "name='SPK MIXR DAC R2 Switch' on" - cset "name='SPOL MIX SPKVOL L Switch' on" - cset "name='SPOR MIX SPKVOL R Switch' on" - cset "name='SPKVOL L Switch' on" - cset "name='SPKVOL R Switch' on" - - # Input Configuration - cset "name='Stereo1 DMIC Mux' 0" cset "name='Stereo1 ADC1 Mux' 1" - cset "name='Stereo1 ADC2 Mux' 1" - cset "name='ADC Capture Switch' on" - # 55/63 - cset "name='ADC Capture Volume' 55" - # set ADC Boost to 0/3, higher vals cause a lot of white noise - cset "name='ADC Boost Capture Volume' 0" - # 55/63 - cset "name='Mono ADC Capture Volume' 55" - # 0/3 - cset "name='Mono ADC Boost Capture Volume' 0" - # 27/31 - cset "name='IN Capture Volume' 27" cset "name='I2S2 Func Switch' on" # 3/12 the headphone mic tends to be quite loud cset "name='IN1 Boost' 3" @@ -70,21 +25,7 @@ SectionVerb { DisableSequence [ cdev "hw:chtrt5645"
- # Disable audio output path - cset "name='codec_out1 mix 0 pcm0_in Switch' off" - cset "name='media0_out mix 0 media1_in Switch' off" - - cset "name='media1_in Gain 0 Switch' off" - cset "name='pcm0_in Gain 0 Switch' off" - cset "name='codec_out1 Gain 0 Switch' off" - - # Disable audio input path - cset "name='pcm1_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop2_out mix 0 codec_in0 Switch' off" - - cset "name='media_loop2_out Gain 0 Switch' off" - cset "name='pcm1_out Gain 0 Switch' off" - cset "name='codec_in0 Gain 0 Switch' off" + <codecs/rt5645-common/DisableSeq.conf> ] }
diff --git a/src/conf/ucm/chtrt5650/HiFi.conf b/src/conf/ucm/chtrt5650/HiFi.conf index cc3d64bf..7142dece 100644 --- a/src/conf/ucm/chtrt5650/HiFi.conf +++ b/src/conf/ucm/chtrt5650/HiFi.conf @@ -13,73 +13,19 @@ SectionVerb { cdev "hw:chtrt5650"
<platforms/bytcr/PlatformEnableSeq.conf> + <codecs/rt5645-common/EnableSeq.conf>
- # Output Configuration - cset "name='DAC1 L Mux' IF1 DAC" - cset "name='DAC1 R Mux' IF1 DAC" - cset "name='DAC1 MIXL DAC1 Switch' 1" - cset "name='DAC1 MIXR DAC1 Switch' 1" - cset "name='Stereo DAC MIXL DAC L1 Switch' 1" - cset "name='Stereo DAC MIXR DAC R1 Switch' 1" cset "name='Speaker HWEQ' 1,164,237,135,1,165,0,0,1,166,237,135,1,167,0,0,1,192,30,196,1,193,0,0,1,194,30,196,1,195,0,0,1,196,31,180,1,197,0,75,1,198,31,180,1,199,31,180,1,200,0,75,1,201,31,180,0,177,51,224" cset "name='DAC1 Playback Volume' 77,77" - cset "name='Speaker ClassD Playback Volume' 4" - - cset "name='DAC L2 Mux' IF2 DAC" - cset "name='DAC R2 Mux' IF2 DAC" - cset "name='Mono DAC MIXL DAC L2 Switch' on" - cset "name='Mono DAC MIXR DAC R2 Switch' on" - cset "name='DAC2 Playback Switch' on" - - cset "name='HPOVOL MIXL DAC1 Switch' on" - cset "name='HPOVOL MIXR DAC1 Switch' on" - cset "name='HPOVOL MIXL DAC2 Switch' on" - cset "name='HPOVOL MIXR DAC2 Switch' on" - cset "name='HPO MIX HPVOL Switch' on" - cset "name='HPOVOL L Switch' on" - cset "name='HPOVOL R Switch' on" - - cset "name='SPK MIXL DAC L1 Switch' on" - cset "name='SPK MIXR DAC R1 Switch' on" - cset "name='SPK MIXL DAC L2 Switch' on" - cset "name='SPK MIXR DAC R2 Switch' on" - cset "name='SPOL MIX SPKVOL L Switch' on" - cset "name='SPOR MIX SPKVOL R Switch' on" - cset "name='SPKVOL L Switch' on" - cset "name='SPKVOL R Switch' on" - - # Input Configuration - cset "name='Stereo1 DMIC Mux' 0" - cset "name='Stereo1 ADC2 Mux' 1" - cset "name='ADC Capture Switch' on" - cset "name='ADC Capture Volume' 74" - cset "name='ADC Boost Capture Volume' 3" - cset "name='Mono ADC Capture Volume' 74" - cset "name='Mono ADC Boost Capture Volume' 2" - cset "name='IN Capture Volume' 63" - cset "name='RT5650 IF1 ADC Mux' 0" cset "name='I2S2 Func Switch' off" + cset "name='RT5650 IF1 ADC Mux' 0" ]
DisableSequence [ cdev "hw:chtrt5650"
- # Disable audio output path - cset "name='codec_out1 mix 0 pcm0_in Switch' off" - cset "name='media0_out mix 0 media1_in Switch' off" - - cset "name='media1_in Gain 0 Switch' off" - cset "name='pcm0_in Gain 0 Switch' off" - cset "name='codec_out1 Gain 0 Switch' off" - - # Disable audio input path - cset "name='pcm1_out mix 0 media_loop2_in Switch' off" - cset "name='media_loop2_out mix 0 codec_in0 Switch' off" - - cset "name='media_loop2_out Gain 0 Switch' off" - cset "name='pcm1_out Gain 0 Switch' off" - cset "name='codec_in0 Gain 0 Switch' off" + <codecs/rt5645-common/DisableSeq.conf> ] }
diff --git a/src/conf/ucm/codecs/Makefile.am b/src/conf/ucm/codecs/Makefile.am index 2b374acb..ac1a56dc 100644 --- a/src/conf/ucm/codecs/Makefile.am +++ b/src/conf/ucm/codecs/Makefile.am @@ -1,4 +1,5 @@ SUBDIRS=\ rt5640 \ +rt5645-common \ rt5651 \ nau8824 diff --git a/src/conf/ucm/codecs/rt5645-common/DisableSeq.conf b/src/conf/ucm/codecs/rt5645-common/DisableSeq.conf new file mode 100644 index 00000000..5127d1ae --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/DisableSeq.conf @@ -0,0 +1,15 @@ +# Disable audio output path +cset "name='codec_out1 mix 0 pcm0_in Switch' off" +cset "name='media0_out mix 0 media1_in Switch' off" + +cset "name='media1_in Gain 0 Switch' off" +cset "name='pcm0_in Gain 0 Switch' off" +cset "name='codec_out1 Gain 0 Switch' off" + +# Disable audio input path +cset "name='pcm1_out mix 0 media_loop2_in Switch' off" +cset "name='media_loop2_out mix 0 codec_in0 Switch' off" + +cset "name='media_loop2_out Gain 0 Switch' off" +cset "name='pcm1_out Gain 0 Switch' off" +cset "name='codec_in0 Gain 0 Switch' off" diff --git a/src/conf/ucm/codecs/rt5645-common/EnableSeq.conf b/src/conf/ucm/codecs/rt5645-common/EnableSeq.conf new file mode 100644 index 00000000..d3ad4cf9 --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/EnableSeq.conf @@ -0,0 +1,46 @@ +# Output Configuration +cset "name='DAC1 L Mux' IF1 DAC" +cset "name='DAC1 R Mux' IF1 DAC" +cset "name='DAC1 MIXL DAC1 Switch' 1" +cset "name='DAC1 MIXR DAC1 Switch' 1" +cset "name='Stereo DAC MIXL DAC L1 Switch' 1" +cset "name='Stereo DAC MIXR DAC R1 Switch' 1" + +cset "name='DAC L2 Mux' IF2 DAC" +cset "name='DAC R2 Mux' IF2 DAC" +cset "name='Mono DAC MIXL DAC L2 Switch' on" +cset "name='Mono DAC MIXR DAC R2 Switch' on" +cset "name='DAC2 Playback Switch' on" + +cset "name='HPOVOL MIXL DAC1 Switch' on" +cset "name='HPOVOL MIXR DAC1 Switch' on" +cset "name='HPOVOL MIXL DAC2 Switch' on" +cset "name='HPOVOL MIXR DAC2 Switch' on" +cset "name='HPO MIX HPVOL Switch' on" +cset "name='HPOVOL L Switch' on" +cset "name='HPOVOL R Switch' on" + +cset "name='SPK MIXL DAC L1 Switch' on" +cset "name='SPK MIXR DAC R1 Switch' on" +cset "name='SPK MIXL DAC L2 Switch' on" +cset "name='SPK MIXR DAC R2 Switch' on" +cset "name='SPOL MIX SPKVOL L Switch' on" +cset "name='SPOR MIX SPKVOL R Switch' on" +cset "name='SPKVOL L Switch' on" +cset "name='SPKVOL R Switch' on" + +# Input Configuration +cset "name='Stereo1 DMIC Mux' 0" +cset "name='Stereo1 ADC2 Mux' 1" +cset "name='ADC Capture Switch' on" + +# 55/63 +cset "name='ADC Capture Volume' 55" +# set ADC Boost to 0/3, higher vals cause a lot of white noise +cset "name='ADC Boost Capture Volume' 0" +# 55/63 +cset "name='Mono ADC Capture Volume' 55" +# 0/3 +cset "name='Mono ADC Boost Capture Volume' 0" +# 27/31 +cset "name='IN Capture Volume' 27" diff --git a/src/conf/ucm/codecs/rt5645-common/Makefile.am b/src/conf/ucm/codecs/rt5645-common/Makefile.am new file mode 100644 index 00000000..f351fa37 --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/Makefile.am @@ -0,0 +1,4 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +ucmdir = $(alsaconfigdir)/ucm/codecs/rt5645-common +ucm_DATA = DisableSeq.conf EnableSeq.conf +EXTRA_DIST = $(ucm_DATA)
From: Russell Parker russell.parker7@gmail.com
Move common enable sequences for rt5645 variants and rt5650 UCM configuratons into a shared component. The corresponding disable sequences are only two lines each and do not seem worth creating components for.
Signed-off-by: Russell Parker russell.parker7@gmail.com
diff --git a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf index 46508766..9616be27 100644 --- a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf +++ b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf @@ -43,12 +43,7 @@ SectionDevice."Speaker" { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Headphone Switch' off" - cset "name='Headphone Channel Switch' off" - - cset "name='Ext Spk Switch' on" - cset "name='Speaker Channel Switch' on" - cset "name='Speaker Playback Volume' 31" + <codecs/rt5645-common/SpeakerEnableSeq.conf> ]
DisableSequence [ @@ -75,13 +70,7 @@ SectionDevice."Headphones" { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Ext Spk Switch' off" - cset "name='Speaker Channel Switch' off" - - cset "name='Headphone Switch' on" - cset "name='Headphone Channel Switch' on" - # 25/39 higher values cause crackling on some boards - cset "name='Headphone Playback Volume' 25" + <codecs/rt5645-common/HeadphonesEnableSeq.conf> ]
DisableSequence [ diff --git a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf index c16cceac..eda1272a 100644 --- a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf +++ b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf @@ -43,12 +43,7 @@ SectionDevice."Speaker" { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Headphone Switch' off" - cset "name='Headphone Channel Switch' off" - - cset "name='Ext Spk Switch' on" - cset "name='Speaker Channel Switch' on" - cset "name='Speaker Playback Volume' 31" + <codecs/rt5645-common/SpeakerEnableSeq.conf> ]
DisableSequence [ @@ -75,13 +70,7 @@ SectionDevice."Headphones" { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Ext Spk Switch' off" - cset "name='Speaker Channel Switch' off" - - cset "name='Headphone Switch' on" - cset "name='Headphone Channel Switch' on" - # 25/39 higher values cause crackling on some boards - cset "name='Headphone Playback Volume' 25" + <codecs/rt5645-common/HeadphonesEnableSeq.conf> ]
DisableSequence [ diff --git a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf index 45cc5186..0e868e26 100644 --- a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf +++ b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf @@ -47,12 +47,7 @@ SectionDevice."Speaker" { cset "name='Stereo DAC MIXL DAC R1 Switch' 1" cset "name='Stereo DAC MIXR DAC R1 Switch' 0"
- cset "name='Headphone Switch' off" - cset "name='Headphone Channel Switch' off" - - cset "name='Ext Spk Switch' on" - cset "name='Speaker Channel Switch' on" - cset "name='Speaker Playback Volume' 31" + <codecs/rt5645-common/SpeakerEnableSeq.conf> ]
DisableSequence [ @@ -83,13 +78,7 @@ SectionDevice."Headphones" { cset "name='Stereo DAC MIXL DAC R1 Switch' 0" cset "name='Stereo DAC MIXR DAC R1 Switch' 1"
- cset "name='Ext Spk Switch' off" - cset "name='Speaker Channel Switch' off" - - cset "name='Headphone Switch' on" - cset "name='Headphone Channel Switch' on" - # 25/39 higher values cause crackling on some boards - cset "name='Headphone Playback Volume' 25" + <codecs/rt5645-common/HeadphonesEnableSeq.conf> ]
DisableSequence [ diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf index bc4801d8..1bb9830d 100644 --- a/src/conf/ucm/chtrt5645/HiFi.conf +++ b/src/conf/ucm/chtrt5645/HiFi.conf @@ -43,12 +43,7 @@ SectionDevice."Speaker" { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Headphone Switch' off" - cset "name='Headphone Channel Switch' off" - - cset "name='Ext Spk Switch' on" - cset "name='Speaker Channel Switch' on" - cset "name='Speaker Playback Volume' 31" + <codecs/rt5645-common/SpeakerEnableSeq.conf> ]
DisableSequence [ @@ -75,13 +70,7 @@ SectionDevice."Headphones" { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Ext Spk Switch' off" - cset "name='Speaker Channel Switch' off" - - cset "name='Headphone Switch' on" - cset "name='Headphone Channel Switch' on" - # 25/39 higher values cause crackling on some boards - cset "name='Headphone Playback Volume' 25" + <codecs/rt5645-common/HeadphonesEnableSeq.conf> ]
DisableSequence [ diff --git a/src/conf/ucm/chtrt5650/HiFi.conf b/src/conf/ucm/chtrt5650/HiFi.conf index 7142dece..c8bd397a 100644 --- a/src/conf/ucm/chtrt5650/HiFi.conf +++ b/src/conf/ucm/chtrt5650/HiFi.conf @@ -43,12 +43,7 @@ SectionDevice."Speaker" { EnableSequence [ cdev "hw:chtrt5650"
- cset "name='Headphone Switch' off" - cset "name='Headphone Channel Switch' off" - - cset "name='Ext Spk Switch' on" - cset "name='Speaker Channel Switch' on" - cset "name='Speaker Playback Volume' 31" + <codecs/rt5645-common/SpeakerEnableSeq.conf> ]
DisableSequence [ @@ -75,12 +70,7 @@ SectionDevice."Headphones" { EnableSequence [ cdev "hw:chtrt5650"
- cset "name='Ext Spk Switch' off" - cset "name='Speaker Channel Switch' off" - - cset "name='Headphone Switch' on" - cset "name='Headphone Channel Switch' on" - cset "name='Headphone Playback Volume' 31" + <codecs/rt5645-common/HeadphonesEnableSeq.conf> ]
DisableSequence [ diff --git a/src/conf/ucm/codecs/rt5645-common/HeadphonesEnableSeq.conf b/src/conf/ucm/codecs/rt5645-common/HeadphonesEnableSeq.conf new file mode 100644 index 00000000..6c231da7 --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/HeadphonesEnableSeq.conf @@ -0,0 +1,7 @@ +cset "name='Ext Spk Switch' off" +cset "name='Speaker Channel Switch' off" + +cset "name='Headphone Switch' on" +cset "name='Headphone Channel Switch' on" +# 25/39 higher values cause crackling on some boards +cset "name='Headphone Playback Volume' 25" diff --git a/src/conf/ucm/codecs/rt5645-common/Makefile.am b/src/conf/ucm/codecs/rt5645-common/Makefile.am index f351fa37..7eff2e72 100644 --- a/src/conf/ucm/codecs/rt5645-common/Makefile.am +++ b/src/conf/ucm/codecs/rt5645-common/Makefile.am @@ -1,4 +1,5 @@ alsaconfigdir = @ALSA_CONFIG_DIR@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5645-common -ucm_DATA = DisableSeq.conf EnableSeq.conf +ucm_DATA = DisableSeq.conf EnableSeq.conf HeadphonesEnableSeq.conf \ + SpeakerEnableSeq.conf EXTRA_DIST = $(ucm_DATA) diff --git a/src/conf/ucm/codecs/rt5645-common/SpeakerEnableSeq.conf b/src/conf/ucm/codecs/rt5645-common/SpeakerEnableSeq.conf new file mode 100644 index 00000000..2cc62fc5 --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/SpeakerEnableSeq.conf @@ -0,0 +1,6 @@ +cset "name='Headphone Switch' off" +cset "name='Headphone Channel Switch' off" + +cset "name='Ext Spk Switch' on" +cset "name='Speaker Channel Switch' on" +cset "name='Speaker Playback Volume' 31"
From: Russell Parker russell.parker7@gmail.com
Signed-off-by: Russell Parker russell.parker7@gmail.com
diff --git a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf index 9616be27..e080e383 100644 --- a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf +++ b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf @@ -92,31 +92,18 @@ SectionDevice."DMic".0 { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Int Mic Switch' on" + <codecs/rt5645-common/DigitalMicEnableSeq.conf>
cset "name='Stereo1 DMIC Mux' DMIC1" cset "name='Stereo1 ADC2 Mux' DMIC" cset "name='Mono ADC L2 Mux' DMIC" cset "name='Mono ADC R2 Mux' DMIC" - - cset "name='Sto1 ADC MIXL ADC1 Switch' off" - cset "name='Sto1 ADC MIXR ADC1 Switch' off" - cset "name='Sto1 ADC MIXL ADC2 Switch' on" - cset "name='Sto1 ADC MIXR ADC2 Switch' on" - cset "name='Mono ADC MIXL ADC1 Switch' off" - cset "name='Mono ADC MIXR ADC1 Switch' off" - cset "name='Mono ADC MIXL ADC2 Switch' on" - cset "name='Mono ADC MIXR ADC2 Switch' on" ]
DisableSequence [ cdev "hw:chtrt5645"
- cset "name='Sto1 ADC MIXL ADC2 Switch' off" - cset "name='Sto1 ADC MIXR ADC2 Switch' off" - cset "name='Mono ADC MIXL ADC2 Switch' off" - cset "name='Mono ADC MIXR ADC2 Switch' off" - cset "name='Int Mic Switch' off" + <codecs/rt5645-common/DigitalMicDisableSeq.conf> ] }
@@ -132,10 +119,8 @@ SectionDevice."HSMic".0 { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Headset Mic Switch' on" + <codecs/rt5645-common/HSMicEnableSeq.conf>
- cset "name='Sto1 ADC MIXL ADC1 Switch' on" - cset "name='Sto1 ADC MIXR ADC1 Switch' on" cset "name='Sto1 ADC MIXL ADC2 Switch' off" cset "name='Sto1 ADC MIXR ADC2 Switch' off"
@@ -143,23 +128,14 @@ SectionDevice."HSMic".0 { cset "name='Mono ADC MIXR ADC1 Switch' on" cset "name='Mono ADC MIXL ADC2 Switch' off" cset "name='Mono ADC MIXR ADC2 Switch' off" - - cset "name='RECMIXL BST1 Switch' on" - cset "name='RECMIXR BST1 Switch' on" - ]
DisableSequence [ cdev "hw:chtrt5645"
- cset "name='Headset Mic Switch' off" + <codecs/rt5645-common/HSMicEnableSeq.conf>
- 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" cset "name='Mono ADC MIXL ADC1 Switch' on" cset "name='Mono ADC MIXR ADC1 Switch' on" - ] } diff --git a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf index eda1272a..714f4597 100644 --- a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf +++ b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf @@ -92,7 +92,7 @@ SectionDevice."DMic".0 { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Int Mic Switch' on" + <codecs/rt5645-common/DigitalMicEnableSeq.conf>
cset "name='Stereo1 DMIC Mux' DMIC2" cset "name='Stereo1 ADC2 Mux' DMIC" @@ -100,25 +100,12 @@ SectionDevice."DMic".0 { cset "name='Mono DMIC R Mux' DMIC2" cset "name='Mono ADC L2 Mux' DMIC" cset "name='Mono ADC R2 Mux' DMIC" - - cset "name='Sto1 ADC MIXL ADC1 Switch' off" - cset "name='Sto1 ADC MIXR ADC1 Switch' off" - cset "name='Sto1 ADC MIXL ADC2 Switch' on" - cset "name='Sto1 ADC MIXR ADC2 Switch' on" - cset "name='Mono ADC MIXL ADC1 Switch' off" - cset "name='Mono ADC MIXR ADC1 Switch' off" - cset "name='Mono ADC MIXL ADC2 Switch' on" - cset "name='Mono ADC MIXR ADC2 Switch' on" ]
DisableSequence [ cdev "hw:chtrt5645"
- cset "name='Sto1 ADC MIXL ADC2 Switch' off" - cset "name='Sto1 ADC MIXR ADC2 Switch' off" - cset "name='Mono ADC MIXL ADC2 Switch' off" - cset "name='Mono ADC MIXR ADC2 Switch' off" - cset "name='Int Mic Switch' off" + <codecs/rt5645-common/DigitalMicDisableSeq.conf> ] }
@@ -134,10 +121,8 @@ SectionDevice."HSMic".0 { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Headset Mic Switch' on" + <codecs/rt5645-common/HSMicEnableSeq.conf>
- cset "name='Sto1 ADC MIXL ADC1 Switch' on" - cset "name='Sto1 ADC MIXR ADC1 Switch' on" cset "name='Sto1 ADC MIXL ADC2 Switch' off" cset "name='Sto1 ADC MIXR ADC2 Switch' off"
@@ -145,23 +130,14 @@ SectionDevice."HSMic".0 { cset "name='Mono ADC MIXR ADC1 Switch' on" cset "name='Mono ADC MIXL ADC2 Switch' off" cset "name='Mono ADC MIXR ADC2 Switch' off" - - cset "name='RECMIXL BST1 Switch' on" - cset "name='RECMIXR BST1 Switch' on" - ]
DisableSequence [ cdev "hw:chtrt5645"
- cset "name='Headset Mic Switch' off" + <codecs/rt5645-common/HSMicEnableSeq.conf>
- 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" cset "name='Mono ADC MIXL ADC1 Switch' on" cset "name='Mono ADC MIXR ADC1 Switch' on" - ] } diff --git a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf index 0e868e26..489390d5 100644 --- a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf +++ b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf @@ -145,10 +145,8 @@ SectionDevice."HSMic".0 { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Headset Mic Switch' on" + <codecs/rt5645-common/HSMicEnableSeq.conf>
- cset "name='Sto1 ADC MIXL ADC1 Switch' on" - cset "name='Sto1 ADC MIXR ADC1 Switch' on" cset "name='Sto1 ADC MIXL ADC2 Switch' off" cset "name='Sto1 ADC MIXR ADC2 Switch' off"
@@ -156,23 +154,14 @@ SectionDevice."HSMic".0 { cset "name='Mono ADC MIXR ADC1 Switch' on" cset "name='Mono ADC MIXL ADC2 Switch' off" cset "name='Mono ADC MIXR ADC2 Switch' off" - - cset "name='RECMIXL BST1 Switch' on" - cset "name='RECMIXR BST1 Switch' on" - ]
DisableSequence [ cdev "hw:chtrt5645"
- cset "name='Headset Mic Switch' off" + <codecs/rt5645-common/HSMicDisableSeq.conf>
- 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" cset "name='Mono ADC MIXL ADC1 Switch' on" cset "name='Mono ADC MIXR ADC1 Switch' on" - ] } diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf index 1bb9830d..ac5f60e2 100644 --- a/src/conf/ucm/chtrt5645/HiFi.conf +++ b/src/conf/ucm/chtrt5645/HiFi.conf @@ -136,10 +136,8 @@ SectionDevice."HSMic".0 { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Headset Mic Switch' on" + <codecs/rt5645-common/HSMicEnableSeq.conf>
- cset "name='Sto1 ADC MIXL ADC1 Switch' on" - cset "name='Sto1 ADC MIXR ADC1 Switch' on" cset "name='Sto1 ADC MIXL ADC2 Switch' off" cset "name='Sto1 ADC MIXR ADC2 Switch' off"
@@ -147,23 +145,14 @@ SectionDevice."HSMic".0 { cset "name='Mono ADC MIXR ADC1 Switch' on" cset "name='Mono ADC MIXL ADC2 Switch' off" cset "name='Mono ADC MIXR ADC2 Switch' off" - - cset "name='RECMIXL BST1 Switch' on" - cset "name='RECMIXR BST1 Switch' on" - ]
DisableSequence [ cdev "hw:chtrt5645"
- cset "name='Headset Mic Switch' off" + <codecs/rt5645-common/HSMicDisableSeq.conf>
- 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" cset "name='Mono ADC MIXL ADC1 Switch' on" cset "name='Mono ADC MIXR ADC1 Switch' on" - ] } diff --git a/src/conf/ucm/chtrt5650/HiFi.conf b/src/conf/ucm/chtrt5650/HiFi.conf index c8bd397a..641dbc34 100644 --- a/src/conf/ucm/chtrt5650/HiFi.conf +++ b/src/conf/ucm/chtrt5650/HiFi.conf @@ -118,22 +118,16 @@ SectionDevice."HSMic".0 { EnableSequence [ cdev "hw:chtrt5650"
- 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" + <codecs/rt5645-common/HSMicEnableSeq.conf> + cset "name='IN1 Boost' 1" ]
DisableSequence [ cdev "hw:chtrt5650"
- 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" + <codecs/rt5645-common/HSMicDisableSeq.conf> + cset "name='IN1 Boost' 0" ] } diff --git a/src/conf/ucm/codecs/rt5645-common/DigitalMicDisableSeq.conf b/src/conf/ucm/codecs/rt5645-common/DigitalMicDisableSeq.conf new file mode 100644 index 00000000..751f38c0 --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/DigitalMicDisableSeq.conf @@ -0,0 +1,5 @@ +cset "name='Sto1 ADC MIXL ADC2 Switch' off" +cset "name='Sto1 ADC MIXR ADC2 Switch' off" +cset "name='Mono ADC MIXL ADC2 Switch' off" +cset "name='Mono ADC MIXR ADC2 Switch' off" +cset "name='Int Mic Switch' off" diff --git a/src/conf/ucm/codecs/rt5645-common/DigitalMicEnableSeq.conf b/src/conf/ucm/codecs/rt5645-common/DigitalMicEnableSeq.conf new file mode 100644 index 00000000..cb243b33 --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/DigitalMicEnableSeq.conf @@ -0,0 +1,10 @@ +cset "name='Int Mic Switch' on" + +cset "name='Sto1 ADC MIXL ADC1 Switch' off" +cset "name='Sto1 ADC MIXR ADC1 Switch' off" +cset "name='Sto1 ADC MIXL ADC2 Switch' on" +cset "name='Sto1 ADC MIXR ADC2 Switch' on" +cset "name='Mono ADC MIXL ADC1 Switch' off" +cset "name='Mono ADC MIXR ADC1 Switch' off" +cset "name='Mono ADC MIXL ADC2 Switch' on" +cset "name='Mono ADC MIXR ADC2 Switch' on" diff --git a/src/conf/ucm/codecs/rt5645-common/HSMicDisableSeq.conf b/src/conf/ucm/codecs/rt5645-common/HSMicDisableSeq.conf new file mode 100644 index 00000000..ef42b176 --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/HSMicDisableSeq.conf @@ -0,0 +1,6 @@ +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" diff --git a/src/conf/ucm/codecs/rt5645-common/HSMicEnableSeq.conf b/src/conf/ucm/codecs/rt5645-common/HSMicEnableSeq.conf new file mode 100644 index 00000000..6c26d687 --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/HSMicEnableSeq.conf @@ -0,0 +1,7 @@ +cset "name='Headset Mic Switch' on" + +cset "name='Sto1 ADC MIXL ADC1 Switch' on" +cset "name='Sto1 ADC MIXR ADC1 Switch' on" + +cset "name='RECMIXL BST1 Switch' on" +cset "name='RECMIXR BST1 Switch' on" diff --git a/src/conf/ucm/codecs/rt5645-common/Makefile.am b/src/conf/ucm/codecs/rt5645-common/Makefile.am index 7eff2e72..06403d9b 100644 --- a/src/conf/ucm/codecs/rt5645-common/Makefile.am +++ b/src/conf/ucm/codecs/rt5645-common/Makefile.am @@ -1,5 +1,7 @@ alsaconfigdir = @ALSA_CONFIG_DIR@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5645-common ucm_DATA = DisableSeq.conf EnableSeq.conf HeadphonesEnableSeq.conf \ - SpeakerEnableSeq.conf + SpeakerEnableSeq.conf DigitalMicDisableSeq.conf \ + DigitalMicEnableSeq.conf HSMicDisableSeq.conf \ + HSMicEnableSeq.conf EXTRA_DIST = $(ucm_DATA)
From: Russell Parker russell.parker7@gmail.com
Since the Internal Analog Microphone device configuration is identical for the rt5645 and rt5645 mono speaker UCMs, move the entire definition to a component.
Signed-off-by: Russell Parker russell.parker7@gmail.com
diff --git a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf index 489390d5..8497fa66 100644 --- a/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf +++ b/src/conf/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf @@ -89,49 +89,7 @@ SectionDevice."Headphones" { ] }
-SectionDevice."Mic".0 { - Comment "Internal Analog Microphone" - - Value { - CaptureChannels "2" - CapturePriority "150" - } - - EnableSequence [ - cdev "hw:chtrt5645" - - cset "name='Int Analog Mic Switch' on" - - cset "name='Sto1 ADC MIXL ADC1 Switch' on" - cset "name='Sto1 ADC MIXR ADC1 Switch' on" - cset "name='Sto1 ADC MIXL ADC2 Switch' off" - cset "name='Sto1 ADC MIXR ADC2 Switch' off" - - cset "name='Mono ADC MIXL ADC1 Switch' on" - cset "name='Mono ADC MIXR ADC1 Switch' on" - cset "name='Mono ADC MIXL ADC2 Switch' off" - cset "name='Mono ADC MIXR ADC2 Switch' off" - - cset "name='RECMIXL BST2 Switch' on" - cset "name='RECMIXR BST2 Switch' on" - - ] - - DisableSequence [ - cdev "hw:chtrt5645" - - cset "name='Sto1 ADC MIXL ADC1 Switch' off" - cset "name='Sto1 ADC MIXR ADC1 Switch' off" - cset "name='Mono ADC MIXL ADC1 Switch' off" - cset "name='Mono ADC MIXR ADC1 Switch' off" - - cset "name='RECMIXL BST2 Switch' off" - cset "name='RECMIXR BST2 Switch' off" - - cset "name='Int Analog Mic Switch' off" - ] -} - +<codecs/rt5645-common/AnalogMic.conf>
SectionDevice."HSMic".0 { Comment "Headset Microphone" diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf index ac5f60e2..b98ae66f 100644 --- a/src/conf/ucm/chtrt5645/HiFi.conf +++ b/src/conf/ucm/chtrt5645/HiFi.conf @@ -81,48 +81,7 @@ SectionDevice."Headphones" { ] }
-SectionDevice."Mic".0 { - Comment "Internal Analog Microphone" - - Value { - CaptureChannels "2" - CapturePriority "150" - } - - EnableSequence [ - cdev "hw:chtrt5645" - - cset "name='Int Analog Mic Switch' on" - - cset "name='Sto1 ADC MIXL ADC1 Switch' on" - cset "name='Sto1 ADC MIXR ADC1 Switch' on" - cset "name='Sto1 ADC MIXL ADC2 Switch' off" - cset "name='Sto1 ADC MIXR ADC2 Switch' off" - - cset "name='Mono ADC MIXL ADC1 Switch' on" - cset "name='Mono ADC MIXR ADC1 Switch' on" - cset "name='Mono ADC MIXL ADC2 Switch' off" - cset "name='Mono ADC MIXR ADC2 Switch' off" - - cset "name='RECMIXL BST2 Switch' on" - cset "name='RECMIXR BST2 Switch' on" - - ] - - DisableSequence [ - cdev "hw:chtrt5645" - - cset "name='Sto1 ADC MIXL ADC1 Switch' off" - cset "name='Sto1 ADC MIXR ADC1 Switch' off" - cset "name='Mono ADC MIXL ADC1 Switch' off" - cset "name='Mono ADC MIXR ADC1 Switch' off" - - cset "name='RECMIXL BST2 Switch' off" - cset "name='RECMIXR BST2 Switch' off" - - cset "name='Int Analog Mic Switch' off" - ] -} +<codecs/rt5645-common/AnalogMic.conf>
SectionDevice."HSMic".0 { Comment "Headset Microphone" diff --git a/src/conf/ucm/codecs/rt5645-common/AnalogMic.conf b/src/conf/ucm/codecs/rt5645-common/AnalogMic.conf new file mode 100644 index 00000000..cbcefa7a --- /dev/null +++ b/src/conf/ucm/codecs/rt5645-common/AnalogMic.conf @@ -0,0 +1,41 @@ +SectionDevice."Mic".0 { + Comment "Internal Analog Microphone" + + Value { + CaptureChannels "2" + CapturePriority "150" + } + + EnableSequence [ + cdev "hw:chtrt5645" + + cset "name='Int Analog Mic Switch' on" + + cset "name='Sto1 ADC MIXL ADC1 Switch' on" + cset "name='Sto1 ADC MIXR ADC1 Switch' on" + cset "name='Sto1 ADC MIXL ADC2 Switch' off" + cset "name='Sto1 ADC MIXR ADC2 Switch' off" + + cset "name='Mono ADC MIXL ADC1 Switch' on" + cset "name='Mono ADC MIXR ADC1 Switch' on" + cset "name='Mono ADC MIXL ADC2 Switch' off" + cset "name='Mono ADC MIXR ADC2 Switch' off" + + cset "name='RECMIXL BST2 Switch' on" + cset "name='RECMIXR BST2 Switch' on" + ] + + DisableSequence [ + cdev "hw:chtrt5645" + + cset "name='Sto1 ADC MIXL ADC1 Switch' off" + cset "name='Sto1 ADC MIXR ADC1 Switch' off" + cset "name='Mono ADC MIXL ADC1 Switch' off" + cset "name='Mono ADC MIXR ADC1 Switch' off" + + cset "name='RECMIXL BST2 Switch' off" + cset "name='RECMIXR BST2 Switch' off" + + cset "name='Int Analog Mic Switch' off" + ] +} diff --git a/src/conf/ucm/codecs/rt5645-common/Makefile.am b/src/conf/ucm/codecs/rt5645-common/Makefile.am index 06403d9b..75924b40 100644 --- a/src/conf/ucm/codecs/rt5645-common/Makefile.am +++ b/src/conf/ucm/codecs/rt5645-common/Makefile.am @@ -3,5 +3,5 @@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5645-common ucm_DATA = DisableSeq.conf EnableSeq.conf HeadphonesEnableSeq.conf \ SpeakerEnableSeq.conf DigitalMicDisableSeq.conf \ DigitalMicEnableSeq.conf HSMicDisableSeq.conf \ - HSMicEnableSeq.conf + HSMicEnableSeq.conf AnalogMic.conf EXTRA_DIST = $(ucm_DATA)
Dne 6.1.2019 v 04:47 russell.parker7@gmail.com napsal(a):
Hi,
When I submitted a patch to create a UCM config for chtrt5650 it was suggested that I also factor out command sequences that it shares with chtrt5645. The following patchset introduces a new component directory codecs/rt5645-common/ and refactors UCM profiles in:
- chtrt5645
- chtrt5645-mono-speaker-analog-mic
- chtrt5650
- ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN
- LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216
I compiled and tested playback with the rt5650 configs but I don't have the devices to test the other configurations. Suggestions and feedback are welcome, I'm not very familiar with UCM configuration so there may definitely be better approaches for some of these changes.
Thanks. I applied your changes to the alsa-lib's repo with only one minor modification - I changed rt5645-common directory name to rt5645. I don't see the reason to explicitly say that it's common code. All configs in the codecs/ tree are common, don't they?
Jaroslav
On Mon, Jan 07, 2019 at 11:32:48AM +0100, Jaroslav Kysela wrote:
Dne 6.1.2019 v 04:47 russell.parker7@gmail.com napsal(a):
Hi,
When I submitted a patch to create a UCM config for chtrt5650 it was suggested that I also factor out command sequences that it shares with chtrt5645. The following patchset introduces a new component directory codecs/rt5645-common/ and refactors UCM profiles in:
- chtrt5645
- chtrt5645-mono-speaker-analog-mic
- chtrt5650
- ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN
- LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216
I compiled and tested playback with the rt5650 configs but I don't have the devices to test the other configurations. Suggestions and feedback are welcome, I'm not very familiar with UCM configuration so there may definitely be better approaches for some of these changes.
Thanks. I applied your changes to the alsa-lib's repo with only one minor modification - I changed rt5645-common directory name to rt5645. I don't see the reason to explicitly say that it's common code. All configs in the codecs/ tree are common, don't they?
I went with rt5645-common/ because it's common across multiple codecs -- the rt5650 chips are a lower-cost version of the rt5645 so I reused components from the shared folder for the chtrt5650 conf too. Apparently, the alc3278 may be similar to the rt5650 as Bossart mentioned in the earlier thread "Add UCM config for chtrt5650", so if UCM support is added the same sequences could be potentially used for that too.
Anyway, that was the naming motivation, but I'm not too picky.
Thanks!
- Russell
Jaroslav
-- Jaroslav Kysela perex@perex.cz Linux Sound Maintainer; ALSA Project; Red Hat, Inc.
participants (3)
-
Jaroslav Kysela
-
Russell Parker
-
russell.parker7@gmail.com