diff --git a/include/nuttx/audio/cxd56.h b/arch/arm/include/cxd56xx/nxaudio.h similarity index 100% rename from include/nuttx/audio/cxd56.h rename to arch/arm/include/cxd56xx/nxaudio.h diff --git a/arch/arm/src/cxd56xx/Kconfig b/arch/arm/src/cxd56xx/Kconfig index 531fe32bf5..7a29504596 100644 --- a/arch/arm/src/cxd56xx/Kconfig +++ b/arch/arm/src/cxd56xx/Kconfig @@ -292,6 +292,49 @@ config CXD56_CHARGER_TEMP_PRECISE This option requires libm. endif +comment "NuttX style Audio Driver Support" + +menu "NX Audio Driver Support" + +config AUDIO_CXD56 + bool "CXD56 audio driver" + default n + depends on AUDIO + select AUDIO_DRIVER_SPECIFIC_BUFFERS + ---help--- + Enable support for audio playback using the CXD5247 chip on the + CXD56 Spresense board. + +if AUDIO_CXD56 + +if AUDIO_DRIVER_SPECIFIC_BUFFERS + +config AUDIO_CXD56_SRC + bool "CXD56 audio sample rate converter" + select AUDIO_SRC + default n + ---help--- + Enable support for audio playback using the CXD5247 chip on the + CXD56 Spresense board with sample rate converter. + +config CXD56_AUDIO_NUM_BUFFERS + int "Number of audio buffers to use" + default 4 + +config CXD56_AUDIO_BUFFER_SIZE + int "Size of each audio buffer" + default 4096 + +endif # AUDIO_DRIVER_SPECIFIC_BUFFERS + +config CXD56_AUDIO_WORKER_STACKSIZE + int "Worker thread stack size" + default 768 + +endif # AUDIO_CXD56 + +endmenu # menu "NX Audio Driver Support" + comment "Peripheral Support" menu "Peripheral Support" diff --git a/arch/arm/src/cxd56xx/Make.defs b/arch/arm/src/cxd56xx/Make.defs index 262705c81b..c7fef91031 100644 --- a/arch/arm/src/cxd56xx/Make.defs +++ b/arch/arm/src/cxd56xx/Make.defs @@ -120,6 +120,13 @@ ifeq ($(CONFIG_CXD56_CHARGER),y) CHIP_CSRCS += cxd56_charger.c endif +ifeq ($(CONFIG_AUDIO_CXD56),y) +CHIP_CSRCS += cxd56_nxaudio.c +ifeq ($(CONFIG_AUDIO_CXD56_SRC),y) +CHIP_CSRCS += cxd56_nxaudio_src.c +endif +endif + ifeq ($(CONFIG_CXD56_GE2D),y) CHIP_CSRCS += cxd56_ge2d.c endif diff --git a/drivers/audio/cxd56.c b/arch/arm/src/cxd56xx/cxd56_nxaudio.c similarity index 99% rename from drivers/audio/cxd56.c rename to arch/arm/src/cxd56xx/cxd56_nxaudio.c index d9b57b9b63..161d421601 100644 --- a/drivers/audio/cxd56.c +++ b/arch/arm/src/cxd56xx/cxd56_nxaudio.c @@ -43,10 +43,10 @@ #include #include -#include "cxd56.h" +#include "cxd56_nxaudio.h" #ifdef CONFIG_AUDIO_CXD56_SRC -#include "cxd56_src.h" +#include "cxd56_nxaudio_src.h" #endif /**************************************************************************** diff --git a/drivers/audio/cxd56.h b/arch/arm/src/cxd56xx/cxd56_nxaudio.h similarity index 100% rename from drivers/audio/cxd56.h rename to arch/arm/src/cxd56xx/cxd56_nxaudio.h diff --git a/drivers/audio/cxd56_src.c b/arch/arm/src/cxd56xx/cxd56_nxaudio_src.c similarity index 99% rename from drivers/audio/cxd56_src.c rename to arch/arm/src/cxd56xx/cxd56_nxaudio_src.c index 6aa921cc49..2bdd99c68f 100644 --- a/drivers/audio/cxd56_src.c +++ b/arch/arm/src/cxd56xx/cxd56_nxaudio_src.c @@ -35,8 +35,8 @@ #include #include -#include "cxd56.h" -#include "cxd56_src.h" +#include "cxd56_nxaudio.h" +#include "cxd56_nxaudio_src.h" /**************************************************************************** * Pre-processor Definitions diff --git a/drivers/audio/cxd56_src.h b/arch/arm/src/cxd56xx/cxd56_nxaudio_src.h similarity index 100% rename from drivers/audio/cxd56_src.h rename to arch/arm/src/cxd56xx/cxd56_nxaudio_src.h diff --git a/boards/arm/cxd56xx/common/src/cxd56_audio.c b/boards/arm/cxd56xx/common/src/cxd56_audio.c index 08ed9849ca..9ddb0821cc 100644 --- a/boards/arm/cxd56xx/common/src/cxd56_audio.c +++ b/boards/arm/cxd56xx/common/src/cxd56_audio.c @@ -33,10 +33,10 @@ #include #include -#include #include #include #include +#include #include "chip.h" #include "arm_internal.h" diff --git a/drivers/audio/Kconfig b/drivers/audio/Kconfig index 7d43c04044..8665a215c7 100644 --- a/drivers/audio/Kconfig +++ b/drivers/audio/Kconfig @@ -27,43 +27,6 @@ if AUDIO_TONE endif # AUDIO_TONE -config AUDIO_CXD56 - bool "CXD56 audio driver" - default n - depends on AUDIO - select AUDIO_DRIVER_SPECIFIC_BUFFERS - ---help--- - Enable support for audio playback using the CXD5247 chip on the - CXD56 Spresense board. - -if AUDIO_CXD56 - -if AUDIO_DRIVER_SPECIFIC_BUFFERS - -config AUDIO_CXD56_SRC - bool "CXD56 audio sample rate converter" - select AUDIO_SRC - default n - ---help--- - Enable support for audio playback using the CXD5247 chip on the - CXD56 Spresense board with sample rate converter. - -config CXD56_AUDIO_NUM_BUFFERS - int "Number of audio buffers to use" - default 4 - -config CXD56_AUDIO_BUFFER_SIZE - int "Size of each audio buffer" - default 4096 - -endif # AUDIO_DRIVER_SPECIFIC_BUFFERS - -config CXD56_AUDIO_WORKER_STACKSIZE - int "Worker thread stack size" - default 768 - -endif # AUDIO_CXD56 - config AUDIO_VS1053 bool "VS1053 codec chip" default n diff --git a/drivers/audio/Make.defs b/drivers/audio/Make.defs index e1c67cdad1..007ab0618c 100644 --- a/drivers/audio/Make.defs +++ b/drivers/audio/Make.defs @@ -22,13 +22,6 @@ ifeq ($(CONFIG_DRIVERS_AUDIO),y) -ifeq ($(CONFIG_AUDIO_CXD56),y) -CSRCS += cxd56.c -ifeq ($(CONFIG_AUDIO_CXD56_SRC),y) -CSRCS += cxd56_src.c -endif -endif - ifeq ($(CONFIG_AUDIO_VS1053),y) CSRCS += vs1053.c endif