qmk/qmk_firmware

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

クローズ

#26,106 opened on 2026/03/27

 (2 件のコメント) (0 件のリアクション) (0 人の担当者)C (43,867 件のフォーク)batch import
bughelp wanted

Repository metrics

Stars
 (20,368 個のスター)
PR merge metrics
 (平均マージ 20d 9h) (30d で 27 merged PRs)

説明

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

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