mirror of https://github.com/PentHertz/srsLTE.git
Merge branch 'segfault_mimo' into next
This commit is contained in:
commit
05306d6a05
|
@ -333,9 +333,8 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels)
|
||||||
|
|
||||||
bzero(zero_mem, sizeof(cf_t)*64*1024);
|
bzero(zero_mem, sizeof(cf_t)*64*1024);
|
||||||
|
|
||||||
|
// Check external clock argument
|
||||||
enum {DEFAULT, EXTERNAL, GPSDO} clock_src;
|
enum {DEFAULT, EXTERNAL, GPSDO} clock_src;
|
||||||
|
|
||||||
// Set external clock reference
|
|
||||||
if (strstr(args, "clock=external")) {
|
if (strstr(args, "clock=external")) {
|
||||||
remove_substring(args, "clock=external");
|
remove_substring(args, "clock=external");
|
||||||
clock_src = EXTERNAL;
|
clock_src = EXTERNAL;
|
||||||
|
@ -347,6 +346,17 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels)
|
||||||
clock_src = DEFAULT;
|
clock_src = DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set over the wire format
|
||||||
|
char *otw_format = "sc16";
|
||||||
|
if (strstr(args, "otw_format=sc12")) {
|
||||||
|
otw_format = "sc12";
|
||||||
|
} else if (strstr(args, "otw_format=sc16")) {
|
||||||
|
/* Do nothing */
|
||||||
|
} else if (strstr(args, "otw_format=")) {
|
||||||
|
fprintf(stderr, "Wrong over the wire format. Valid formats: sc12, sc16\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* If device type or name not given in args, choose a B200 */
|
/* If device type or name not given in args, choose a B200 */
|
||||||
if (args[0]=='\0') {
|
if (args[0]=='\0') {
|
||||||
if (find_string(devices_str, "type=b200") && !strstr(args, "recv_frame_size")) {
|
if (find_string(devices_str, "type=b200") && !strstr(args, "recv_frame_size")) {
|
||||||
|
@ -407,7 +417,7 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels)
|
||||||
uhd_usrp_set_clock_source(handler->usrp, "gpsdo", 0);
|
uhd_usrp_set_clock_source(handler->usrp, "gpsdo", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
handler->has_rssi = get_has_rssi(handler);
|
handler->has_rssi = get_has_rssi(handler);
|
||||||
if (handler->has_rssi) {
|
if (handler->has_rssi) {
|
||||||
uhd_sensor_value_make_from_realnum(&handler->rssi_value, "rssi", 0, "dBm", "%f");
|
uhd_sensor_value_make_from_realnum(&handler->rssi_value, "rssi", 0, "dBm", "%f");
|
||||||
}
|
}
|
||||||
|
@ -415,7 +425,7 @@ int rf_uhd_open_multi(char *args, void **h, uint32_t nof_channels)
|
||||||
size_t channel[4] = {0, 1, 2, 3};
|
size_t channel[4] = {0, 1, 2, 3};
|
||||||
uhd_stream_args_t stream_args = {
|
uhd_stream_args_t stream_args = {
|
||||||
.cpu_format = "fc32",
|
.cpu_format = "fc32",
|
||||||
.otw_format = (nof_channels > 1) ? "sc12" : "sc16",
|
.otw_format = otw_format,
|
||||||
.args = "",
|
.args = "",
|
||||||
.channel_list = channel,
|
.channel_list = channel,
|
||||||
.n_channels = nof_channels,
|
.n_channels = nof_channels,
|
||||||
|
|
Loading…
Reference in New Issue