mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 17:45:48 -05:00
XTRX: fixes for better stability
This commit is contained in:
parent
3b648609db
commit
bbec66c662
@ -525,7 +525,7 @@ void XTRXOutput::getLORange(float& minF, float& maxF, float& stepF) const
|
||||
minF = 29e6;
|
||||
maxF = 3840e6;
|
||||
stepF = 10;
|
||||
qDebug("XTRXInput::getLORange: min: %f max: %f step: %f",
|
||||
qDebug("XTRXOutput::getLORange: min: %f max: %f step: %f",
|
||||
minF, maxF, stepF);
|
||||
}
|
||||
|
||||
@ -534,7 +534,7 @@ void XTRXOutput::getSRRange(float& minF, float& maxF, float& stepF) const
|
||||
minF = 100e3;
|
||||
maxF = 120e6;
|
||||
stepF = 10;
|
||||
qDebug("XTRXInput::getSRRange: min: %f max: %f step: %f",
|
||||
qDebug("XTRXOutput::getSRRange: min: %f max: %f step: %f",
|
||||
minF, maxF, stepF);
|
||||
}
|
||||
|
||||
@ -543,7 +543,7 @@ void XTRXOutput::getLPRange(float& minF, float& maxF, float& stepF) const
|
||||
minF = 500e3;
|
||||
maxF = 130e6;
|
||||
stepF = 10;
|
||||
qDebug("XTRXInput::getLPRange: min: %f max: %f step: %f",
|
||||
qDebug("XTRXOutput::getLPRange: min: %f max: %f step: %f",
|
||||
minF, maxF, stepF);
|
||||
}
|
||||
|
||||
@ -832,14 +832,14 @@ bool XTRXOutput::applySettings(const XTRXOutputSettings& settings, bool force, b
|
||||
settings.m_lpfFIREnable,
|
||||
settings.m_lpfFIRBW) < 0)
|
||||
{
|
||||
qCritical("XTRXInput::applySettings: could %s and set LPF FIR to %f Hz",
|
||||
qCritical("XTRXOutput::applySettings: could %s and set LPF FIR to %f Hz",
|
||||
settings.m_lpfFIREnable ? "enable" : "disable",
|
||||
settings.m_lpfFIRBW);
|
||||
}
|
||||
else
|
||||
{
|
||||
//doCalibration = true;
|
||||
qDebug("XTRXInput::applySettings: %sd and set LPF FIR to %f Hz",
|
||||
qDebug("XTRXOutput::applySettings: %sd and set LPF FIR to %f Hz",
|
||||
settings.m_lpfFIREnable ? "enable" : "disable",
|
||||
settings.m_lpfFIRBW);
|
||||
}
|
||||
@ -919,7 +919,7 @@ bool XTRXOutput::applySettings(const XTRXOutputSettings& settings, bool force, b
|
||||
|
||||
if (m_deviceShared.set_samplerate(settings.m_devSampleRate,
|
||||
master, //(settings.m_devSampleRate<<settings.m_log2HardDecim)*4,
|
||||
false) < 0)
|
||||
true) < 0)
|
||||
{
|
||||
qCritical("XTRXOutput::applySettings: could not set sample rate to %f with oversampling of %d",
|
||||
settings.m_devSampleRate,
|
||||
@ -1089,7 +1089,7 @@ bool XTRXOutput::applySettings(const XTRXOutputSettings& settings, bool force, b
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "XTRXInput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
|
||||
qDebug() << "XTRXOutput::applySettings: center freq: " << m_settings.m_centerFrequency << " Hz"
|
||||
<< " device stream sample rate: " << m_settings.m_devSampleRate << "S/s"
|
||||
<< " sample rate with soft interpolation: " << m_settings.m_devSampleRate/(1<<m_settings.m_log2SoftInterp) << "S/s"
|
||||
<< " m_gain: " << m_settings.m_gain
|
||||
|
@ -30,9 +30,8 @@ XTRXOutputThread::XTRXOutputThread(struct xtrx_dev *dev, unsigned int nbChannels
|
||||
m_nbChannels(nbChannels),
|
||||
m_uniqueChannelIndex(uniqueChannelIndex)
|
||||
{
|
||||
qDebug("XTRXOutputThread::XTRXOutputThread");
|
||||
qDebug("XTRXOutputThread::XTRXOutputThread: nbChannels: %u uniqueChannelIndex: %u", nbChannels, uniqueChannelIndex);
|
||||
m_channels = new Channel[2];
|
||||
m_buf = new qint16[2*DeviceXTRX::blockSize*nbChannels];
|
||||
}
|
||||
|
||||
XTRXOutputThread::~XTRXOutputThread()
|
||||
@ -43,7 +42,6 @@ XTRXOutputThread::~XTRXOutputThread()
|
||||
stopWork();
|
||||
}
|
||||
|
||||
delete[] m_buf;
|
||||
delete[] m_channels;
|
||||
}
|
||||
|
||||
@ -127,7 +125,7 @@ void XTRXOutputThread::run()
|
||||
|
||||
params.dir = XTRX_TX;
|
||||
params.tx_repeat_buf = 0;
|
||||
params.tx.paketsize = DeviceXTRX::blockSize;
|
||||
params.tx.paketsize = 2*DeviceXTRX::blockSize;
|
||||
params.tx.chs = XTRX_CH_AB;
|
||||
params.tx.wfmt = XTRX_WF_16;
|
||||
params.tx.hfmt = XTRX_IQ_INT16;
|
||||
@ -168,7 +166,9 @@ void XTRXOutputThread::run()
|
||||
nfo.samples = DeviceXTRX::blockSize;
|
||||
nfo.buffer_count = m_nbChannels;
|
||||
nfo.buffers = (void* const*) buffs.data();
|
||||
nfo.flags = 0; //XTRX_TX_SEND_ZEROS;
|
||||
nfo.flags = XTRX_TX_DONT_BUFFER; // | XTRX_TX_SEND_ZEROS;
|
||||
nfo.timeout = 0;
|
||||
nfo.out_txlatets = 0;
|
||||
nfo.ts = ts;
|
||||
|
||||
while (m_running)
|
||||
@ -189,6 +189,14 @@ void XTRXOutputThread::run()
|
||||
break;
|
||||
}
|
||||
|
||||
if (nfo.out_flags & XTRX_TX_DISCARDED_TO) {
|
||||
qDebug("XTRXOutputThread::run: underrun");
|
||||
}
|
||||
|
||||
if (nfo.out_txlatets) {
|
||||
qDebug("XTRXOutputThread::run: out_txlatets: %lu", nfo.out_txlatets);
|
||||
}
|
||||
|
||||
nfo.ts += DeviceXTRX::blockSize;
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,6 @@ private:
|
||||
struct xtrx_dev *m_dev;
|
||||
|
||||
Channel *m_channels; //!< Array of channels dynamically allocated for the given number of Rx channels
|
||||
qint16 *m_buf; //!< Full buffer for SISO or MIMO operation
|
||||
unsigned int m_nbChannels;
|
||||
unsigned int m_uniqueChannelIndex;
|
||||
|
||||
|
@ -95,6 +95,7 @@ void XTRXInputThread::run()
|
||||
params.rx.wfmt = XTRX_WF_16;
|
||||
params.rx.hfmt = XTRX_IQ_INT16;
|
||||
params.rx_stream_start = 2*DeviceXTRX::blockSize; // was 2*8192
|
||||
params.rx.paketsize = 2*DeviceXTRX::blockSize;
|
||||
|
||||
if (m_nbChannels == 1)
|
||||
{
|
||||
@ -144,6 +145,10 @@ void XTRXInputThread::run()
|
||||
break;
|
||||
}
|
||||
|
||||
if (nfo.out_events & RCVEX_EVENT_OVERFLOW) {
|
||||
qDebug("XTRXInputThread::run: overflow");
|
||||
}
|
||||
|
||||
if (m_nbChannels > 1) {
|
||||
callbackMI((const qint16*) buffs[0], (const qint16*) buffs[1], 2 * nfo.out_samples);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user