From 4efc5de07abec7ac071239bcc99505e3eabf9e27 Mon Sep 17 00:00:00 2001 From: Russell Parker Date: Sat, 5 Jan 2019 19:47:15 -0800 Subject: [PATCH] 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 --- .../HiFi.conf | 44 +------------------ ucm/chtrt5645/HiFi.conf | 43 +----------------- ucm/codecs/rt5645/AnalogMic.conf | 41 +++++++++++++++++ 3 files changed, 43 insertions(+), 85 deletions(-) create mode 100644 ucm/codecs/rt5645/AnalogMic.conf diff --git a/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf b/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf index f66d09a..43cb4d6 100644 --- a/ucm/chtrt5645-mono-speaker-analog-mic/HiFi.conf +++ b/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/ucm/chtrt5645/HiFi.conf b/ucm/chtrt5645/HiFi.conf index 7250822..53300f6 100644 --- a/ucm/chtrt5645/HiFi.conf +++ b/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/ucm/codecs/rt5645/AnalogMic.conf b/ucm/codecs/rt5645/AnalogMic.conf new file mode 100644 index 0000000..cbcefa7 --- /dev/null +++ b/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" + ] +} -- 2.47.1