[fix](trx-backend-soapysdr): enforce 9 kHz minimum bandwidth for AMC mode

clamp_bandwidth_for_mode now floors AMC bandwidth at 9 kHz so that both
the sum (L+R) and difference (L−R) sidebands are always captured,
regardless of what the user or a set_filter call requests.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
2026-03-17 00:19:35 +01:00
parent e337870d53
commit 7a144375f2
@@ -217,8 +217,12 @@ pub struct ChannelDsp {
impl ChannelDsp {
fn clamp_bandwidth_for_mode(mode: &RigMode, bandwidth_hz: u32) -> u32 {
let _ = mode;
bandwidth_hz
match mode {
// C-QUAM requires ≥ 9 kHz to capture both sum (L+R) and difference
// (LR) sidebands; narrower bandwidths would discard stereo content.
RigMode::AMC => bandwidth_hz.max(9_000),
_ => bandwidth_hz,
}
}
pub fn set_channel_if_hz(&mut self, channel_if_hz: f64) {