framework/13-inch: fix enhanced audio device priority#1858
Open
Stebalien wants to merge 1 commit intoNixOS:masterfrom
Open
framework/13-inch: fix enhanced audio device priority#1858Stebalien wants to merge 1 commit intoNixOS:masterfrom
Stebalien wants to merge 1 commit intoNixOS:masterfrom
Conversation
On framework laptops, ensure that the "enhanced audio" sink for the laptop speakers has a lower priority than bluetooth speakers (by giving it the same priority as the laptop speakers, 1009 [1]). Bluetooth speakers have a priority of 1010 [2] by default. NOTE: the existing comment in the code claiming that higher values mean lower priority is incorrect; lower priorities values mean lower priority. [1] https://gitlab.freedesktop.org/pipewire/wireplumber/-/blob/7fa44ef8d0b2f603bd826d399718cef8cf6a800a/src/scripts/monitors/alsa.lua#L218 [2] https://gitlab.freedesktop.org/pipewire/wireplumber/-/blob/7fa44ef8d0b2f603bd826d399718cef8cf6a800a/src/scripts/monitors/bluez.lua#L275
70a10a7 to
1ea299f
Compare
Member
|
How did you figure out the numbers? |
Author
Then I grepped around in the wireplumber source code and found where the priorities were configured (see the links in the PR description). The bluez priority is always 1010 for sinks and 2010 for sources. The calculation for built-in audio devices is trickier, but it looks like it should be a stable 1009 for Framework laptops, assuming it always shows up as the "first" device. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
On framework laptops, ensure that the "enhanced audio" sink for the laptop speakers has a lower priority than bluetooth speakers (by giving it the same priority as the built-in laptop speakers, 1009). Bluetooth speakers have a priority of 1010 by default.
NOTE: the existing comment in the code claiming that higher values mean lower priority is incorrect; lower priorities values mean lower priority.
Things done
nixos-hardwareandimporting it via
<nixos-hardware>or Flake inputAfter testing, my audio switches from my laptop speakers to my bluetooth headphones when I connect them.