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.

Closes: #370
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 Jan 9, 2024
1 parent c0a4df6 commit 8e39917
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 "[1-8]" Amp 1 }
Macro.num2.cs42l43spk { ForAmps "[2-8]" Amp 2 }
Macro.num3.cs42l43spk { ForAmps "[3-8]" Amp 3 }
Macro.num4.cs42l43spk { ForAmps "[4-8]" Amp 4 }
Macro.num5.cs42l43spk { ForAmps "[5-8]" Amp 5 }
Macro.num6.cs42l43spk { ForAmps "[6-8]" 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 8e39917

Please sign in to comment.