mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-03 21:20:31 -05:00 
			
		
		
		
	LimeSDR: added soft decimation/interpolation by 64
This commit is contained in:
		
							parent
							
								
									a159e72e20
								
							
						
					
					
						commit
						10cbfb3b44
					
				@ -395,7 +395,7 @@ void LimeSDROutputGUI::on_hwInterp_currentIndexChanged(int index)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void LimeSDROutputGUI::on_swInterp_currentIndexChanged(int index)
 | 
					void LimeSDROutputGUI::on_swInterp_currentIndexChanged(int index)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if ((index <0) || (index > 5))
 | 
					    if ((index <0) || (index > 6))
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    m_settings.m_log2SoftInterp = index;
 | 
					    m_settings.m_log2SoftInterp = index;
 | 
				
			||||||
    sendSettings();
 | 
					    sendSettings();
 | 
				
			||||||
 | 
				
			|||||||
@ -295,7 +295,7 @@
 | 
				
			|||||||
        <string>TSP hardware interpolation factor</string>
 | 
					        <string>TSP hardware interpolation factor</string>
 | 
				
			||||||
       </property>
 | 
					       </property>
 | 
				
			||||||
       <property name="currentIndex">
 | 
					       <property name="currentIndex">
 | 
				
			||||||
        <number>2</number>
 | 
					        <number>0</number>
 | 
				
			||||||
       </property>
 | 
					       </property>
 | 
				
			||||||
       <item>
 | 
					       <item>
 | 
				
			||||||
        <property name="text">
 | 
					        <property name="text">
 | 
				
			||||||
@ -383,6 +383,11 @@
 | 
				
			|||||||
         <string>32</string>
 | 
					         <string>32</string>
 | 
				
			||||||
        </property>
 | 
					        </property>
 | 
				
			||||||
       </item>
 | 
					       </item>
 | 
				
			||||||
 | 
					       <item>
 | 
				
			||||||
 | 
					        <property name="text">
 | 
				
			||||||
 | 
					         <string>64</string>
 | 
				
			||||||
 | 
					        </property>
 | 
				
			||||||
 | 
					       </item>
 | 
				
			||||||
      </widget>
 | 
					      </widget>
 | 
				
			||||||
     </item>
 | 
					     </item>
 | 
				
			||||||
     <item>
 | 
					     <item>
 | 
				
			||||||
 | 
				
			|||||||
