conf/ucm: bytcr-rt5651: Enable Stereo? ADC MIXL ADC? switches when enabling inputs
PATCH 1/4 conf/ucm: bytcr-rt5651: Enable Stereo? ADC MIXL ADC? switches when enabling inputs
Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input, rather then just enabling them all in ucm/codecs/rt5651/EnableSeq.conf .
This is a preparation patch for adding digital mic support.
--- src/conf/ucm/codecs/rt5651/EnableSeq.conf | 16 ++++++++-------- src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf | 4 ++++ src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf | 4 ++++ src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf | 4 ++++ src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf | 4 ++++ 5 files changed, 24 insertions(+), 8 deletions(-)
src/conf/ucm/codecs/rt5651/EnableSeq.conf +8 -8
@@ -14,12 +14,14 @@ cset "name='Stereo DAC MIXL DAC L1 Switch' on" cset "name='Stereo DAC MIXL DAC R1 Switch' off" cset "name='Stereo DAC MIXR DAC L1 Switch' off" cset "name='Stereo DAC MIXR DAC R1 Switch' on" -cset "name='Stereo1 ADC MIXR ADC1 Switch' on" -cset "name='Stereo1 ADC MIXR ADC2 Switch' on" -cset "name='Stereo2 ADC MIXL ADC1 Switch' on" -cset "name='Stereo2 ADC MIXL ADC2 Switch' on" -cset "name='Stereo2 ADC MIXR ADC1 Switch' on" -cset "name='Stereo2 ADC MIXR ADC2 Switch' on" +cset "name='Stereo1 ADC MIXL ADC1 Switch' off" +cset "name='Stereo1 ADC MIXR ADC1 Switch' off" +cset "name='Stereo1 ADC MIXL ADC2 Switch' off" +cset "name='Stereo1 ADC MIXR ADC2 Switch' off" +cset "name='Stereo2 ADC MIXL ADC1 Switch' off" +cset "name='Stereo2 ADC MIXR ADC1 Switch' off" +cset "name='Stereo2 ADC MIXL ADC2 Switch' off" +cset "name='Stereo2 ADC MIXR ADC2 Switch' off" cset "name='Headphone Switch' off" cset "name='Speaker Switch' off"
@@ -41,8 +43,6 @@ cset "name='IN3 Boost' 1" # input cset "name='Stereo1 ADC L1 Mux' ADC" cset "name='Stereo1 ADC R1 Mux' ADC" -cset "name='Stereo1 ADC MIXL ADC1 Switch' on" -cset "name='Stereo1 ADC MIXR ADC1 Switch' on" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off" cset "name='RECMIXL BST3 Switch' off"
src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf +4 -0
@@ -12,10 +12,14 @@ SectionDevice."InternalMic-IN1" { cset "name='Internal Mic Switch' on" cset "name='RECMIXL BST1 Switch' on" cset "name='RECMIXR BST1 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='Internal Mic Switch' off" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off"
src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf +4 -0
@@ -14,10 +14,14 @@ SectionDevice."InternalMic-IN12" { cset "name='RECMIXR BST1 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='Internal Mic Switch' off" cset "name='RECMIXL BST1 Switch' off" cset "name='RECMIXR BST1 Switch' off"
src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf +4 -0
@@ -12,10 +12,14 @@ SectionDevice."InternalMic-IN2" { cset "name='Internal 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='Internal Mic Switch' off" cset "name='RECMIXL BST2 Switch' off" cset "name='RECMIXR BST2 Switch' off"
src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf +4 -0
@@ -12,10 +12,14 @@ SectionDevice."HeadsetMic-IN3" { cset "name='Headset Mic Switch' on" cset "name='RECMIXL BST3 Switch' on" cset "name='RECMIXR BST3 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 BST3 Switch' off" cset "name='RECMIXR BST3 Switch' off"
Signature · 1 line
2.20.1
PATCH 2/4 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.
---
src/conf/ucm/bytcr-rt5651/HiFi.conf | 1 +
src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf | 1 +
src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf | 1 +
.../{IN2-InternalMic.conf => IN2-HeadsetMic.conf} | 10 ++++++----
src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf | 1 +
src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf | 3 ++-
src/conf/ucm/codecs/rt5651/Makefile.am | 2 +-
7 files changed, 13 insertions(+), 6 deletions(-)
copy src/conf/ucm/codecs/rt5651/{IN2-InternalMic.conf => IN2-HeadsetMic.conf} (73%)src/conf/ucm/bytcr-rt5651/HiFi.conf +1 -0
@@ -26,4 +26,5 @@ SectionVerb { <codecs/rt5651/IN1-InternalMic.conf> <codecs/rt5651/IN2-InternalMic.conf> <codecs/rt5651/IN12-InternalMic.conf> +<codecs/rt5651/IN2-HeadsetMic.conf> <codecs/rt5651/IN3-HeadsetMic.conf>
src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf +1 -0
@@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN1" { ConflictingDevice [ "InternalMic-IN2" "InternalMic-IN12" + "HeadsetMic-IN2" "HeadsetMic-IN3" ]
src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf +1 -0
@@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN12" { ConflictingDevice [ "InternalMic-IN1" "InternalMic-IN2" + "HeadsetMic-IN2" "HeadsetMic-IN3" ]
src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf renamed from src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf +6 -4
@@ -1,15 +1,16 @@ -SectionDevice."InternalMic-IN2" { - Comment "Internal Microphone on IN2" +SectionDevice."HeadsetMic-IN2" { + Comment "Headset Microphone on IN2" ConflictingDevice [ "InternalMic-IN1" + "InternalMic-IN2" "InternalMic-IN12" "HeadsetMic-IN3" ] EnableSequence [ cdev "hw:bytcrrt5651" - cset "name='Internal Mic Switch' on" + 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"
@@ -20,12 +21,13 @@ SectionDevice."InternalMic-IN2" { cdev "hw:bytcrrt5651" cset "name='Stereo1 ADC MIXL ADC1 Switch' off" cset "name='Stereo1 ADC MIXR ADC1 Switch' off" - cset "name='Internal Mic 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" } }
src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf +1 -0
@@ -4,6 +4,7 @@ SectionDevice."InternalMic-IN2" { ConflictingDevice [ "InternalMic-IN1" "InternalMic-IN12" + "HeadsetMic-IN2" "HeadsetMic-IN3" ]
src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf +2 -1
@@ -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 [
src/conf/ucm/codecs/rt5651/Makefile.am +1 -1
@@ -2,5 +2,5 @@ alsaconfigdir = @ALSA_CONFIG_DIR@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5651 ucm_DATA = EnableSeq.conf HeadPhones.conf HeadPhones-swapped.conf \ IN1-InternalMic.conf IN2-InternalMic.conf IN12-InternalMic.conf \ - IN3-HeadsetMic.conf Speaker.conf MonoSpeaker.conf + IN2-HeadsetMic.conf IN3-HeadsetMic.conf Speaker.conf MonoSpeaker.conf EXTRA_DIST = $(ucm_DATA)
Signature · 1 line
2.20.1
PATCH 3/4 conf/ucm: bytcr-rt5651: Add digital mic support
In reply to Hans de GoedeAdd a new ucm/codecs/rt5651/DigitalMic.conf snippet for digital mic support and include this in the default non board-specific bytcr-rt5651.conf.
--- src/conf/ucm/bytcr-rt5651/HiFi.conf | 1 + src/conf/ucm/codecs/rt5651/DigitalMic.conf | 29 +++++++++++++++++++ src/conf/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 + src/conf/ucm/codecs/rt5651/Makefile.am | 3 +- 9 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/conf/ucm/codecs/rt5651/DigitalMic.conf
src/conf/ucm/bytcr-rt5651/HiFi.conf +1 -0
@@ -23,6 +23,7 @@ SectionVerb { <codecs/rt5651/MonoSpeaker.conf> <codecs/rt5651/HeadPhones.conf> +<codecs/rt5651/DigitalMic.conf> <codecs/rt5651/IN1-InternalMic.conf> <codecs/rt5651/IN2-InternalMic.conf> <codecs/rt5651/IN12-InternalMic.conf>
src/conf/ucm/codecs/rt5651/DigitalMic.conf new file +29 -0
@@ -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 + } +}
src/conf/ucm/codecs/rt5651/EnableSeq.conf +2 -0
@@ -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"
src/conf/ucm/codecs/rt5651/IN1-InternalMic.conf +1 -0
@@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN1" { Comment "Internal Microphone on IN1" ConflictingDevice [ + "DigitalMic" "InternalMic-IN2" "InternalMic-IN12" "HeadsetMic-IN2"
src/conf/ucm/codecs/rt5651/IN12-InternalMic.conf +1 -0
@@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN12" { Comment "Internal Microphones on IN1 and IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "HeadsetMic-IN2"
src/conf/ucm/codecs/rt5651/IN2-HeadsetMic.conf +1 -0
@@ -2,6 +2,7 @@ SectionDevice."HeadsetMic-IN2" { Comment "Headset Microphone on IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "InternalMic-IN12"
src/conf/ucm/codecs/rt5651/IN2-InternalMic.conf +1 -0
@@ -2,6 +2,7 @@ SectionDevice."InternalMic-IN2" { Comment "Internal Microphone on IN2" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN12" "HeadsetMic-IN2"
src/conf/ucm/codecs/rt5651/IN3-HeadsetMic.conf +1 -0
@@ -2,6 +2,7 @@ SectionDevice."HeadsetMic-IN3" { Comment "Headset Microphone on IN3" ConflictingDevice [ + "DigitalMic" "InternalMic-IN1" "InternalMic-IN2" "InternalMic-IN12"
src/conf/ucm/codecs/rt5651/Makefile.am +2 -1
@@ -1,6 +1,7 @@ alsaconfigdir = @ALSA_CONFIG_DIR@ ucmdir = $(alsaconfigdir)/ucm/codecs/rt5651 -ucm_DATA = EnableSeq.conf HeadPhones.conf HeadPhones-swapped.conf \ +ucm_DATA = DigitalMic.conf EnableSeq.conf \ + HeadPhones.conf HeadPhones-swapped.conf \ IN1-InternalMic.conf IN2-InternalMic.conf IN12-InternalMic.conf \ IN2-HeadsetMic.conf IN3-HeadsetMic.conf Speaker.conf MonoSpeaker.conf EXTRA_DIST = $(ucm_DATA)
Signature · 1 line
2.20.1
PATCH 4/4 conf/ucm: bytcr-rt5651: Add bytcr-rt5651-stereo-spk-dmic-mic config
In reply to Hans de GoedeAdd a config for boards which use a digital mic as internal mic, combined with having the headset mic on in2.
An example of such a board is the Point of View TAB-P1006W-232 (v1.0) tablet.
--- configure.ac | 1 + src/conf/ucm/Makefile.am | 1 + .../HiFi.conf | 26 +++++++++++++++++++ .../Makefile.am | 4 +++ .../bytcr-rt5651-stereo-spk-dmic-mic.conf | 10 +++++++ 5 files changed, 42 insertions(+) create mode 100644 src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf create mode 100644 src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile.am create mode 100644 src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/bytcr-rt5651-stereo-spk-dmic-mic.conf
configure.ac +1 -0
@@ -731,6 +731,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ src/conf/ucm/bytcr-rt5651-mono-spk-in1-mic/Makefile \ src/conf/ucm/bytcr-rt5651-mono-spk-in2-mic/Makefile \ src/conf/ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/Makefile \ + src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile \ src/conf/ucm/bytcr-rt5651-stereo-spk-in1-mic/Makefile \ src/conf/ucm/bytcr-rt5651-stereo-spk-in2-mic/Makefile \ src/conf/ucm/bytcr-rt5651-stereo-spk-in12-mic/Makefile \
src/conf/ucm/Makefile.am +1 -0
@@ -15,6 +15,7 @@ bytcr-rt5651 \ bytcr-rt5651-mono-spk-in1-mic \ bytcr-rt5651-mono-spk-in2-mic \ bytcr-rt5651-mono-spk-in2-mic-hp-swapped \ +bytcr-rt5651-stereo-spk-dmic-mic \ bytcr-rt5651-stereo-spk-in1-mic \ bytcr-rt5651-stereo-spk-in2-mic \ bytcr-rt5651-stereo-spk-in12-mic \
src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf new file +26 -0
@@ -0,0 +1,26 @@ +# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651 + + +SectionVerb { + EnableSequence [ + cdev "hw:bytcrrt5651" + <platforms/bytcr/PlatformEnableSeq.conf> + <codecs/rt5651/EnableSeq.conf> + ] + + DisableSequence [ + cdev "hw:bytcrrt5651" + <platforms/bytcr/PlatformDisableSeq.conf> + ] + + Value { + PlaybackPCM "hw:bytcrrt5651" + CapturePCM "hw:bytcrrt5651" + } +} + +<codecs/rt5651/Speaker.conf> +<codecs/rt5651/HeadPhones.conf> + +<codecs/rt5651/DigitalMic.conf> +<codecs/rt5651/IN2-HeadsetMic.conf>
src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile.am new file +4 -0
@@ -0,0 +1,4 @@ +alsaconfigdir = @ALSA_CONFIG_DIR@ +ucmdir = $(alsaconfigdir)/ucm/bytcr-rt5651-stereo-spk-dmic-mic +ucm_DATA = bytcr-rt5651-stereo-spk-dmic-mic.conf HiFi.conf +EXTRA_DIST = $(ucm_DATA)
src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/bytcr-rt5651-stereo-spk-dmic-mic.conf new file +10 -0
@@ -0,0 +1,10 @@ +# Adapted from https://github.com/plbossart/UCM/tree/master/bytcr-rt5651 + +SectionUseCase."HiFi" { + File "../bytcr-rt5651-stereo-spk-dmic-mic/HiFi.conf" + Comment "Play HiFi quality Music" +} + +SectionDefaults [ + cdev "hw:bytcrrt5651" +]
Signature · 1 line
2.20.1
Quoted 7 lines · Hans de Goede
Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input, rather then just enabling them all in
ucm/codecs/rt5651/EnableSeq.conf.This is a preparation patch for adding digital mic support.
Signed-off-by Hans de Goede <[email protected]>
Is this patchset safe to apply now without change in kernel side? Just to be sure.
thanks,
Takashi
Hi,
Quoted 6 lines · Takashi Iwai
Quoted 4 lines · Hans de Goede
Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input, rather then just enabling them all in
ucm/codecs/rt5651/EnableSeq.conf.
Quoted 6 lines
Quoted 3 lines
This is a preparation patch for adding digital mic support.
Signed-off-by Hans de Goede <[email protected]>Is this patchset safe to apply now without change in kernel side? Just to be sure.
Yes this is safe to apply / use with current (unpatched) kernels.
Regards,
Hans
Quoted 10 lines · Hans de Goede
Hi,
Quoted 6 lines · Takashi Iwai
Quoted 4 lines · Hans de Goede
Explicitly enable the right 'Stereo? ADC MIXL ADC?' when selecting an input, rather then just enabling them all in
ucm/codecs/rt5651/EnableSeq.conf.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
This is a preparation patch for adding digital mic support.
Signed-off-by Hans de Goede <[email protected]>Is this patchset safe to apply now without change in kernel side? Just to be sure.
Yes this is safe to apply / use with current (unpatched) kernels.
OK, now applied all four patches. Thanks.
Takashi