Browse Source

fix: 修正音频相关的几个编译警告

Wendal Chen 2 years ago
parent
commit
b237da6c7f
3 changed files with 14 additions and 1 deletions
  1. 1 0
      app/audio_driver/es8311.c
  2. 3 0
      app/main.c
  3. 10 1
      app/port/luat_audio_air101.c

+ 1 - 0
app/audio_driver/es8311.c

@@ -3,6 +3,7 @@
 #include "luat_gpio.h"
 #include "luat_i2c.h"
 #include "luat_audio_air101.h"
+#include "luat_timer.h"
 
 #include "es8311.h"
 

+ 3 - 0
app/main.c

@@ -6,6 +6,9 @@
 #include "wm_osal.h"
 #include "wm_watchdog.h"
 
+#include "FreeRTOS.h"
+#include "task.h"
+
 #ifdef __LUATOS__
 #include "string.h"
 #include "luat_fs.h"

+ 10 - 1
app/port/luat_audio_air101.c

@@ -5,6 +5,15 @@
 #include "luat_audio_air101.h"
 #include "es8311.h"
 
+#include "FreeRTOS.h"
+#include "task.h"
+
+#define LUAT_LOG_TAG "audio"
+#include "luat_log.h"
+
+int luat_i2s_resume(uint8_t id);
+int luat_i2s_stop(uint8_t id);
+
 extern volatile uint8_t run_status;
 
 audio_codec_conf_t audio_hardware = {
@@ -33,7 +42,7 @@ int luat_audio_play_get_last_error(uint8_t multimedia_id){
 
 int luat_audio_start_raw(uint8_t multimedia_id, uint8_t audio_format, uint8_t num_channels, uint32_t sample_rate, uint8_t bits_per_sample, uint8_t is_signed){
     if(sample_rate == 8000 && bits_per_sample == 8){
-        wm_printf("not support 8K 8Bit record!\n");
+        LLOGW("not support 8K 8Bit record!\n");
         return -1;
     }