Merge pull request #47 from robertlipe/sampling_3

Remove unused sampling argument
This commit is contained in:
Marek Kraus 2020-10-30 08:00:58 +01:00 committed by GitHub
commit 24495294f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 16 deletions

View File

@ -170,7 +170,7 @@ static void DAC_LLI_Init(uint32_t *psrc, uint32_t bufsize)
}
LLIList[i].dmaCtrl= dmaCtrlRegVal;
}
LLIList[i - 1].nextLLI=(uint32_t)&LLIList[0];
@ -208,12 +208,9 @@ static BL_Err_Type DAC_DMA_Test(uint32_t *psrc, uint32_t bufsize)
}
int audio_dac_dma_test(uint16_t *paddr, uint32_t bufsize, int sampling)
int audio_dac_dma_test(uint16_t *paddr, uint32_t bufsize)
{
sampling = sampling;
if(SUCCESS != DAC_DMA_Test(paddr, bufsize)){
return 0;
}

View File

@ -31,6 +31,6 @@
#define __BL_DAC_DMA_H__
#include <stdint.h>
int audio_dac_dma_test(uint16_t *pcbuff, uint32_t bufsize, int sampling);
int audio_dac_dma_test(uint16_t *pcbuff, uint32_t bufsize);
#endif

View File

@ -129,12 +129,11 @@ static int get_dts_addr(const char *name, uint32_t *start, uint32_t *off)
static void cmd_play_audio(char *buf, int len, int argc, char **argv)
{
int sampling = 0;
int fd_audio;
romfs_filebuf_t filebuf;
uint16_t *p_u16addr;
uint32_t bufsize;
fd_audio = aos_open("/romfs/audio_32k", 0);
if (fd_audio < 0) {
@ -144,15 +143,12 @@ static void cmd_play_audio(char *buf, int len, int argc, char **argv)
aos_ioctl(fd_audio, IOCTL_ROMFS_GET_FILEBUF, (long unsigned int)&filebuf);
aos_close(fd_audio);
// From a long unsigned int* to a uint16_t* should be a NOP, even
// From a long unsigned int* to a uint16_t* should be a NOP, even
// considering alignment.
p_u16addr = (uint16_t*) filebuf.buf;
bufsize = filebuf.bufsize;
audio_dac_dma_test(p_u16addr, bufsize, sampling);
return;
audio_dac_dma_test(p_u16addr, bufsize);
}
int bl_sys_play_audio_init(void)
@ -176,7 +172,7 @@ static void aos_loop_proc(void *pvParameters)
if (0 == get_dts_addr("uart", &fdt, &offset)) {
vfs_uart_init(fdt, offset);
}
#ifdef CONF_USER_ENABLE_VFS_ROMFS
romfs_register();
printf("romfs register \r\n");
@ -194,8 +190,7 @@ static void aos_loop_proc(void *pvParameters)
aos_poll_read_fd(fd_console, aos_cli_event_cb_read_get(), (void*)0x12345678);
_cli_init();
}
aos_loop_run();
puts("------------------------------------------\r\n");