[alsa-devel] [PATCH 0/5] conf/ucm: chtrt5645: Various updates
Hi All,
Here is a series of chtrt5645 UCM updates, the first 2 patches bring in some fixes for the generic config from: https://github.com/plbossart/UCM
The 3th patch adds some analog mic input fixes, together these 3 patches bring the generic chtrt5645 config in sync with the newer chtrt5645-mono-speaker-analog-mic config, but then for stereo speakers.
The 4th and the 5th patch add long-name using board/model specific configs for the Asus T100HA and Lenovo Miix 320, these use a digital mic connected to the DMIC1 resp. DMIC2. input.
The generic chtrt5645 config has been tested on a Lenovo Miix 310 and a Kazam Vision tablet, both of which feature stereo speakers and an analog microphone.
The Asus T100HA and Lenovo Miix 320 configs have been tested on the resp. models they apply to.
Regards,
Hans
From: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Apply cleanup and playback fixes changes from: https://github.com/plbossart/UCM.git
Cc: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com [hdegoede@redhat.com: Modify commit msg and paths for merging into alsa-lib] Signed-off-by: Hans de Goede hdegoede@redhat.com --- src/conf/ucm/chtrt5645/HiFi.conf | 157 +++++++++++++++++++++++++------ 1 file changed, 129 insertions(+), 28 deletions(-)
diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf index 0c2c83cc..f63392d4 100644 --- a/src/conf/ucm/chtrt5645/HiFi.conf +++ b/src/conf/ucm/chtrt5645/HiFi.conf @@ -11,51 +11,146 @@ SectionVerb { EnableSequence [ cdev "hw:chtrt5645"
- # Enable audio output path - cset "name='codec_out1 mix 0 pcm0_in Switch' on" - cset "name='media0_out mix 0 media1_in Switch' on" + # media mixer settings + # compress + cset "name='media0_in Gain 0 Switch' on" + cset "name='media0_in Gain 0 Volume' 0"
- cset "name='media1_in Gain 0 Ramp Delay' 50" + # normal cset "name='media1_in Gain 0 Switch' on" - cset "name='media1_in Gain 0 Volume' 80% 80%" + 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 Ramp Delay' 50" cset "name='pcm0_in Gain 0 Switch' on" - cset "name='pcm0_in Gain 0 Volume' 80% 80%" + 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"
- cset "name='codec_out1 Gain 0 Ramp Delay' 50" - cset "name='codec_out1 Gain 0 Switch' on" - cset "name='codec_out1 Gain 0 Volume' 70% 70%" + # input used when SSP0 is connected + cset "name='modem_in Gain 0 Switch' on" + cset "name='modem_in Gain 0 Volume' 0"
- # Enable audio input path - cset "name='pcm1_out mix 0 media_loop2_in Switch' on" - cset "name='media_loop2_out mix 0 codec_in0 Switch' on" + 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='codec_in0 Gain 0 Ramp Delay' 50" - cset "name='codec_in0 Gain 0 Switch' on" - cset "name='codec_in0 Gain 0 Volume' 80% 80%" + cset "name='pcm1_out Gain 0 Switch' on" + cset "name='pcm1_out Gain 0 Volume' 0"
- cset "name='media_loop2_out Gain 0 Ramp Delay' 50" - cset "name='media_loop2_out Gain 0 Switch' on" - cset "name='media_loop2_out Gain 0 Volume' 80% 80%" + # 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%"
- cset "name='pcm1_out Gain 0 Ramp Delay' 50" - cset "name='pcm1_out Gain 0 Switch' on" - cset "name='pcm1_out Gain 0 Volume' 80% 80%" + # 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"
# Output Configuration - cset "name='DAC L2 Mux' 'IF1 DAC'" - cset "name='DAC R2 Mux' 'IF1 DAC'" + 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" @@ -105,15 +200,18 @@ SectionDevice."Speaker" { }
ConflictingDevice [ - "Headphone" + "Headphones" ]
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' 39" + cset "name='Speaker Playback Volume' 31" ]
DisableSequence [ @@ -124,7 +222,7 @@ SectionDevice."Speaker" { ] }
-SectionDevice."Headphone".0 { +SectionDevice."Headphones" { Comment "Headphones"
Value { @@ -140,9 +238,12 @@ SectionDevice."Headphone".0 { 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" - cset "name='Headphone Playback Volume' 39" + cset "name='Headphone Playback Volume' 31" ]
DisableSequence [
From: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Apply microphone recording changes from: https://github.com/plbossart/UCM.git
Cc: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com [hdegoede@redhat.com: Drop non generic DMIC changes] Signed-off-by: Hans de Goede hdegoede@redhat.com --- src/conf/ucm/chtrt5645/HiFi.conf | 50 ++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 9 deletions(-)
diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf index f63392d4..b97a9c00 100644 --- a/src/conf/ucm/chtrt5645/HiFi.conf +++ b/src/conf/ucm/chtrt5645/HiFi.conf @@ -4,8 +4,8 @@ SectionVerb { TQ "HiFi"
# ALSA PCM device for HiFi - PlaybackPCM "hw:chtrt5645,0" - CapturePCM "hw:chtrt5645,0" + PlaybackPCM "hw:chtrt5645" + CapturePCM "hw:chtrt5645" }
EnableSequence [ @@ -255,7 +255,7 @@ SectionDevice."Headphones" { }
SectionDevice."Mic".0 { - Comment "Internal Microphone" + Comment "Internal Analog Microphones"
Value { CaptureChannels "2" @@ -266,15 +266,33 @@ SectionDevice."Mic".0 { cdev "hw:chtrt5645"
cset "name='Int Mic Switch' on" - cset "name='Sto1 ADC MIXL ADC2 Switch' on" - cset "name='Sto1 ADC MIXR ADC2 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 BST1 Switch' on" + cset "name='RECMIXR BST1 Switch' on" + ]
DisableSequence [ cdev "hw:chtrt5645"
- cset "name='Sto1 ADC MIXL ADC2 Switch' off" - cset "name='Sto1 ADC MIXR ADC2 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' off" + cset "name='Mono ADC MIXR ADC1 Switch' off" + + cset "name='RECMIXL BST1 Switch' off" + cset "name='RECMIXR BST1 Switch' off" + cset "name='Int Mic Switch' off" ] } @@ -292,19 +310,33 @@ SectionDevice."HSMic".0 { cdev "hw:chtrt5645"
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" + 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 BST1 Switch' on" + cset "name='RECMIXR BST1 Switch' on" + ]
DisableSequence [ cdev "hw:chtrt5645"
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" + cset "name='Mono ADC MIXL ADC1 Switch' on" + cset "name='Mono ADC MIXR ADC1 Switch' on" + ] }
The internal analog mic switch is called 'Int Analog Mic Switch' (not 'Int Mic Switch') and is connected to BST2 not BST1.
Also change the analog mic volume levels so that we get better audio / less noise.
Signed-off-by: Hans de Goede hdegoede@redhat.com --- src/conf/ucm/chtrt5645/HiFi.conf | 38 ++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 14 deletions(-)
diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf index b97a9c00..e81866cf 100644 --- a/src/conf/ucm/chtrt5645/HiFi.conf +++ b/src/conf/ucm/chtrt5645/HiFi.conf @@ -160,15 +160,24 @@ SectionVerb {
# 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" - cset "name='ADC Capture Volume' 31" - cset "name='ADC Boost Capture Volume' 3" - cset "name='Mono ADC Capture Volume' 63" - cset "name='Mono ADC Boost Capture Volume' 2" - cset "name='IN Capture Volume' 63" + # 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" + # 8/8 the internal analog mic tends to be quite soft + cset "name='IN2 Boost' 8" ]
DisableSequence [ @@ -243,7 +252,8 @@ SectionDevice."Headphones" {
cset "name='Headphone Switch' on" cset "name='Headphone Channel Switch' on" - cset "name='Headphone Playback Volume' 31" + # 25/39 higher values cause crackling on some boards + cset "name='Headphone Playback Volume' 25" ]
DisableSequence [ @@ -255,7 +265,7 @@ SectionDevice."Headphones" { }
SectionDevice."Mic".0 { - Comment "Internal Analog Microphones" + Comment "Internal Analog Microphone"
Value { CaptureChannels "2" @@ -265,7 +275,7 @@ SectionDevice."Mic".0 { EnableSequence [ cdev "hw:chtrt5645"
- cset "name='Int Mic Switch' on" + cset "name='Int Analog Mic Switch' on"
cset "name='Sto1 ADC MIXL ADC1 Switch' on" cset "name='Sto1 ADC MIXR ADC1 Switch' on" @@ -277,8 +287,8 @@ SectionDevice."Mic".0 { 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" + cset "name='RECMIXL BST2 Switch' on" + cset "name='RECMIXR BST2 Switch' on"
]
@@ -290,10 +300,10 @@ SectionDevice."Mic".0 { cset "name='Mono ADC MIXL ADC1 Switch' off" cset "name='Mono ADC MIXR ADC1 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"
- cset "name='Int Mic Switch' off" + cset "name='Int Analog Mic Switch' off" ] }
The Asus T100HA uses a digital mic rather then an analog one, add long-name config specific for the T100HA, which is a copy of the standard chtrt5645 config with the internal analog mic section replaced with one for the digital mic found on the Asus T100HA.
Signed-off-by: Hans de Goede hdegoede@redhat.com --- configure.ac | 1 + ...USTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf | 5 + .../HiFi.conf | 348 ++++++++++++++++++ .../Makefile.am | 4 + src/conf/ucm/Makefile.am | 1 + 5 files changed, 359 insertions(+) create mode 100644 src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf create mode 100644 src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf create mode 100644 src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/Makefile.am
diff --git a/configure.ac b/configure.ac index 5bc1994f..94baf055 100644 --- a/configure.ac +++ b/configure.ac @@ -717,6 +717,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ src/conf/cards/Makefile \ src/conf/pcm/Makefile \ src/conf/ucm/Makefile \ + src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/Makefile \ src/conf/ucm/broadwell-rt286/Makefile \ src/conf/ucm/broxton-rt298/Makefile \ src/conf/ucm/bytcr-rt5651/Makefile \ diff --git a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf new file mode 100644 index 00000000..5afe5f0b --- /dev/null +++ b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf @@ -0,0 +1,5 @@ +Comment "Intel SoC Audio Device" +SectionUseCase."HiFi" { + File "../ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf" + Comment "Default" +} diff --git a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf new file mode 100644 index 00000000..78bf9823 --- /dev/null +++ b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/HiFi.conf @@ -0,0 +1,348 @@ +SectionVerb { + # ALSA PCM + Value { + TQ "HiFi" + + # ALSA PCM device for HiFi + PlaybackPCM "hw:chtrt5645" + CapturePCM "hw:chtrt5645" + } + + 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" + + # 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" + # 8/8 the internal analog mic tends to be quite soft + cset "name='IN2 Boost' 8" + ] + + 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" + ] +} + +SectionDevice."Speaker" { + Comment "Speaker" + + Value { + PlaybackChannels "2" + } + + ConflictingDevice [ + "Headphones" + ] + + 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" + ] + + DisableSequence [ + cdev "hw:chtrt5645" + + cset "name='Ext Spk Switch' off" + cset "name='Speaker Channel Switch' off" + ] +} + +SectionDevice."Headphones" { + Comment "Headphones" + + Value { + PlaybackChannels "2" + JackControl "Headphone Jack" + JackHWMute "Speaker" + } + + ConflictingDevice [ + "Speaker" + ] + + 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" + ] + + DisableSequence [ + cdev "hw:chtrt5645" + + cset "name='Headphone Switch' off" + cset "name='Headphone Channel Switch' off" + ] +} + +SectionDevice."DMic".0 { + Comment "Internal Microphone" + + Value { + CaptureChannels "2" + CapturePriority "150" + } + + EnableSequence [ + cdev "hw:chtrt5645" + + cset "name='Int Mic Switch' on" + + 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" + ] +} + +SectionDevice."HSMic".0 { + Comment "Headset Microphone" + + Value { + CaptureChannels "2" + JackControl "Headset Mic Jack" + JackHWMute "DMic" + } + + EnableSequence [ + cdev "hw:chtrt5645" + + cset "name='Headset 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 BST1 Switch' on" + cset "name='RECMIXR BST1 Switch' on" + + ] + + DisableSequence [ + cdev "hw:chtrt5645" + + 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" + cset "name='Mono ADC MIXL ADC1 Switch' on" + cset "name='Mono ADC MIXR ADC1 Switch' on" + + ] +} diff --git a/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/Makefile.am b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/Makefile.am new file mode 100644 index 00000000..dd8b372a --- /dev/null +++ b/src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/Makefile.am @@ -0,0 +1,4 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +ucmdir = $(alsaconfigdir)/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN +ucm_DATA = ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf HiFi.conf +EXTRA_DIST = $(ucm_DATA) diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am index 3b4f13a8..e496ca89 100644 --- a/src/conf/ucm/Makefile.am +++ b/src/conf/ucm/Makefile.am @@ -1,4 +1,5 @@ SUBDIRS=\ +ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN \ broadwell-rt286 \ broxton-rt298 \ bytcr-rt5651 \
The Lenovo Ideapad Miix 320 uses a digital mic connected to the DMIC2 input (unlike the Asus T100HA which has it connected to the DMIC1 input), add a long-name config specific for the Miix 320, which is a copy of the standard chtrt5645 config with the internal analog mic section replaced with one for a digital mic connected to the DMIC2 input.
Signed-off-by: Hans de Goede hdegoede@redhat.com --- configure.ac | 1 + .../HiFi.conf | 350 ++++++++++++++++++ ...-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf | 5 + .../Makefile.am | 4 + src/conf/ucm/Makefile.am | 1 + 5 files changed, 361 insertions(+) create mode 100644 src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf create mode 100644 src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf create mode 100644 src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/Makefile.am
diff --git a/configure.ac b/configure.ac index 94baf055..3ee989eb 100644 --- a/configure.ac +++ b/configure.ac @@ -729,6 +729,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ src/conf/ucm/gpd-win-pocket-rt5645/Makefile \ src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/Makefile \ src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile \ + src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/Makefile \ src/conf/ucm/PandaBoard/Makefile \ src/conf/ucm/PandaBoardES/Makefile \ src/conf/ucm/PAZ00/Makefile \ diff --git a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf new file mode 100644 index 00000000..8cc9c7f2 --- /dev/null +++ b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf @@ -0,0 +1,350 @@ +SectionVerb { + # ALSA PCM + Value { + TQ "HiFi" + + # ALSA PCM device for HiFi + PlaybackPCM "hw:chtrt5645" + CapturePCM "hw:chtrt5645" + } + + 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" + + # 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" + # 8/8 the internal analog mic tends to be quite soft + cset "name='IN2 Boost' 8" + ] + + 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" + ] +} + +SectionDevice."Speaker" { + Comment "Speaker" + + Value { + PlaybackChannels "2" + } + + ConflictingDevice [ + "Headphones" + ] + + 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" + ] + + DisableSequence [ + cdev "hw:chtrt5645" + + cset "name='Ext Spk Switch' off" + cset "name='Speaker Channel Switch' off" + ] +} + +SectionDevice."Headphones" { + Comment "Headphones" + + Value { + PlaybackChannels "2" + JackControl "Headphone Jack" + JackHWMute "Speaker" + } + + ConflictingDevice [ + "Speaker" + ] + + 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" + ] + + DisableSequence [ + cdev "hw:chtrt5645" + + cset "name='Headphone Switch' off" + cset "name='Headphone Channel Switch' off" + ] +} + +SectionDevice."DMic".0 { + Comment "Internal Microphone" + + Value { + CaptureChannels "2" + CapturePriority "150" + } + + EnableSequence [ + cdev "hw:chtrt5645" + + cset "name='Int Mic Switch' on" + + cset "name='Stereo1 DMIC Mux' DMIC2" + cset "name='Stereo1 ADC2 Mux' DMIC" + cset "name='Mono DMIC L Mux' DMIC2" + 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" + ] +} + +SectionDevice."HSMic".0 { + Comment "Headset Microphone" + + Value { + CaptureChannels "2" + JackControl "Headset Mic Jack" + JackHWMute "DMic" + } + + EnableSequence [ + cdev "hw:chtrt5645" + + cset "name='Headset 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 BST1 Switch' on" + cset "name='RECMIXR BST1 Switch' on" + + ] + + DisableSequence [ + cdev "hw:chtrt5645" + + 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" + 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/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf new file mode 100644 index 00000000..50bda000 --- /dev/null +++ b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf @@ -0,0 +1,5 @@ +Comment "Intel SoC Audio Device" +SectionUseCase."HiFi" { + File "../LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/HiFi.conf" + Comment "Default" +} diff --git a/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/Makefile.am b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/Makefile.am new file mode 100644 index 00000000..18963c21 --- /dev/null +++ b/src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/Makefile.am @@ -0,0 +1,4 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +ucmdir = $(alsaconfigdir)/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216 +ucm_DATA = LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf HiFi.conf +EXTRA_DIST = $(ucm_DATA) diff --git a/src/conf/ucm/Makefile.am b/src/conf/ucm/Makefile.am index e496ca89..02df25f0 100644 --- a/src/conf/ucm/Makefile.am +++ b/src/conf/ucm/Makefile.am @@ -11,6 +11,7 @@ GoogleNyan \ gpd-win-pocket-rt5645 \ HDAudio-Gigabyte-ALC1220DualCodecs \ HDAudio-Lenovo-DualCodecs \ +LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216 \ PandaBoard \ PandaBoardES \ PAZ00 \
On Sat, 28 Apr 2018 21:51:55 +0200, Hans de Goede wrote:
Hi All,
Here is a series of chtrt5645 UCM updates, the first 2 patches bring in some fixes for the generic config from: https://github.com/plbossart/UCM
The 3th patch adds some analog mic input fixes, together these 3 patches bring the generic chtrt5645 config in sync with the newer chtrt5645-mono-speaker-analog-mic config, but then for stereo speakers.
The 4th and the 5th patch add long-name using board/model specific configs for the Asus T100HA and Lenovo Miix 320, these use a digital mic connected to the DMIC1 resp. DMIC2. input.
The generic chtrt5645 config has been tested on a Lenovo Miix 310 and a Kazam Vision tablet, both of which feature stereo speakers and an analog microphone.
The Asus T100HA and Lenovo Miix 320 configs have been tested on the resp. models they apply to.
Applied all 5 patches now. Thanks!
Takashi
participants (2)
-
Hans de Goede
-
Takashi Iwai