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>

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@2658 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
Kurtis Heimerl
2011-11-26 03:17:59 +00:00
parent e6daa8b6ed
commit 4ad3c3c91e

View File

@@ -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