Apply patch to fix some USB MIDI controllers

Some USB MIDI controllers use interrupt endpoints which is unsupported
by Circle (rsta2/circle#316).

Apply temporary patch to allow the use of these devices.
This commit is contained in:
Dale Whinham committed 2022-09-28 12:40:26 +01:00
1 parent 89052e6c8a
commit e6b777c271
3 files changed
+26

No files matched your search

+1
View File
@@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Incorrect I²C clock speed with recent Raspberry Pi firmware versions (issue #292). This was caused by core clock frequency scaling by the GPU firmware. Changes to `config.txt` have been added to ensure the I²C clock is stable by locking the core frequency to 250MHz. The newer Raspberry Pi firmware has been restored.
- Some USB MIDI controllers which make use of interrupt endpoints [would not be usable](https://github.com/rsta2/circle/issues/316) (e.g. some Novation models).
## [0.12.1] - 2022-06-14
+2
View File
@@ -17,6 +17,7 @@ $(CIRCLE_STDLIB_CONFIG) $(CIRCLE_CONFIG)&:
# Apply patches
@patch -N -p1 --no-backup-if-mismatch -r - -d $(CIRCLEHOME) < patches/circle-44.4-minimal-usb-drivers.patch
@patch -N -p1 --no-backup-if-mismatch -r - -d $(CIRCLEHOME) < patches/circle-44.5-usb-midi-interrupt-ep.patch
ifeq ($(strip $(GC_SECTIONS)),1)
# Enable function/data sections for circle-stdlib
@@ -121,6 +122,7 @@ clean:
#
veryclean: clean
# Reverse patches
@patch -R -N -p1 --no-backup-if-mismatch -r - -d $(CIRCLEHOME) < patches/circle-44.5-usb-midi-interrupt-ep.patch
@patch -R -N -p1 --no-backup-if-mismatch -r - -d $(CIRCLEHOME) < patches/circle-44.4-minimal-usb-drivers.patch
@patch -R -N -p1 --no-backup-if-mismatch -r - -d $(FLUIDSYNTHHOME) < patches/fluidsynth-2.3.0-circle.patch
@@ -0,0 +1,23 @@
From 646c3629a4cb44a1948819048a3fe2f365a1b568 Mon Sep 17 00:00:00 2001
From: Rene Stange <rsta2@o2online.de>
Date: Sat, 24 Sep 2022 14:55:30 +0200
Subject: [PATCH] usb/usbmidi: Allow to use Interrupt EPs
Issue #316
---
lib/usb/usbmidi.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/usb/usbmidi.cpp b/lib/usb/usbmidi.cpp
index b828c535..a0cc58c5 100644
--- a/lib/usb/usbmidi.cpp
+++ b/lib/usb/usbmidi.cpp
@@ -109,7 +109,7 @@ boolean CUSBMIDIDevice::Configure (void)
TUSBAudioEndpointDescriptor *pEndpointDesc;
while ((pEndpointDesc = (TUSBAudioEndpointDescriptor *) GetDescriptor (DESCRIPTOR_ENDPOINT)) != 0)
{
- if ((pEndpointDesc->bmAttributes & 0x3F) != 0x02) // Bulk EP
+ if ((pEndpointDesc->bmAttributes & 0x3E) != 0x02) // Bulk or Interrupt EP
{
continue;
}