/*
* Check device by its physical USB bus/port address.
*/
- usb_get_port_path(devlist[i], connection_id, sizeof(connection_id));
+ if (usb_get_port_path(devlist[i], connection_id, sizeof(connection_id)) < 0)
+ continue;
+
if (strcmp(sdi->connection_id, connection_id))
/* This is not the one. */
continue;
}
tmp = base / devc->samplerate;
- if (tmp) {
+ /* Downsample only if really necessary */
+ if (tmp > 1) {
/* Downsampling on */
cmdstring[2] |= 2;
/* Downsampler = 1comp((Base / Samplerate) - 2)