Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ucm & libinput config for trogdor-coachz #201

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pulakctl
Copy link

@pulakctl pulakctl commented Feb 23, 2024

As discussed in #44, this will add the ucm and libinput quirks to extra-files for trogdor.

Libinput changes:

  • This mostly improves the touchpad pressure sensitivity issue on Wayland sessions, which should be using the libinput driver by default. On xorg synaptics is taking precedence by default and it seemed to be working fine for me.

Alsa UCM:

  • Working internal speakers and mic (no boosted gain out-of-the-box yet) with disabled HDMI section. To use HDMI output, you would have to uncomment the section and restart with HDMI plugged in as pulseaudio seems to be having some issue with the jack detection?
  • Note that the SC7180 configuration in chromebook-trogdor/extra-files is only required for systems older than bookworm, as bookworm's alsa-ucm-conf already has sc7180-rt5682-max98357a
  • 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.

@hexdump0815
Copy link
Owner

thanks a lot for this pr - i'll have a look at it during the next days

@hexdump0815
Copy link
Owner

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

@jenneron
Copy link

jenneron commented Apr 4, 2024

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

@jenneron
Copy link

jenneron commented Apr 4, 2024

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:

  • google,coachz-rev1 / google,coachz-rev2
  • google,coachz
  • google,coachz-rev1-sku0 / google,coachz-rev2-sku0
  • google,coachz-sku0

@pulakctl
Copy link
Author

pulakctl commented Apr 4, 2024

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.

@pulakctl
Copy link
Author

Update: the alsa-ucm PR has been merged upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants