qmk/qmk_firmware
View on GitHub[Bug] audio.pins in keyboard.json is not converted to C defines during build
Open
#26106 opened on Mar 27, 2026
bughelp wanted
Description
Bug Description
The audio.pins property defined in keyboard.json is not converted to AUDIO_PIN / AUDIO_PIN_ALT C defines during the build process, even though it is a valid property in the keyboard JSON schema.
Expected Behavior
When audio.pins is specified in keyboard.json, the build system should generate the corresponding AUDIO_PIN and AUDIO_PIN_ALT defines in info_config.h, similar to how other audio.* properties are handled.
Actual Behavior
The audio.pins value is silently ignored during build. Users must still manually define AUDIO_PIN / AUDIO_PIN_ALT in config.h for audio to work.
Details
- The JSON schema (
data/schemas/keyboard.jsonschema) definesaudio.pinsas a validmcu_pin_array. - All other
audio.*properties have mappings indata/mappings/info_config.hjsonand are correctly converted to C defines viagenerate_config_items()inlib/python/qmk/cli/generate/config_h.py. - The reverse direction (config.h → keyboard.json) works correctly:
_extract_audio()inlib/python/qmk/info.pyreads legacyB5_AUDIO,B6_AUDIO, etc. and populatesaudio.pins. - However,
audio.pinshas no entry ininfo_config.hjson, so the forward direction (keyboard.json → C defines) is missing.
Affected Properties
| Property | keyboard.json → C | config.h → keyboard.json |
|---|---|---|
audio.default.on |
✅ | ✅ |
audio.default.clicky |
✅ | ✅ |
audio.driver |
✅ (rules.mk) | ✅ |
audio.power_control.pin |
✅ | ✅ |
audio.power_control.on_state |
✅ | ✅ |
audio.voices |
✅ | ✅ |
audio.macro_beep |
✅ | ✅ |
audio.pins |
❌ Missing | ✅ |