[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:
@@ -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
|
||||
// (L−R) 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) {
|
||||
|
||||
Reference in New Issue
Block a user