diff --git a/.gitmodules b/.gitmodules index 9a69a3110..9f95e53e5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "esp-idf"] - path = esp-idf - url = https://github.com/espressif/esp-idf [submodule "components/esp-adf-libs"] path = components/esp-adf-libs url = https://github.com/espressif/esp-adf-libs diff --git a/components/audio_hal/Kconfig.projbuild b/components/audio_hal/Kconfig.projbuild index 19545f9aa..e5f808b0e 100644 --- a/components/audio_hal/Kconfig.projbuild +++ b/components/audio_hal/Kconfig.projbuild @@ -10,6 +10,8 @@ config ESP_LYRAT_V4_3_BOARD bool "ESP32-Lyrat V4.3" config ESP_LYRAT_V4_2_BOARD bool "ESP32-Lyrat V4.2" +config WHYENGINEER_LIN_BOARD + bool "WhyEngineer Lin Audio board" endchoice endmenu diff --git a/components/audio_hal/audio_hal.c b/components/audio_hal/audio_hal.c index 824d24365..1505ac83e 100755 --- a/components/audio_hal/audio_hal.c +++ b/components/audio_hal/audio_hal.c @@ -31,6 +31,7 @@ #include "audio_mutex.h" #include "es8374.h" #include "es8388.h" +#include "wm8978.h" static const char *TAG = "AUDIO_HAL"; @@ -52,6 +53,7 @@ struct audio_hal { }; static struct audio_hal audio_hal_codecs_default[] = { +#if (defined CONFIG_ESP_LYRAT_V4_3_BOARD) ||(defined CONFIG_ESP_LYRAT_V4_2_BOARD) { .audio_codec_initialize = es8388_init, .audio_codec_deinitialize = es8388_deinit, @@ -67,7 +69,18 @@ static struct audio_hal audio_hal_codecs_default[] = { .audio_codec_config_iface = es8374_config_i2s, .audio_codec_set_volume = es8374_set_voice_volume, .audio_codec_get_volume = es8374_get_voice_volume, + }, +#endif +#ifdef CONFIG_WHYENGINEER_LIN_BOARD + { + .audio_codec_initialize =wm8978_init, + .audio_codec_deinitialize=wm8978_deinit, + .audio_codec_ctrl=wm8978_ctrl_state, + .audio_codec_config_iface=wm8978_config_i2s, + .audio_codec_set_volume=wm8978_set_voice_volume, + .audio_codec_get_volume=wm8978_get_voice_volume, } +#endif }; audio_hal_handle_t audio_hal_init(audio_hal_codec_config_t* audio_hal_conf, int index) @@ -93,7 +106,9 @@ audio_hal_handle_t audio_hal_init(audio_hal_codec_config_t* audio_hal_conf, int audio_hal->handle = audio_hal; audio_hal_codecs_default[index].handle = audio_hal; mutex_unlock(audio_hal->audio_hal_lock); +#if (defined CONFIG_ESP_LYRAT_V4_3_BOARD) ||(defined CONFIG_ESP_LYRAT_V4_2_BOARD) es8388_pa_power(true); +#endif return audio_hal; } diff --git a/components/audio_hal/board/board.h b/components/audio_hal/board/board.h index 72e29e746..03a9a9ec5 100644 --- a/components/audio_hal/board/board.h +++ b/components/audio_hal/board/board.h @@ -39,6 +39,10 @@ extern "C" { #include "lyrat_v4_2_board.h" #endif +#ifdef CONFIG_WHYENGINEER_LIN_BOARD +#include "we_lin_board.h" +#endif + #ifdef __cplusplus } diff --git a/components/audio_hal/board/we_lin_board.h b/components/audio_hal/board/we_lin_board.h new file mode 100644 index 000000000..0716be55f --- /dev/null +++ b/components/audio_hal/board/we_lin_board.h @@ -0,0 +1,66 @@ +/* + * ESPRESSIF MIT License + * + * Copyright (c) 2018 + * + * Permission is hereby granted for use on all ESPRESSIF SYSTEMS products, in which case, + * it is free of charge, to any person obtaining a copy of this software and associated + * documentation files (the "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the Software is furnished + * to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all copies or + * substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifndef _WHYENGINEER_BOARD_H_ +#define _WHYENGINEER_BOARD_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#define SD_CARD_OPEN_FILE_NUM_MAX 5 + +#define IIC_PORT 0 +#define IIC_DATA 19 +#define IIC_CLK 18 + + +/* I2S gpios */ +#define IIS_SCLK 33 +#define IIS_LCLK 25 +#define IIS_DSIN 26 +#define IIS_DOUT 27 + + +#define LED_R 5 +#define LED_G 21 +#define LED_B 22 + +#define KEY_1_SEL GPIO_SEL_34 +#define KEY_2_SEL GPIO_SEL_35 +#define KEY_3_SEL GPIO_SEL_32 + +#define KEY_1_NUM GPIO_NUM_34 +#define KEY_2_NUM GPIO_NUM_35 +#define KEY_3_NUM GPIO_NUM_32 + +#define SD_CARD_INTR_GPIO 23 +#define SD_CARD_INTR_SEL 23 + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/components/audio_hal/component.mk b/components/audio_hal/component.mk index a5aecfcd1..5407464f8 100755 --- a/components/audio_hal/component.mk +++ b/components/audio_hal/component.mk @@ -4,6 +4,12 @@ # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) -COMPONENT_ADD_INCLUDEDIRS := ./include ./driver/es8388 ./board ./driver/es8374 +COMPONENT_ADD_INCLUDEDIRS := ./include ./driver/es8388 ./board ./driver/es8374 ./driver/wm8978 -COMPONENT_SRCDIRS := . ./driver/es8388 ./board ./driver/es8374 + +#COMPONENT_SRCDIRS :=. ./driver/es8388 ./board ./driver/es8374 ./driver/wm8978 +ifdef CONFIG_WHYENGINEER_LIN_BOARD +COMPONENT_SRCDIRS := . ./driver/wm8978 +else +COMPONENT_SRCDIRS := . ./driver/es8388 ./board ./driver/es8374 +endif diff --git a/components/audio_hal/driver/wm8978/wm8978.c b/components/audio_hal/driver/wm8978/wm8978.c new file mode 100644 index 000000000..ff8b0c9a7 --- /dev/null +++ b/components/audio_hal/driver/wm8978/wm8978.c @@ -0,0 +1,425 @@ + +#include +#include "esp_log.h" +#include "driver/i2c.h" +#include "driver/i2s.h" +#include "wm8978.h" +#include "board.h" + +#define ACK_CHECK_EN 0x1 /*!< I2C master will check ack from slave*/ +#define ACK_CHECK_DIS 0x0 /*!< I2C master will not check ack from slave */ +#define ACK_VAL 0x0 /*!< I2C ack value */ +#define NACK_VAL 0x1 /*!< I2C nack value */ + +static const char *ES_TAG = "WM8978_DRIVER"; + +#define WM8978_ADDR 0X1A + +#define ES_ASSERT(a, format, b, ...) \ + if ((a) != 0) { \ + ESP_LOGE(ES_TAG, format, ##__VA_ARGS__); \ + return b;\ + } + + +static uint16_t WM8978_REGVAL_TBL[58]= +{ + 0X0000,0X0000,0X0000,0X0000,0X0050,0X0000,0X0140,0X0000, + 0X0000,0X0000,0X0000,0X00FF,0X00FF,0X0000,0X0100,0X00FF, + 0X00FF,0X0000,0X012C,0X002C,0X002C,0X002C,0X002C,0X0000, + 0X0032,0X0000,0X0000,0X0000,0X0000,0X0000,0X0000,0X0000, + 0X0038,0X000B,0X0032,0X0000,0X0008,0X000C,0X0093,0X00E9, + 0X0000,0X0000,0X0000,0X0000,0X0003,0X0010,0X0010,0X0100, + 0X0100,0X0002,0X0001,0X0001,0X0039,0X0039,0X0039,0X0039, + 0X0001,0X0001 +}; + + +static const i2c_config_t es_i2c_cfg = { + .mode = I2C_MODE_MASTER, + .sda_io_num = IIC_DATA, + .scl_io_num = IIC_CLK, + .sda_pullup_en = GPIO_PULLUP_DISABLE, + .scl_pullup_en = GPIO_PULLUP_DISABLE, + .master.clk_speed = 100000 +}; +static inline esp_err_t _i2c_master_mem_write(i2c_port_t i2c_num, uint8_t DevAddr,uint8_t MemAddr,uint8_t* data_wr, size_t size) +{ + if (size == 0) { + return ESP_OK; + } + i2c_cmd_handle_t cmd = i2c_cmd_link_create();//a cmd list + i2c_master_start(cmd); + i2c_master_write_byte(cmd, ( DevAddr << 1 ) | I2C_MASTER_WRITE, ACK_CHECK_EN); + i2c_master_write_byte(cmd, MemAddr, ACK_CHECK_EN); + i2c_master_write(cmd, data_wr, size, ACK_CHECK_EN); + i2c_master_stop(cmd); + esp_err_t ret = i2c_master_cmd_begin(i2c_num, cmd, 1000 / portTICK_RATE_MS); + i2c_cmd_link_delete(cmd); + + return ret; +} +static int wm8978_write_reg(uint8_t reg, uint16_t val) +{ + int res = 0; + uint8_t buf[2]; + buf[0]=((val&0x0100)>>8)|(reg<<1); + buf[1]=(uint8_t)(val&0xff); + res=(int)_i2c_master_mem_write(IIC_PORT,WM8978_ADDR,buf[0],buf+1,1); + ES_ASSERT(res, "es_write_reg error", -1); + WM8978_REGVAL_TBL[reg]=val; + return res; +} + +static int wm8978_read_reg(uint8_t reg_add, uint16_t *pData) +{ + *pData = WM8978_REGVAL_TBL[reg_add]; + return 0; +} + +static int i2c_init() +{ + int res; + res = i2c_param_config(IIC_PORT, &es_i2c_cfg); + res |= i2c_driver_install(IIC_PORT, es_i2c_cfg.mode, 0, 0, 0); + ES_ASSERT(res, "i2c_init error", -1); + return res; +} + +void wm8978_read_all() +{ + for (int i = 0; i < 58; i++) { + uint16_t reg = 0; + wm8978_read_reg(i, ®); + ets_printf("0x%x: 0x%x\n", i, reg); + } +} + +esp_err_t wm8978_init(audio_hal_codec_config_t *cfg){ + int res=0; + res|=i2c_init(); + //power config + res|=wm8978_write_reg(1,0x1df); + res|=wm8978_write_reg(2,0x1bf); + res|=wm8978_write_reg(3,0x1ff); + //interface config + uint16_t val; + res|=wm8978_read_reg(4,&val); + + if(cfg->i2s_iface.bits==AUDIO_HAL_BIT_LENGTH_16BITS){ + val&=0x19f; + }else if(cfg->i2s_iface.bits==AUDIO_HAL_BIT_LENGTH_24BITS){ + val&=0x19f; + val|=BIT6; + }else if(cfg->i2s_iface.bits==AUDIO_HAL_BIT_LENGTH_32BITS){ + val|=(BIT6|BIT5); + }else{ + return ESP_FAIL; + } + + if(cfg->i2s_iface.fmt==AUDIO_HAL_I2S_NORMAL){ + val&=0x1e7; + val|=(BIT4); + }else if(cfg->i2s_iface.fmt==AUDIO_HAL_I2S_RIGHT){ + val&=0x1e7; + }else if(cfg->i2s_iface.fmt==AUDIO_HAL_I2S_LEFT){ + val&=0x1e7; + val|=BIT3; + }else if(cfg->i2s_iface.fmt==AUDIO_HAL_I2S_DSP){ + val|=(BIT4|BIT3); + }else{ + return ESP_FAIL; + } + res|=wm8978_write_reg(4,val); + //clk config + res|=wm8978_read_reg(6,&val); + val&=0x01f;//use the mclk,not need pll,div=1 + if(cfg->i2s_iface.mode==AUDIO_HAL_MODE_MASTER){ + val&=~BIT0; + }else{ + //as slave mode ,must config bclk div + //the mclk=256fs + //todo ... + return ESP_FAIL; + } + res|=wm8978_write_reg(6,val); + if(cfg->i2s_iface.samples==AUDIO_HAL_08K_SAMPLES){ + val=0x00A; + }else if(cfg->i2s_iface.samples==AUDIO_HAL_16K_SAMPLES){ + val=0x006; + }else if(cfg->i2s_iface.samples==AUDIO_HAL_24K_SAMPLES){ + val=0x004; + }else if((cfg->i2s_iface.samples==AUDIO_HAL_44K_SAMPLES)||(cfg->i2s_iface.samples==AUDIO_HAL_48K_SAMPLES)){ + val=0; + } + res|=wm8978_write_reg(7,val); + res|=wm8978_write_reg(10,0x008); + res|=wm8978_write_reg(14,0x108); + res|=wm8978_write_reg(32,0x1b8); + res|=wm8978_set_adc_volume(100);//max + res|=wm8978_write_reg(47,0x100); + res|=wm8978_write_reg(48,0x100); + res|=wm8978_read_reg(49,&val); + val|=BIT2|BIT3|BIT4; + res|=wm8978_write_reg(49,val); + res|=wm8978_read_reg(56,&val); + val|=BIT1; + val&=~BIT0; + res|=wm8978_write_reg(56,val); + res|=wm8978_read_reg(57,&val); + val|=BIT1; + val&=~BIT0; + res|=wm8978_write_reg(57,val); + wm8979_eq_dir(0); + return res; + +} +/* +* 0: adc +* 1: dac +*/ +esp_err_t wm8979_eq_dir(uint8_t dir){ + uint16_t val; + int res; + res=wm8978_read_reg(18,&val); + if(dir){ + val|=BIT8; + }else{ + val&=~BIT8; + } + res|=wm8978_write_reg(18,val); + return res; +} +/* + * gain: 0~100(-12db~12db) + * freq: 0:80 1:105 2:135 3:175 +*/ +esp_err_t wm8978_set_eq1(uint8_t freq,int gain){ + uint16_t val; + if(gain>100) + gain=100; + if(gain<0) + gain=0; + gain*=24; + gain/=100; + gain=24-gain; + int res=wm8978_read_reg(18,&val); + val&=0x100; + val|=(freq<<5)|((uint16_t)gain); + res|=wm8978_write_reg(18,val); + return res; +} +/* + * gain: 0~100(-12db~12db) + * freq: 0:230 1:300 2:385 3:500 +*/ +esp_err_t wm8978_set_eq2(uint8_t freq,int gain){ + uint16_t val; + if(gain>100) + gain=100; + if(gain<0) + gain=0; + gain*=24; + gain/=100; + gain=24-gain; + val=(freq<<5)|((uint16_t)gain); + return wm8978_write_reg(19,val); +} +/* + * gain: 0~100(-12db~12db) + * freq: 0:650 1:850 2:1.1k 3:1.4k +*/ +esp_err_t wm8978_set_eq3(uint8_t freq,int gain){ + uint16_t val; + if(gain>100) + gain=100; + if(gain<0) + gain=0; + gain*=24; + gain/=100; + gain=24-gain; + val=(freq<<5)|((uint16_t)gain); + return wm8978_write_reg(20,val); +} +/* + * gain: 0~100(-12db~12db) + * freq: 0:1.8k 1:2.4k 2:3.2k 3:4.1k +*/ +esp_err_t wm8978_set_eq4(uint8_t freq,int gain){ + uint16_t val; + if(gain>100) + gain=100; + if(gain<0) + gain=0; + gain*=24; + gain/=100; + gain=24-gain; + val=(freq<<5)|((uint16_t)gain); + return wm8978_write_reg(21,val); +} +/* + * gain: 0~100(-12db~12db) + * freq: 0:5.3k 1:6.9k 2:9k 3:11.7k +*/ +esp_err_t wm8978_set_eq5(uint8_t freq,int gain){ + uint16_t val; + if(gain>100) + gain=100; + if(gain<0) + gain=0; + gain*=24; + gain/=100; + gain=24-gain; + val=(freq<<5)|((uint16_t)gain); + return wm8978_write_reg(22,val); +} + +esp_err_t wm8978_pga_volume(int volume){ + int res=0; + volume*=63; + volume/=100; + res|=wm8978_write_reg(45,volume); + res|=wm8978_write_reg(46,volume|BIT8); + return res; +} +esp_err_t wm8978_set_hp_volume(int volume){ + int res=0; + volume*=63; + volume/=100; + res|=wm8978_write_reg(53,volume); + res|=wm8978_write_reg(52,volume|BIT8); + return res; +} +esp_err_t wm8978_set_spk_volume(int volume){ + int res=0; + volume*=63; + volume/=100; + res|=wm8978_write_reg(55,volume); + res|=wm8978_write_reg(54,volume|BIT8); + return res; +} +esp_err_t wm8978_mute(bool en){ + uint16_t val; + int res=wm8978_read_reg(10,&val); + if(en){ + val|=BIT6; + }else{ + val&=~BIT6; + } + res|=wm8978_write_reg(10,val); + return res; +} +esp_err_t wm8978_set_adc_volume(int volume){ + int res=0; + volume*=255; + volume/=100; + volume|=BIT8; + res|=wm8978_write_reg(15,volume); + res|=wm8978_write_reg(16,volume); + return res; +} + + +esp_err_t wm8978_deinit(void){ + return wm8978_write_reg(0,0x1); +} +esp_err_t wm8978_ctrl_state(audio_hal_codec_mode_t mode, audio_hal_ctrl_t ctrl_state){ + uint16_t val1,val2; + int res=0; + res|=wm8978_read_reg(2,&val1); + res|=wm8978_read_reg(3,&val2); + if(mode==AUDIO_HAL_CODEC_MODE_ENCODE){ + //disable dac + val2&=~(BIT0|BIT1); + res|=wm8978_write_reg(3,val2); + val1|=(BIT0|BIT1); + res|=wm8978_write_reg(2,val1); + }else if(mode==AUDIO_HAL_CODEC_MODE_DECODE){ + val1&=~(BIT0|BIT1); + res|=wm8978_write_reg(2,val1); + val2|=(BIT0|BIT1); + res|=wm8978_write_reg(3,val2); + }else if(mode==AUDIO_HAL_CODEC_MODE_BOTH){ + val1|=(BIT0|BIT1); + val2|=(BIT0|BIT1); + res|=wm8978_write_reg(2,val1); + res|=wm8978_write_reg(3,val2); + }else{ + return ESP_FAIL; + } + if(ctrl_state==AUDIO_HAL_CTRL_START){ + wm8978_mute(false); + }else{ + wm8978_mute(true); + } + return res; + +} +esp_err_t wm8978_config_i2s(audio_hal_codec_mode_t mode, audio_hal_codec_i2s_iface_t *iface){ + (void)mode; + uint16_t val; + int res=0; + if(iface->mode!=AUDIO_HAL_MODE_MASTER){ + //todo ... + return ESP_FAIL; + } + res|=wm8978_read_reg(4,&val); + if(iface->bits==AUDIO_HAL_BIT_LENGTH_16BITS){ + val&=0x19f; + }else if(iface->bits==AUDIO_HAL_BIT_LENGTH_24BITS){ + val&=0x19f; + val|=BIT6; + }else if(iface->bits==AUDIO_HAL_BIT_LENGTH_32BITS){ + val|=(BIT6|BIT5); + }else{ + return ESP_FAIL; + } + if(iface->fmt==AUDIO_HAL_I2S_NORMAL){ + val&=0x1e7; + val|=(BIT4); + }else if(iface->fmt==AUDIO_HAL_I2S_RIGHT){ + val&=0x1e7; + }else if(iface->fmt==AUDIO_HAL_I2S_LEFT){ + val&=0x1e7; + val|=BIT3; + }else if(iface->fmt==AUDIO_HAL_I2S_DSP){ + val|=(BIT4|BIT3); + }else{ + return ESP_FAIL; + } + res|=wm8978_write_reg(4,val); + + if(iface->samples==AUDIO_HAL_08K_SAMPLES){ + val=0x00A; + }else if(iface->samples==AUDIO_HAL_16K_SAMPLES){ + val=0x006; + }else if(iface->samples==AUDIO_HAL_24K_SAMPLES){ + val=0x004; + }else if((iface->samples==AUDIO_HAL_44K_SAMPLES)||(iface->samples==AUDIO_HAL_48K_SAMPLES)){ + val=0; + } + res|=wm8978_write_reg(7,val); + return res; +} +static int _vol; + +esp_err_t wm8978_set_voice_volume(int volume){ + if(volume>100) + volume=100; + if(volume<0) + volume=0; + int res=0; + _vol=volume; + volume*=255; + volume/=100; + volume|=BIT8; + res|=wm8978_write_reg(11,volume); + res|=wm8978_write_reg(12,volume); + res=0; + return res; +} + +esp_err_t wm8978_get_voice_volume(int *volume){ + *volume=_vol; + return ESP_OK; +} \ No newline at end of file diff --git a/components/audio_hal/driver/wm8978/wm8978.h b/components/audio_hal/driver/wm8978/wm8978.h new file mode 100644 index 000000000..579431154 --- /dev/null +++ b/components/audio_hal/driver/wm8978/wm8978.h @@ -0,0 +1,32 @@ +#ifndef WM8978_H +#define WM8978_H + +#include "esp_types.h" +#include "audio_hal.h" +#include "driver/i2s.h" + +esp_err_t wm8978_init(audio_hal_codec_config_t *cfg); +esp_err_t wm8978_deinit(void); + +esp_err_t wm8978_ctrl_state(audio_hal_codec_mode_t mode, audio_hal_ctrl_t ctrl_state); +esp_err_t wm8978_config_i2s(audio_hal_codec_mode_t mode, audio_hal_codec_i2s_iface_t *iface); +//0-100 +esp_err_t wm8978_set_voice_volume(int volume); +esp_err_t wm8978_get_voice_volume(int *volume); + +esp_err_t wm8978_set_adc_volume(int volume); +esp_err_t wm8978_mute(bool en); +esp_err_t wm8978_pga_volume(int volume); +esp_err_t wm8978_set_spk_volume(int volume); +esp_err_t wm8978_set_hp_volume(int volume); +/* +* 0: adc +* 1: dac +*/ +esp_err_t wm8979_eq_dir(uint8_t dir); +esp_err_t wm8978_set_eq5(uint8_t freq,int gain); +esp_err_t wm8978_set_eq4(uint8_t freq,int gain); +esp_err_t wm8978_set_eq3(uint8_t freq,int gain); +esp_err_t wm8978_set_eq2(uint8_t freq,int gain); +esp_err_t wm8978_set_eq1(uint8_t freq,int gain); +#endif \ No newline at end of file diff --git a/components/audio_hal/include/audio_hal.h b/components/audio_hal/include/audio_hal.h index 34e0ab26e..f26d197ac 100755 --- a/components/audio_hal/include/audio_hal.h +++ b/components/audio_hal/include/audio_hal.h @@ -61,6 +61,19 @@ typedef struct audio_hal* audio_hal_handle_t; }, \ }; +#define AUDIO_HAL_WM8978_DEFAULT(){ \ + .adc_input = AUDIO_HAL_ADC_INPUT_DIFFERENCE, \ + .dac_output = AUDIO_HAL_DAC_OUTPUT_ALL, \ + .codec_mode = AUDIO_HAL_CODEC_MODE_BOTH, \ + .i2s_iface = { \ + .mode = AUDIO_HAL_MODE_MASTER, \ + .fmt = AUDIO_HAL_I2S_NORMAL, \ + .samples = AUDIO_HAL_44K_SAMPLES, \ + .bits = AUDIO_HAL_BIT_LENGTH_16BITS, \ + }, \ +}; + + /** * @brief Select media hal codec mode */ diff --git a/docs/_static/adf_block_diagram.xml b/docs/_static/adf_block_diagram.xml index 9a2876412..afc3d6eca 100644 --- a/docs/_static/adf_block_diagram.xml +++ b/docs/_static/adf_block_diagram.xml @@ -1 +1 @@ -7Zxtc9o4EIB/DTPth9z43fDRvKWZS1qmpE3vo7AV0NVYnBAB+utPxhZgryhOsU1gks40sLJl69mVtFqt0jA709UtQ7PJAw1w2DC0YNUwuw3D0HWjJX7FknUicR0zEYwZCdKLdoIh+YVToZZKFyTA88yFnNKQk1lW6NMowj7PyBBjdJm97JmG2afO0BgDwdBHIZQ+kYBPEmnTcHfyT5iMJ+mT7WbavBHyf44ZXUTp4xqG+bz5SYqnSFaVtnM+QQFd7onMXsPsMEp58mm66uAwRiupJff1D5RuX5vhiBe5wcItwwj8Z8ewXeQEN66R1PCCwgWWTdi8KF9LNpvm4bgCvWG2lxPC8XCG/Lh0KaxByCZ8GqbFzyQMOzSkTHyPaCQuas85oz+xFApCPSf+J0oQ81NT0MS3F8w4ESrxQjKOhIzTuG7YwrTR8eV4tSdKW3yL6RRzthaXpKXyjrW0uVR5y52m3aaTyCZ7WracZmphqXWNt1XvEIsPKWU1cVMB2AnFE9oj8WHMN01MBM9UNHEfvfPfgsqCm/mGlCcu0J3Zalcoa+kNB6LMWwSEit9d/IJDOpviTZV9hqZ4SdlP8fmD1+1/3L4Dy7+EaE/yHkC8975VW4i2+anPQkw7YyFGswUtxNGghRiyu5xiIaouWJWF3Nx1+2fRtFCq1+pYvXYlCrPl+HpMYZZ2ur6s4/p6wAFB4ppP3n3lWAMbNwNL1Yuaxsh0nHKAW1YGuGVC4LregsBd83Tg9nHgctgbcobRdK6Gnh/yPtwZw4bRicdHIjQh7l7POZ4mok+Pj4N4mETTGH80ms8uU3G6nOJ/qzm3Gs0pZ78cwth9mhVv6NYHRCNZg/ZbALaeHSssW//LBggM1Wix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0Zvmo6q2SkjI1hmD5NkaT2+k6YndoEfwV+RRfUS4APww9djGdthkhU9zhXNlbdss/HFe6Le1P0axdA2FmvF+IVqtioz0DfOCd9RWTyAP17vLo+9qZczZ6DPfSUbykdhxhi/k6JrxB78zmZcxS9buFyEYqxTP18ioFusFSM1iUopON+SJeXTjifEFUnYRv6s8JVG6ERunSqzjmp6oDq44KRaHzpUF0ZrDgHVFWebw4njgIvPn3S2C5U9vABTG7Pc3ratkQeNDELg8NB5hQLxLa/L6TKZ0xlDIeIkxecqVzFKn3CgJLNWlPqLJ8u7xr5PMk5XTAfp/ftmB+tSm85+ao4YmPMQVUb9W2bXkyjqo3Ed43GGjS3Gjxdp7CyarWqyq9916oQW3qzPK3CyqrVqmr3+V2rjThRvcS+CiurVquqPYJ3rQqxq5nlaRVWVq1W4bLpM17F7/MVhxjN4+VTHyO+YBho++3vuTtW7vio3KjZ35iRzmIm9Ns6bASFz47A9VKfsHn1bOvJbwJsdcWmV2Vs4aoJIKz8cFIrdzjJhNvhqkMs0i5Oar8B2v+ER41kC+hK0g1ASke9e+JOgdPfyZ74ADMym2CGwhqOf731A2Gn79EqEiVbqvRUvYQT/g4MFDzSRZwWWWkHqolsLuPMMlUH7arKn3bgir294FresS3ENbF2nTrZw3TwU/2kdxILrxGvVihcuYJ/ITZ9cJ1qn1lGhQKbZgFFOfXpls2lNK57W8WMH1c2mcDGZ5MFegTfqatk0Fsu1a+w2rgaQxcEPGSKhjE/omEYo7O2k7SzUPYB4RfiPWCxakHz7R5ZE4sX2iuKvsuxfzPk6zddCC06FaPfcexpna22uOwg7CYFkveskkpGVHQ3rFI7XHMArvu7+bFcSNNn9aTSz9z8= \ No newline at end of file diff --git a/esp-idf b/esp-idf deleted file mode 160000 index c2b39f4a5..000000000 --- a/esp-idf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c2b39f4a5f4234d3276bec40d42132589739d655 diff --git a/project.mk b/project.mk index fec131e28..8a04e008d 100644 --- a/project.mk +++ b/project.mk @@ -1,5 +1,4 @@ ADF_VER := $(shell cd ${ADF_PATH} && git describe --always --tags --dirty) -IDF_PATH := $(ADF_PATH)/esp-idf EXTRA_COMPONENT_DIRS += $(ADF_PATH)/components/ CPPFLAGS := -D ADF_VER=\"$(ADF_VER)\" include $(IDF_PATH)/make/project.mk