Skip to content

Commit c64c3ba

Browse files
committed
Move "usb" config option to the system section
We now support more than just USB MIDI devices, so it no longer makes sense to keep this in the MIDI section.
1 parent 8e8109f commit c64c3ba

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2727
- Update to FluidSynth v2.1.8.
2828
- Update ARM toolchains to 10.2-2020.11.
2929
- Config file options are now case-insensitive.
30+
- The `usb` configuration option has been moved to the `[system]` section. Please update your configuration file if you use this option.
3031

3132
### Fixed
3233

include/config.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737

3838
BEGIN_SECTION(system)
3939
CFG(default_synth, TSystemDefaultSynth, SystemDefaultSynth, TSystemDefaultSynth::MT32 )
40+
CFG(usb, bool, SystemUSB, true )
4041
CFG(i2c_baud_rate, int, SystemI2CBaudRate, 400000 )
4142
CFG(power_save_timeout, int, SystemPowerSaveTimeout, 300 )
4243
END_SECTION
4344

4445
BEGIN_SECTION(midi)
45-
CFG(usb, bool, MIDIUSB, true )
4646
CFG(gpio_baud_rate, int, MIDIGPIOBaudRate, 31250 )
4747
CFG(gpio_thru, bool, MIDIGPIOThru, false )
4848
END_SECTION

sdcard/mt32-pi.cfg

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@
2525
# soundfont: Use FluidSynth for SoundFont synthesis
2626
default_synth = mt32
2727

28+
# Enable or disable support for USB devices.
29+
#
30+
# Disable this to speed up boot time if you are not using any USB devices.
31+
#
32+
# Values: on*, off
33+
usb = on
34+
2835
# Set the I2C baud rate/clock speed for all peripherals (Hz).
2936
#
3037
# Most peripherals will work fine at the default speed (400KHz "fast mode"),
@@ -55,15 +62,6 @@ power_save_timeout = 300
5562
# MIDI options
5663
# -----------------------------------------------------------------------------
5764
[midi]
58-
59-
# Enable or disable searching for a USB MIDI interface on startup.
60-
#
61-
# Disable this to speed up boot time if you are using GPIO for MIDI.
62-
# If no USB MIDI devices are detected, GPIO will be used as a fallback.
63-
#
64-
# Values: on*, off
65-
usb = on
66-
6765
# Set the baud rate used for GPIO MIDI.
6866
#
6967
# For connecting to standard MIDI devices (i.e. via DIN cable), this should be

src/mt32pi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ bool CMT32Pi::Initialize(bool bSerialMIDIAvailable)
152152
// the initialization must be skipped in this case, or an
153153
// exit happens here under 64-bit QEMU.
154154
LCDLog(TLCDLogType::Startup, "Init USB");
155-
if (pConfig->MIDIUSB)
155+
if (pConfig->SystemUSB)
156156
{
157157
if (!m_pUSBHCI->Initialize())
158158
return false;
@@ -359,7 +359,7 @@ void CMT32Pi::MainTask()
359359
}
360360

361361
// Check for USB PnP events
362-
if (CConfig::Get()->MIDIUSB)
362+
if (CConfig::Get()->SystemUSB)
363363
UpdateUSB();
364364
}
365365

0 commit comments

Comments
 (0)