From: Jaroslav Kysela Date: Thu, 28 Nov 2019 16:37:47 +0000 (+0100) Subject: sof-hda-dsp: add support for mono microphone (HeadphoneMic = stereo, HeadsetMic ... X-Git-Tag: v1.2.1.2~6 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=bca9c563be9c670e2ccfe8d5ed6ee95f492e86ff;p=alsa-ucm-conf.git sof-hda-dsp: add support for mono microphone (HeadphoneMic = stereo, HeadsetMic = mono) Idea-by: Jaska Uimonen Signed-off-by: Jaroslav Kysela --- diff --git a/ucm2/sof-hda-dsp/HDA-Capture-value.conf b/ucm2/sof-hda-dsp/HDA-Capture-value.conf new file mode 100644 index 0000000..b3e90aa --- /dev/null +++ b/ucm2/sof-hda-dsp/HDA-Capture-value.conf @@ -0,0 +1,5 @@ +CapturePCM "hw:${CardId},0" +CaptureMixerElem "Capture" +CaptureVolume "Capture Volume" +CaptureSwitch "Capture Switch" +CaptureChannels "2" diff --git a/ucm2/sof-hda-dsp/HiFi.conf b/ucm2/sof-hda-dsp/HiFi.conf index 06bc2f9..97adbe5 100644 --- a/ucm2/sof-hda-dsp/HiFi.conf +++ b/ucm2/sof-hda-dsp/HiFi.conf @@ -80,16 +80,51 @@ SectionDevice."Speaker" { } } -SectionDevice."HeadsetMic" { - Comment "Headset Microphone" +If.monomic { + Condition { + Type ControlExists + Control "name='Input Source'" + } + True { + SectionDevice."HeadphoneMic" { + Comment "Headphone Stereo Microphone" - Value { - CapturePCM "hw:${CardId},0" - CaptureMixerElem "Capture" - CaptureVolume "Capture Volume" - CaptureSwitch "Capture Switch" - CaptureChannels "2" - JackControl "Mic Jack" + ConflictingDevice [ + "HeadsetMic" + ] + + EnableSequence [ + cset "name='Input Source' Headphone Mic" + ] + + Value { + + JackControl "Headphone Mic Jack" + } + } + + SectionDevice."HeadsetMic" { + Comment "Headset Mono Microphone" + + EnableSequence [ + cset "name='Input Source' Headset Mic" + ] + + Value { + + JackControl "Headphone Mic Jack" + } + } + } + False { + SectionDevice."HeadphoneMic" { + Comment "Headphone Stereo Microphone" + + Value { + + JackControl "Mic Jack" + } + } } }