disable dynamic rate for x300

master
Ismael Gomez 9 years ago
parent 1399d44d0e
commit 3d592aeab7

@ -246,7 +246,7 @@ int rf_uhd_open(char *args, void **h)
// Allow NULL parameter // Allow NULL parameter
if (args == NULL) { if (args == NULL) {
args = ""; args = "";
} else { }
/* 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")) {
@ -255,13 +255,14 @@ int rf_uhd_open(char *args, void **h)
} else if (find_string(devices_str, "type=x300")) { } else if (find_string(devices_str, "type=x300")) {
// Else if X300 is available, set master clock rate now (can't be changed later) // Else if X300 is available, set master clock rate now (can't be changed later)
args = "type=x300,master_clock_rate=184.32e6"; args = "type=x300,master_clock_rate=184.32e6";
handler->dynamic_rate = false;
} }
} else { } else {
// If args is set and x300 type is specified, make sure master_clock_rate is defined // If args is set and x300 type is specified, make sure master_clock_rate is defined
if (strstr(args, "type=x300") && !strstr(args, "master_clock_rate")) { if (strstr(args, "type=x300") && !strstr(args, "master_clock_rate")) {
sprintf(args2, "%s,master_clock_rate=184.32e6",args); sprintf(args2, "%s,master_clock_rate=184.32e6",args);
args = args2; args = args2;
} handler->dynamic_rate = false;
} }
} }

Loading…
Cancel
Save