forked from xiaozhi/xiaozhi-esp32
正点原子esp32s3开发板音量问题修正 (#125)
* Update config.h 添加音量增益设置 * Update config.h 音量增益设置 * Update atk_dnesp32s3.cc 音量增益设置 * Update es8388_audio_codec.h 音量增益设置 * Update es8388_audio_codec.cc 音量增益设置
This commit is contained in:
@@ -169,6 +169,8 @@ public:
|
||||
GPIO_NUM_NC, AUDIO_CODEC_ES8388_ADDR);
|
||||
|
||||
audio_codec->SetOutputVolume(AUDIO_DEFAULT_OUTPUT_VOLUME); //设置默认音量
|
||||
audio_codec->WriteReg(0x30, AUDIO_ADD_OUTPUT_VOLUME);
|
||||
audio_codec->WriteReg(0x31, AUDIO_ADD_OUTPUT_VOLUME);//音量增益设置
|
||||
}
|
||||
return audio_codec;
|
||||
}
|
||||
@@ -178,4 +180,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
DECLARE_BOARD(atk_dnesp32s3);
|
||||
DECLARE_BOARD(atk_dnesp32s3);
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
#ifndef _BOARD_CONFIG_H_
|
||||
#define _BOARD_CONFIG_H_
|
||||
|
||||
|
||||
#include <driver/gpio.h>
|
||||
|
||||
#define AUDIO_INPUT_SAMPLE_RATE 24000
|
||||
#define AUDIO_OUTPUT_SAMPLE_RATE 24000
|
||||
#define AUDIO_DEFAULT_OUTPUT_VOLUME 90
|
||||
#define AUDIO_ADD_OUTPUT_VOLUME 90
|
||||
|
||||
#define AUDIO_I2S_GPIO_MCLK GPIO_NUM_3
|
||||
#define AUDIO_I2S_GPIO_WS GPIO_NUM_9
|
||||
|
||||
Reference in New Issue
Block a user