mirror of https://github.com/esphome/esphome.git
Merge c9bccbd2d2
into c7c0d97a5e
This commit is contained in:
commit
87272eb550
|
@ -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...");
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue