This commit is contained in:
pimdo 2024-05-02 15:45:58 +12:00 committed by GitHub
commit 87272eb550
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 7 deletions

View File

@ -11,8 +11,7 @@ static const char *const TAG = "i2s_audio";
void I2SAudioComponent::setup() {
static i2s_port_t next_port_num = I2S_NUM_0;
if (next_port_num >= I2S_NUM_MAX) {
if (next_port_num > SOC_I2S_NUM) {
ESP_LOGE(TAG, "Too many I2S Audio components!");
this->mark_failed();
return;
@ -20,7 +19,6 @@ void I2SAudioComponent::setup() {
this->port_ = next_port_num;
next_port_num = (i2s_port_t) (next_port_num + 1);
ESP_LOGCONFIG(TAG, "Setting up I2S Audio...");
}

View File

@ -57,7 +57,7 @@ void I2SAudioMicrophone::start_() {
.use_apll = this->use_apll_,
.tx_desc_auto_clear = false,
.fixed_mclk = 0,
.mclk_multiple = I2S_MCLK_MULTIPLE_DEFAULT,
.mclk_multiple = I2S_MCLK_MULTIPLE_256,
.bits_per_chan = I2S_BITS_PER_CHAN_DEFAULT,
};

View File

@ -51,7 +51,7 @@ void I2SAudioSpeaker::player_task(void *params) {
.use_apll = false,
.tx_desc_auto_clear = true,
.fixed_mclk = I2S_PIN_NO_CHANGE,
.mclk_multiple = I2S_MCLK_MULTIPLE_DEFAULT,
.mclk_multiple = I2S_MCLK_MULTIPLE_256,
.bits_per_chan = I2S_BITS_PER_CHAN_DEFAULT,
};
#if SOC_I2S_SUPPORTS_DAC

View File

@ -560,7 +560,7 @@ void VoiceAssistant::signal_stop_() {
}
void VoiceAssistant::on_event(const api::VoiceAssistantEventResponse &msg) {
ESP_LOGD(TAG, "Event Type: %d", msg.event_type);
ESP_LOGD(TAG, "Event Type: %lu", msg.event_type);
switch (msg.event_type) {
case api::enums::VOICE_ASSISTANT_RUN_START:
ESP_LOGD(TAG, "Assist Pipeline running");
@ -723,7 +723,7 @@ void VoiceAssistant::on_event(const api::VoiceAssistantEventResponse &msg) {
this->defer([this]() { this->stt_vad_end_trigger_->trigger(); });
break;
default:
ESP_LOGD(TAG, "Unhandled event type: %d", msg.event_type);
ESP_LOGD(TAG, "Unhandled event type: %lu", msg.event_type);
break;
}
}