mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-06 03:29:12 -04:00
Multi device support: completely removed dependency on DSPEngine from source plugins
This commit is contained in:
parent
f4c03bcab1
commit
2b036e2212
@ -228,13 +228,13 @@ bool AirspyInput::applySettings(const AirspySettings& settings, bool force)
|
||||
if (m_settings.m_dcBlock != settings.m_dcBlock)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (m_settings.m_iqCorrection != settings.m_iqCorrection)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_devSampleRateIndex != settings.m_devSampleRateIndex) || force)
|
||||
|
@ -182,13 +182,13 @@ bool BladerfInput::applySettings(const BladeRFSettings& settings, bool force)
|
||||
if (m_settings.m_dcBlock != settings.m_dcBlock)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (m_settings.m_iqCorrection != settings.m_iqCorrection)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_lnaGain != settings.m_lnaGain) || force)
|
||||
|
@ -335,13 +335,13 @@ void FCDProInput::applySettings(const FCDProSettings& settings, bool force)
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_iqCorrection != settings.m_iqCorrection) || force)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (signalChange)
|
||||
|
@ -234,20 +234,19 @@ void FCDProPlusInput::applySettings(const FCDProPlusSettings& settings, bool for
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
m_pluginApi->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if ((m_settings.m_iqImbalance != settings.m_iqImbalance) || force)
|
||||
{
|
||||
m_settings.m_iqImbalance = settings.m_iqImbalance;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
m_pluginApi->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if (signalChange)
|
||||
{
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(fcd_traits<ProPlus>::sampleRate, m_settings.m_centerFrequency);
|
||||
m_pluginApi->getDeviceInputMessageQueue()->push(notif);
|
||||
//DSPEngine::instance()->getInputMessageQueue()->push(notif);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,13 +185,13 @@ bool HackRFInput::applySettings(const HackRFSettings& settings, bool force)
|
||||
if (m_settings.m_dcBlock != settings.m_dcBlock)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if (m_settings.m_iqCorrection != settings.m_iqCorrection)
|
||||
{
|
||||
m_settings.m_iqCorrection = settings.m_iqCorrection;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqCorrection);
|
||||
}
|
||||
|
||||
if ((m_settings.m_devSampleRateIndex != settings.m_devSampleRateIndex) || force)
|
||||
|
@ -358,13 +358,13 @@ bool RTLSDRInput::applySettings(const RTLSDRSettings& settings, bool force)
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force)
|
||||
{
|
||||
m_settings.m_dcBlock = settings.m_dcBlock;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if ((m_settings.m_iqImbalance != settings.m_iqImbalance) || force)
|
||||
{
|
||||
m_settings.m_iqImbalance = settings.m_iqImbalance;
|
||||
DSPEngine::instance()->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
m_pluginAPI->configureCorrections(m_settings.m_dcBlock, m_settings.m_iqImbalance);
|
||||
}
|
||||
|
||||
if (forwardChange)
|
||||
|
@ -124,7 +124,7 @@ bool SDRdaemonInput::handleMessage(const Message& message)
|
||||
MsgConfigureSDRdaemonAutoCorr& conf = (MsgConfigureSDRdaemonAutoCorr&) message;
|
||||
bool dcBlock = conf.getDCBlock();
|
||||
bool iqImbalance = conf.getIQImbalance();
|
||||
DSPEngine::instance()->configureCorrections(dcBlock, iqImbalance);
|
||||
m_pluginAPI->configureCorrections(dcBlock, iqImbalance);
|
||||
return true;
|
||||
}
|
||||
else if (MsgConfigureSDRdaemonAutoFollowPolicy::match(message))
|
||||
|
@ -127,12 +127,6 @@ void DSPEngine::removeAudioSink(AudioFifo* audioFifo)
|
||||
m_audioOutput.removeFifo(audioFifo);
|
||||
}
|
||||
|
||||
void DSPEngine::configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection, uint deviceIndex)
|
||||
{
|
||||
qDebug("DSPEngine::configureCorrections(%d)", deviceIndex);
|
||||
m_deviceEngines[deviceIndex]->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
}
|
||||
|
||||
DSPDeviceEngine *DSPEngine::getDeviceEngineByUID(uint uid)
|
||||
{
|
||||
std::vector<DSPDeviceEngine*>::iterator it = m_deviceEngines.begin();
|
||||
|
@ -52,8 +52,6 @@ public:
|
||||
void addSink(SampleSink* sink, uint deviceIndex = 0); //!< Add a sample sink
|
||||
void removeSink(SampleSink* sink, uint deviceIndex = 0); //!< Remove a sample sink
|
||||
|
||||
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection, uint deviceIndex = 0); //!< Configure DSP corrections
|
||||
|
||||
DSPDeviceEngine *getDeviceEngineByIndex(uint deviceIndex) { return m_deviceEngines[deviceIndex]; }
|
||||
DSPDeviceEngine *getDeviceEngineByUID(uint uid);
|
||||
|
||||
|
@ -118,6 +118,11 @@ MessageQueue *PluginAPI::getDeviceOutputMessageQueue()
|
||||
return m_pluginManager->getDeviceOutputMessageQueue();
|
||||
}
|
||||
|
||||
void PluginAPI::configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection)
|
||||
{
|
||||
m_pluginManager->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
}
|
||||
|
||||
GLSpectrum *PluginAPI::getSpectrum()
|
||||
{
|
||||
return m_pluginManager->getSpectrum();
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
uint getDeviceUID() const; //!< Return the current device engine unique ID
|
||||
MessageQueue *getDeviceInputMessageQueue();
|
||||
MessageQueue *getDeviceOutputMessageQueue();
|
||||
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection); //!< Configure current device engine DSP corrections
|
||||
|
||||
GLSpectrum *getSpectrum();
|
||||
|
||||
|
@ -65,6 +65,11 @@ public:
|
||||
MessageQueue *getDeviceInputMessageQueue() { return m_dspDeviceEngine->getInputMessageQueue(); }
|
||||
MessageQueue *getDeviceOutputMessageQueue() { return m_dspDeviceEngine->getOutputMessageQueue(); }
|
||||
|
||||
void configureCorrections(bool dcOffsetCorrection, bool iqImbalanceCorrection) //!< Configure current device engine DSP corrections
|
||||
{
|
||||
m_dspDeviceEngine->configureCorrections(dcOffsetCorrection, iqImbalanceCorrection);
|
||||
}
|
||||
|
||||
GLSpectrum *getSpectrum() { return m_spectrum; }
|
||||
|
||||
void loadSettings(const Preset* preset);
|
||||
|
Loading…
Reference in New Issue
Block a user