Skip to content

fix(sound): match ActiveRoute events to the correct node#1979

Closed
tmshlvck wants to merge 1 commit into
pop-os:masterfrom
tmshlvck:master
Closed

fix(sound): match ActiveRoute events to the correct node#1979
tmshlvck wants to merge 1 commit into
pop-os:masterfrom
tmshlvck:master

Conversation

@tmshlvck
Copy link
Copy Markdown

Fix pop-os/cosmic-applets#1388

When a device has multiple sink/source nodes (e.g. a GPU with multiple HDMI outputs on a single ALSA card), an ActiveRoute event for the currently active device caused the handler to pick the first node from the device_ids IntMap whose device matched. IntMap iteration order is hash-based, so the first node was effectively random among nodes sharing the same device.

Use card_profile_device to disambiguate: only match a node when its card.profile.device is listed in route.devices. This mirrors the matching already done in update_device_route_name.

A LLM was used to analyze the code paths and draft the patch. The diagnosis and fix were verified end-to-end against a real multi-HDMI setup (Radeon HDMI/DP card with three sink nodes) by reproducing the stuck-volume symptom and confirming it no longer occurs after the patch is applied.

  • I have disclosed use of any AI generated code in my commit messages.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

…file_device

Fix pop-os/cosmic-applets#1388

When a device has multiple sink/source nodes (e.g. a GPU with multiple HDMI
outputs on a single ALSA card), an ActiveRoute event for the currently active
device caused the handler to pick the first node from the device_ids IntMap
whose device matched. IntMap iteration order is hash-based, so the first
node was effectively random among nodes sharing the same device.

Use card_profile_device to disambiguate: only match a node when its
card.profile.device is listed in route.devices. This mirrors the matching
already done in update_device_route_name.

A LLM was used to analyze the code paths and draft the patch. The diagnosis
and fix were verified end-to-end against a real multi-HDMI setup (Radeon
HDMI/DP card with three sink nodes) by reproducing the stuck-volume symptom
and confirming it no longer occurs after the patch is applied.
@mmstick
Copy link
Copy Markdown
Member

mmstick commented Apr 23, 2026

Conflicts with #1972

@mmstick mmstick closed this Apr 23, 2026
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.

Audio applet: Volume slider has no effect after first volume change on multi-HDMI card

2 participants