mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-21 22:38:08 +00:00
Transceiver52M: Remove periodic alignment update from UHD build
Periodic timing alignment should never be required for UHD devices, though the mechanism was used as a fallback mechanism should UHD not properly recover after an underrun - as may occur in old 003.003.000 based revisions. This issue is not a concern in more recent UHD releases and deprecates this code for legacy USRP1 use only. Signed-off-by: Thomas Tsou <tom@tsou.cc>
This commit is contained in:
@@ -772,7 +772,6 @@ int uhd_device::writeSamples(short *buf, int len, bool *underrun,
|
|||||||
|
|
||||||
bool uhd_device::updateAlignment(TIMESTAMP timestamp)
|
bool uhd_device::updateAlignment(TIMESTAMP timestamp)
|
||||||
{
|
{
|
||||||
aligned = false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,8 +118,10 @@ bool RadioInterface::tuneRx(double freq)
|
|||||||
void RadioInterface::start()
|
void RadioInterface::start()
|
||||||
{
|
{
|
||||||
LOG(INFO) << "starting radio interface...";
|
LOG(INFO) << "starting radio interface...";
|
||||||
|
#ifdef USRP1
|
||||||
mAlignRadioServiceLoopThread.start((void * (*)(void*))AlignRadioServiceLoopAdapter,
|
mAlignRadioServiceLoopThread.start((void * (*)(void*))AlignRadioServiceLoopAdapter,
|
||||||
(void*)this);
|
(void*)this);
|
||||||
|
#endif
|
||||||
writeTimestamp = mRadio->initialWriteTimestamp();
|
writeTimestamp = mRadio->initialWriteTimestamp();
|
||||||
readTimestamp = mRadio->initialReadTimestamp();
|
readTimestamp = mRadio->initialReadTimestamp();
|
||||||
mRadio->start();
|
mRadio->start();
|
||||||
@@ -134,6 +136,7 @@ void RadioInterface::start()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef USRP1
|
||||||
void *AlignRadioServiceLoopAdapter(RadioInterface *radioInterface)
|
void *AlignRadioServiceLoopAdapter(RadioInterface *radioInterface)
|
||||||
{
|
{
|
||||||
while (1) {
|
while (1) {
|
||||||
@@ -147,6 +150,7 @@ void RadioInterface::alignRadio() {
|
|||||||
sleep(60);
|
sleep(60);
|
||||||
mRadio->updateAlignment(writeTimestamp+ (TIMESTAMP) 10000);
|
mRadio->updateAlignment(writeTimestamp+ (TIMESTAMP) 10000);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void RadioInterface::driveTransmitRadio(signalVector &radioBurst, bool zeroBurst) {
|
void RadioInterface::driveTransmitRadio(signalVector &radioBurst, bool zeroBurst) {
|
||||||
|
|
||||||
@@ -218,14 +222,6 @@ bool RadioInterface::isUnderrun()
|
|||||||
return retVal;
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioInterface::attach(RadioDevice *wRadio, int wRadioOversampling)
|
|
||||||
{
|
|
||||||
if (!mOn) {
|
|
||||||
mRadio = wRadio;
|
|
||||||
mRadioOversampling = SAMPSPERSYM;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
double RadioInterface::setRxGain(double dB)
|
double RadioInterface::setRxGain(double dB)
|
||||||
{
|
{
|
||||||
if (mRadio)
|
if (mRadio)
|
||||||
|
|||||||
@@ -143,17 +143,17 @@ public:
|
|||||||
/** get transport window type of attached device */
|
/** get transport window type of attached device */
|
||||||
enum RadioDevice::TxWindowType getWindowType() { return mRadio->getWindowType(); }
|
enum RadioDevice::TxWindowType getWindowType() { return mRadio->getWindowType(); }
|
||||||
|
|
||||||
|
#if USRP1
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/** drive synchronization of Tx/Rx of USRP */
|
/** drive synchronization of Tx/Rx of USRP */
|
||||||
void alignRadio();
|
void alignRadio();
|
||||||
|
|
||||||
/** reset the interface */
|
|
||||||
void reset();
|
|
||||||
|
|
||||||
friend void *AlignRadioServiceLoopAdapter(RadioInterface*);
|
friend void *AlignRadioServiceLoopAdapter(RadioInterface*);
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if USRP1
|
||||||
/** synchronization thread loop */
|
/** synchronization thread loop */
|
||||||
void *AlignRadioServiceLoopAdapter(RadioInterface*);
|
void *AlignRadioServiceLoopAdapter(RadioInterface*);
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user