1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-15 04:41:55 -05:00

Tx channels: fixed stream assignment with MIMO devices

This commit is contained in:
f4exb 2019-11-19 01:22:55 +01:00
parent 4d14f332bc
commit 4326af12ee
9 changed files with 120 additions and 0 deletions

View File

@ -230,6 +230,19 @@ void FileSource::applySettings(const FileSourceSettings& settings, bool force)
reverseAPIKeys.append("gainDB");
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
FileSourceBaseband::MsgConfigureFileSourceBaseband *msg = FileSourceBaseband::MsgConfigureFileSourceBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);

View File

@ -286,6 +286,22 @@ void LocalSource::applySettings(const LocalSourceSettings& settings, bool force)
m_basebandSource->getInputMessageQueue()->push(msg);
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
LocalSourceBaseband::MsgConfigureLocalSourceBaseband *msg = LocalSourceBaseband::MsgConfigureLocalSourceBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);
if ((settings.m_useReverseAPI) && (reverseAPIKeys.size() != 0))
{
bool fullUpdate = ((m_settings.m_useReverseAPI != settings.m_useReverseAPI) && settings.m_useReverseAPI) ||

View File

@ -294,6 +294,19 @@ void ATVMod::applySettings(const ATVModSettings& settings, bool force)
reverseAPIKeys.append("overlayText");
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
ATVModBaseband::MsgConfigureATVModBaseband *msg = ATVModBaseband::MsgConfigureATVModBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);

View File

@ -286,6 +286,19 @@ void FreeDVMod::applySettings(const FreeDVModSettings& settings, bool force)
}
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
FreeDVModBaseband::MsgConfigureFreeDVModBaseband *msg = FreeDVModBaseband::MsgConfigureFreeDVModBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);

View File

@ -360,6 +360,19 @@ void NFMMod::applySettings(const NFMModSettings& settings, bool force)
}
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
NFMModBaseband::MsgConfigureNFMModBaseband *msg = NFMModBaseband::MsgConfigureNFMModBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);

View File

@ -315,6 +315,19 @@ void SSBMod::applySettings(const SSBModSettings& settings, bool force)
}
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
SSBModBaseband::MsgConfigureSSBModBaseband *msg = SSBModBaseband::MsgConfigureSSBModBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);

View File

@ -287,6 +287,19 @@ void WFMMod::applySettings(const WFMModSettings& settings, bool force)
}
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
WFMModBaseband::MsgConfigureWFMModBaseband *msg = WFMModBaseband::MsgConfigureWFMModBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);

View File

@ -176,6 +176,19 @@ void RemoteSource::applySettings(const RemoteSourceSettings& settings, bool forc
reverseAPIKeys.append("dataPort");
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
RemoteSourceBaseband::MsgConfigureRemoteSourceBaseband *msg = RemoteSourceBaseband::MsgConfigureRemoteSourceBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);

View File

@ -220,6 +220,19 @@ void UDPSource::applySettings(const UDPSourceSettings& settings, bool force)
reverseAPIKeys.append("stereoInput");
}
if (m_settings.m_streamIndex != settings.m_streamIndex)
{
if (m_deviceAPI->getSampleMIMO()) // change of stream is possible for MIMO devices only
{
m_deviceAPI->removeChannelSourceAPI(this, m_settings.m_streamIndex);
m_deviceAPI->removeChannelSource(this, m_settings.m_streamIndex);
m_deviceAPI->addChannelSource(this, settings.m_streamIndex);
m_deviceAPI->addChannelSourceAPI(this, settings.m_streamIndex);
}
reverseAPIKeys.append("streamIndex");
}
UDPSourceBaseband::MsgConfigureUDPSourceBaseband *msg = UDPSourceBaseband::MsgConfigureUDPSourceBaseband::create(settings, force);
m_basebandSource->getInputMessageQueue()->push(msg);