feat: CpalBackend wiring for TNC binaries + on-air test plan#105
Merged
Conversation
- openpulse-config: add [audio] section (backend, input_device, output_device); default backend is "cpal" for production builds - openpulse-ardop + openpulse-kiss: add `cpal` feature flag that enables openpulse-audio/cpal-backend; add --backend CLI flag; select CpalBackend when feature is compiled in, fall back to loopback with a warning if not - docs/on-air_testplan.md: detailed setup instructions, station config examples, test matrix (BPSK250 exchange, rate adaptation, Winlink RMS via RF, multi-mode ladder, ID compliance), diagnostics table
There was a problem hiding this comment.
Pull request overview
This PR adds configurable audio-backend selection (CPAL vs loopback) to the ARDOP and KISS TNC binaries, extends openpulse-config with an [audio] section, and introduces an on-air test plan document to guide real-station validation.
Changes:
- Add
[audio]config (backend + device name fields) toopenpulse-configand its generated config template. - Wire
--backendCLI override + config-based backend selection intoopenpulse-tncandopenpulse-kisstnc, including a non-CPAL fallback path. - Add
docs/on-air_testplan.mdwith station setup, build steps, and test matrix.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/on-air_testplan.md | New on-air validation plan and operational checklist for two-station testing. |
| crates/openpulse-kiss/src/main.rs | Adds backend CLI/config selection and CPAL feature-gated wiring for the KISS TNC binary. |
| crates/openpulse-kiss/Cargo.toml | Introduces a cpal feature that enables openpulse-audio/cpal-backend. |
| crates/openpulse-config/src/lib.rs | Adds [audio] config section (backend + device names) and updates the init template. |
| crates/openpulse-ardop/src/main.rs | Adds backend CLI/config selection and CPAL feature-gated wiring for the ARDOP TNC binary. |
| crates/openpulse-ardop/Cargo.toml | Introduces a cpal feature that enables openpulse-audio/cpal-backend. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+123
to
+124
| # Connect to the KISS TCP port and send a test AX.25 UI frame | ||
| echo -n "TEST" | socat - TCP:127.0.0.1:8100 |
|
|
||
| ```bash | ||
| # Long-running IRS session | ||
| ./target/release/openpulse-tnc --mode BPSK250 --backend cpal --log debug |
Comment on lines
+67
to
+68
| name => anyhow::bail!("unknown audio backend '{name}' — use 'cpal' or 'loopback'"), | ||
| }; |
Comment on lines
+61
to
+65
| "cpal" | "default" => { | ||
| tracing::warn!( | ||
| "cpal backend not compiled in (build with --features cpal); using loopback" | ||
| ); | ||
| Box::new(LoopbackBackend::default()) |
Comment on lines
+74
to
+75
| name => anyhow::bail!("unknown audio backend '{name}' — use 'cpal' or 'loopback'"), | ||
| }; |
Comment on lines
+68
to
+72
| "cpal" | "default" => { | ||
| tracing::warn!( | ||
| "cpal backend not compiled in (build with --features cpal); using loopback" | ||
| ); | ||
| Box::new(LoopbackBackend::default()) |
Comment on lines
+43
to
+51
| /// Audio backend and device selection. | ||
| #[derive(Debug, Clone, Deserialize, Serialize)] | ||
| #[serde(default)] | ||
| pub struct AudioConfig { | ||
| /// Audio backend: `cpal` (real hardware) or `loopback` (testing). | ||
| pub backend: String, | ||
| /// Input device name. Empty string selects the system default. | ||
| pub input_device: String, | ||
| /// Output device name. Empty string selects the system default. |
…t backend, fix testplan examples - Remove input_device/output_device from AudioConfig (not wired to engine) - Change AudioConfig default backend from "cpal" to "default" - Split "cpal" vs "default" backend match arms: "default" silently falls back to loopback when cpal feature absent; "cpal" warns - Update --backend help text and bail message to include "default" - Update init_template [audio] section with backend option descriptions - Fix KISS frame example in on-air_testplan.md (socat → Python socket) - Replace --log debug with RUST_LOG=debug in testplan examples - Remove input_device/output_device from testplan station config example - Change testplan backend example from "cpal" to "default"
dc0sk
commented
May 5, 2026
Owner
Author
dc0sk
left a comment
There was a problem hiding this comment.
Please re-review updated changes.
Owner
Author
|
@copilot review |
Copilot stopped work on behalf of
dc0sk due to an error
May 5, 2026 16:43
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.
Summary
openpulse-config: new[audio]section —backend(cpal/loopback),input_device,output_device; default backend iscpalopenpulse-ardop+openpulse-kiss:cpalfeature flag enablesopenpulse-audio/cpal-backend;--backendCLI flag overrides config; graceful fallback to loopback with warning when feature not compiled indocs/on-air_testplan.md: full test plan with station setup, config examples, 5-test matrix, regulatory checklist, and diagnostics tableBuild for production (real audio)
CI continues to use
--no-default-features(loopback only — no hardware required).Test plan
cargo test --workspace --no-default-featurescargo clippy --workspace --no-default-features -- -D warningscargo fmt --all -- --check