From ba8f1454f46537609f65a6abb4bb0e82fecbc2f1 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 5 Oct 2021 18:01:45 -0700 Subject: [PATCH] Move Audio drivers from quantum to platform drivers folder (#14308) * Move Audio drivers from quantum to platform drivers folder * fix path for audio drivers Co-authored-by: Ryan Co-authored-by: Ryan --- common_features.mk | 2 +- .../avr/drivers/audio_pwm.h | 0 .../avr/drivers/audio_pwm_hardware.c | 0 .../chibios/drivers/audio_dac.h | 0 .../chibios/drivers/audio_dac_additive.c | 0 .../chibios/drivers/audio_dac_basic.c | 0 .../chibios/drivers/audio_pwm.h | 0 .../chibios/drivers/audio_pwm_hardware.c | 0 .../chibios/drivers/audio_pwm_software.c | 0 quantum/audio/audio.h | 13 ++++--------- 10 files changed, 5 insertions(+), 10 deletions(-) rename quantum/audio/driver_avr_pwm.h => platforms/avr/drivers/audio_pwm.h (100%) rename quantum/audio/driver_avr_pwm_hardware.c => platforms/avr/drivers/audio_pwm_hardware.c (100%) rename quantum/audio/driver_chibios_dac.h => platforms/chibios/drivers/audio_dac.h (100%) rename quantum/audio/driver_chibios_dac_additive.c => platforms/chibios/drivers/audio_dac_additive.c (100%) rename quantum/audio/driver_chibios_dac_basic.c => platforms/chibios/drivers/audio_dac_basic.c (100%) rename quantum/audio/driver_chibios_pwm.h => platforms/chibios/drivers/audio_pwm.h (100%) rename quantum/audio/driver_chibios_pwm_hardware.c => platforms/chibios/drivers/audio_pwm_hardware.c (100%) rename quantum/audio/driver_chibios_pwm_software.c => platforms/chibios/drivers/audio_pwm_software.c (100%) diff --git a/common_features.mk b/common_features.mk index a71bcace02..d7b0f826aa 100644 --- a/common_features.mk +++ b/common_features.mk @@ -83,7 +83,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c SRC += $(QUANTUM_DIR)/audio/audio.c ## common audio code, hardware agnostic - SRC += $(QUANTUM_DIR)/audio/driver_$(PLATFORM_KEY)_$(strip $(AUDIO_DRIVER)).c + SRC += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/audio_$(strip $(AUDIO_DRIVER)).c SRC += $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/luts.c endif diff --git a/quantum/audio/driver_avr_pwm.h b/platforms/avr/drivers/audio_pwm.h similarity index 100% rename from quantum/audio/driver_avr_pwm.h rename to platforms/avr/drivers/audio_pwm.h diff --git a/quantum/audio/driver_avr_pwm_hardware.c b/platforms/avr/drivers/audio_pwm_hardware.c similarity index 100% rename from quantum/audio/driver_avr_pwm_hardware.c rename to platforms/avr/drivers/audio_pwm_hardware.c diff --git a/quantum/audio/driver_chibios_dac.h b/platforms/chibios/drivers/audio_dac.h similarity index 100% rename from quantum/audio/driver_chibios_dac.h rename to platforms/chibios/drivers/audio_dac.h diff --git a/quantum/audio/driver_chibios_dac_additive.c b/platforms/chibios/drivers/audio_dac_additive.c similarity index 100% rename from quantum/audio/driver_chibios_dac_additive.c rename to platforms/chibios/drivers/audio_dac_additive.c diff --git a/quantum/audio/driver_chibios_dac_basic.c b/platforms/chibios/drivers/audio_dac_basic.c similarity index 100% rename from quantum/audio/driver_chibios_dac_basic.c rename to platforms/chibios/drivers/audio_dac_basic.c diff --git a/quantum/audio/driver_chibios_pwm.h b/platforms/chibios/drivers/audio_pwm.h similarity index 100% rename from quantum/audio/driver_chibios_pwm.h rename to platforms/chibios/drivers/audio_pwm.h diff --git a/quantum/audio/driver_chibios_pwm_hardware.c b/platforms/chibios/drivers/audio_pwm_hardware.c similarity index 100% rename from quantum/audio/driver_chibios_pwm_hardware.c rename to platforms/chibios/drivers/audio_pwm_hardware.c diff --git a/quantum/audio/driver_chibios_pwm_software.c b/platforms/chibios/drivers/audio_pwm_software.c similarity index 100% rename from quantum/audio/driver_chibios_pwm_software.c rename to platforms/chibios/drivers/audio_pwm_software.c diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 56b9158a1a..290d461f5a 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h @@ -26,17 +26,12 @@ #if defined(__AVR__) # include -# if defined(AUDIO_DRIVER_PWM) -# include "driver_avr_pwm.h" -# endif #endif -#if defined(PROTOCOL_CHIBIOS) -# if defined(AUDIO_DRIVER_PWM) -# include "driver_chibios_pwm.h" -# elif defined(AUDIO_DRIVER_DAC) -# include "driver_chibios_dac.h" -# endif +#if defined(AUDIO_DRIVER_PWM) +# include "audio_pwm.h" +#elif defined(AUDIO_DRIVER_DAC) +# include "audio_dac.h" #endif typedef union {