BT_BTM: SCO xmit Q overflow

kturanmak
Posts: 6
Joined: Wed Apr 09, 2025 5:53 am

BT_BTM: SCO xmit Q overflow

Postby kturanmak » Fri May 30, 2025 11:43 am

hi forum, I am encountering this error in the hf application. I am sharing my hf handler codes below. What could be the problem? Thank you!

Code: Select all

static uint32_t bt_app_hf_client_outgoing_cb(uint8_t *p_buf, uint32_t sz)
{
	//request 240 byt read per time from bt stack cb
    int32_t out_len_bytes = 0; 
	if (rb_bytes_filled(ringbuf_algo_out) >= sz)
	{
		out_len_bytes = rb_read(ringbuf_algo_out, (char*) p_buf, sz,0);
		return out_len_bytes;
	}
	else
	{
		return 0;
	}
}

volatile char hf_pkt = 0;
uint8_t tmp[1024*4];
volatile uint8_t hf_counter=0;

static void bt_app_hf_client_incoming_cb(const uint8_t *buf, uint32_t sz)
{ 
  	// 240byt frame came forom bt stack handler
  	#define HF_IN_PCKT_COUNT	10
    if (bt_stream_reader) 
    {
        if (audio_element_get_state(bt_stream_reader) == AEL_STATE_RUNNING) 
        {
			memcpy(&tmp[hf_counter*sz], buf, sz);
			
			if (hf_counter >= (HF_IN_PCKT_COUNT-1))
			{
				hf_active = true;	
				audio_element_output(bt_stream_reader, (char *)tmp, HF_IN_PCKT_COUNT*sz);
				hf_counter = 0;
			}
			else
			{
				hf_counter++;
			}
			esp_hf_client_outgoing_data_ready();
        }
    }
}
BT_error.png
BT_error.png (12.63 KiB) Viewed 25 times

Who is online

Users browsing this forum: Bing [Bot], PetalBot and 3 guests