aboutsummaryrefslogtreecommitdiffstats
path: root/src/libosmo-fl2k.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'iq' into interleaved_rgMatthias P. Braendli2022-01-091-22/+36
|\
| * lib: revert implementing RGB233 modeSteve Markgraf2020-06-021-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will soon have support for a palette mode, which can replicate the RGB233 mode if required, or any custom arrangement of bits per color. Furthermore, the RGB233 mode did not work correctly in this state, as we did not implement swapping of the 32 bit words. This reverts the following commits: 58de0a5bccb6648ee3372643517ea51b3ab5b523 3f44f8fc224c6b0b45a824109619f993e0b87552 b82303f44fc8388817306235a673e0bfa671dd3f
| * lib: fix hang on exitSteve Markgraf2020-05-261-0/+3
| | | | | | | | | | As the sample worker thread might still be waiting for a buffer, we need to wake it up first before trying to join.
| * lib: reuse hint message when zero-copy buffer alloc failsSteve Markgraf2020-05-261-8/+9
| |
| * lib: implement enabling RGB332 modeSergey Alirzaev2020-05-191-7/+19
| | | | | | | | | | | | | | I've decided to provide a separate pointer for a raw buffer in case the library user comes up with a non-RGB332 use case that avoids byte rearrangement (and copying should be replaced with pulling from the user's pointer in this case)
| * lib: fall back to iface 1 in case iface 0 altsetting 1 failsSteve Markgraf2020-01-261-2/+7
| | | | | | | | | | | | | | Some people on the mailing list reported that with older kernels setting interface 0 altsetting 1 does not work, fall back to the old behavior in this case for now, while still investigating the root cause of this problem.
| * lib: use interface 0 altsetting 1 instead of interface 1Steve Markgraf2020-01-191-3/+3
| | | | | | | | | | | | | | | | | | This makes osmo-fl2k work again with Linux 5.5.0-rc6 or later, as the FL2000 shares the endpoints for interface 0 and 1, which is forbidden by the USB spec and the Kernel will not ignore this anymore. See: https://marc.info/?l=linux-usb&m=157944230213296&w=2
| * fix compiler warningsSteve Markgraf2020-01-191-3/+3
| | | | | | | | | | | | | | | | | | warning: absolute value function ‘fabsf’ given an argument of type ‘double’ but has parameter of type ‘float’ which may cause truncation of value warning: ‘__builtin_strncpy’ specified bound 64 equals destination size
| * improve exit handling on device removalSteve Markgraf2019-08-261-7/+10
| |
| * lib: wait for sample worker thread before freeing buffersSteve Markgraf2019-08-251-0/+2
| | | | | | | | | | | | | | This fixes a segfault when exiting, as sometimes it occured that the USB worker thread completed before the sample worker thread, and the buffers the latter was still accessing had already been freed.
* | Merge remote-tracking branch 'upstream/master' into interleaved_rgMatthias P. Braendli2019-03-231-13/+131
|\|
| * lib: Add workaround for Linux usbfs mmap() bugSteve Markgraf2018-10-071-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | The Linux Kernel has a bug on ARM/ARM64 systems where the USB CMA memory is incorrectly mapped to userspace, breaking zerocopy. When the Kernel allocates the memory, it clears it with memset(). If the mapping worked correctly, we should have zeroed out buffers, if it doesn't, we get random Kernel memory. We now check for this, and fall back to buffers in userspace if that's the case. Signed-off-by: Steve Markgraf <steve@steve-m.de>
| * lib: add I2C supportSteve Markgraf2018-06-171-0/+101
| | | | | | | | | | | | | | Note that the FL2000 only supports I2C transfers with a fixed length of 4 bytes. Signed-off-by: Steve Markgraf <steve@steve-m.de>
| * fix sleep durations on WindowsSteve Markgraf2018-06-171-11/+9
| | | | | | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
| * libusb-1.0.22 deprecated libusb_set_debug() with libusb_set_option()Harald Welte2018-06-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | This avoids the following compiler warnings when using more recent versions of libusb: src/libosmo-fl2k.c:384:2: warning: ‘libusb_set_debug’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations] libusb_set_debug(dev->ctx, 3); ^~~~~~~~~~~~~~~~ Details can be found at https://github.com/libusb/libusb/commit/539f22e2fd916558d11ab9a66f10f461c5593168
* | Add support for interleaved R/G samplesMatthias P. Braendli2018-05-201-7/+44
|/ | | | | This is useful for transmitting complex I/Q data on the red and green DACs
* lib: update output on zero-copy allocationSteve Markgraf2018-05-011-2/+3
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* lib: free zero-copy buffers in case of errorSteve Markgraf2018-05-011-4/+17
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* lib: libusb_dev_mem_free() is not present in old versionsSteve Markgraf2018-04-231-0/+2
| | | | Signed-off-by: Steve Markgraf <steve@steve-m.de>
* initial commitSteve Markgraf2018-04-171-0/+969
Signed-off-by: Steve Markgraf <steve@steve-m.de>