@ -30,7 +30,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = {
 | 
					const PluginDescriptor LimeSDROutputPlugin::m_pluginDescriptor = {
 | 
				
			||||||
    QString("LimeSDR Output"),
 | 
					    QString("LimeSDR Output"),
 | 
				
			||||||
    QString("3.4.0"),
 | 
					    QString("3.4.4"),
 | 
				
			||||||
    QString("(c) Edouard Griffiths, F4EXB"),
 | 
					    QString("(c) Edouard Griffiths, F4EXB"),
 | 
				
			||||||
    QString("https://github.com/f4exb/sdrangel"),
 | 
					    QString("https://github.com/f4exb/sdrangel"),
 | 
				
			||||||
    true,
 | 
					    true,
 | 
				
			||||||
 | 
				
			|||||||
@ -84,9 +84,9 @@ void LimeSDROutputThread::run()
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    count = 0;
 | 
					    count = 0;
 | 
				
			||||||
    msleep = LIMESDROUTPUT_BLOCKSIZE/(m_sampleRate/1e6f);
 | 
					//    msleep = LIMESDROUTPUT_BLOCKSIZE/(m_sampleRate/1e6f);
 | 
				
			||||||
    mdelta = msleep/100;
 | 
					//    mdelta = msleep/100;
 | 
				
			||||||
    msleep = (3*msleep)/4; // to start faster
 | 
					//    msleep = (3*msleep)/4; // to start faster
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    while (m_running)
 | 
					    while (m_running)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -104,25 +104,25 @@ void LimeSDROutputThread::run()
 | 
				
			|||||||
            qDebug("LimeSDROutputThread::run written %d/%d samples", res, LIMESDROUTPUT_BLOCKSIZE);
 | 
					            qDebug("LimeSDROutputThread::run written %d/%d samples", res, LIMESDROUTPUT_BLOCKSIZE);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        usleep(msleep);
 | 
					//        usleep(msleep);
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
        if (count < 10)
 | 
					//        if (count < 10)
 | 
				
			||||||
        {
 | 
					//        {
 | 
				
			||||||
            count++;
 | 
					//            count++;
 | 
				
			||||||
        }
 | 
					//        }
 | 
				
			||||||
        else
 | 
					//        else
 | 
				
			||||||
        {
 | 
					//        {
 | 
				
			||||||
            if (LMS_GetStreamStatus(m_stream, &streamStatus) == 0)
 | 
					//            if (LMS_GetStreamStatus(m_stream, &streamStatus) == 0)
 | 
				
			||||||
            {
 | 
					//            {
 | 
				
			||||||
                if (streamStatus.fifoFilledCount < (4*streamStatus.fifoSize)/5) { // FIFO at 80%
 | 
					//                if (streamStatus.fifoFilledCount < (4*streamStatus.fifoSize)/5) { // FIFO at 80%
 | 
				
			||||||
                    msleep -= mdelta;
 | 
					//                    msleep -= mdelta;
 | 
				
			||||||
                } else {
 | 
					//                } else {
 | 
				
			||||||
                    msleep += mdelta;
 | 
					//                    msleep += mdelta;
 | 
				
			||||||
                }
 | 
					//                }
 | 
				
			||||||
            }
 | 
					//            }
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
            count = 0;
 | 
					//            count = 0;
 | 
				
			||||||
        }
 | 
					//        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (LMS_StopStream(m_stream) < 0) {
 | 
					    if (LMS_StopStream(m_stream) < 0) {
 | 
				
			||||||
 | 
				
			|||||||
@ -427,7 +427,7 @@ void LimeSDRInputGUI::on_hwDecim_currentIndexChanged(int index)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void LimeSDRInputGUI::on_swDecim_currentIndexChanged(int index)
 | 
					void LimeSDRInputGUI::on_swDecim_currentIndexChanged(int index)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if ((index <0) || (index > 5))
 | 
					    if ((index <0) || (index > 6))
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    m_settings.m_log2SoftDecim = index;
 | 
					    m_settings.m_log2SoftDecim = index;
 | 
				
			||||||
    sendSettings();
 | 
					    sendSettings();
 | 
				
			||||||
 | 
				
			|||||||
@ -330,7 +330,7 @@
 | 
				
			|||||||
        <string>TSP hardware decimation factor</string>
 | 
					        <string>TSP hardware decimation factor</string>
 | 
				
			||||||
       </property>
 | 
					       </property>
 | 
				
			||||||
       <property name="currentIndex">
 | 
					       <property name="currentIndex">
 | 
				
			||||||
        <number>2</number>
 | 
					        <number>0</number>
 | 
				
			||||||
       </property>
 | 
					       </property>
 | 
				
			||||||
       <item>
 | 
					       <item>
 | 
				
			||||||
        <property name="text">
 | 
					        <property name="text">
 | 
				
			||||||
@ -418,6 +418,11 @@
 | 
				
			|||||||
         <string>32</string>
 | 
					         <string>32</string>
 | 
				
			||||||
        </property>
 | 
					        </property>
 | 
				
			||||||
       </item>
 | 
					       </item>
 | 
				
			||||||
 | 
					       <item>
 | 
				
			||||||
 | 
					        <property name="text">
 | 
				
			||||||
 | 
					         <string>64</string>
 | 
				
			||||||
 | 
					        </property>
 | 
				
			||||||
 | 
					       </item>
 | 
				
			||||||
      </widget>
 | 
					      </widget>
 | 
				
			||||||
     </item>
 | 
					     </item>
 | 
				
			||||||
     <item>
 | 
					     <item>
 | 
				
			||||||
 | 
				
			|||||||
@ -31,7 +31,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const PluginDescriptor LimeSDRInputPlugin::m_pluginDescriptor = {
 | 
					const PluginDescriptor LimeSDRInputPlugin::m_pluginDescriptor = {
 | 
				
			||||||
    QString("LimeSDR Input"),
 | 
					    QString("LimeSDR Input"),
 | 
				
			||||||
    QString("3.4.0"),
 | 
					    QString("3.4.4"),
 | 
				
			||||||
    QString("(c) Edouard Griffiths, F4EXB"),
 | 
					    QString("(c) Edouard Griffiths, F4EXB"),
 | 
				
			||||||
    QString("https://github.com/f4exb/sdrangel"),
 | 
					    QString("https://github.com/f4exb/sdrangel"),
 | 
				
			||||||
    true,
 | 
					    true,
 | 
				
			||||||
 | 
				
			|||||||
@ -132,6 +132,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len)
 | 
				
			|||||||
            case 5:
 | 
					            case 5:
 | 
				
			||||||
                m_decimators.decimate32_inf(&it, buf, len);
 | 
					                m_decimators.decimate32_inf(&it, buf, len);
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
 | 
					            case 6:
 | 
				
			||||||
 | 
					                m_decimators.decimate64_inf(&it, buf, len);
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
            default:
 | 
					            default:
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@ -155,6 +158,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len)
 | 
				
			|||||||
            case 5:
 | 
					            case 5:
 | 
				
			||||||
                m_decimators.decimate32_sup(&it, buf, len);
 | 
					                m_decimators.decimate32_sup(&it, buf, len);
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
 | 
					            case 6:
 | 
				
			||||||
 | 
					                m_decimators.decimate64_sup(&it, buf, len);
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
            default:
 | 
					            default:
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@ -178,6 +184,9 @@ void LimeSDRInputThread::callback(const qint16* buf, qint32 len)
 | 
				
			|||||||
            case 5:
 | 
					            case 5:
 | 
				
			||||||
                m_decimators.decimate32_cen(&it, buf, len);
 | 
					                m_decimators.decimate32_cen(&it, buf, len);
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
 | 
					            case 6:
 | 
				
			||||||
 | 
					                m_decimators.decimate64_cen(&it, buf, len);
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
            default:
 | 
					            default:
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user