Skip to contentSkip to conversation

sof-soundwire: Add basic support for cs42l43

PATCH In review Charles Keepax 2 participants 2 messages Jan 17, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 sof-soundwire: Add basic support for cs42l43

cs42l43 is a codec device, add basic support for it. Including a dual channel DMIC input, stereo headphones, and a mono headset microphone.

---

No changes just a resend of v4.

Thanks,
Charles

 ucm2/codecs/cs42l43/init.conf         | 14 ++++++++
 ucm2/sof-soundwire/cs42l43-dmic.conf  | 26 +++++++++++++++
 ucm2/sof-soundwire/cs42l43.conf       | 46 +++++++++++++++++++++++++++
 ucm2/sof-soundwire/sof-soundwire.conf |  2 +-
 4 files changed, 87 insertions(+), 1 deletion(-)
 create mode 100644 ucm2/codecs/cs42l43/init.conf
 create mode 100644 ucm2/sof-soundwire/cs42l43-dmic.conf
 create mode 100644 ucm2/sof-soundwire/cs42l43.conf
ucm2/codecs/cs42l43/init.conf new file +14 -0
new file mode 100644
index 0000000..10a6e1f
@@ -0,0 +1,14 @@
+# cs42l43 specific control settings
+
+LibraryConfig.remap.Config {
+	ctl.default.map {
+		"name='cs42l43 PDM2 Switch'" {
+			"name='cs42l43 Decimator 3 Switch'".vindex.0 0
+			"name='cs42l43 Decimator 4 Switch'".vindex.1 0
+		}
+		"name='cs42l43 PDM2 Volume'" {
+			"name='cs42l43 Decimator 3 Volume'".vindex.0 0
+			"name='cs42l43 Decimator 4 Volume'".vindex.1 0
+		}
+	}
+}
ucm2/sof-soundwire/cs42l43-dmic.conf new file +26 -0
new file mode 100644
index 0000000..d5f895d
@@ -0,0 +1,26 @@
+# Use case Configuration for sof-soundwire card
+
+SectionDevice."Mic" {
+	Comment "Microphones"
+
+	ConflictingDevice [
+		"Headset"
+	]
+
+	EnableSequence [
+		cset "name='cs42l43 DP1TX1 Input' 'Decimator 3'"
+		cset "name='cs42l43 DP1TX2 Input' 'Decimator 4'"
+	]
+
+	DisableSequence [
+		cset "name='cs42l43 DP1TX1 Input' 'None'"
+		cset "name='cs42l43 DP1TX2 Input' 'None'"
+	]
+
+	Value {
+		CapturePriority 100
+		CapturePCM "hw:${CardId},4"
+		CaptureMixer "default:${CardId}"
+		CaptureMixerElem "cs42l43 PDM2"
+	}
+}
ucm2/sof-soundwire/cs42l43.conf new file +46 -0

46 lines not on this page · raw message

ucm2/sof-soundwire/sof-soundwire.conf +1 -1
index 18b1bf8..35a262c 100644
@@ -47,7 +47,7 @@ DefineRegex {
 If.hs_init {
 	Condition {
 		Type RegexMatch
-		Regex "(rt5682|rt700|rt711|rt713(-sdca)?)"
+		Regex "(cs42l43|rt5682|rt700|rt711|rt713(-sdca)?)"
 		String "${var:HeadsetCodec1}"
 	}
 	True.Include.hs_init.File "/codecs/${var:HeadsetCodec1}/init.conf"
Signature · 1 line
2.30.2
#1 lore raw
Quoted 2 lines · Charles Keepax

cs42l43 is a codec device, add basic support for it. Including a dual channel DMIC input, stereo headphones, and a mono headset microphone.

Applied thanks.

Jaroslav

Signature · 2 lines
Jaroslav Kysela <[email protected]>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.