Open pulakctl opened 7 months ago
thanks a lot for this pr - i'll have a look at it during the next days
i just wanted to note that i did not forget about this pr, i'm just having very little time right now, but i'll come back to it (and other stuff) for sure when more time will be available
UCM configuration is added to not conflict with upstream alsa-lib tree but I have not enabled it in conf.d as this commit will cause a conflict with upstream. I'm not sure how to best handle this, so let me know what would the best approach.
This part doesn't really explain why UCM configs in this PR conflict with upstream UCM, it just points to some files and commits. It is okay if you don't know it yet, but the first part of handling this would be to figure out why there is a conflict in the first place.
Is it because there are different devices using the same sound card name, but having different audio configuration? does strace alsaucm reload
output suggests a better path for ucm configs, so they don't conflict? e.g. something more board-specific
Also, it is better to submit these changes to https://github.com/alsa-project/alsa-ucm-conf to make this work available for other projects and reduce amount of configs (thus reducing maintenance burden) here
Is it because there are different devices using the same sound card name, but having different audio configuration? does
strace alsaucm reload
output suggests a better path for ucm configs, so they don't conflict? e.g. something more board-specific
if no, we can make different ucm configuration depending on device-tree compatible like here https://gitlab.com/postmarketOS/pmaports/-/blob/1f86677848a69f26ba60ec46b2a58b7283e7dead/device/community/alsa-ucm-conf-google-kukui/mt8183_mt6358_HiFi.conf#L36-40. You can figure out your compatible strings with cat /proc/device-tree/compatible
or looking into kernel source. So, for trogdor-coachz we need to care about these compatible strings:
Also, it is better to submit these changes to https://github.com/alsa-project/alsa-ucm-conf to make this work available for other projects and reduce amount of configs (thus reducing maintenance burden) here
Sorry, I forgot to mention that I've sent a PR upstream, if I get any updates on that I will update this PR accordingly.
This part doesn't really explain why UCM configs in this PR conflict with upstream UCM, it just points to some files and commits.
Regarding the conflict, the commit here symlinks /usr/share/alsa/ucm2/conf.d/SC7180
to /usr/share/alsa/ucm2/SC7180
, which has a config for sc7180-rt5682-max98357a-1mic.
Meanwhile upstream has /usr/share/alsa/ucm2/conf.d/SC7180
as a directory, with a symlink inside it for sc7180-rt5682-max98357a-1mic. On top of that the upstream HiFi.conf for the card differs from the one in imagebuilder. Wouldn't this override the upstream config?
To enable my changes with current imagebuilder setup, we wouldn't really need to do device detection in UCM imo, we can just move the ucm config to be inline with imagebuilder's setup (/usr/share/alsa/ucm2/SC7180 would have ucm for both sc7180-rt5682-max98357a-1mic
& sc7180-adau7002-max98357a
.
As discussed in #44, this will add the ucm and libinput quirks to extra-files for trogdor.
Libinput changes:
Alsa UCM: