1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-29 06:04:01 +00:00
This commit is contained in:
J. Nick Koston
2025-07-24 16:28:31 -10:00
parent 25cd16409b
commit 3d0cea4ce3
247 changed files with 463 additions and 67 deletions

View File

@@ -10,6 +10,8 @@ namespace i2s_audio {
static const char *const TAG = "i2s_audio";
void I2SAudioComponent::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
static i2s_port_t next_port_num = I2S_NUM_0;
if (next_port_num >= SOC_I2S_NUM) {
ESP_LOGE(TAG, "Too many components");

View File

@@ -119,7 +119,10 @@ void I2SAudioMediaPlayer::set_volume_(float volume, bool publish) {
this->volume = volume;
}
void I2SAudioMediaPlayer::setup() { this->state = media_player::MEDIA_PLAYER_STATE_IDLE; }
void I2SAudioMediaPlayer::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->state = media_player::MEDIA_PLAYER_STATE_IDLE;
}
void I2SAudioMediaPlayer::loop() {
switch (this->i2s_state_) {

View File

@@ -40,6 +40,7 @@ enum MicrophoneEventGroupBits : uint32_t {
};
void I2SAudioMicrophone::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
#ifdef USE_I2S_LEGACY
#if SOC_I2S_SUPPORTS_ADC
if (this->adc_) {

View File

@@ -61,6 +61,8 @@ static const std::vector<int16_t> Q15_VOLUME_SCALING_FACTORS = {
19508, 20665, 21891, 23189, 24565, 26022, 27566, 29201, 30933, 32767};
void I2SAudioSpeaker::setup() {
ESP_LOGCONFIG(TAG, "Running setup");
this->event_group_ = xEventGroupCreate();
if (this->event_group_ == nullptr) {