Skip to contentSkip to conversation

UCM Path condition type does not support variables as file path

DISCUSSION GitHub issues - opened 1 participant 1 message Apr 24, 2024 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

alsa-project/alsa-lib issue #395 was opened from singalsu:

To control audio processing in SOF I want to do do this:

```
Define.SpeakerIirBlob "${ConfTopDir}/sof/ipc4/eq_iir/highpass_100hz_0db_48khz.blob"
Define.SpeakerFirBlob "${ConfTopDir}/sof/ipc4/eq_fir/pass.blob"
Define.SpeakerDrcBlob "${ConfTopDir}/sof/ipc4/drc/spk_default.blob"
Define.HeadphoneIirBlob "${ConfTopDir}/sof/ipc4/eq_iir/pass.blob"
Define.HeadphoneFirBlob "${ConfTopDir}/sof/ipc4/eq_fir/pass.blob"
Define.ProductConfigSOF "/sof/product_configs/${CardLongName}.conf"
Define.FullPathToIt "${ConfTopDir}${var:ProductConfigSOF}"

If.HasProductConfig {
        Condition {
                Type Path
                Mode read
                Path "${var:FullPathToIt}"
        }
        True {
                Include.product-config.File "${var:ProductConfigSOF}"
        }
}
```

However if I replace line as "Path "/usr/share/alsa/ucm2/sof/product_configs/ACME-2000--foobar.conf" (product name obfuscated for confidentiality) the True condition is achieved. It looks like Path is not evaluating variables.

This feature was added in commit 2f57b404b1c1c376316ca0c6bb5e789e2066298f where the usage is explained.

Issue URL : https://github.com/alsa-project/alsa-lib/issues/395
Repository URL: https://github.com/alsa-project/alsa-lib