alsa-project / alsa-ucm-conf

ALSA Use Case Manager configuration
BSD 3-Clause "New" or "Revised" License
73 stars 213 forks source link

trying to open ucm2/conf.d/simple-card/Unknown-UnknownProduct-.conf for PinePhonePro #199

Closed ollieparanoid closed 2 years ago

ollieparanoid commented 2 years ago

Hi,

we are trying to narrow down why alsa-lib tries to open /usr/share/alsa/ucm2/conf.d/simple-card/Unknown-UnknownProduct-.conf instead of the proper path /usr/share/alsa/ucm2/PinePhonePro/PINE64-PinePhonePro-.conf with custom (to-be-upstreamed to alsa-ucm-conf.git) ucm configurations we are using in postmarketOS for the PinePhonePro: https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/community/device-pine64-pinephonepro/ucm

It only happens for some users, but not for everybody. I've taken a quick look at the code but didn't see right away where the wrong path is built, git grep UnknownProduct gives no results.

Could somebody give us a hint where to look? I don't really have a clue how this works. Thanks!

Downstream discussion: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/3356

perexg commented 2 years ago

The path is composed as (see ucm2/ucm.conf):

 #
 # The probed path when hw-card is found:
 #
 #   ucm2/conf.d/[${CardDriver}|${KernelDriver}]/${CardLongName}.conf
 #   ucm2/conf.d/[${CardDriver}|${KernelDriver}]/[${CardDriver}|${KernelDriver}].conf
 #   ucm2/${KernelModule}/${KernelModule}.conf (obsolete)
 #   ucm2/${CardDriver}/${CardLongName}.conf (obsolete)
 #   ucm2/${CardDriver}/${CardDriver}.conf (obsolete)
 #

Variables are explained here: https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/README.md

ollieparanoid commented 2 years ago

Thanks a lot, I think this should be enough to figure this out.