The load mechanism assumed only one multi-codec in the system, but we saw in #774 multiple instances of those codecs (rt1320 and rt713). Make the load mechanism straight: - introduce file variables - remove shadow variables - probe multi-codecs separately and modify the file variables - test for duplicate file inclusion (in both sof-soundwire / HiFi configs) - merge dmic configs for rt712,rt713 to one file This change also improves filters for speaker/headset/mic init includes. Closes: https://github.com/alsa-project/alsa-ucm-conf/pull/775 Link: https://github.com/alsa-project/alsa-ucm-conf/issues/774 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
50 lines
899 B
Text
50 lines
899 B
Text
# Use case Configuration for sof-soundwire card
|
|
|
|
SectionVerb {
|
|
EnableSequence [
|
|
disdevall ""
|
|
]
|
|
|
|
Value.TQ "HiFi"
|
|
}
|
|
|
|
If.spk {
|
|
Condition {
|
|
Type String
|
|
Empty "${var:SpeakerCodecFile}"
|
|
}
|
|
False.Include.a.File "/sof-soundwire/${var:SpeakerCodecFile}.conf"
|
|
}
|
|
|
|
If.mic {
|
|
Condition {
|
|
Type String
|
|
Empty "${var:MicCodecFile}"
|
|
}
|
|
False.If.dup {
|
|
Condition {
|
|
Type String
|
|
String1 "${var:MicCodecFile}"
|
|
String2 "${var:SpeakerCodecFile}"
|
|
}
|
|
False.Include.a.File "/sof-soundwire/${var:MicCodecFile}.conf"
|
|
}
|
|
}
|
|
|
|
If.headset {
|
|
Condition {
|
|
Type String
|
|
Empty "${var:HeadsetCodecFile}"
|
|
}
|
|
False.If.dup {
|
|
Condition {
|
|
Type String
|
|
# guard with "=" to avoid empty string matching
|
|
Needle "=${var:HeadsetCodecFile}="
|
|
Haystack "=${var:SpeakerCodecFile}=${var:MicCodecFile}="
|
|
}
|
|
False.Include.a.File "/sof-soundwire/${var:HeadsetCodecFile}.conf"
|
|
}
|
|
}
|
|
|
|
<sof-soundwire/Hdmi.conf>
|