<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-trx/+/14987">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">radioInterface: Clarify how underruns are handled driving a radioDevice<br><br>The underrun parameter in radioDevice's readSamples() is not a "Rx<br>Underrun" event, but rather it's used to retrieve a "Tx Underrun" which<br>on some SDRs (like USRP1) seems to be (so far) available only at<br>readSamples() times.<br><br>Thus, underrun parameter for both readSamples() and writeSamples() is<br>actually flagging the same event, and should be ORed in pushBuffer() as<br>it's already done in pullBuffer(). Otherwise if implementation is<br>setting the underrun pointer to false, it could erase the flag being<br>marked by the counterpart function before isUnderrun() is called (which<br>is the one responsible to clear the flag).<br><br>Change-Id: Id549489fc1485e0d762818c8e682aaddd5041f1c<br>---<br>M Transceiver52M/radioInterface.cpp<br>1 file changed, 3 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/87/14987/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp</span><br><span>index e32848e..0d33f22 100644</span><br><span>--- a/Transceiver52M/radioInterface.cpp</span><br><span>+++ b/Transceiver52M/radioInterface.cpp</span><br><span>@@ -348,6 +348,7 @@</span><br><span> /* Send timestamped chunk to the device with arbitrary size */</span><br><span> bool RadioInterface::pushBuffer()</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+  bool local_underrun;</span><br><span>   size_t numSent, segmentLen = sendBuffer[0]->getSegmentLen();</span><br><span> </span><br><span>   if (sendBuffer[0]->getAvailSegments() < 1)</span><br><span>@@ -363,8 +364,9 @@</span><br><span>   /* Send the all samples in the send buffer */</span><br><span>   numSent = mRadio->writeSamples(convertSendBuffer,</span><br><span>                                  segmentLen,</span><br><span style="color: hsl(0, 100%, 40%);">-                                 &underrun,</span><br><span style="color: hsl(120, 100%, 40%);">+                                 &local_underrun,</span><br><span>                                  writeTimestamp);</span><br><span style="color: hsl(120, 100%, 40%);">+  underrun |= local_underrun;</span><br><span>   writeTimestamp += numSent;</span><br><span> </span><br><span>   return true;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-trx/+/14987">change 14987</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-trx/+/14987"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-trx </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Id549489fc1485e0d762818c8e682aaddd5041f1c </div>
<div style="display:none"> Gerrit-Change-Number: 14987 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>