Revision 43e5480d
| b/host/lib/usrp/usrp1/dsp_impl.cpp | ||
|---|---|---|
| 36 | 36 |
boost::bind(&usrp1_impl::rx_dsp_get, this, _1, _2), |
| 37 | 37 |
boost::bind(&usrp1_impl::rx_dsp_set, this, _1, _2)); |
| 38 | 38 |
|
| 39 |
rx_dsp_set(DSP_PROP_HOST_RATE, double(64e6/10)); //FIXME magic number
|
|
| 39 |
rx_dsp_set(DSP_PROP_HOST_RATE, _clock_ctrl->get_master_clock_freq() / 16);
|
|
| 40 | 40 |
} |
| 41 | 41 |
|
| 42 | 42 |
/*********************************************************************** |
| ... | ... | |
| 95 | 95 |
switch(key.as<dsp_prop_t>()) {
|
| 96 | 96 |
case DSP_PROP_FREQ_SHIFT: {
|
| 97 | 97 |
double new_freq = val.as<double>(); |
| 98 |
_iface->poke32(FR_RX_FREQ_0, compute_freq_word(64e6, new_freq)); //FIXME magic rate |
|
| 98 |
boost::uint32_t hw_freq_word = compute_freq_word( |
|
| 99 |
_clock_ctrl->get_master_clock_freq(), new_freq); |
|
| 100 |
_iface->poke32(FR_RX_FREQ_0, hw_freq_word); |
|
| 99 | 101 |
_tx_dsp_freq = new_freq; |
| 100 | 102 |
return; |
| 101 | 103 |
} |
| ... | ... | |
| 130 | 132 |
boost::bind(&usrp1_impl::tx_dsp_set, this, _1, _2)); |
| 131 | 133 |
|
| 132 | 134 |
//initial config and update |
| 133 |
tx_dsp_set(DSP_PROP_HOST_RATE, double(64e6/10)); //FIXME magic number
|
|
| 135 |
tx_dsp_set(DSP_PROP_HOST_RATE, _clock_ctrl->get_master_clock_freq() * 2 / 16);
|
|
| 134 | 136 |
} |
| 135 | 137 |
|
| 136 | 138 |
/*********************************************************************** |
| ... | ... | |
| 152 | 154 |
return; |
| 153 | 155 |
|
| 154 | 156 |
case DSP_PROP_CODEC_RATE: |
| 155 |
val = MASTER_CLOCK_RATE;
|
|
| 157 |
val = _clock_ctrl->get_master_clock_freq() * 2;
|
|
| 156 | 158 |
return; |
| 157 | 159 |
|
| 158 | 160 |
case DSP_PROP_HOST_RATE: |
| b/host/lib/usrp/usrp1/usrp1_impl.hpp | ||
|---|---|---|
| 33 | 33 |
#ifndef INCLUDED_USRP1_IMPL_HPP |
| 34 | 34 |
#define INCLUDED_USRP1_IMPL_HPP |
| 35 | 35 |
|
| 36 |
static const double MASTER_CLOCK_RATE = 64e6; //TODO get from clock control |
|
| 37 |
|
|
| 38 | 36 |
/*! |
| 39 | 37 |
* Simple wax obj proxy class: |
| 40 | 38 |
* Provides a wax obj interface for a set and a get function. |
Also available in: Unified diff