uhd: Use full DAC scale with UmTRX to improve signal quality.
Signed-off-by: Tom Tsou <tom@tsou.cc>
This commit is contained in:
parent
2cc2ddda41
commit
88bbf1aafd
|
@ -36,7 +36,8 @@
|
|||
#define E1XX_CLK_RT 52e6
|
||||
#define B100_BASE_RT 400000
|
||||
#define USRP2_BASE_RT 390625
|
||||
#define TX_AMPL 0.3
|
||||
#define USRP_TX_AMPL 0.3
|
||||
#define UMTRX_TX_AMPL 0.7
|
||||
#define SAMPLE_BUF_SZ (1 << 20)
|
||||
|
||||
/*
|
||||
|
@ -305,8 +306,8 @@ public:
|
|||
inline TIMESTAMP initialWriteTimestamp() { return ts_initial * sps; }
|
||||
inline TIMESTAMP initialReadTimestamp() { return ts_initial; }
|
||||
|
||||
inline double fullScaleInputValue() { return 32000 * TX_AMPL; }
|
||||
inline double fullScaleOutputValue() { return 32000; }
|
||||
double fullScaleInputValue();
|
||||
double fullScaleOutputValue();
|
||||
|
||||
double setRxGain(double db, size_t chan);
|
||||
double getRxGain(size_t chan);
|
||||
|
@ -1182,6 +1183,19 @@ double uhd_device::getRxFreq(size_t chan)
|
|||
return rx_freqs[chan];
|
||||
}
|
||||
|
||||
double uhd_device::fullScaleInputValue()
|
||||
{
|
||||
if (dev_type == UMTRX)
|
||||
return (double) SHRT_MAX * UMTRX_TX_AMPL;
|
||||
else
|
||||
return (double) SHRT_MAX * USRP_TX_AMPL;
|
||||
}
|
||||
|
||||
double uhd_device::fullScaleOutputValue()
|
||||
{
|
||||
return (double) SHRT_MAX;
|
||||
}
|
||||
|
||||
bool uhd_device::recv_async_msg()
|
||||
{
|
||||
uhd::async_metadata_t md;
|
||||
|
|
Loading…
Reference in New Issue