fl2k_* have libusb: error [op_dev_mem_alloc] alloc dev mem failed errno 12

Steve Markgraf steve at steve-m.de
Sun Jun 3 18:40:37 UTC 2018


Hi,

On 30.05.2018 17:57, Hannes Wagner wrote:
> I haven't been able to receive a FM signal yet. My output from the fl2k_test shows:

What are the commandline parameters you are using for fl2k_fm? As you
can see below, you need to limit your samplerate to < 114 MS/s.

> sudo fl2k_test -s 162e6
> Allocating 6 zero-copy buffers
> libusb: error [op_dev_mem_alloc] alloc dev mem failed errno 12
> Failed to allocate zero-copy buffer for transfer 4
> Falling back to buffers in userspace
> Reporting PPM error measurement every 10 seconds...
> Press ^C after a few minutes.
> real sample rate: 113962068 current PPM: -296530 cumulative PPM: -296530
> real sample rate: 113975309 current PPM: -296449 cumulative PPM: -296489
> real sample rate: 114139355 current PPM: -295436 cumulative PPM: -296136
> 
> Do I need to change my kernel settings or will the device simply won't work?

What happens according to the output: libfl2k is running on a system
that seems to support zero-copy transfers, but fails during allocation.
Probably there is not enough DMA-able contiguous memory present for the
Kernel. This is no big deal, as libfl2k will then de-allocate the
already allocated zero-copy buffers, and then fall back to buffers
allocated with malloc() (which of course then will require
copy_from_user() in the Kernel).
So it should work just fine, you just won't get the performance
benefit of zero-copy buffers.
And according to the output of fl2k_test, you are getting around 114
MS/s, as you are probably using a Renesas uPD7202xx controller. If you
want to generate any output, you need to set the sample rate to a value
below that.

Regards,
Steve


More information about the osmocom-sdr mailing list