laforge
/
openbts-osmo
Archived
1
0
Fork 0

usrp1: fix transmit side tuning bug

Transmit tuning was primarily setup for side A only. Some boards
- WBX - would still tune with improper channel arguments, though
receiver performance was disrupted.

Previous testing was primarily with single board on side A only
or dual configuration with side A transmit, so this bug largely
went undetected. Patch tested with RFX and WBX daughterboards
in single and dual configurations sides A and B.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
master
Thomas Tsou 12 years ago
parent e8cb2708b2
commit d186353546
  1. 15
      public-trunk/Transceiver/USRPDevice.cpp
  2. 15
      public-trunk/Transceiver52M/USRPDevice.cpp

@ -127,36 +127,29 @@ bool USRPDevice::open()
switch (dboardConfig) {
case TXA_RXB:
m_dbTx = m_uTx->db(0)[0];
m_dbRx = m_uRx->db(1)[0];
txSubdevSpec = usrp_subdev_spec(0,0);
rxSubdevSpec = usrp_subdev_spec(1,0);
break;
case TXB_RXA:
m_dbTx = m_uTx->db(1)[0];
m_dbRx = m_uRx->db(0)[0];
txSubdevSpec = usrp_subdev_spec(1,0);
rxSubdevSpec = usrp_subdev_spec(0,0);
break;
case TXA_RXA:
m_dbTx = m_uTx->db(0)[0];
m_dbRx = m_uRx->db(0)[0];
txSubdevSpec = usrp_subdev_spec(0,0);
rxSubdevSpec = usrp_subdev_spec(0,0);
break;
case TXB_RXB:
m_dbTx = m_uTx->db(1)[0];
m_dbRx = m_uRx->db(1)[0];
txSubdevSpec = usrp_subdev_spec(1,0);
rxSubdevSpec = usrp_subdev_spec(1,0);
break;
default:
m_dbTx = m_uTx->db(0)[0];
m_dbRx = m_uRx->db(1)[0];
txSubdevSpec = usrp_subdev_spec(0,0);
rxSubdevSpec = usrp_subdev_spec(1,0);
}
m_dbTx = m_uTx->selected_subdev(txSubdevSpec);
m_dbRx = m_uRx->selected_subdev(rxSubdevSpec);
samplesRead = 0;
samplesWritten = 0;
started = false;
@ -496,7 +489,7 @@ bool USRPDevice::setTxFreq(double wFreq)
{
usrp_tune_result result;
if (m_uTx->tune(0, m_dbTx, wFreq, &result)) {
if (m_uTx->tune(txSubdevSpec.side, m_dbTx, wFreq, &result)) {
LOG(INFO) << "set TX: " << wFreq << std::endl
<< " baseband freq: " << result.baseband_freq << std::endl
<< " DDC freq: " << result.dxc_freq << std::endl

@ -130,36 +130,29 @@ bool USRPDevice::open()
switch (dboardConfig) {
case TXA_RXB:
m_dbTx = m_uTx->db(0)[0];
m_dbRx = m_uRx->db(1)[0];
txSubdevSpec = usrp_subdev_spec(0,0);
rxSubdevSpec = usrp_subdev_spec(1,0);
break;
case TXB_RXA:
m_dbTx = m_uTx->db(1)[0];
m_dbRx = m_uRx->db(0)[0];
txSubdevSpec = usrp_subdev_spec(1,0);
rxSubdevSpec = usrp_subdev_spec(0,0);
break;
case TXA_RXA:
m_dbTx = m_uTx->db(0)[0];
m_dbRx = m_uRx->db(0)[0];
txSubdevSpec = usrp_subdev_spec(0,0);
rxSubdevSpec = usrp_subdev_spec(0,0);
break;
case TXB_RXB:
m_dbTx = m_uTx->db(1)[0];
m_dbRx = m_uRx->db(1)[0];
txSubdevSpec = usrp_subdev_spec(1,0);
rxSubdevSpec = usrp_subdev_spec(1,0);
break;
default:
m_dbTx = m_uTx->db(0)[0];
m_dbRx = m_uRx->db(1)[0];
txSubdevSpec = usrp_subdev_spec(0,0);
rxSubdevSpec = usrp_subdev_spec(1,0);
}
m_dbTx = m_uTx->selected_subdev(txSubdevSpec);
m_dbRx = m_uRx->selected_subdev(rxSubdevSpec);
samplesRead = 0;
samplesWritten = 0;
started = false;
@ -513,7 +506,7 @@ bool USRPDevice::setTxFreq(double wFreq)
{
usrp_tune_result result;
if (m_uTx->tune(0, m_dbTx, wFreq, &result)) {
if (m_uTx->tune(txSubdevSpec.side, m_dbTx, wFreq, &result)) {
LOG(INFO) << "set TX: " << wFreq << std::endl
<< " baseband freq: " << result.baseband_freq << std::endl
<< " DDC freq: " << result.dxc_freq << std::endl