From 3bea51c3188257c5bc0eaaed922d1f714e3508c7 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Thu, 21 Jan 2021 14:38:26 -0600 Subject: [PATCH] sof-hda-dsp: update handling of cfg-dmics strings Existing platforms can have 1,2,3 or 4 microphones. The SOF firmware will generate 2 or 4 channels. Since by default CaptureChannels is 2, we need to add the case for cfg-dmics = 3. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Jaroslav Kysela --- ucm2/sof-hda-dsp/HiFi.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ucm2/sof-hda-dsp/HiFi.conf b/ucm2/sof-hda-dsp/HiFi.conf index a250331..2c02c15 100644 --- a/ucm2/sof-hda-dsp/HiFi.conf +++ b/ucm2/sof-hda-dsp/HiFi.conf @@ -16,9 +16,9 @@ SectionDevice."Mic1" { CapturePCM "hw:${CardId},6" If.chn { Condition { - Type String - Haystack "${CardComponents}" - Needle "cfg-dmics:4" + Type RegexMatch + Regex "cfg-dmics:[34]" + String "${CardComponents}" } True { CaptureChannels 4 -- 2.47.1