| 78 | }; |
| 79 | |
| 80 | static double get_dev_offset(enum uhd_dev_type type, int sps) |
| 81 | { |
| 82 | if (type == USRP1) { |
| 83 | LOG(ERR) << "Invalid device type"; |
| 84 | return 0.0; |
| 85 | } |
| 86 | |
| 87 | switch (sps) { |
| 88 | case 1: |
| 89 | return uhd_offsets[2 * type + 0].offset; |
| 90 | case 4: |
| 91 | return uhd_offsets[2 * type + 1].offset; |
| 92 | } |
| 93 | |
| 94 | LOG(ERR) << "Unsupported samples-per-symbols: " << sps; |
| 95 | return 0.0; |
| 96 | } |
| 97 | |
| 98 | /* |
| 99 | * Select sample rate based on device type and requested samples-per-symbol. |