btashton commented on a change in pull request #2124: URL: https://github.com/apache/incubator-nuttx/pull/2124#discussion_r512417078
########## File path: arch/sim/src/Makefile ########## @@ -202,6 +202,11 @@ ifeq ($(CONFIG_RPTUN),y) CSRCS += up_rptun.c endif +ifeq ($(CONFIG_AUDIO),y) Review comment: I think this should be replaced with something like `CONFIG_SIM_ALSA` that way we can support other methods of supporting sim audio in the future. ########## File path: arch/sim/src/sim/up_audio.c ########## @@ -0,0 +1,590 @@ +/**************************************************************************** + * arch/sim/src/sim/up_audio.c Review comment: For the same reason lets make this ALSA specific filename along with the function/struct names. It would be nice to support macOS in the future for audio. ########## File path: arch/sim/src/sim/up_initialize.c ########## @@ -281,4 +282,9 @@ void up_initialize(void) #if defined(CONFIG_FS_SMARTFS) && (defined(CONFIG_SIM_SPIFLASH) || defined(CONFIG_SIM_QSPIFLASH)) up_init_smartfs(); #endif + +#ifdef CONFIG_AUDIO + audio_register("pcm0p", sim_audio_initialize(true)); Review comment: Lets set these via `CONFIG_SIM_ALSA_DEVICE` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org