Skip to content

Use port aliases for audio hardware port display names#163

Open
laenzlinger wants to merge 1 commit into
mod-audio:masterfrom
laenzlinger:feature/audio-port-aliases
Open

Use port aliases for audio hardware port display names#163
laenzlinger wants to merge 1 commit into
mod-audio:masterfrom
laenzlinger:feature/audio-port-aliases

Conversation

@laenzlinger

Copy link
Copy Markdown

Summary

Use get_port_name_alias() for audio hardware ports, same as already done for MIDI ports (line 616). This allows custom hardware to set JACK port aliases and have them displayed correctly in the UI.

Problem

Audio port display names are derived from the raw JACK port name (capture_1Capture_1). For custom hardware (non-MOD devices running mod-ui), there's no way to show meaningful names like "IN L" or "Guitar In".

Solution

Replace name.title() with self.get_port_name_alias("system:" + name) which:

  • Returns the JACK port alias if one is set (e.g. via jack_alias)
  • Falls back to portname.split(":",1)[-1].title() when no alias exists (backward compatible)

This is the same function already used for MIDI port names.

Testing

Tested on Raspberry Pi CM5 with custom I2S soundcard (PCM1863 + PCM5242). JACK aliases set via systemd service ExecStartPost. UI correctly displays custom port names.

Apply get_port_name_alias() to audio ports, same as already done for
MIDI ports. This allows custom hardware to set JACK port aliases
(e.g. via jack_alias) and have them displayed in the UI.

Falls back to the existing name.title() behavior when no alias is set.
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.

1 participant