summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorSaulo VerĂ­ssimo <[email protected]>2026-05-17 13:07:21 -0300
committerSaulo VerĂ­ssimo <[email protected]>2026-05-17 13:07:21 -0300
commit287096f7333aa10b6aaaf75337ccd3de9b06b95d (patch)
tree6eaae51a7c4d7ff75ee700748ac85b2849b328d2 /src/class
parent4b729bfb9274af44f8edfba2134893a6889cfd03 (diff)
midi2: scale device buffers with EPSIZE
Match midi2_host pattern. Literal 256 underran HS endpoints (512B).
Diffstat (limited to 'src/class')
-rw-r--r--src/class/midi/midi2_device.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/class/midi/midi2_device.h b/src/class/midi/midi2_device.h
index cb47bdf3c..b0bbd7572 100644
--- a/src/class/midi/midi2_device.h
+++ b/src/class/midi/midi2_device.h
@@ -48,14 +48,6 @@ extern "C" {
// Class Driver Configuration
//--------------------------------------------------------------------+
-#ifndef CFG_TUD_MIDI2_TX_BUFSIZE
- #define CFG_TUD_MIDI2_TX_BUFSIZE 256
-#endif
-
-#ifndef CFG_TUD_MIDI2_RX_BUFSIZE
- #define CFG_TUD_MIDI2_RX_BUFSIZE 256
-#endif
-
#ifndef CFG_TUD_MIDI2_TX_EPSIZE
#define CFG_TUD_MIDI2_TX_EPSIZE TUD_EPSIZE_BULK_MAX
#endif
@@ -64,6 +56,14 @@ extern "C" {
#define CFG_TUD_MIDI2_RX_EPSIZE TUD_EPSIZE_BULK_MAX
#endif
+#ifndef CFG_TUD_MIDI2_TX_BUFSIZE
+ #define CFG_TUD_MIDI2_TX_BUFSIZE (4 * CFG_TUD_MIDI2_TX_EPSIZE)
+#endif
+
+#ifndef CFG_TUD_MIDI2_RX_BUFSIZE
+ #define CFG_TUD_MIDI2_RX_BUFSIZE (4 * CFG_TUD_MIDI2_RX_EPSIZE)
+#endif
+
#ifndef CFG_TUD_MIDI2_NUM_GROUPS
#define CFG_TUD_MIDI2_NUM_GROUPS 1
#endif