Skip to content

Commit

Permalink
fix: adf-i2s-in: send audio setting request in every preparation phase.
Browse files Browse the repository at this point in the history
  • Loading branch information
gnumpi committed Jun 17, 2024
1 parent 2e2e39d commit 08640fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions esphome/components/i2s_audio/adf_pipeline/adf_i2s_in.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ void ADFElementI2SIn::clear_adf_elements_(){
this->valid_settings_ = false;
}

bool ADFElementI2SIn::prepare_elements(bool initial_call){
if( initial_call ){
this->valid_settings_ = false;
}
return ADFPipelineElement::prepare_elements(initial_call);
}


} // namespace i2s_audio
} // namespace esphome
Expand Down
2 changes: 1 addition & 1 deletion esphome/components/i2s_audio/adf_pipeline/adf_i2s_in.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ADFElementI2SIn : public I2SReader, public ADFPipelineSourceElement, publi
const std::string get_name() override { return "I2S_Reader"; }
void dump_config() override { this->dump_i2s_settings(); }
bool is_ready() override;

bool prepare_elements(bool initial_call) override;
protected:

bool valid_settings_{false};
Expand Down

0 comments on commit 08640fe

Please sign in to comment.