diff options
author | Steve Markgraf <steve@steve-m.de> | 2020-01-19 16:45:20 +0100 |
---|---|---|
committer | Steve Markgraf <steve@steve-m.de> | 2020-01-19 16:59:34 +0100 |
commit | a9f3771eb6ad4f9afb98d346dc6c54a1812d6e73 (patch) | |
tree | 96976100985a1777737351a09b4e116f5d471041 /src | |
parent | 4b72aab349ac55073208864036188ccc70e88b0a (diff) | |
download | osmo-fl2k-a9f3771eb6ad4f9afb98d346dc6c54a1812d6e73.tar.gz osmo-fl2k-a9f3771eb6ad4f9afb98d346dc6c54a1812d6e73.tar.bz2 osmo-fl2k-a9f3771eb6ad4f9afb98d346dc6c54a1812d6e73.zip |
lib: use interface 0 altsetting 1 instead of interface 1
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
Diffstat (limited to 'src')
-rw-r--r-- | src/libosmo-fl2k.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libosmo-fl2k.c b/src/libosmo-fl2k.c index 7e1a008..7478893 100644 --- a/src/libosmo-fl2k.c +++ b/src/libosmo-fl2k.c @@ -2,7 +2,7 @@ * osmo-fl2k, turns FL2000-based USB 3.0 to VGA adapters into * low cost DACs * - * Copyright (C) 2016-2018 by Steve Markgraf <steve@steve-m.de> + * Copyright (C) 2016-2020 by Steve Markgraf <steve@steve-m.de> * * SPDX-License-Identifier: GPL-2.0+ * @@ -444,10 +444,10 @@ int fl2k_open(fl2k_dev_t **out_dev, uint32_t index) fprintf(stderr, "usb_claim_interface 0 error %d\n", r); goto err; } - r = libusb_claim_interface(dev->devh, 1); + r = libusb_set_interface_alt_setting(dev->devh, 0, 1); if (r < 0) { - fprintf(stderr, "usb_claim_interface 1 error %d\n", r); + fprintf(stderr, "Error enabling IF 0 altsetting 1: %d\n", r); goto err; } |