From 9a4a7618e9e8dd3fc864feb6173e6d738b2b4cd2 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 24 Dec 2018 16:05:02 +0100 Subject: [PATCH] conf/ucm: bytcr-rt5651: Add support for a headset-mic on IN2 The first design with the headset-mic on IN2 rather then the default / reference-design IN3 has shown up. Add a new ucm/codecs/rt5651/IN2-HeadsetMic.conf snippet to deal with this 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/IN1-InternalMic.conf | 1 + ucm/codecs/rt5651/IN12-InternalMic.conf | 1 + ucm/codecs/rt5651/IN2-HeadsetMic.conf | 33 +++++++++++++++++++++++++ ucm/codecs/rt5651/IN2-InternalMic.conf | 1 + ucm/codecs/rt5651/IN3-HeadsetMic.conf | 3 ++- 6 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 ucm/codecs/rt5651/IN2-HeadsetMic.conf diff --git a/ucm/bytcr-rt5651/HiFi.conf b/ucm/bytcr-rt5651/HiFi.conf index fddd8a3..37bb1d4 100644 --- a/ucm/bytcr-rt5651/HiFi.conf +++ b/ucm/bytcr-rt5651/HiFi.conf @@ -26,4 +26,5 @@ SectionVerb { + diff --git a/ucm/codecs/rt5651/IN1-InternalMic.conf b/ucm/codecs/rt5651/IN1-InternalMic.conf index b2ce17b..5092809 100644 --- a/ucm/codecs/rt5651/IN1-InternalMic.conf +++ b/ucm/codecs/rt5651/IN1-InternalMic.conf @@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN1" { ConflictingDevice [ "InternalMic-IN2" "InternalMic-IN12" + "HeadsetMic-IN2" "HeadsetMic-IN3" ] diff --git a/ucm/codecs/rt5651/IN12-InternalMic.conf b/ucm/codecs/rt5651/IN12-InternalMic.conf index e804191..c917e85 100644 --- a/ucm/codecs/rt5651/IN12-InternalMic.conf +++ b/ucm/codecs/rt5651/IN12-InternalMic.conf @@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN12" { ConflictingDevice [ "InternalMic-IN1" "InternalMic-IN2" + "HeadsetMic-IN2" "HeadsetMic-IN3" ] diff --git a/ucm/codecs/rt5651/IN2-HeadsetMic.conf b/ucm/codecs/rt5651/IN2-HeadsetMic.conf new file mode 100644 index 0000000..b6dc081 --- /dev/null +++ b/ucm/codecs/rt5651/IN2-HeadsetMic.conf @@ -0,0 +1,33 @@ +SectionDevice."HeadsetMic-IN2" { + Comment "Headset Microphone on IN2" + + ConflictingDevice [ + "InternalMic-IN1" + "InternalMic-IN2" + "InternalMic-IN12" + "HeadsetMic-IN3" + ] + + EnableSequence [ + cdev "hw:bytcrrt5651" + cset "name='Headset Mic Switch' on" + cset "name='RECMIXL BST2 Switch' on" + cset "name='RECMIXR BST2 Switch' on" + cset "name='Stereo1 ADC MIXL ADC1 Switch' on" + cset "name='Stereo1 ADC MIXR ADC1 Switch' on" + ] + + DisableSequence [ + cdev "hw:bytcrrt5651" + cset "name='Stereo1 ADC MIXL ADC1 Switch' off" + cset "name='Stereo1 ADC MIXR ADC1 Switch' off" + cset "name='Headset Mic Switch' off" + cset "name='RECMIXL BST2 Switch' off" + cset "name='RECMIXR BST2 Switch' off" + ] + + Value { + CaptureChannels "2" + JackControl "Headset Mic Jack" + } +} diff --git a/ucm/codecs/rt5651/IN2-InternalMic.conf b/ucm/codecs/rt5651/IN2-InternalMic.conf index 048fcc9..bbb713c 100644 --- a/ucm/codecs/rt5651/IN2-InternalMic.conf +++ b/ucm/codecs/rt5651/IN2-InternalMic.conf @@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN2" { ConflictingDevice [ "InternalMic-IN1" "InternalMic-IN12" + "HeadsetMic-IN2" "HeadsetMic-IN3" ] diff --git a/ucm/codecs/rt5651/IN3-HeadsetMic.conf b/ucm/codecs/rt5651/IN3-HeadsetMic.conf index 712d14b..48f3e46 100644 --- a/ucm/codecs/rt5651/IN3-HeadsetMic.conf +++ b/ucm/codecs/rt5651/IN3-HeadsetMic.conf @@ -1,10 +1,11 @@ SectionDevice."HeadsetMic-IN3" { - Comment "Headset Microphone" + Comment "Headset Microphone on IN3" ConflictingDevice [ "InternalMic-IN1" "InternalMic-IN2" "InternalMic-IN12" + "HeadsetMic-IN2" ] EnableSequence [ -- 2.47.1