Set the radio's sound card in radio configure

WSJT-X and JS8Call get the radio's sound card as PipeWire names it: radio
asks pactl for the input and output nodes on the radio's ALSA card.
WSJT-X (Qt 5, through Qt's PulseAudio plugin) keeps the node names in
SoundInName and SoundOutName; JS8Call (Qt 6) keeps them in SoundInId and
SoundOutId, with PipeWire's descriptions, quoted as Qt writes them, in
SoundInName and SoundOutName. A setting that's empty or a default
("default", "pipewire") is replaced; a device you chose is left alone
unless --force.

If Graywolf has no channels, it gets input and output devices on
plughw:CARD=...,DEV=0 and a channel named after the radio, with its
defaults (1200 baud AFSK, APRS) and PTT through rigctld, in the same
stop and start as the PTT change.

fldigi, not1mm and POTACAT name sound cards in ways radio can't write,
so the closing message names them and says which card to choose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
David Young
2026-11-28 13:06:17 -07:00
co-authored by Claude Opus 5.5
parent 04d973039a
commit 4053664d77
5 changed files with 286 additions and 68 deletions
+6 -5
View File
@@ -18,11 +18,12 @@ control a radio.
- [ ] `radio configure`, the rest. It writes the rigctld user service and
points WSJT-X, JS8Call, Pat, fldigi, Dire Wolf, not1mm, QLog, POTACAT
and Graywolf at it. Still to do:
- [ ] Sound cards. Each program saves its sound device under a name from
its audio backend (WSJT-X saved "pipewire" here), so find what each
saves for a USB codec on a real machine before writing it. Dire Wolf
is done: it takes ALSA names. Graywolf takes cpal device names, and
needs a channel with an audio device; POTACAT keeps audio per rig
- [ ] Sound cards for fldigi, not1mm and POTACAT. fldigi (PortAudio) and
not1mm (sounddevice) name a card with its number, as in
"USB Audio CODEC: - (hw:1,0)", which can change between boots; a
sounddevice name can match part of a name, so not1mm might take
"USB Audio CODEC". POTACAT keeps browser device ids, which only it
can see. WSJT-X, JS8Call, Dire Wolf and Graywolf are done
- [ ] flrig can't use rigctld, so it can't run alongside it. Say so, or
offer flrig as the controller instead
- [ ] More than one radio at once: a rigctld for each, on its own port