-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ucm2: sof-soundwire: add RT1320 amplifier
Add support for rt1320 amplifier Closes: #439 Signed-off-by: Shuming Fan <[email protected]> Signed-off-by: Jaroslav Kysela <[email protected]>
- Loading branch information
1 parent
6b2f0c1
commit 01b3d89
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Use case Configuration for sof-soundwire card | ||
|
||
# | ||
# Arguments: | ||
# ForAmps - regex filter for var:SpeakerAmps | ||
# Amp - amplifier number (1,2 etc.) | ||
# Sel - channel selection (L,R R,L L,L R,R L,L+R R,L+R L+R,L L+R,R L+R,L+R) | ||
# | ||
DefineMacro.rt1320spk.If.0 { | ||
Condition { | ||
Type RegexMatch | ||
Regex "${var:__ForAmps}" | ||
String "${var:SpeakerAmps}" | ||
} | ||
True { | ||
EnableSequence [ | ||
cset "name='rt1320-${var:__Amp} RX Channel Select' ${var:__Sel}" | ||
cset "name='rt1320-${var:__Amp} OT23 L Switch' 1" | ||
cset "name='rt1320-${var:__Amp} OT23 R Switch' 1" | ||
] | ||
DisableSequence [ | ||
cset "name='rt1320-${var:__Amp} OT23 L Switch' 0" | ||
cset "name='rt1320-${var:__Amp} OT23 R Switch' 0" | ||
] | ||
} | ||
} | ||
|
||
SectionDevice."Speaker" { | ||
Comment "Speaker" | ||
|
||
Macro.num1.rt1320spk { ForAmps "1" Amp 1 Sel "L,R" } | ||
Macro.num2.rt1320spk { ForAmps "2" Amp 1 Sel "L,L" } | ||
Macro.num3.rt1320spk { ForAmps "2" Amp 2 Sel "R,R" } | ||
|
||
EnableSequence [ | ||
cset "name='Speaker Switch' on" | ||
] | ||
|
||
DisableSequence [ | ||
cset "name='Speaker Switch' off" | ||
] | ||
|
||
Value { | ||
PlaybackPriority 100 | ||
PlaybackPCM "hw:${CardId},2" | ||
} | ||
} |