diff --git a/data/mappings/info_rules.hjson b/data/mappings/info_rules.hjson index 5d08be2fc1a..97611bcf587 100644 --- a/data/mappings/info_rules.hjson +++ b/data/mappings/info_rules.hjson @@ -11,6 +11,7 @@ // invalid: Default `false`. Set to `true` to generate errors when a value exists // replace_with: use with a key marked deprecated or invalid to designate a replacement + "AUDIO_DRIVER": {"info_key": "audio.driver"}, "BACKLIGHT_DRIVER": {"info_key": "backlight.driver"}, "BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"}, "BOARD": {"info_key": "board"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 24f7fec9ab3..585c64777f2 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -133,6 +133,10 @@ "clicky": {"type": "boolean"} } }, + "driver": { + "type": "string", + "enum": ["dac_additive", "dac_basic", "pwm_software", "pwm_hardware"] + }, "macro_beep": {"type": "boolean"}, "pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, "power_control": { diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 6f0b84c414b..d1dc5d3beac 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -118,6 +118,8 @@ Configures the [Audio](feature_audio.md) feature. * `clicky` * The default audio clicky enabled state. * Default: `true` + * `driver` + * The driver to use. Must be one of `dac_additive`, `dac_basic`, `pwm_software`, `pwm_hardware`. * `macro_beep` * Play a short beep for `\a` (ASCII `BEL`) characters in Send String macros. * Default: `false` diff --git a/keyboards/adafruit/macropad/keyboard.json b/keyboards/adafruit/macropad/keyboard.json index 86601c0167f..94f2673f98f 100644 --- a/keyboards/adafruit/macropad/keyboard.json +++ b/keyboards/adafruit/macropad/keyboard.json @@ -19,6 +19,7 @@ "oled": true }, "audio": { + "driver": "pwm_hardware", "power_control": { "pin": "GP14" } diff --git a/keyboards/adafruit/macropad/rules.mk b/keyboards/adafruit/macropad/rules.mk index 1630b74ceae..d7ca5b3b90f 100644 --- a/keyboards/adafruit/macropad/rules.mk +++ b/keyboards/adafruit/macropad/rules.mk @@ -1,2 +1 @@ -AUDIO_DRIVER = pwm_hardware OLED_TRANSPORT = spi diff --git a/keyboards/arrowmechanics/wings/keyboard.json b/keyboards/arrowmechanics/wings/keyboard.json index fca38314c9b..0f1e6696f75 100644 --- a/keyboards/arrowmechanics/wings/keyboard.json +++ b/keyboards/arrowmechanics/wings/keyboard.json @@ -17,6 +17,9 @@ "mousekey": true, "rgb_matrix": true }, + "audio": { + "driver": "pwm_hardware" + }, "matrix_pins": { "cols": ["GP8", "GP9", "GP10", "GP11", "GP12", "GP13", "GP14", "GP15", "GP16"], "rows": ["GP22", "GP21", "GP20", "GP19", "GP18", "GP17"] diff --git a/keyboards/arrowmechanics/wings/rules.mk b/keyboards/arrowmechanics/wings/rules.mk index 22ce54190c8..161ec22b16e 100644 --- a/keyboards/arrowmechanics/wings/rules.mk +++ b/keyboards/arrowmechanics/wings/rules.mk @@ -1,2 +1 @@ SERIAL_DRIVER = vendor -AUDIO_DRIVER = pwm_hardware diff --git a/keyboards/boardsource/equals/48/keyboard.json b/keyboards/boardsource/equals/48/keyboard.json index 5b633559313..13bc0d80ab7 100644 --- a/keyboards/boardsource/equals/48/keyboard.json +++ b/keyboards/boardsource/equals/48/keyboard.json @@ -10,6 +10,9 @@ "cols": ["GP0", "GP1", "GP2", "GP3", "GP4", "GP5", "GP6", "GP7", "GP8", "GP9", "GP10", "GP11"], "rows": ["GP12", "GP13", "GP16", "GP17"] }, + "audio": { + "driver": "pwm_hardware" + }, "ws2812": { "driver": "vendor", "pin": "GP21" diff --git a/keyboards/boardsource/equals/48/rules.mk b/keyboards/boardsource/equals/48/rules.mk index 2f75fc139fc..ec94c118ee1 100644 --- a/keyboards/boardsource/equals/48/rules.mk +++ b/keyboards/boardsource/equals/48/rules.mk @@ -1,2 +1 @@ -AUDIO_DRIVER = pwm_hardware QUANTUM_PAINTER_DRIVERS += st7735_spi diff --git a/keyboards/boardsource/equals/60/keyboard.json b/keyboards/boardsource/equals/60/keyboard.json index 3bc1f49be38..63cb4717e57 100644 --- a/keyboards/boardsource/equals/60/keyboard.json +++ b/keyboards/boardsource/equals/60/keyboard.json @@ -10,6 +10,9 @@ "cols": ["GP0", "GP1", "GP2", "GP3", "GP4", "GP5", "GP6", "GP7", "GP8", "GP9", "GP10", "GP11"], "rows": ["GP12", "GP13", "GP16", "GP17", "GP18"] }, + "audio": { + "driver": "pwm_hardware" + }, "ws2812": { "driver": "vendor", "pin": "GP21" diff --git a/keyboards/boardsource/equals/60/rules.mk b/keyboards/boardsource/equals/60/rules.mk index 2f75fc139fc..ec94c118ee1 100644 --- a/keyboards/boardsource/equals/60/rules.mk +++ b/keyboards/boardsource/equals/60/rules.mk @@ -1,2 +1 @@ -AUDIO_DRIVER = pwm_hardware QUANTUM_PAINTER_DRIVERS += st7735_spi diff --git a/keyboards/boardsource/unicorne/keyboard.json b/keyboards/boardsource/unicorne/keyboard.json index 6afbcc044cb..4fb63de9e32 100644 --- a/keyboards/boardsource/unicorne/keyboard.json +++ b/keyboards/boardsource/unicorne/keyboard.json @@ -32,6 +32,9 @@ "pid": "0x7563", "vid": "0x4273" }, + "audio": { + "driver": "pwm_hardware" + }, "ws2812": { "driver": "vendor", "pin": "GP29" diff --git a/keyboards/boardsource/unicorne/rules.mk b/keyboards/boardsource/unicorne/rules.mk index d123b2a2fa8..48b30dcd51a 100644 --- a/keyboards/boardsource/unicorne/rules.mk +++ b/keyboards/boardsource/unicorne/rules.mk @@ -1,3 +1,2 @@ SERIAL_DRIVER = vendor -AUDIO_DRIVER = pwm_hardware POINTING_DEVICE_DRIVER = analog_joystick diff --git a/keyboards/custommk/cmk11/keyboard.json b/keyboards/custommk/cmk11/keyboard.json index d831351aa78..9a853063ba3 100644 --- a/keyboards/custommk/cmk11/keyboard.json +++ b/keyboards/custommk/cmk11/keyboard.json @@ -18,6 +18,9 @@ "nkro": true, "rgb_matrix": true }, + "audio": { + "driver": "pwm_hardware" + }, "matrix_pins": { "cols": ["B0", "A1", "A2", "A3", "A6", "B10"], "rows": ["A5", "A4"] diff --git a/keyboards/custommk/cmk11/rules.mk b/keyboards/custommk/cmk11/rules.mk deleted file mode 100644 index 72f75f4367e..00000000000 --- a/keyboards/custommk/cmk11/rules.mk +++ /dev/null @@ -1 +0,0 @@ -AUDIO_DRIVER = pwm_hardware diff --git a/keyboards/custommk/ergostrafer/keyboard.json b/keyboards/custommk/ergostrafer/keyboard.json index a1283114c8e..4f23417415d 100644 --- a/keyboards/custommk/ergostrafer/keyboard.json +++ b/keyboards/custommk/ergostrafer/keyboard.json @@ -17,6 +17,9 @@ "encoder": true, "audio": true }, + "audio": { + "driver": "pwm_hardware" + }, "matrix_pins": { "cols": ["B0", "A1", "A2", "A3", "A6", "B6", "B10"], "rows": ["C13", "C14", "C15", "B1", "A7", "A5"] diff --git a/keyboards/custommk/ergostrafer/rules.mk b/keyboards/custommk/ergostrafer/rules.mk deleted file mode 100644 index 72f75f4367e..00000000000 --- a/keyboards/custommk/ergostrafer/rules.mk +++ /dev/null @@ -1 +0,0 @@ -AUDIO_DRIVER = pwm_hardware diff --git a/keyboards/custommk/evo70_r2/keyboard.json b/keyboards/custommk/evo70_r2/keyboard.json index dea56ed2570..5f10d6705d9 100644 --- a/keyboards/custommk/evo70_r2/keyboard.json +++ b/keyboards/custommk/evo70_r2/keyboard.json @@ -51,6 +51,9 @@ "twinkle": true } }, + "audio": { + "driver": "pwm_hardware" + }, "ws2812": { "driver": "pwm", "pin": "A10" diff --git a/keyboards/custommk/evo70_r2/rules.mk b/keyboards/custommk/evo70_r2/rules.mk index 193fe4f1a43..3961343ce4b 100644 --- a/keyboards/custommk/evo70_r2/rules.mk +++ b/keyboards/custommk/evo70_r2/rules.mk @@ -1,5 +1,3 @@ -AUDIO_DRIVER = pwm_hardware - # project specific files SRC += matrix.c diff --git a/keyboards/handwired/macroboard/f411/keyboard.json b/keyboards/handwired/macroboard/f411/keyboard.json index 03a8aadc1b9..8b1155d7740 100644 --- a/keyboards/handwired/macroboard/f411/keyboard.json +++ b/keyboards/handwired/macroboard/f411/keyboard.json @@ -9,6 +9,9 @@ "rows": ["A15", "B3", "B4", "B5", "B7"] }, "diode_direction": "COL2ROW", + "audio": { + "driver": "pwm_hardware" + }, "ws2812": { "driver": "pwm" }, diff --git a/keyboards/handwired/macroboard/f411/rules.mk b/keyboards/handwired/macroboard/f411/rules.mk deleted file mode 100644 index 72f75f4367e..00000000000 --- a/keyboards/handwired/macroboard/f411/rules.mk +++ /dev/null @@ -1 +0,0 @@ -AUDIO_DRIVER = pwm_hardware diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/keyboard.json b/keyboards/handwired/tractyl_manuform/5x6_right/f303/keyboard.json index 000d8f0dd77..499390c6107 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/keyboard.json +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/keyboard.json @@ -12,6 +12,9 @@ "led_count": 20, "split_count": [10, 10] }, + "audio": { + "driver": "dac_additive" + }, "ws2812": { "pin": "A6", "driver": "pwm" diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk index 23f790a1ad4..22915ec0001 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/rules.mk @@ -1,4 +1,3 @@ # KEYBOARD_SHARED_EP = yes SERIAL_DRIVER = usart -AUDIO_DRIVER = dac_additive diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/keyboard.json b/keyboards/handwired/tractyl_manuform/5x6_right/f411/keyboard.json index 73c13e8e318..7182ee17012 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/keyboard.json +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/keyboard.json @@ -15,6 +15,9 @@ "build": { "debounce_type": "asym_eager_defer_pk" }, + "audio": { + "driver": "pwm_hardware" + }, "ws2812": { "pin": "A1", "driver": "pwm" diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk index e75692030f7..f26cbbced12 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk @@ -2,4 +2,3 @@ KEYBOARD_SHARED_EP = yes MOUSE_SHARED_EP = yes SERIAL_DRIVER = usart -AUDIO_DRIVER = pwm_hardware diff --git a/keyboards/nack/keyboard.json b/keyboards/nack/keyboard.json index 6a3b6db3ade..cd08aac0af4 100644 --- a/keyboards/nack/keyboard.json +++ b/keyboards/nack/keyboard.json @@ -17,6 +17,9 @@ "rgb_matrix": true, "unicode": true }, + "audio": { + "driver": "dac_basic" + }, "ws2812": { "pin": "B5", "driver": "spi" diff --git a/keyboards/nack/rules.mk b/keyboards/nack/rules.mk deleted file mode 100644 index 72354402a6b..00000000000 --- a/keyboards/nack/rules.mk +++ /dev/null @@ -1 +0,0 @@ -AUDIO_DRIVER = dac_basic diff --git a/keyboards/planck/ez/info.json b/keyboards/planck/ez/info.json index 4244b4d83d8..f7b2a8f8a1f 100644 --- a/keyboards/planck/ez/info.json +++ b/keyboards/planck/ez/info.json @@ -75,6 +75,9 @@ "rows": ["A10", "A9", "A8", "B15", "C13", "C14", "C15", "A2"] }, "diode_direction": "COL2ROW", + "audio": { + "driver": "dac_additive" + }, "encoder": { "rotary": [ {"pin_a": "B12", "pin_b": "B13"} diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk index 6cdb6ed4c29..ef20f95b652 100644 --- a/keyboards/planck/ez/rules.mk +++ b/keyboards/planck/ez/rules.mk @@ -1,5 +1,3 @@ -AUDIO_DRIVER = dac_additive - RGBLIGHT_SUPPORTED = no BAKCLIGHT_SUPPORTED = no diff --git a/keyboards/quokka/keyboard.json b/keyboards/quokka/keyboard.json index 0c34b0ee65f..094e3e496eb 100644 --- a/keyboards/quokka/keyboard.json +++ b/keyboards/quokka/keyboard.json @@ -13,6 +13,9 @@ "oled": true, "rgb_matrix": true }, + "audio": { + "driver": "pwm_hardware" + }, "matrix_pins": { "cols": ["GP8", "GP7", "GP6", "GP5", "GP4"], "rows": ["GP10", "GP19", "GP20", "GP18"] diff --git a/keyboards/quokka/rules.mk b/keyboards/quokka/rules.mk index c53818be735..161ec22b16e 100644 --- a/keyboards/quokka/rules.mk +++ b/keyboards/quokka/rules.mk @@ -1,2 +1 @@ -AUDIO_DRIVER = pwm_hardware SERIAL_DRIVER = vendor diff --git a/keyboards/rgbkb/sol3/rev1/keyboard.json b/keyboards/rgbkb/sol3/rev1/keyboard.json index 3b8b7d060c8..83e0a7a9275 100644 --- a/keyboards/rgbkb/sol3/rev1/keyboard.json +++ b/keyboards/rgbkb/sol3/rev1/keyboard.json @@ -24,6 +24,9 @@ "twinkle": true } }, + "audio": { + "driver": "dac_additive" + }, "ws2812": { "pin": "B5", "driver": "pwm" diff --git a/keyboards/rgbkb/sol3/rules.mk b/keyboards/rgbkb/sol3/rules.mk index bf22130a55a..0c48b5d30e4 100644 --- a/keyboards/rgbkb/sol3/rules.mk +++ b/keyboards/rgbkb/sol3/rules.mk @@ -14,7 +14,6 @@ CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Enable N-Key Rollover AUDIO_ENABLE = yes # Audio output -AUDIO_DRIVER = dac_additive DYNAMIC_MACRO_ENABLE = yes DIP_SWITCH_ENABLE = yes diff --git a/keyboards/tzarc/djinn/info.json b/keyboards/tzarc/djinn/info.json index fddee1c21fd..be0710ebef4 100644 --- a/keyboards/tzarc/djinn/info.json +++ b/keyboards/tzarc/djinn/info.json @@ -31,6 +31,9 @@ "rows": ["B13", "B14", "B15", "C6", "C7", "C8"], "cols": ["C0", "C1", "C2", "C3", "A0", "A1", "A2"] }, + "audio": { + "driver": "pwm_software" + }, "backlight": { "pin": "A7", "levels": 4 diff --git a/keyboards/tzarc/djinn/rules.mk b/keyboards/tzarc/djinn/rules.mk index 5a4589a86fe..78912d16d05 100644 --- a/keyboards/tzarc/djinn/rules.mk +++ b/keyboards/tzarc/djinn/rules.mk @@ -4,8 +4,6 @@ SERIAL_DRIVER = usart CIE1931_CURVE = yes -AUDIO_DRIVER = pwm_software - QUANTUM_PAINTER_DRIVERS = ili9341_spi SRC += \ diff --git a/keyboards/yanghu/unicorne/info.json b/keyboards/yanghu/unicorne/info.json index 504df68fb06..1b890dcabaf 100644 --- a/keyboards/yanghu/unicorne/info.json +++ b/keyboards/yanghu/unicorne/info.json @@ -18,6 +18,9 @@ "oled": true, "rgblight": true }, + "audio": { + "driver": "pwm_hardware" + }, "rgblight": { "led_count": 8, "animations": { diff --git a/keyboards/yanghu/unicorne/rules.mk b/keyboards/yanghu/unicorne/rules.mk index 13cbb6b1e7d..96852c8abfe 100644 --- a/keyboards/yanghu/unicorne/rules.mk +++ b/keyboards/yanghu/unicorne/rules.mk @@ -1,3 +1 @@ -AUDIO_DRIVER = pwm_hardware - DEFAULT_FOLDER = yanghu/unicorne/f411 diff --git a/keyboards/zsa/moonlander/keyboard.json b/keyboards/zsa/moonlander/keyboard.json index 233cb46bba7..08864fe2d77 100644 --- a/keyboards/zsa/moonlander/keyboard.json +++ b/keyboards/zsa/moonlander/keyboard.json @@ -22,6 +22,9 @@ "rgb_matrix": true, "swap_hands": true }, + "audio": { + "driver": "dac_additive" + }, "dynamic_keymap": { "layer_count": 8 }, diff --git a/keyboards/zsa/moonlander/rules.mk b/keyboards/zsa/moonlander/rules.mk index 46375584890..10928ea0611 100644 --- a/keyboards/zsa/moonlander/rules.mk +++ b/keyboards/zsa/moonlander/rules.mk @@ -1,4 +1,3 @@ -AUDIO_DRIVER = dac_additive CUSTOM_MATRIX = lite # project specific files