On Tue, Dec 05, 2023 at 11:11:03AM -0600, Pierre-Louis Bossart wrote:
On 12/5/23 10:28, Charles Keepax wrote:
On Tue, Dec 05, 2023 at 09:25:27AM -0600, Pierre-Louis Bossart wrote:
On 12/5/23 08:24, Charles Keepax wrote:
- EnableSequence [
cset "name='AMP1 Speaker Switch' 1"
cset "name='AMP2 Speaker Switch' 1"
cset "name='AMP3 Speaker Switch' 1"
cset "name='AMP4 Speaker Switch' 1"
- ]
If we only need an on/off switch, I wonder if this can be made conditional, i.e. enable/disable a control if it exists. That would scale to various numbers of amplifiers without a need to add a 2-amp, 6 or 8-amp configuration.
I think that is possible, would you lean towards modifying HiFi.conf to only include a single file for cs35l56, or would you lean more towards having each cs35l56-x.conf file include a single base file?
I wasn't referring to partitioning of files, rather the conditional UCM syntax,
Condition { Type ControlExists Control "name='AMP4 Speaker Switch'" }
I get that, but once you have added those you still have the issue HiFi.conf will load the speaker use-case as follows:
False.Include.spkdev.File "/sof-soundwire/${var:SpeakerCodec1}-${var:SpeakerAmps1}.conf"
Meaning the number of amps will be part of the file name requested. So my question was how you wanted to deal with that? Personally I would lean towards just having all the cs35l56-8.conf, cs35l56-6.conf etc. include a cs35l56-base.conf. Its slightly more files, but feels a bit less crufty than having a special case for cs35l56 to not include the number of amps in the filename.
Thanks, Charles