fix: show monitor name for HDMI/DP audio endpoints#46
Open
okhomenko wants to merge 4 commits intotsowell:mainfrom
Open
fix: show monitor name for HDMI/DP audio endpoints#46okhomenko wants to merge 4 commits intotsowell:mainfrom
okhomenko wants to merge 4 commits intotsowell:mainfrom
Conversation
When using NVIDIA GPU audio in pro-audio mode (or any HDMI/DP output),
all sinks share the same PipeWire device. The previous default endpoint
template resolved {device:device.nick} first, which returns the GPU
name ("HDA NVidia") for every output, making them indistinguishable.
PipeWire populates node.nick with the monitor name sourced from EDID/ELD
data (e.g. "PA32QCV", "DELL U2723QE"). By trying {node:node.nick} first,
each HDMI/DP sink now shows its connected monitor's name. For devices
where node.nick is absent, the template falls through to device.nick as
before.
7343a46 to
3b39bf1
Compare
Parse SPA_PARAM_ROUTE_info from EnumRoute params to extract device.product.name (sourced from EDID/ELD data). When a profile maps to exactly one route with a known monitor name, append it to the profile description in the Configuration tab dropdown. Before: Digital Stereo (HDMI 2) Output After: Digital Stereo (HDMI 2) Output — PA32QCV Profiles that map to multiple routes (e.g. Pro Audio) or no routes (e.g. Off) are left unchanged.
Reuse the enriched profile title (which includes the monitor name) for the target_title shown below the device name in the Configuration tab, instead of re-deriving it from the raw profile description.
Author
|
Brainstorming on how we could make this PR stronger for long-term quality: instead of treating this as just an HDMI/NVIDIA naming fix, maybe we should establish a reusable "physical endpoint label" concept and have both the Output Devices tab and Configuration tab build on that. What I mean by that is:
That would give us one place to handle cases like:
If we go that route, I think the cleanest version may be to expose a computed label through the naming system itself, so templates/overrides can use it too, instead of keeping it as a view-only special case. @tsowell curious what you think — is that too much scope for this PR, or does it feel like the right direction while we're touching this area? |
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.
Problem
When using NVIDIA GPU audio in pro-audio mode, or any HDMI/DP output, all sinks share the same PipeWire device. The default endpoint name template resolves
{device:device.nick}first — which returns the GPU/card name (e.g.HDA NVidia) for every output — making multiple HDMI/DP sinks completely indistinguishable in wiremix.Additionally, the Configuration tab shows generic names for both the selected profile and the profile dropdown, with no indication of which physical monitor each profile corresponds to.
Reproducing steps:
pactl set-card-profile alsa_card.pci-0000_01_00.1 pro-audioHDA NVidiain Output Devices tabDigital Stereo (HDMI 2) Outputand the dropdown lists all profiles without monitor namesExpected: each sink, selected profile, and profile dropdown entry shows the name of the connected monitor (e.g.
PA32QCV,DELL U2723QE)Actual: all sinks show
HDA NVidia; selected profile and dropdown show generic HDMI port numbers onlyRoot cause
Output Devices tab: PipeWire reads the monitor name from EDID/ELD data and stores it in
node.nick(e.g.PA32QCV,DELL U2723QE). The device-leveldevice.nickis the GPU name shared by all HDMI outputs on that card. The default endpoint template tried{device:device.nick}first — it always succeeds — so{node:node.description}was never reached.Configuration tab: Profile descriptions (
Digital Stereo (HDMI) Output) come from PipeWire and don't include monitor names. TheSPA_PARAM_ROUTE_infodict on each EnumRoute containsdevice.product.name(the EDID monitor name) but was not being parsed. The selected profile display was also derived independently from the raw profile description, so it missed the enrichment too.This can be verified:
Fix
Output Devices tab: Add
{node:node.nick}as the first template indefault_endpoint. Whennode.nickis set (HDMI/DP monitors), it is used. When absent, falls through to{device:device.nick}as before.pub fn default_endpoint() -> Vec<NameTemplate> { vec![ + "{node:node.nick}".parse().unwrap(), "{device:device.nick}".parse().unwrap(), "{node:node.description}".parse().unwrap(), ] }Configuration tab: Parse
SPA_PARAM_ROUTE_infoindevice_enum_routeto extractdevice.product.name. When a profile maps to exactly one route with a known monitor name, append it to the profile description. The selected profile display reuses this enriched title so it stays consistent with the dropdown.Profiles that map to multiple routes (e.g. Pro Audio) or no routes (e.g. Off) are left unchanged.