[PATCH alsa-ucm-conf v3 2/2] sof-soundwire: Add basic support for basic cs35l56 configurations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cs35l56 is a boosted speaker amp, add UCM support for configurations
with up to 8 amps.

Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
---

Changes since v2:
 - Rebased on top of conversion of the Realtek amps.
 - Add a macro for each amp to simplify things a bit.

Thanks,
Charles

 ucm2/sof-soundwire/cs35l56.conf | 41 +++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 ucm2/sof-soundwire/cs35l56.conf

diff --git a/ucm2/sof-soundwire/cs35l56.conf b/ucm2/sof-soundwire/cs35l56.conf
new file mode 100644
index 0000000..7eca3fd
--- /dev/null
+++ b/ucm2/sof-soundwire/cs35l56.conf
@@ -0,0 +1,41 @@
+# Use case Configuration for sof-soundwire card
+
+#
+# Arguments:
+#   Amp - Amp number 1-8
+#
+
+DefineMacro.cs42l43spk {
+	If.amppresent {
+		Condition {
+			Type ControlExists
+			Control "name='AMP${var:__Amp} Speaker Switch'"
+		}
+		True {
+			EnableSequence [
+				cset "name='AMP${var:__Amp} Speaker Switch' 1"
+			]
+			DisableSequence [
+				cset "name='AMP${var:__Amp} Speaker Switch' 0"
+			]
+		}
+	}
+}
+
+SectionDevice."Speaker" {
+	Comment "Speaker"
+
+	Macro.num1.cs42l43spk { Amp 1 }
+	Macro.num2.cs42l43spk { Amp 2 }
+	Macro.num3.cs42l43spk { Amp 3 }
+	Macro.num4.cs42l43spk { Amp 4 }
+	Macro.num5.cs42l43spk { Amp 5 }
+	Macro.num6.cs42l43spk { Amp 6 }
+	Macro.num7.cs42l43spk { Amp 7 }
+	Macro.num8.cs42l43spk { Amp 8 }
+
+	Value {
+		PlaybackPriority 100
+		PlaybackPCM "hw:${CardId},2"
+	}
+}
-- 
2.39.2




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux