Skip to content

Commit

Permalink
sof-soundwire: Add basic support for basic cs35l56 configurations
Browse files Browse the repository at this point in the history
cs35l56 is a boosted speaker amp, add UCM support for configurations
with up to 8 amps.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
charleskeepax authored and perexg committed Dec 7, 2023
1 parent 6e34e88 commit ac71bf7
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions ucm2/sof-soundwire/cs35l56.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Use case Configuration for sof-soundwire card

#
# Arguments:
# ForAmps - regex filter for var:SpeakerAmps
# Amp - amplifier number 1-8
#
DefineMacro.cs42l43spk.If.0 {
Condition {
Type RegexMatch
Regex "${var:__ForAmps}"
String "${var:SpeakerAmps}"
}
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 { ForAmps "[12345678]" Amp 1 }
Macro.num2.cs42l43spk { ForAmps "[2345678]" Amp 2 }
Macro.num3.cs42l43spk { ForAmps "[45678]" Amp 3 }
Macro.num4.cs42l43spk { ForAmps "[45678]" Amp 4 }
Macro.num5.cs42l43spk { ForAmps "[678]" Amp 5 }
Macro.num6.cs42l43spk { ForAmps "[678]" Amp 6 }
Macro.num7.cs42l43spk { ForAmps "[78]" Amp 7 }
Macro.num8.cs42l43spk { ForAmps "8" Amp 8 }

Value {
PlaybackPriority 100
PlaybackPCM "hw:${CardId},2"
}
}

0 comments on commit ac71bf7

Please sign in to comment.