Skip to content

A headset named for the surround it simulates, like Virtual 7.1, is hardware when nobody chose a device - #1049

Open
unRekable wants to merge 1 commit into
mainfrom
fix/pick-tells-software-from-hardware
Open

unRekable wants to merge 1 commit into
mainfrom
fix/pick-tells-software-from-hardware

Conversation

@unRekable

Copy link
Copy Markdown
Collaborator

What changed and why

Nobody chose a microphone, and the system default is a headset whose USB dongle says "virtual": a HyperX Cloud II ("HyperX Virtual Surround Sound"), or an adapter Linux names "Virtual 7.1 Ch Sound". The device choice took "virtual" for software and moved the call to the onboard sound or a webcam (#1017). main exempts "virtual surround" alone. Now the three phrases a real device says are exempt: virtual surround, virtual 7.1, virtual 5.1. "Virtual" with any other word stays software, because a call must never land on software by itself.

So that a scenario can show it, mediad takes a stand-in for the device list: TINYCLIENT_MEDIAD_DEVICES names a file that lists them. It replaces the list only. A call's streams are as before.

Type

  • feature
  • fix
  • perf
  • refactor
  • chore
  • docs

Platforms

  • windows
  • macos
  • linux
  • android
  • ios

Proof

Scenario: e2e/scenarios/auto-device-virtual-name

The scenario starts the real mediad over the chat pipe with the stand-in list (the adapter as the default, a webcam, a VB-Audio cable) and reads the device list at start and when the device menu opens. It passes when the adapter is hardware and the only automatic choice, and the cable is software. A build from before the change does not read the stand-in, so its list never names the headset and six of twelve steps fail there.

Lab run: not made. The driver ran only against a stand-in for mediad's frames, never against the real mediad on a lab host.

Not shown: the adapter's name rests on one public report, and no other real device besides the HyperX was found. cpal 0.18 reports no desktop device as virtual, so only the name can tell them apart.

Also run on this branch on Windows before this pull request: cargo build --workspace --all-targets --features tinyclient/gui, then cargo nextest run --workspace --features tinyclient/gui (3682 passed, 28 skipped; new among them two tests in pick.rs, two in audio.rs and one program test in tests/voice.rs), then cargo test --workspace --doc --features tinyclient/gui.

Compatibility

No protocol change. The stand-in is read only when the variable is set; the tests' harness clears it.

Risk and rollback

A software device that says "virtual 7.1" or "virtual 5.1" would now be taken for hardware. None is known. Revert the commit.

Release note

A headset whose name says "Virtual Surround" or "Virtual 7.1" is used for calls when nobody chose a device.

Part of #1017.

…, as hardware and every other "virtual" device as software
@unRekable
unRekable requested a review from itz4blitz as a code owner December 5, 2026 15:46
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