On 06. 12. 23 17:46, Charles Keepax wrote:
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. This patch was inspiration for me. Could you check modifications in https://github.com/alsa-project/alsa-ucm-conf/pull/370 ? We can use regex to create condition against SpeakerAmps variable, so the configuration may look like:
... Condition { Type RegexMatch Regex "${var:__ForAmps}" String "${var:SpeakerAmps}" } ... Macro.num1.cs42l43spk { ForAmps "[12468]" Amp 1 } Macro.num2.cs42l43spk { ForAmps "[2468]" Amp 2 } Macro.num3.cs42l43spk { ForAmps "[468]" Amp 3 } Macro.num4.cs42l43spk { ForAmps "[468]" Amp 4 } Macro.num5.cs42l43spk { ForAmps "[68]" Amp 5 } Macro.num6.cs42l43spk { ForAmps "[68]" Amp 6 } Macro.num7.cs42l43spk { ForAmps "8" Amp 7 } Macro.num8.cs42l43spk { ForAmps "8" Amp 8 } ... I assume that only even count for amplifiers is valid (with mono exception). Jaroslav -- Jaroslav Kysela <perex@xxxxxxxx> Linux Sound Maintainer; ALSA Project; Red Hat, Inc.