File: 0001-fix-automatic-filter-bandwidth-selection.patch

package info (click to toggle)
soapyhackrf 0.3.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 276 kB
  • sloc: cpp: 1,425; python: 32; xml: 20; makefile: 10
file content (49 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 8dab6e53b1828c1e9a9e5a989e73a6435bab2164 Mon Sep 17 00:00:00 2001
From: Michael Ossmann <mike@ossmann.com>
Date: Sat, 24 Sep 2022 06:48:48 -0400
Subject: [PATCH 1/4] fix automatic filter bandwidth selection

---
 HackRF_Settings.cpp | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/HackRF_Settings.cpp b/HackRF_Settings.cpp
index d50d98d..8ef5696 100644
--- a/HackRF_Settings.cpp
+++ b/HackRF_Settings.cpp
@@ -557,23 +557,6 @@ void SoapyHackRF::setSampleRate( const int direction, const size_t channel, cons
 	{
 		int ret = hackrf_set_sample_rate( _dev, _current_samplerate );
 
-		if(_auto_bandwidth){
-
-			_current_bandwidth=hackrf_compute_baseband_filter_bw_round_down_lt(_current_samplerate);
-
-
-			if(direction==SOAPY_SDR_RX){
-
-				_rx_stream.bandwidth=_current_bandwidth;
-			}
-			if(direction==SOAPY_SDR_TX){
-
-				_tx_stream.bandwidth=_current_bandwidth;
-			}
-
-			ret|=hackrf_set_baseband_filter_bandwidth(_dev,_current_bandwidth);
-		}
-
 		if ( ret != HACKRF_SUCCESS )
 		{
 			SoapySDR::logf( SOAPY_SDR_ERROR, "hackrf_set_sample_rate(%f) returned %s", _current_samplerate, hackrf_error_name( (hackrf_error) ret ) );
@@ -614,7 +597,7 @@ std::vector<double> SoapyHackRF::listSampleRates( const int direction, const siz
 void SoapyHackRF::setBandwidth( const int direction, const size_t channel, const double bw )
 {
 	std::lock_guard<std::mutex> lock(_device_mutex);
-	_current_bandwidth = hackrf_compute_baseband_filter_bw(bw);
+	_current_bandwidth = bw;
 
 	if(direction==SOAPY_SDR_RX){
 
-- 
2.47.3