qmk/qmk_firmware

[Bug] audio.pins in keyboard.json is not converted to C defines during build

Open

#26,106 opened on 2026年3月27日

GitHub で見る
 (2 comments) (0 reactions) (0 assignees)C (20,368 stars) (43,867 forks)batch import
bughelp wanted

説明

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) defines audio.pins as a valid mcu_pin_array.
  • All other audio.* properties have mappings in data/mappings/info_config.hjson and are correctly converted to C defines via generate_config_items() in lib/python/qmk/cli/generate/config_h.py.
  • The reverse direction (config.h → keyboard.json) works correctly: _extract_audio() in lib/python/qmk/info.py reads legacy B5_AUDIO, B6_AUDIO, etc. and populates audio.pins.
  • However, audio.pins has no entry in info_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

コントリビューターガイド

[Bug] audio.pins in keyboard.json is not converted to C defines during build · qmk/qmk_firmware#26106 | Good First Issue