From: Russell Parker Date: Sun, 6 Jan 2019 03:47:15 +0000 (-0800) Subject: Create device component for rt5645 Internal Analog Mic UCM X-Git-Tag: v1.1.8~4 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=b4c0a51505520edc86edd74bafd3e6397e3325e0;p=alsa-lib.git Create device component for rt5645 Internal Analog Mic UCM 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 Signed-off-by: Jaroslav Kysela --- 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 f66d09a4..43cb4d63 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" - ] -} - + SectionDevice."HSMic".0 { Comment "Headset Microphone" diff --git a/src/conf/ucm/chtrt5645/HiFi.conf b/src/conf/ucm/chtrt5645/HiFi.conf index 7250822d..53300f62 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" - ] -} + SectionDevice."HSMic".0 { Comment "Headset Microphone" diff --git a/src/conf/ucm/codecs/rt5645/AnalogMic.conf b/src/conf/ucm/codecs/rt5645/AnalogMic.conf new file mode 100644 index 00000000..cbcefa7a --- /dev/null +++ b/src/conf/ucm/codecs/rt5645/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/Makefile.am b/src/conf/ucm/codecs/rt5645/Makefile.am index 61c483b4..203e989e 100644 --- a/src/conf/ucm/codecs/rt5645/Makefile.am +++ b/src/conf/ucm/codecs/rt5645/Makefile.am @@ -3,5 +3,5 @@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5645 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)