File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ unsafe fn afe_init() -> (
2828 afe_config. agc_init = true ;
2929 afe_config. afe_linear_gain = 2.0 ;
3030 afe_config. aec_init = true ;
31- afe_config. aec_mode = esp_sr:: aec_mode_t_AEC_MODE_SR_HIGH_PERF;
31+ afe_config. aec_mode = esp_sr:: aec_mode_t_AEC_MODE_VOIP_HIGH_PERF;
32+ afe_config. aec_filter_length = 5 ;
3233 afe_config. ns_init = true ;
3334 afe_config. wakenet_init = false ;
3435 afe_config. memory_alloc_mode = esp_sr:: afe_memory_alloc_mode_t_AFE_MEMORY_ALLOC_MORE_PSRAM;
Original file line number Diff line number Diff line change @@ -30,14 +30,6 @@ fn main() -> anyhow::Result<()> {
3030 let partition = esp_idf_svc:: nvs:: EspDefaultNvsPartition :: take ( ) ?;
3131 let nvs = esp_idf_svc:: nvs:: EspDefaultNvs :: new ( partition, "setting" , true ) ?;
3232
33- let mut conf = esp_idf_svc:: hal:: task:: thread:: ThreadSpawnConfiguration :: default ( ) ;
34- conf. stack_alloc_caps = ( esp_idf_svc:: hal:: task:: thread:: MallocCap :: Spiram ) . into ( ) ;
35- conf. inherit = true ;
36- let r = conf. set ( ) ;
37- if let Err ( e) = r {
38- log:: error!( "Failed to set thread stack alloc caps: {:?}" , e) ;
39- }
40-
4133 log_heap ( ) ;
4234
4335 crate :: hal:: audio_init ( ) ;
@@ -250,9 +242,21 @@ fn main() -> anyhow::Result<()> {
250242 in_mclk : None ,
251243 } ;
252244
245+ // let mut conf =
246+ // esp_idf_svc::hal::task::thread::ThreadSpawnConfiguration::get().unwrap_or_default();
247+ // conf.pin_to_core = Some(esp_idf_svc::hal::cpu::Core::Core1);
248+ // let r = conf.set();
249+ // if let Err(e) = r {
250+ // log::error!("Failed to set thread stack alloc caps: {:?}", e);
251+ // }
252+
253253 std:: thread:: Builder :: new ( )
254254 . stack_size ( AUDIO_STACK_SIZE )
255255 . spawn ( move || {
256+ log:: info!(
257+ "Starting audio worker thread in core {:?}" ,
258+ esp_idf_svc:: hal:: cpu:: core( )
259+ ) ;
256260 let r = worker. run ( rx1, evt_tx_) ;
257261 if let Err ( e) = r {
258262 log:: error!( "Audio worker error: {:?}" , e) ;
You can’t perform that action at this time.
0 commit comments