From a999a3a1ee360f01a9d4c903850a1102566bda5d Mon Sep 17 00:00:00 2001 From: WeirdTreeThing Date: Tue, 23 May 2023 22:33:00 -0400 Subject: [PATCH] cml: sof-rt5682: add dmic split --- cml/sof-rt5682/HiFi.conf | 55 +++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/cml/sof-rt5682/HiFi.conf b/cml/sof-rt5682/HiFi.conf index 108712a..094c9b7 100644 --- a/cml/sof-rt5682/HiFi.conf +++ b/cml/sof-rt5682/HiFi.conf @@ -21,6 +21,44 @@ SectionVerb { ] } +# Split 4ch dmic into 2 virtual 2ch mics +Include.pcm_split.File "/conf.d/dmic-common/split.conf" + +Macro [ + { + SplitPCM { + Name "cml_stereo_in" + Direction Capture + Format S32_LE + Channels 2 + HWChannels 4 + HWChannelPos0 FL + HWChannelPos1 FR + HWChannelPos2 FL + HWChannelPos3 FR + } + } +] + +Include.ctl_remap.File "/conf.d/dmic-common/remap.conf" + +Macro [ + { + CtlRemapStereoVolSw { + Dst "Mic 1 Capture" + Index0 0 + Index1 1 + } + } + { + CtlRemapStereoVolSw { + Dst "Mic 2 Capture" + Index0 2 + Index1 3 + } + } +] + SectionDevice."Speaker" { Comment "Speaker" @@ -69,12 +107,17 @@ SectionDevice."Mic" { CaptureChannelMap "0 1 -1 -1 -1 -1 -1 -1 -1 -1 -1" IntrinsicSensitivity "-2400" } - EnableSequence [ - cdev "hw:sofrt5682" - ] - DisableSequence [ - cdev "hw:sofrt5682" - ] + Macro.pcm_split.SplitPCMDevice { + Name "cml_stereo_in" + Direction Capture + Device 1 + HWChannels 4 + Channels 2 + Channel0 0 + Channel1 1 + ChannelPos0 FL + ChannelPos1 FR + } } SectionDevice."Headset" {