From ac913dc4b235f9581cf7423041a903c19e255dd6 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 24 Dec 2018 16:05:03 +0100 Subject: [PATCH] conf/ucm: bytcr-rt5651: Add digital mic support Add a new ucm/codecs/rt5651/DigitalMic.conf snippet for digital mic support and include this in the default non board-specific bytcr-rt5651.conf. Signed-off-by: Hans de Goede Signed-off-by: Takashi Iwai --- ucm/bytcr-rt5651/HiFi.conf | 1 + ucm/codecs/rt5651/DigitalMic.conf | 29 +++++++++++++++++++++++++ ucm/codecs/rt5651/EnableSeq.conf | 2 ++ ucm/codecs/rt5651/IN1-InternalMic.conf | 1 + ucm/codecs/rt5651/IN12-InternalMic.conf | 1 + ucm/codecs/rt5651/IN2-HeadsetMic.conf | 1 + ucm/codecs/rt5651/IN2-InternalMic.conf | 1 + ucm/codecs/rt5651/IN3-HeadsetMic.conf | 1 + 8 files changed, 37 insertions(+) create mode 100644 ucm/codecs/rt5651/DigitalMic.conf diff --git a/ucm/bytcr-rt5651/HiFi.conf b/ucm/bytcr-rt5651/HiFi.conf index 37bb1d4..8fcc5a8 100644 --- a/ucm/bytcr-rt5651/HiFi.conf +++ b/ucm/bytcr-rt5651/HiFi.conf @@ -23,6 +23,7 @@ SectionVerb { + diff --git a/ucm/codecs/rt5651/DigitalMic.conf b/ucm/codecs/rt5651/DigitalMic.conf new file mode 100644 index 0000000..63ffa9d --- /dev/null +++ b/ucm/codecs/rt5651/DigitalMic.conf @@ -0,0 +1,29 @@ +SectionDevice."DigitalMic" { + Comment "Internal Digital Microphone" + + ConflictingDevice [ + "InternalMic-IN1" + "InternalMic-IN2" + "InternalMic-IN12" + "HeadsetMic-IN2" + "HeadsetMic-IN3" + ] + + EnableSequence [ + cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC2 Switch' on" + cset "name='Stereo1 ADC MIXR ADC2 Switch' on" + cset "name='Internal Mic Switch' on" + ] + + DisableSequence [ + cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC2 Switch' off" + cset "name='Stereo1 ADC MIXR ADC2 Switch' off" + cset "name='Internal Mic Switch' off" + ] + + Value { + CaptureChannels 2 + } +} diff --git a/ucm/codecs/rt5651/EnableSeq.conf b/ucm/codecs/rt5651/EnableSeq.conf index db2fd32..9c1386f 100644 --- a/ucm/codecs/rt5651/EnableSeq.conf +++ b/ucm/codecs/rt5651/EnableSeq.conf @@ -43,6 +43,8 @@ cset "name='IN3 Boost' 1" # input cset "name='Stereo1 ADC L1 Mux' ADC" cset "name='Stereo1 ADC R1 Mux' ADC" +cset "name='Stereo1 ADC L2 Mux' DMIC" +cset "name='Stereo1 ADC R2 Mux' DMIC" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off" cset "name='RECMIXL BST3 Switch' off" diff --git a/ucm/codecs/rt5651/IN1-InternalMic.conf b/ucm/codecs/rt5651/IN1-InternalMic.conf index 5092809..12ab5cb 100644 --- a/ucm/codecs/rt5651/IN1-InternalMic.conf +++ b/ucm/codecs/rt5651/IN1-InternalMic.conf @@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN1" { Comment "Internal Microphone on IN1" ConflictingDevice [ + "DigitalMic" "InternalMic-IN2" "InternalMic-IN12" "HeadsetMic-IN2" diff --git a/ucm/codecs/rt5651/IN12-InternalMic.conf b/ucm/codecs/rt5651/IN12-InternalMic.conf index c917e85..c4290b7 100644 --- a/ucm/codecs/rt5651/IN12-InternalMic.conf +++ b/ucm/codecs/rt5651/IN12-InternalMic.conf @@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN12" { Comment "Internal Microphones on IN1 and IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "HeadsetMic-IN2" diff --git a/ucm/codecs/rt5651/IN2-HeadsetMic.conf b/ucm/codecs/rt5651/IN2-HeadsetMic.conf index b6dc081..8759c27 100644 --- a/ucm/codecs/rt5651/IN2-HeadsetMic.conf +++ b/ucm/codecs/rt5651/IN2-HeadsetMic.conf @@ -2,6 +2,7 @@ SectionDevice."HeadsetMic-IN2" { Comment "Headset Microphone on IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "InternalMic-IN12" diff --git a/ucm/codecs/rt5651/IN2-InternalMic.conf b/ucm/codecs/rt5651/IN2-InternalMic.conf index bbb713c..c9c11c2 100644 --- a/ucm/codecs/rt5651/IN2-InternalMic.conf +++ b/ucm/codecs/rt5651/IN2-InternalMic.conf @@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN2" { Comment "Internal Microphone on IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN12" "HeadsetMic-IN2" diff --git a/ucm/codecs/rt5651/IN3-HeadsetMic.conf b/ucm/codecs/rt5651/IN3-HeadsetMic.conf index 48f3e46..66af6b9 100644 --- a/ucm/codecs/rt5651/IN3-HeadsetMic.conf +++ b/ucm/codecs/rt5651/IN3-HeadsetMic.conf @@ -2,6 +2,7 @@ SectionDevice."HeadsetMic-IN3" { Comment "Headset Microphone on IN3" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "InternalMic-IN12" -- 2.47.1