Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_volume does not change the volume until the music is paused (on iPhone iOS >= 15.7.9) #493

Open
1 task done
mrhempman69 opened this issue Oct 17, 2023 · 37 comments
Open
1 task done
Labels
help wanted Extra attention is needed

Comments

@mrhempman69
Copy link

mrhempman69 commented Oct 17, 2023

Problem Description

Volume changes are received by the device, but the actual volume doesn't change until the music is paused then played. It doesn't update the volume during streaming.

Based on serial logs, the set_volume inside A2DPVolumeControl doesn't fire when music is playing. Only when you pause the song, will "set_volume" function be fired.

Device Description

ESP32 Wroom https://www.amazon.com/gp/product/B0C7C2HQ7P/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Sketch

#include "BluetoothA2DPSink.h"
#include "./data/mrhemVolumeControl.h"
BluetoothA2DPSink a2dp_sink;
A2DPMrhemVolumeControl mrhemVolumeControl;
void setup() {   
 
  Serial.begin(9600);
  int mclkPin=3;
  i2s_pin_config_t external_pin_config = {
        .mck_io_num = mclkPin,
        .bck_io_num =33,
        .ws_io_num = 32,
        .data_out_num = 22,
        .data_in_num = I2S_PIN_NO_CHANGE,
    };
  static const i2s_config_t externalDAC_config = {
        .mode = (i2s_mode_t) (I2S_MODE_MASTER | I2S_MODE_TX),
        .sample_rate =  44100, // corrected by info from bluetooth
        .bits_per_sample = (i2s_bits_per_sample_t) 16, 
        .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
        .communication_format = (i2s_comm_format_t)I2S_COMM_FORMAT_STAND_MSB,
        .intr_alloc_flags = 0, // default interrupt priority
        .dma_buf_count = 8,
        .dma_buf_len = 64,
        .use_apll = true,
        .tx_desc_auto_clear = true, // avoiding noise in case of data unavailability
        .mclk_multiple=(i2s_mclk_multiple_t) 256,

  };

  a2dp_sink.set_volume_control(&mrhemVolumeControl); 

  a2dp_sink.set_avrc_metadata_callback(avrc_metadata_callback);
  bool externalDAC=true;

    a2dp_sink.set_pin_config(external_pin_config);
    a2dp_sink.set_i2s_config(externalDAC_config);
    a2dp_sink.i2s_mclk_pin_select(mclkPin);

  a2dp_sink.start("mrhemMusicBasic");
}

./data/mrhemVolumeControl.h:

#include "BluetoothA2DPSink.h"
#include "SoundData.h"
#include "esp_log.h"

class A2DPMrhemVolumeControl : public A2DPVolumeControl {

        public: A2DPMrhemVolumeControl() {
            volumeFactorMax = 4096;
        }

        virtual void set_volume(uint8_t volume) override {
            constexpr double base = 1.4;
            constexpr double bits = 12;
            constexpr double zero_ofs = pow(base, -bits);
            constexpr double scale = pow(2.0, bits);
            double volumeFactorFloat = (pow(base, volume * bits / 127.0 - bits) - zero_ofs) * scale / (1.0 - zero_ofs);
            volumeFactor = volumeFactorFloat;
            if (volumeFactor > 0x1000) {
                volumeFactor = 0x1000;
            }
            Serial.print("mrhem default Volume is now"); 
            Serial.println(volumeFactor);
        }
};

Other Steps to Reproduce

I monitored the serial output in the Arduino IDE's Serial Monitor. I press the volume change buttons on the iphone, but "mrhem default Volume is now" does not output. It only outputs much later with the newest value when I pause the stream.

Provide your Version of the EP32 Arduino Core (or the IDF Version)

esp32 by Espressif: 2.0.11

I have checked existing issues, discussions and online documentation

  • I confirm I have checked existing issues, discussions and online documentation
@pschatzmann
Copy link
Owner

pschatzmann commented Oct 17, 2023

In the light that this is working perfectly with the provided default implementation, I tend to assume that you messed something up!

What are you doing in the loop ?
What is your reason to provide your own implementation ?
Did you activate the logging to verify what you receive from the IPhone? Maybe your phone (application) is not sending any ESP_AVRC_TG_SET_ABSOLUTE_VOLUME_CMD_EVT properly...

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 17, 2023

The loop is nothing:

int8_t IntStat = 0;
int8_t IntConnected = 0;
int16_t runningMean=0;
int16_t absRunningMean=0;
void loop() {

   if (a2dp_sink.is_connected() != IntConnected) {
    IntConnected = a2dp_sink.is_connected();
    if (IntConnected == 0) {
      Serial.println("Not Connected");
    }
    if (IntConnected == 1) {
      Serial.println("Connected");
    }
  }
  if (a2dp_sink.get_audio_state() != IntStat) {
    IntStat = a2dp_sink.get_audio_state();
    if (IntStat == 0) {
      Serial.println("Stop");
    }
    if (IntStat == 2) {
      Serial.println("Play");
    }
  }

}
// btw, I have commented out the following function & the line in the "setup" function that references it, and problem still persists too:
void avrc_metadata_callback(uint8_t data1, const uint8_t *data2) {
  Serial.printf("AVRC metadata rsp: attribute id 0x%x, %s\n", data1, data2);
}

The reason for providing my own implementation, was only to determine why the volume wasn't working 😆. I have trimmed down to basically just the default implementation.

When I activate the verbose logging, there is a huge delay in the volume being changed. Also, the music is skipping because the controller seems like it is logging too much to also be able to stream correctly. However, the volume does change without me pressing pause, it just is like a 10 second delay.

With "Info" logging i'd say there's a mix of the last two problems....

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 17, 2023

Did you double check that you are not starving the A2DP task with your loop ?
Just add some delay calls in your loop.

Maybe you better use some callbacks instead of polling the states in your loop....

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 17, 2023

I thought that was going to fix it but even using void loop() { } did not help...

Here is some of the log from when I press "play" and tap "volume up" about once per second. Unfortunately I can't paste the full log because I am choosing to work in the IDE instead of linux terminal, and IDEs in general are trash (https://forum.arduino.cc/t/copy-paste-data-from-the-serial-monitor/1041585/36)

16:18:12.065 -> [455564][D][BluetoothA2DPSink.cpp:1435] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
16:18:12.162 -> [455670][D][BluetoothA2DPSink.cpp:570] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
16:18:12.258 -> [455776][D][BluetoothA2DPSink.cpp:1443] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
16:18:12.354 -> [455869][D][BluetoothA2DPSink.cpp:587] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_CHANGE_NOTIFY_EVT
16:18:12.483 -> [455969][I][BluetoothA2DPSink.cpp:1459] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 87%
16:18:12.611 -> [456093][D][BluetoothA2DPSink.cpp:358] app_work_dispatch(): [BT_API] app_work_dispatch event 0x4, param len 12
16:18:12.707 -> [456205][I][BluetoothA2DPSink.cpp:1399] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 87
16:18:12.835 -> [456322][D][BluetoothA2DPSink.cpp:390] app_send_msg(): [BT_AV] app_send_msg
16:18:12.931 -> mrhem default Volume is now2433
16:18:12.963 -> [456528][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:13.059 -> [456648][D][BluetoothA2DPSink.cpp:413] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x3
16:18:13.155 -> [456656][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:13.250 -> [456760][I][BluetoothA2DPSink.cpp:416] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
16:18:13.379 -> [456870][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:13.476 -> [456976][D][BluetoothA2DPSink.cpp:381] app_work_dispatched(): [BT_AV] app_work_dispatched
16:18:13.572 -> [457072][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:13.668 -> [457167][D][BluetoothA2DPSink.cpp:1435] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
16:18:13.765 -> [457278][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:13.861 -> [457369][D][BluetoothA2DPSink.cpp:1443] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
16:18:13.957 -> [457465][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:14.052 -> [457565][I][BluetoothA2DPSink.cpp:1459] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 93%
16:18:14.181 -> [457677][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:14.277 -> [457773][I][BluetoothA2DPSink.cpp:1399] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 93
16:18:14.405 -> [457869][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:14.500 -> mrhem default Volume is now3159
16:18:14.533 -> [458103][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:14.628 -> [458211][D][BluetoothA2DPSink.cpp:413] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x3
16:18:14.724 -> [458218][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:14.820 -> [458322][I][BluetoothA2DPSink.cpp:416] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
16:18:14.948 -> [458433][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:15.044 -> [458539][D][BluetoothA2DPSink.cpp:381] app_work_dispatched(): [BT_AV] app_work_dispatched
16:18:15.140 -> [458635][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:15.237 -> [458729][D][BluetoothA2DPSink.cpp:1435] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
16:18:15.333 -> [458841][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:15.430 -> [458932][D][BluetoothA2DPSink.cpp:1443] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
16:18:15.525 -> [459027][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:15.621 -> [459127][I][BluetoothA2DPSink.cpp:1459] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 100%
16:18:15.749 -> [459238][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:15.845 -> [459337][I][BluetoothA2DPSink.cpp:1399] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 100
16:18:15.941 -> [459433][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:16.037 -> mrhem default Volume is now4096
16:18:16.102 -> [459668][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:16.165 -> [459775][D][BluetoothA2DPSink.cpp:413] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x4
16:18:16.293 -> [459783][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:16.390 -> [459887][I][BluetoothA2DPSink.cpp:416] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
16:18:16.487 -> [459997][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:18:16.583 -> [460103][D][BluetoothA2DPSink.cpp:381] app_work_dispatched(): [BT_AV] app_work_dispatched
16:18:16.678 -> [460199][D][A2DPVolumeControl.h:43] update_audio_data(): [VolumeControl] update_audio_data
16:18:16.774 -> [460294][D][BluetoothA2DPSink.cpp:1316] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
16:18:16.903 -> [460405][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback

The volume change is about 10 seconds late

@pschatzmann
Copy link
Owner

Yes: an empty loop is equally bad!

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 17, 2023

Right true, I got that from the homepage, but i also just tried void loop(){ delay(100); } and it also did not help...

I will try a different ESP32 board...

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 17, 2023

Did you check the log it you get the events in time from the IPhone ?
With Android and my very old IPhone it's working w/o issues. Maybe you can also try BluetoothA2DPSinkQueued

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 17, 2023

Well, I don't know how to check the timing of those events, but I just tried it, and it works on my android tablet, also the audio quality is much better..... My iphone is fairly old too (iphone 6S) but it's not surprising knowing Apple that it would make up a problem like this for non-Apple bluetooth.... I will try that class.

I tried setting the bluetooth to type "Headphone" in apple settings, and surprisingly, the device rebooted after a few seconds of streaming (may be due to "Queued" class though):


16:53:27.522 -> [ 27427][D][BluetoothA2DPSink.cpp:1435] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
16:53:27.618 -> [ 27521][D][BluetoothA2DPSink.cpp:358] app_work_dispatch(): [BT_API] app_work_dispatch event 0x1, param len 12
16:53:27.746 -> [ 27627][D][BluetoothA2DPSink.cpp:1443] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 1
16:53:27.841 -> [ 27744][D][BluetoothA2DPSink.cpp:390] app_send_msg(): [BT_AV] app_send_msg
16:53:27.905 -> [ 27844][I][BluetoothA2DPSink.cpp:1480] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
16:53:28.033 -> [ 27928][D][BluetoothA2DPSink.cpp:1116] audio_data_callback(): [BT_AV] audio_data_callback
16:53:28.130 -> [ 28040][D][BluetoothA2DPSink.cpp:413] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
16:53:28.226 -> [ 28136][E][BluetoothA2DPSinkQueued.cpp:59] write_audio(): [BT_AV] s_ringbuf_i2s is null
16:53:28.323 -> 
16:53:28.323 -> assert failed: xRingbufferSend ringbuf.c:1027 (pxRingbuffer)
16:53:28.387 -> 
16:53:28.387 -> 
16:53:28.387 -> Backtrace: 0x400837ed:0x3ffd1390 0x400931e9:0x3ffd13b0 0x40098a11:0x3ffd13d0 0x40092dd6:0x3ffd1500 0x400d6db2:0x3ffd1530 0x400d3c5a:0x3ffd1570 0x400d31f3:0x3ffd15b0 0x40111e81:0x3ffd15d0 0x40109129:0x3ffd1610 0x401090bf:0x3ffd1630
16:53:28.644 -> 
16:53:28.644 -> 
16:53:28.644 -> 
16:53:28.644 -> 
16:53:28.644 -> ELF file SHA256: 431d63af4beb7841
16:53:28.676 -> 
16:53:28.676 -> Rebooting...
16:53:28.708 -> �P����BLV�&8��3��W� �[    36][D][BluetoothA2DPSink.cpp:160] start(): [BT_AV] start
16:53:29.255 -> [    36][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 222332
16:53:29.351 -> [   143][I][BluetoothA2DPSink.cpp:172] start(): [BT_AV] Device name will be set to 'mrhemMusicBasic3'

@mrhempman69 mrhempman69 changed the title set_volume does not change the volume until the music is paused set_volume does not change the volume until the music is paused (on iPhone iOS >= 15.7.9) Oct 17, 2023
@mrhempman69
Copy link
Author

mrhempman69 commented Oct 17, 2023

The problem persists when using Apple Music (perhaps not related to #485, i used it on files that I added from my computer, not the streaming service) and YouTube Music. Probably the music app is not making a difference.

The problem persists in iOS 16.6 (iPhone SE, newer-ish iphone compared to my iphone 6S)....

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 18, 2023

This issue is likely related to the last few detailed comments in #87, as the behaviors are quite similar

@pschatzmann
Copy link
Owner

I committed a new version of BluetoothA2DPSinkQueued which might resolve your issues...
You will need to run your sketch with this class instead of the simple BluetoothA2DPSink!

Since I don't have any recent IPhone, please let me know if this help ?

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 19, 2023

I will do some more investigation, but I wanted to paste this log after doing what you suggested, in case there is an easy fix. Edit: Though it's 11:08 in Sweden, so hopefully i can have some more info by morning there....
Edit2: I updated the log, please ignore the changes in timestamp midway through

You must understand, it was highly inconvenient to copy and paste these, because the arduino-ide is total trash, and doesn't enable copying and pasting more than ~30 lines at a time from the serial monitor.

16:59:08.404 -> ��ѽ�ѡ�): [BT_AV] bluedroid initialized
16:59:08.489 -> [   838][I][BluetoothA2DPSink.cpp:338] init_bluetooth(): [BT_AV] bluedroid enabled
16:59:08.531 -> [   838][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
16:59:08.659 -> [   935][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable true
16:59:08.787 -> [   940][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
16:59:08.850 -> [  1050][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
16:59:08.978 -> [  1131][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
16:59:09.075 -> [  1252][I][BluetoothA2DPSink.cpp:643] av_hdl_a2d_evt(): [BT_AV] A2DP PROF STATE: Init Compl
16:59:09.171 -> 
16:59:09.171 -> [  1333][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
16:59:09.235 -> [  1050][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 117540
16:59:09.330 -> [  1514][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
16:59:13.905 -> [  6314][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 16
16:59:14.306 -> [  6699][I][BluetoothA2DPSink.cpp:497] app_gap_callback(): [BT_AV] authentication success: iPhone (16)
16:59:14.402 -> [  6813][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
16:59:14.530 -> [  6813][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
16:59:14.657 -> [  6913][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connecting, [c0:b6:58:63:bf:5d]
16:59:14.785 -> [  7049][I][BluetoothA2DPSink.cpp:814] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTING
16:59:14.881 -> [  7164][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
16:59:15.009 -> [  7285][I][BluetoothA2DPSink.cpp:661] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , codec type 0
17:26:53.116 -> [ 43314][I][BluetoothA2DPSink.cpp:692] handle_audio_cfg(): [BT_AV] audio player configured, samplerate=44100
17:26:53.212 -> [ 43428][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:53.341 -> [ 43549][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
17:26:53.469 -> [ 43664][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connected, [c0:b6:58:63:bf:5d]
17:26:53.596 -> [ 43798][I][BluetoothA2DPSink.cpp:819] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTED
17:26:53.693 -> [ 43913][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable false
17:26:53.821 -> [ 44028][I][BluetoothA2DPSinkQueued.cpp:6] bt_i2s_task_start_up(): [BT_API] ringbuffer data empty! mode changed: RINGBUFFER_MODE_PREFETCHING
17:26:53.982 -> [ 44176][I][BluetoothA2DPSinkQueued.cpp:21] bt_i2s_task_start_up(): [BT_AV] BtI2STask Started
17:26:54.078 -> [ 44275][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:54.174 -> [ 44300][I][BluetoothA2DPSink.cpp:550] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT stat:0
17:26:54.302 -> [ 44396][I][BluetoothA2DPSink.cpp:984] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
17:26:54.398 -> [ 44507][I][BluetoothA2DPSink.cpp:552] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT remote name:iPhone (16)
17:26:54.527 -> [ 44603][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:54.655 -> [ 44741][I][BluetoothA2DPSink.cpp:559] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
17:26:54.752 -> [ 44853][I][BluetoothA2DPSink.cpp:1494] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
17:26:54.848 -> [ 44949][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 71896
17:26:54.944 -> [ 45065][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:55.073 -> [ 45278][I][BluetoothA2DPSink.cpp:992] av_hdl_avrc_evt(): [BT_AV] remote rn_cap: count 7, bitmask 0x1f06
17:26:56.871 -> [ 47199][I][BluetoothA2DPSink.cpp:559] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
17:26:56.967 -> [ 47200][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 72080
17:26:57.031 -> [ 47254][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:57.159 -> [ 47374][I][BluetoothA2DPSink.cpp:1473] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 100%
17:26:57.287 -> [ 47412][I][BluetoothA2DPSinkQueued.cpp:100] write_audio(): [BT_API] ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING
17:26:57.415 -> [ 47488][I][BluetoothA2DPSink.cpp:1413] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 100
17:26:57.544 -> [ 47632][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:26:57.639 -> [ 47641][W][BluetoothA2DPSinkQueued.cpp:93] write_audio(): [BT_API] ringbuffer overflowed, ready to decrease data! mode changed: RINGBUFFER_MODE_DROPPING
17:26:57.799 -> [ 47860][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:26:57.927 -> [ 48024][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:26:58.023 -> [ 48126][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:26:58.119 -> [ 48239][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:26:58.248 -> [ 48342][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:26:58.344 -> [ 48455][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!

The last few lines repeat... until:

17:40:19.031 -> mrhem default Volume is now[ 80303][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:40:19.160 -> 4096[ 80435][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:40:19.287 -> 
17:40:19.287 -> [ 80558][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:40:19.417 -> [ 80558][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:40:19.512 -> [ 80770][I][BluetoothA2DPSink.cpp:712] handle_audio_state(): [BT_AV] A2DP audio state: Started
17:40:19.609 -> [ 80771][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:40:19.705 -> [ 80975][I][BluetoothA2DPSink.cpp:724] handle_audio_state(): [BT_AV] i2s_start
17:40:19.801 -> [ 80975][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:40:19.897 -> [ 81082][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:40:20.025 -> [ 81267][I][BluetoothA2DPSinkQueued.cpp:62] i2s_task_handler(): [BT_API] ringbuffer underflowed! mode changed: RINGBUFFER_MODE_PREFETCHING
17:40:20.153 -> [ 81274][I][BluetoothA2DPSinkQueued.cpp:84] write_audio(): [BT_API] ringbuffer data decreased! mode changed: RINGBUFFER_MODE_PROCESSING
17:40:20.312 -> [ 81162][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:40:20.409 -> [ 81587][W][BluetoothA2DPSinkQueued.cpp:93] write_audio(): [BT_API] ringbuffer overflowed, ready to decrease data! mode changed: RINGBUFFER_MODE_DROPPING
17:40:20.569 -> [ 81683][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:40:20.697 -> [ 81847][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:40:20.825 -> [ 81965][I][BluetoothA2DPSink.cpp:712] handle_audio_state(): [BT_AV] A2DP audio state: Suspended
17:40:20.921 -> [ 82079][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:40:21.017 -> [ 82179][W][BluetoothA2DPSink.cpp:732] handle_audio_state(): [BT_AV] i2s_stop
17:40:21.112 -> [ 82293][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:40:21.209 -> [ 82372][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:40:21.336 -> [ 82487][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:40:21.465 -> [ 82605][I][BluetoothA2DPSink.cpp:712] handle_audio_state(): [BT_AV] A2DP audio state: Started
17:40:21.560 -> [ 82719][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:40:21.657 -> [ 82816][I][BluetoothA2DPSink.cpp:724] handle_audio_state(): [BT_AV] i2s_start
17:40:21.753 -> [ 82930][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:40:26.554 -> [ 87806][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:40:26.650 -> [ 87919][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, droE (104650) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
17:40:26.842 -> E (104650) task_wdt:  - IDLE (CPU 0)
17:40:26.907 -> E (104650) task_wdt: Tasks currently running:
17:40:26.938 -> E (104650) task_wdt: CPU 0: BTC_TASK
17:40:26.971 -> E (104650) task_wdt: CPU 1: IDLE
17:40:27.035 -> E (104650) task_wdt: AbGuru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0). 
17:40:27.131 -> 
17:40:27.131 -> Core  0 register dump:
17:40:27.163 -> PC      : 0x4000921a  PS      : 0x00060035  A0      : 0x80007d16  A1      : 0x3ffbe9ac  
17:40:27.259 -> A2      : 0x00800000  A3      : 0x10000000  A4      : 0x00000000  A5      : 0x00000020  
17:40:27.323 -> A6      : 0x3ffc68c0  A7      : 0x00000002  A8      : 0x3ff40000  A9      : 0x0000006f  
17:40:27.419 -> A10     : 0x00800000  A11     : 0x3ff4001c  A12     : 0x3ffced50  A13     : 0x3ffced30  
17:40:27.514 -> A14     : 0x00000000  A15     : 0x3ffced50  SAR     : 0x00000004  EXCCAUSE: 0x00000005  
17:40:27.610 -> EXCVADDR: 0x00000000  LBEG    : 0x40090fad  LEND    : 0x40090fbd  LCOUNT  : 0xfffffffe  
17:40:27.707 -> Core  0 was running in ISR context:
17:40:27.738 -> EPC1    : 0x400e31cf  EPC2    : 0x00000000  EPC3    : 0x4000921a  EPC4    : 0x4000921a

There is audio, but there is no instant volume changes....

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 19, 2023

Strange: I tested it on Android and there it was working. It seems that the I2S writes are not working, so the queue is never consumed.

After i2s_start() is_i2s_active, should be true!

I will compare your log with mine tomorrow...

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 19, 2023

The last log was using the PCM5102 breakout board from the wiki. I actually am not getting audio from that board. But this is what happens using a different external DAC (NAU8402) where i am getting audio (still i2s_write_data failed).

17:26:53.116 -> [ 43314][I][BluetoothA2DPSink.cpp:692] handle_audio_cfg(): [BT_AV] audio player configured, samplerate=44100
17:26:53.212 -> [ 43428][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:53.341 -> [ 43549][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
17:26:53.469 -> [ 43664][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connected, [c0:b6:58:63:bf:5d]
17:26:53.596 -> [ 43798][I][BluetoothA2DPSink.cpp:819] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTED
17:26:53.693 -> [ 43913][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable false
17:26:53.821 -> [ 44028][I][BluetoothA2DPSinkQueued.cpp:6] bt_i2s_task_start_up(): [BT_API] ringbuffer data empty! mode changed: RINGBUFFER_MODE_PREFETCHING
17:26:53.982 -> [ 44176][I][BluetoothA2DPSinkQueued.cpp:21] bt_i2s_task_start_up(): [BT_AV] BtI2STask Started
17:26:54.078 -> [ 44275][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:54.174 -> [ 44300][I][BluetoothA2DPSink.cpp:550] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT stat:0
17:26:54.302 -> [ 44396][I][BluetoothA2DPSink.cpp:984] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
17:26:54.398 -> [ 44507][I][BluetoothA2DPSink.cpp:552] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT remote name:iPhone (16)
17:26:54.527 -> [ 44603][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:54.655 -> [ 44741][I][BluetoothA2DPSink.cpp:559] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
17:26:54.752 -> [ 44853][I][BluetoothA2DPSink.cpp:1494] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
17:26:54.848 -> [ 44949][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 71896
17:26:54.944 -> [ 45065][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:55.073 -> [ 45278][I][BluetoothA2DPSink.cpp:992] av_hdl_avrc_evt(): [BT_AV] remote rn_cap: count 7, bitmask 0x1f06
17:26:56.871 -> [ 47199][I][BluetoothA2DPSink.cpp:559] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
17:26:56.967 -> [ 47200][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 72080
17:26:57.031 -> [ 47254][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
17:26:57.159 -> [ 47374][I][BluetoothA2DPSink.cpp:1473] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 100%
17:26:57.287 -> [ 47412][I][BluetoothA2DPSinkQueued.cpp:100] write_audio(): [BT_API] ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING
17:26:57.415 -> [ 47488][I][BluetoothA2DPSink.cpp:1413] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 100
17:26:57.544 -> [ 47632][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:26:57.639 -> [ 47641][W][BluetoothA2DPSinkQueued.cpp:93] write_audio(): [BT_API] ringbuffer overflowed, ready to decrease data! mode changed: RINGBUFFER_MODE_DROPPING
17:26:57.799 -> [ 47860][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:26:57.927 -> [ 48024][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:26:58.023 -> [ 48126][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:26:58.119 -> [ 48239][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
17:26:58.248 -> [ 48342][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
17:26:58.344 -> [ 48455][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!

The last few lines repeat...

I am pretty concerned based on your last message that there is some kind of hardware error here. Almost like the breadboards that I'm using are flawed, or the jumper wires are too thin, or something like that. So many potential variables... However perhaps this is unlikely... Since it does play audio outside the Queued class, just the volume changes don't work immediately...


// Tried normal , with android, 9600 baud, , info log, NAU circuit, staticy but audio and volume works....
// Tried normal , with iphone, 9600 baud, , info log, NAU circuit, staticy but audio works, but volume does not....
// Tried queued , with iphone, 9600 baud, , info log, PCM circuit, no work
// Tried queued , with android, 9600 baud, , info log, PCM circuit, no work
// Tried normal, with android, 9600 baud, , info log, PCM circuit, no audio but volume changes in the log are immediate

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 19, 2023

I guess the access to is_i2s_active needs to by synchronized.
Can you check if is good enought to define this variable as volatile ?

But it is strange: the in the above log the entry for i2s_start is missing...

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 19, 2023

I guess the access to is_i2s_active needs to by synchronized. Can you check if is good enought to define this variable as volatile ?

I tried that here. This is the full log:

18:23:29.012 -> ���(���.��L��$5��[    36][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 222316
18:23:29.511 -> [    36][I][BluetoothA2DPSink.cpp:172] start(): [BT_AV] Device name will be set to 'mrhemMusicBasic7'
18:23:29.608 -> [   103][I][BluetoothA2DPSink.cpp:238] init_i2s(): [BT_AV] init_i2s
18:23:29.705 -> [   174][I][BluetoothA2DPSink.cpp:240] init_i2s(): [BT_AV] init_i2s is_i2s_output
18:23:29.768 -> [   356][I][BluetoothA2DPSink.cpp:320] init_bluetooth(): [BT_AV] controller initialized
18:23:30.078 -> [   680][I][BluetoothA2DPSink.cpp:329] init_bluetooth(): [BT_AV] bluedroid initialized
18:23:30.143 -> [   749][I][BluetoothA2DPSink.cpp:338] init_bluetooth(): [BT_AV] bluedroid enabled
18:23:30.238 -> [   749][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:30.366 -> [   845][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable true
18:23:30.495 -> [   852][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
18:23:30.558 -> [   960][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:30.686 -> [  1041][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
18:23:30.751 -> [  1162][I][BluetoothA2DPSink.cpp:643] av_hdl_a2d_evt(): [BT_AV] A2DP PROF STATE: Init Compl
18:23:30.847 -> 
18:23:30.878 -> [  1243][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
18:23:30.942 -> [   960][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 116652
18:23:31.038 -> [  1424][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
18:23:38.186 -> [  8812][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 16
18:23:38.418 -> [  9046][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:38.546 -> [  9046][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
18:23:38.673 -> [  9146][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connecting, [c0:b6:58:63:bf:5d]
18:23:38.801 -> [  9282][I][BluetoothA2DPSink.cpp:814] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTING
18:23:38.929 -> [  9397][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:39.025 -> [  9518][I][BluetoothA2DPSink.cpp:1463] av_hdl_avrc_tg_evt(): [BT_AV] AVRC conn_state evt: state 1, [c0:b6:58:63:bf:5d]
18:23:39.153 -> [  9644][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:39.281 -> [  9765][I][BluetoothA2DPSink.cpp:1479] av_hdl_avrc_tg_evt(): [BT_AV] AVRC register event notification: 13, param: 0x0
18:23:39.409 -> [  9890][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:39.538 -> [ 10011][I][BluetoothA2DPSink.cpp:661] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , codec type 0
18:23:39.634 -> [ 10116][I][BluetoothA2DPSink.cpp:673] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , sample_rate 44100
18:23:39.763 -> [ 10227][I][BluetoothA2DPSink.cpp:684] handle_audio_cfg(): [BT_AV] configure audio player 21-15-2-35
18:23:39.859 -> 
18:23:39.859 -> [ 10335][I][BluetoothA2DPSink.cpp:692] handle_audio_cfg(): [BT_AV] audio player configured, samplerate=44100
18:23:39.956 -> [ 10449][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:40.084 -> [ 10570][I][BluetoothA2DPSink.cpp:939] av_hdl_avrc_evt(): [BT_AV] AVRC conn_state evt: state 1, [c0:b6:58:63:bf:5d]
18:23:40.213 -> [ 10692][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:40.341 -> [ 10813][I][BluetoothA2DPSink.cpp:984] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
18:23:40.438 -> [ 10909][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:40.567 -> [ 11030][I][BluetoothA2DPSink.cpp:1494] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
18:23:40.662 -> [ 11145][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:40.791 -> [ 11266][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
18:23:40.886 -> [ 11381][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connected, [c0:b6:58:63:bf:5d]
18:23:41.046 -> [ 11515][I][BluetoothA2DPSink.cpp:819] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTED
18:23:41.046 -> [ 11515][I][BluetoothA2DPSink.cpp:819] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTED
18:23:41.142 -> [ 11630][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable false
18:23:41.271 -> [ 11745][I][BluetoothA2DPSinkQueued.cpp:6] bt_i2s_task_start_up(): [BT_API] ringbuffer data empty! mode changed: RINGBUFFER_MODE_PREFETCHING
18:23:41.398 -> [ 11893][I][BluetoothA2DPSinkQueued.cpp:21] bt_i2s_task_start_up(): [BT_AV] BtI2STask Started
18:23:41.526 -> [ 11992][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:41.622 -> [ 12066][I][BluetoothA2DPSink.cpp:550] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT stat:0
18:23:41.750 -> [ 12113][I][BluetoothA2DPSink.cpp:984] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
18:23:41.847 -> [ 12224][I][BluetoothA2DPSink.cpp:552] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT remote name:iPhone (16)
18:23:41.974 -> [ 12320][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:42.102 -> [ 12538][I][BluetoothA2DPSink.cpp:559] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
18:23:42.198 -> [ 12570][I][BluetoothA2DPSink.cpp:1494] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
18:23:42.295 -> [ 12666][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 71908
18:23:42.390 -> [ 12782][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:42.519 -> [ 12995][I][BluetoothA2DPSink.cpp:992] av_hdl_avrc_evt(): [BT_AV] remote rn_cap: count 7, bitmask 0x1f06
18:23:44.096 -> [ 14693][I][BluetoothA2DPSink.cpp:559] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
18:23:44.191 -> [ 14694][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 72092
18:23:44.255 -> [ 14747][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:44.383 -> [ 14868][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x1, My Dad's Gone Crazy (feat. Hailie Jade)
18:23:44.543 -> [ 15018][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:44.671 -> [ 15139][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x2, Eminem
18:23:44.767 -> [ 15255][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:44.895 -> [ 15375][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x4, 
18:23:44.992 -> [ 15485][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:45.120 -> [ 15606][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x8, 1
18:23:45.249 -> [ 15716][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
18:23:45.345 -> [ 15830][I][BluetoothA2DPSinkQueued.cpp:100] write_audio(): [BT_API] ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING
18:23:45.504 -> [ 15837][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x10, 126
18:23:45.601 -> [ 15981][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
18:23:45.728 -> [ 15990][W][BluetoothA2DPSinkQueued.cpp:93] write_audio(): [BT_API] ringbuffer overflowed, ready to decrease data! mode changed: RINGBUFFER_MODE_DROPPING
18:23:45.888 -> [ 16199][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
18:23:45.985 -> [ 16363][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
18:23:46.081 -> [ 16465][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
18:23:46.209 -> [ 16578][W][BluetoothA2DPSinkQueued.cpp:81] write_audio(): [BT_API] ringbuffer is full, drop this packet!
18:23:46.305 -> [ 16680][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive

--- repeats endlessly
--- May also have restarted itself once
--- Did play music for about 0.2 seconds on first connection, then went out
So it's inconsistent....

But it is strange: the in the above log the entry for i2s_start is missing...

If a line is missing from the log, may be due to arduino ide maintainers closing discussion for a huge issue, then having its assignee leave, without being replaced arduino/arduino-ide#2262 arduino/arduino-ide#812 It's a huge chore to copy and paste only 20-30 log lines at a time and oftenthe scroll window slips and i have to try again

----By the way, Arduino doesn't cache the libraries somewhere does it? Because I just went into the Arduino libraries folder and changed the variable from "bool is_i2s_active" to "volatile bool is_i2s_active". But there's no way to know if it updated in the next flash

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 19, 2023

That should be good enough. I am still confused from what I see: some critical events seem to be missing.
Can you try to add the logic from https://github.com/pschatzmann/ESP32-A2DP/blob/main/examples/bt_music_receiver_status_callback/bt_music_receiver_status_callback.ino

I really need the confirmation that the audio state (which will activate and deactivate i2s) is working....

Maybe it will give less issues to use the connection state instead of the audio state for this scenario.

@mrhempman69
Copy link
Author

Here is the log from the code you requested. Hopefully the issue was not that I had "Info" logging instead of "Debug". Debug is active now..:

19:18:18.063 -> ets Jul 29 2019 12:21:46
19:18:18.108 -> 
19:18:18.108 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
19:18:18.108 -> configsip: 0, SPIWP:0xee
19:18:18.108 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
19:18:18.108 -> mode:DIO, clock div:1
19:18:18.108 -> load:0x3fff0030,len:1344
19:18:18.108 -> load:0x40078000,len:13964
19:18:18.108 -> load:0x40080400,len:3600
19:18:18.108 -> entry 0x400805f0
19:18:18.471 -> [    25][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
19:18:18.503 -> [    36][D][BluetoothA2DPSink.cpp:160] start(): [BT_AV] start
19:18:18.503 -> [    36][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 222372
19:18:18.503 -> [    45][I][BluetoothA2DPSink.cpp:172] start(): [BT_AV] Device name will be set to 'MyMusic'
19:18:18.503 -> [    53][D][BluetoothA2DPSink.cpp:1163] init_nvs(): [BT_AV] init_nvs
19:18:18.503 -> [    59][D][BluetoothA2DPCommon.cpp:152] get_last_connection(): [BT_AV] get_last_connection
19:18:18.535 -> [    68][D][BluetoothA2DPCommon.cpp:175] get_last_connection(): [BT_AV] => c0:b6:58:63:bf:5d
19:18:18.535 -> [    75][I][BluetoothA2DPSink.cpp:238] init_i2s(): [BT_AV] init_i2s
19:18:18.535 -> [    81][I][BluetoothA2DPSink.cpp:240] init_i2s(): [BT_AV] init_i2s is_i2s_output
19:18:18.535 -> [    89][D][BluetoothA2DPSink.cpp:315] init_bluetooth(): [BT_AV] init_bluetooth
19:18:18.658 -> [   190][I][BluetoothA2DPSink.cpp:320] init_bluetooth(): [BT_AV] controller initialized
19:18:18.964 -> [   502][I][BluetoothA2DPSink.cpp:329] init_bluetooth(): [BT_AV] bluedroid initialized
19:18:19.028 -> [   572][I][BluetoothA2DPSink.cpp:338] init_bluetooth(): [BT_AV] bluedroid enabled
19:18:19.028 -> [   572][D][BluetoothA2DPSink.cpp:455] app_task_start_up(): [BT_AV] app_task_start_up
19:18:19.028 -> [   575][D][BluetoothA2DPSink.cpp:1289] ccall_app_task_handler(): [BT_AV] ccall_app_task_handler
19:18:19.028 -> [   584][D][BluetoothA2DPSink.cpp:411] app_task_handler(): [BT_AV] app_task_handler
19:18:19.060 -> [   591][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 0
19:18:19.060 -> [   601][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:19.060 -> [   608][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:18:19.060 -> [   616][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:19.092 -> [   626][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:19.092 -> [   634][D][BluetoothA2DPSink.cpp:1319] ccall_av_hdl_stack_evt(): [BT_AV] ccall_av_hdl_stack_evt
19:18:19.092 -> [   643][D][BluetoothA2DPSink.cpp:1015] av_hdl_stack_evt(): [BT_AV] av_hdl_stack_evt evt 0
19:18:19.092 -> [   651][D][BluetoothA2DPSink.cpp:1020] av_hdl_stack_evt(): [BT_AV] av_hdl_stack_evt av_hdl_stack_evt BT_APP_EVT_STACK_UP
19:18:19.124 -> [   661][D][BluetoothA2DPSink.cpp:1029] av_hdl_stack_evt(): [BT_AV] AVRCP controller initialized!
19:18:19.124 -> [   662][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:18:19.124 -> [   670][D][BluetoothA2DPSink.cpp:1072] av_hdl_stack_evt(): [BT_AV] set_scan_mode_connectable(true)
19:18:19.156 -> [   678][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
19:18:19.156 -> [   687][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable true
19:18:19.156 -> [   696][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:18:19.156 -> [   670][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 130044
19:18:19.188 -> [   712][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:18:19.188 -> [   727][D][BluetoothA2DPSink.cpp:1108] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_AUDIO_CFG_EVT
19:18:19.188 -> [   737][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x4, param len 16
19:18:19.188 -> [   746][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:19.220 -> [   753][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x4
19:18:19.220 -> [   754][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:18:19.220 -> [   762][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:19.220 -> [   770][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
19:18:19.252 -> [   780][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:19.252 -> [   787][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:18:19.252 -> [   795][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:18:19.252 -> [   804][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
19:18:19.284 -> [   812][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 4
19:18:19.284 -> [   818][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:18:19.284 -> [   826][I][BluetoothA2DPSink.cpp:643] av_hdl_a2d_evt(): [BT_AV] A2DP PROF STATE: Init Compl
19:18:19.284 -> 
19:18:19.284 -> [   835][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
19:18:34.276 -> [ 15817][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:18:34.277 -> [ 15817][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 16
19:18:34.449 -> [ 15989][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:18:34.449 -> [ 15990][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:18:34.449 -> [ 15994][D][BluetoothA2DPSink.cpp:1092] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_CONNECTION_STATE_EVT
19:18:34.449 -> [ 16004][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 16
19:18:34.482 -> [ 16020][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:34.482 -> [ 16021][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:18:34.482 -> [ 16029][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:34.482 -> [ 16039][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:34.513 -> [ 16047][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:18:34.513 -> [ 16021][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:18:34.513 -> [ 16056][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 0
19:18:34.513 -> [ 16064][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:18:34.545 -> [ 16072][D][BluetoothA2DPSink.cpp:623] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt ESP_A2D_CONNECTION_STATE_EVT
19:18:34.545 -> [ 16080][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 12
19:18:34.545 -> [ 16089][D][BluetoothA2DPSink.cpp:748] handle_connection_state(): [BT_AV] handle_connection_state evt 0
19:18:34.577 -> [ 16099][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:34.577 -> [ 16108][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
19:18:34.577 -> [ 16115][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:18:34.578 -> [ 16124][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connecting, [c0:b6:58:63:bf:5d]
19:18:34.609 -> [ 16133][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:18:34.609 -> [ 16144][I][BluetoothA2DPSink.cpp:814] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTING
19:18:34.609 -> [ 16152][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x4, param len 12
19:18:34.641 -> Connecting
19:18:34.641 -> [ 16172][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:34.641 -> [ 16182][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:18:34.641 -> [ 16182][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:18:34.641 -> [ 16188][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:34.673 -> [ 16197][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:18:34.673 -> [ 16207][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:34.673 -> [ 16214][D][BluetoothA2DPSink.cpp:1101] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_AUDIO_CFG_EVT
19:18:34.673 -> [ 16222][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:18:34.705 -> [ 16231][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 16
19:18:34.705 -> [ 16240][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 0
19:18:34.705 -> [ 16250][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:34.705 -> [ 16258][I][BluetoothA2DPSink.cpp:1463] av_hdl_avrc_tg_evt(): [BT_AV] AVRC conn_state evt: state 1, [c0:b6:58:63:bf:5d]
19:18:34.737 -> [ 16265][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:34.737 -> [ 16275][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x4
19:18:34.737 -> [ 16284][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:34.769 -> [ 16293][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:34.769 -> [ 16301][D][BluetoothA2DPSink.cpp:584] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_CONNECTION_STATE_EVT
19:18:34.769 -> [ 16311][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:34.769 -> [ 16321][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 12
19:18:34.801 -> [ 16329][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:18:34.801 -> [ 16339][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:34.801 -> [ 16348][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 4
19:18:34.833 -> [ 16355][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:34.833 -> [ 16363][I][BluetoothA2DPSink.cpp:1479] av_hdl_avrc_tg_evt(): [BT_AV] AVRC register event notification: 13, param: 0x0
19:18:34.833 -> [ 16372][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:34.833 -> [ 16382][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:18:34.866 -> [ 16390][D][BluetoothA2DPSink.cpp:596] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_REMOTE_FEATURES_EVT
19:18:34.866 -> [ 16399][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:34.866 -> [ 16409][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x5, param len 12
19:18:34.897 -> [ 16419][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:34.897 -> [ 16429][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:34.897 -> [ 16437][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:18:34.897 -> [ 16443][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:18:34.929 -> [ 16452][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 2
19:18:34.929 -> [ 16460][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:18:34.929 -> [ 16468][D][BluetoothA2DPSink.cpp:633] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt ESP_A2D_AUDIO_CFG_EVT
19:18:34.929 -> [ 16476][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x1, param len 12
19:18:34.961 -> [ 16485][D][BluetoothA2DPSink.cpp:658] handle_audio_cfg(): [BT_AV] handle_audio_cfg evt 2
19:18:34.961 -> [ 16495][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:34.961 -> [ 16502][I][BluetoothA2DPSink.cpp:661] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , codec type 0
19:18:34.961 -> [ 16509][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:18:34.993 -> [ 16518][I][BluetoothA2DPSink.cpp:673] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , sample_rate 44100
19:18:34.993 -> [ 16526][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:18:34.993 -> [ 16536][I][BluetoothA2DPSink.cpp:684] handle_audio_cfg(): [BT_AV] configure audio player 21-15-2-35
19:18:34.993 -> 
19:18:34.993 -> [ 16543][D][BluetoothA2DPSink.cpp:1092] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_CONNECTION_STATE_EVT
19:18:35.025 -> [ 16552][I][BluetoothA2DPSink.cpp:692] handle_audio_cfg(): [BT_AV] audio player configured, samplerate=44100
19:18:35.025 -> [ 16562][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 16
19:18:35.025 -> [ 16572][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:18:35.057 -> [ 16581][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:35.057 -> [ 16590][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.057 -> [ 16607][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.057 -> [ 16615][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:35.089 -> [ 16623][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 0
19:18:35.089 -> [ 16631][I][BluetoothA2DPSink.cpp:939] av_hdl_avrc_evt(): [BT_AV] AVRC conn_state evt: state 1, [c0:b6:58:63:bf:5d]
19:18:35.089 -> [ 16641][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x5
19:18:35.089 -> [ 16650][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.121 -> [ 16660][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.121 -> [ 16667][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:35.121 -> [ 16676][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 5
19:18:35.153 -> [ 16684][I][BluetoothA2DPSink.cpp:984] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
19:18:35.153 -> [ 16692][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x1
19:18:35.153 -> [ 16700][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.153 -> [ 16708][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:35.185 -> [ 16710][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.185 -> [ 16719][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:35.185 -> [ 16727][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:18:35.185 -> [ 16735][D][BluetoothA2DPSink.cpp:604] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_GET_RN_CAPABILITIES_RSP_EVT
19:18:35.217 -> [ 16744][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 1
19:18:35.217 -> [ 16755][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x6, param len 12
19:18:35.217 -> [ 16763][I][BluetoothA2DPSink.cpp:1494] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
19:18:35.249 -> [ 16773][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:35.249 -> [ 16783][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:18:35.249 -> [ 16789][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:35.249 -> [ 16798][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.282 -> [ 16807][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:35.282 -> [ 16817][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.282 -> [ 16825][D][BluetoothA2DPSink.cpp:596] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_REMOTE_FEATURES_EVT
19:18:35.314 -> [ 16832][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:18:35.314 -> [ 16843][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x5, param len 12
19:18:35.314 -> [ 16851][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 0
19:18:35.314 -> [ 16861][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:35.345 -> [ 16868][D][BluetoothA2DPSink.cpp:623] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt ESP_A2D_CONNECTION_STATE_EVT
19:18:35.345 -> [ 16875][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:18:35.345 -> [ 16885][D][BluetoothA2DPSink.cpp:748] handle_connection_state(): [BT_AV] handle_connection_state evt 0
19:18:35.345 -> [ 16893][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:18:35.377 -> [ 16903][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
19:18:35.377 -> [ 16910][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x1, param len 12
19:18:35.377 -> [ 16920][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connected, [c0:b6:58:63:bf:5d]
19:18:35.409 -> [ 16930][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:35.409 -> [ 16941][I][BluetoothA2DPSink.cpp:819] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTED
19:18:35.409 -> [ 16957][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable false
19:18:35.409 -> Connected
19:18:35.409 -> [ 16977][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x6
19:18:35.442 -> [ 16977][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.442 -> [ 16986][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.442 -> [ 16990][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:18:35.473 -> [ 16994][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:35.473 -> [ 17003][I][BluetoothA2DPSink.cpp:550] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT stat:0
19:18:35.473 -> [ 17011][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 6
19:18:35.473 -> [ 17020][I][BluetoothA2DPSink.cpp:552] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT remote name:iPhone (16)
19:18:35.505 -> [ 17028][I][BluetoothA2DPSink.cpp:992] av_hdl_avrc_evt(): [BT_AV] remote rn_cap: count 7, bitmask 0x1f06
19:18:35.505 -> [ 17048][D][BluetoothA2DPSink.cpp:883] av_new_track(): [BT_AV] av_new_track
19:18:35.505 -> [ 17055][D][BluetoothA2DPSink.cpp:896] av_playback_changed(): [BT_AV] av_playback_changed
19:18:35.505 -> [ 17063][D][BluetoothA2DPSink.cpp:702] handle_avrc_connection_state(): [BT_AV] handle_avrc_connection_state state 1
19:18:35.537 -> [ 17073][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x5
19:18:35.537 -> [ 17082][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.537 -> [ 17083][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:35.505 -> [ 17055][D][BluetoothA2DPSink.cpp:896] av_playback_changed(): [BT_AV] av_playback_changed
19:18:35.505 -> [ 17063][D][BluetoothA2DPSink.cpp:702] handle_avrc_connection_state(): [BT_AV] handle_avrc_connection_state state 1
19:18:35.537 -> [ 17073][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x5
19:18:35.537 -> [ 17082][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.537 -> [ 17083][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:35.569 -> [ 17092][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.569 -> [ 17100][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:35.569 -> [ 17108][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:35.569 -> [ 17116][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:18:35.601 -> [ 17124][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 5
19:18:35.601 -> [ 17135][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:18:35.601 -> [ 17142][I][BluetoothA2DPSink.cpp:984] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
19:18:35.601 -> [ 17151][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:18:35.633 -> [ 17159][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x1
19:18:35.633 -> [ 17168][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:35.633 -> [ 17177][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.665 -> [ 17184][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:35.665 -> [ 17194][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.665 -> [ 17203][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:35.665 -> [ 17211][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:18:35.697 -> [ 17218][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:18:35.697 -> [ 17227][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 1
19:18:35.697 -> [ 17237][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:18:35.697 -> [ 17246][I][BluetoothA2DPSink.cpp:1494] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
19:18:35.729 -> [ 17254][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:18:35.729 -> [ 17264][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:18:35.729 -> [ 17273][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:35.729 -> [ 17282][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.761 -> [ 17289][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:35.761 -> [ 17299][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.761 -> [ 17308][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:35.793 -> [ 17315][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:35.793 -> [ 17323][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:18:35.793 -> [ 17332][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:18:35.793 -> [ 17342][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:18:35.825 -> [ 17350][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x1, My Dad's Gone Crazy (feat. Hailie Jade)
19:18:35.825 -> [ 17358][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:18:35.825 -> [ 17370][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:18:35.857 -> [ 17380][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:35.857 -> [ 17389][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.857 -> [ 17395][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:35.857 -> [ 17405][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.889 -> [ 17414][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:35.889 -> [ 17422][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:35.889 -> [ 17430][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:18:35.889 -> [ 17438][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:18:35.921 -> [ 17448][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:18:35.921 -> [ 17456][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x2, Eminem
19:18:35.921 -> [ 17464][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:18:35.953 -> [ 17474][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:18:35.953 -> [ 17484][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:35.953 -> [ 17492][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:35.953 -> [ 17499][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:35.985 -> [ 17509][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:35.985 -> [ 17518][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:35.985 -> [ 17526][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:35.985 -> [ 17534][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:18:36.017 -> [ 17542][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:18:36.017 -> [ 17552][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:18:36.017 -> [ 17560][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x4, 
19:18:36.017 -> [ 17568][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:18:36.049 -> [ 17577][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:18:36.049 -> [ 17587][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:36.049 -> [ 17596][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:36.081 -> [ 17602][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:36.081 -> [ 17613][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:36.081 -> [ 17621][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:36.081 -> [ 17629][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:36.114 -> [ 17637][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:18:36.114 -> [ 17645][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:18:36.114 -> [ 17656][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:18:36.114 -> [ 17663][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x8, 1
19:18:36.146 -> [ 17672][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:18:36.146 -> [ 17681][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:18:36.146 -> [ 17691][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:36.177 -> [ 17699][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:36.177 -> [ 17716][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:36.177 -> [ 17724][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:36.177 -> [ 17732][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:18:36.210 -> [ 17740][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x10, 126
19:18:36.210 -> [ 17749][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:18:36.210 -> [ 17758][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:36.210 -> [ 17768][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:36.245 -> [ 17776][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:36.245 -> [ 17784][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:18:36.245 -> [ 17792][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x20, 
19:18:37.296 -> [ 18859][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:18:37.328 -> [ 18859][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:18:37.328 -> [ 18865][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x3, param len 12
19:18:37.328 -> [ 18874][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:37.328 -> [ 18881][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x3
19:18:37.360 -> [ 18890][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:37.360 -> [ 18900][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:37.360 -> [ 18908][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:18:37.360 -> [ 18917][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
19:18:37.392 -> [ 18923][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:18:37.392 -> [ 18925][I][BluetoothA2DPSink.cpp:1473] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 100%
19:18:37.392 -> [ 18933][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:18:37.392 -> [ 18943][I][BluetoothA2DPSink.cpp:1413] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 100
19:18:37.424 -> [ 18950][D][BluetoothA2DPSink.cpp:1096] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_AUDIO_STATE_EVT
19:18:37.424 -> [ 18970][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x1, param len 16
19:18:37.424 -> [ 18980][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:37.456 -> [ 18987][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x1
19:18:37.456 -> [ 18995][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:37.456 -> [ 19003][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.456 -> [ 19005][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:37.488 -> [ 19014][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:18:37.488 -> [ 19021][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:18:37.488 -> [ 19032][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.488 -> [ 19038][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 1
19:18:37.521 -> [ 19046][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:18:37.521 -> [ 19054][D][BluetoothA2DPSink.cpp:628] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt ESP_A2D_AUDIO_STATE_EVT
19:18:37.521 -> [ 19062][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:18:37.521 -> [ 19071][D][BluetoothA2DPSink.cpp:710] handle_audio_state(): [BT_AV] handle_audio_state evt 1
19:18:37.552 -> [ 19080][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:18:37.552 -> [ 19089][I][BluetoothA2DPSink.cpp:712] handle_audio_state(): [BT_AV] A2DP audio state: Started
19:18:37.552 -> [ 19096][D][BluetoothA2DPSink.cpp:592] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_CHANGE_NOTIFY_EVT
19:18:37.584 -> Started
19:18:37.584 -> [ 19115][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x4, param len 12
19:18:37.584 -> [ 19125][I][BluetoothA2DPSink.cpp:724] handle_audio_state(): [BT_AV] i2s_start
19:18:37.584 -> [ 19125][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:18:37.584 -> [ 19139][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x4
19:18:37.616 -> [ 19142][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.616 -> [ 19148][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:18:37.616 -> [ 19166][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:18:37.616 -> [ 19171][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.648 -> [ 19174][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:18:37.648 -> [ 19190][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 4
19:18:37.648 -> [ 19197][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.648 -> [ 19198][D][BluetoothA2DPSink.cpp:911] av_notify_evt_handler(): [BT_AV] av_notify_evt_handler
19:18:37.680 -> [ 19214][D][BluetoothA2DPSink.cpp:918] av_notify_evt_handler(): [BT_AV] av_notify_evt_handler ESP_AVRC_RN_PLAY_STATUS_CHANGE 1, to 1
19:18:37.680 -> [ 19222][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.680 -> [ 19226][D][BluetoothA2DPSink.cpp:896] av_playback_changed(): [BT_AV] av_playback_changed
19:18:37.727 -> [ 19249][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.727 -> [ 19273][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.758 -> [ 19312][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.758 -> [ 19328][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.837 -> [ 19368][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.837 -> [ 19384][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.869 -> [ 19424][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.869 -> [ 19439][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.949 -> [ 19480][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.949 -> [ 19496][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.981 -> [ 19537][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:37.981 -> [ 19552][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:38.045 -> [ 19593][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:38.045 -> [ 19609][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:38.117 -> [ 19650][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:18:38.117 -> [ 19666][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback

The above logs are from just the page you linked to. In the next Github comment, I will provide logs for some code that has some more of my code integrated (will be show the code there)

@mrhempman69
Copy link
Author

So in the last comment, I just used the code that you linked to. But this is with some more of my code integrated.

The code:

#include "BluetoothA2DPSink.h"

BluetoothA2DPSink a2dp_sink;

// for esp_a2d_connection_state_t see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/bluetooth/esp_a2dp.html#_CPPv426esp_a2d_connection_state_t
void connection_state_changed(esp_a2d_connection_state_t state, void *ptr){
  Serial.println(a2dp_sink.to_str(state));
}

// for esp_a2d_audio_state_t see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/bluetooth/esp_a2dp.html#_CPPv421esp_a2d_audio_state_t
void audio_state_changed(esp_a2d_audio_state_t state, void *ptr){
  Serial.println(a2dp_sink.to_str(state));
}


void setup() {
  Serial.begin(115200);
  a2dp_sink.set_on_connection_state_changed(connection_state_changed);
  a2dp_sink.set_on_audio_state_changed(audio_state_changed);
  
  int mclkPin=3;
  i2s_pin_config_t external_pin_config = {
        .mck_io_num = mclkPin,
        .bck_io_num =33,
        .ws_io_num = 32,
        .data_out_num = 22,
        .data_in_num = I2S_PIN_NO_CHANGE,
    };
  static const i2s_config_t externalDAC_config = {
        .mode = (i2s_mode_t) (I2S_MODE_MASTER | I2S_MODE_TX),
        .sample_rate =  44100, // corrected by info from bluetooth
        .bits_per_sample = (i2s_bits_per_sample_t) 16, 
        .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
        .communication_format = (i2s_comm_format_t)I2S_COMM_FORMAT_STAND_MSB,
        .intr_alloc_flags = 0, // default interrupt priority
        .dma_buf_count = 8,
        .dma_buf_len = 64,
        .use_apll = true,
        .tx_desc_auto_clear = true, // avoiding noise in case of data unavailability
        .mclk_multiple=(i2s_mclk_multiple_t) 256,

  };


  bool externalDAC=true;

    a2dp_sink.set_pin_config(external_pin_config);
    a2dp_sink.set_i2s_config(externalDAC_config);
    a2dp_sink.i2s_mclk_pin_select(mclkPin);

  a2dp_sink.start("MyMusic");  
}


void loop() {
  delay(1000); // do nothing
}

The log:

19:24:16.755 -> ets Jul 29 2019 12:21:46
19:24:16.755 -> 
19:24:16.755 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
19:24:16.755 -> configsip: 0, SPIWP:0xee
19:24:16.755 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
19:24:16.755 -> mode:DIO, clock div:1
19:24:16.755 -> load:0x3fff0030,len:1344
19:24:16.755 -> load:0x40078000,len:13964
19:24:16.755 -> load:0x40080400,len:3600
19:24:16.755 -> entry 0x400805f0
19:24:17.131 -> [    25][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
19:24:17.131 -> [    36][D][BluetoothA2DPSink.cpp:160] start(): [BT_AV] start
19:24:17.131 -> [    36][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 222372
19:24:17.131 -> [    45][I][BluetoothA2DPSink.cpp:172] start(): [BT_AV] Device name will be set to 'MyMusic'
19:24:17.163 -> [    53][D][BluetoothA2DPSink.cpp:1163] init_nvs(): [BT_AV] init_nvs
19:24:17.163 -> [    59][D][BluetoothA2DPCommon.cpp:152] get_last_connection(): [BT_AV] get_last_connection
19:24:17.163 -> [    68][D][BluetoothA2DPCommon.cpp:175] get_last_connection(): [BT_AV] => c0:b6:58:63:bf:5d
19:24:17.163 -> [    75][I][BluetoothA2DPSink.cpp:238] init_i2s(): [BT_AV] init_i2s
19:24:17.209 -> [    81][I][BluetoothA2DPSink.cpp:240] init_i2s(): [BT_AV] init_i2s is_i2s_output
19:24:17.209 -> [    89][D][BluetoothA2DPSink.cpp:315] init_bluetooth(): [BT_AV] init_bluetooth
19:24:17.290 -> [   191][I][BluetoothA2DPSink.cpp:320] init_bluetooth(): [BT_AV] controller initialized
19:24:17.626 -> [   518][I][BluetoothA2DPSink.cpp:329] init_bluetooth(): [BT_AV] bluedroid initialized
19:24:17.690 -> [   589][I][BluetoothA2DPSink.cpp:338] init_bluetooth(): [BT_AV] bluedroid enabled
19:24:17.690 -> [   589][D][BluetoothA2DPSink.cpp:455] app_task_start_up(): [BT_AV] app_task_start_up
19:24:17.690 -> [   593][D][BluetoothA2DPSink.cpp:1289] ccall_app_task_handler(): [BT_AV] ccall_app_task_handler
19:24:17.690 -> [   602][D][BluetoothA2DPSink.cpp:411] app_task_handler(): [BT_AV] app_task_handler
19:24:17.722 -> [   609][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 0
19:24:17.722 -> [   619][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:17.722 -> [   625][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:24:17.722 -> [   634][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:17.754 -> [   644][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:17.754 -> [   652][D][BluetoothA2DPSink.cpp:1319] ccall_av_hdl_stack_evt(): [BT_AV] ccall_av_hdl_stack_evt
19:24:17.754 -> [   660][D][BluetoothA2DPSink.cpp:1015] av_hdl_stack_evt(): [BT_AV] av_hdl_stack_evt evt 0
19:24:17.754 -> [   668][D][BluetoothA2DPSink.cpp:1020] av_hdl_stack_evt(): [BT_AV] av_hdl_stack_evt av_hdl_stack_evt BT_APP_EVT_STACK_UP
19:24:17.787 -> [   679][D][BluetoothA2DPSink.cpp:1029] av_hdl_stack_evt(): [BT_AV] AVRCP controller initialized!
19:24:17.787 -> [   680][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:24:17.787 -> [   688][D][BluetoothA2DPSink.cpp:1072] av_hdl_stack_evt(): [BT_AV] set_scan_mode_connectable(true)
19:24:17.818 -> [   696][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
19:24:17.818 -> [   705][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable true
19:24:17.818 -> [   714][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:24:17.818 -> [   688][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 130044
19:24:17.850 -> [   730][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:24:17.850 -> [   745][D][BluetoothA2DPSink.cpp:1108] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_AUDIO_CFG_EVT
19:24:17.850 -> [   754][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x4, param len 16
19:24:17.850 -> [   764][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:17.882 -> [   771][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x4
19:24:17.882 -> [   771][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:24:17.882 -> [   779][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:17.914 -> [   788][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
19:24:17.914 -> [   798][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:17.914 -> [   805][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:24:17.914 -> [   813][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:24:17.947 -> [   821][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
19:24:17.947 -> [   829][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 4
19:24:17.947 -> [   836][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:24:17.947 -> [   844][I][BluetoothA2DPSink.cpp:643] av_hdl_a2d_evt(): [BT_AV] A2DP PROF STATE: Init Compl
19:24:17.947 -> 
19:24:17.947 -> [   852][I][BluetoothA2DPSink.cpp:566] app_gap_callback(): [BT_AV] event: 10
19:24:41.948 -> [ 24867][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callb
19:24:42.316 -> [ 25211][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:24:42.316 -> [ 25211][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:24:42.316 -> [ 25216][D][BluetoothA2DPSink.cpp:1092] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_CONNECTION_STATE_EVT
19:24:42.316 -> [ 25226][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 16
19:24:42.348 -> [ 25235][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:42.348 -> [ 25242][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:24:42.348 -> [ 25251][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:42.348 -> [ 25261][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:42.380 -> [ 25269][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:24:42.380 -> [ 25277][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 0
19:24:42.380 -> [ 25284][D][BluetoothA2DPSink.cpp:623] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt ESP_A2D_CONNECTION_STATE_EVT
19:24:42.380 -> [ 25294][D][BluetoothA2DPSink.cpp:748] handle_connection_state(): [BT_AV] handle_connection_state evt 0
19:24:42.412 -> [ 25303][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
19:24:42.412 -> [ 25313][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connecting, [c0:b6:58:63:bf:5d]
19:24:42.412 -> [ 25273][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:24:42.444 -> [ 25324][I][BluetoothA2DPSink.cpp:814] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTING
19:24:42.444 -> Connecting
19:24:42.444 -> [ 25333][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:24:42.444 -> [ 25353][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 12
19:24:42.476 -> [ 25361][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:42.476 -> [ 25368][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:24:42.476 -> [ 25368][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:24:42.476 -> [ 25376][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:42.508 -> [ 25385][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:24:42.508 -> [ 25395][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:42.508 -> [ 25403][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x4, param len 12
19:24:42.508 -> [ 25411][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:24:42.540 -> [ 25421][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:42.540 -> [ 25429][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 0
19:24:42.540 -> [ 25436][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:24:42.540 -> [ 25445][I][BluetoothA2DPSink.cpp:1463] av_hdl_avrc_tg_evt(): [BT_AV] AVRC conn_state evt: state 1, [c0:b6:58:63:bf:5d]
19:24:42.572 -> [ 25453][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:24:42.572 -> [ 25464][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x4
19:24:42.572 -> [ 25471][D][BluetoothA2DPSink.cpp:1101] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_AUDIO_CFG_EVT
19:24:42.604 -> [ 25480][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:42.604 -> [ 25489][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 16
19:24:42.604 -> [ 25499][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:42.604 -> [ 25509][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:42.636 -> [ 25517][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:24:42.636 -> [ 25523][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:42.636 -> [ 25532][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 4
19:24:42.636 -> [ 25541][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:42.668 -> [ 25549][I][BluetoothA2DPSink.cpp:1479] av_hdl_avrc_tg_evt(): [BT_AV] AVRC register event notification: 13, param: 0x0
19:24:42.668 -> [ 25557][D][BluetoothA2DPSink.cpp:584] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_CONNECTION_STATE_EVT
19:24:42.668 -> [ 25568][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:24:42.700 -> [ 25578][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 12
19:24:42.700 -> [ 25587][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:42.700 -> [ 25597][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:42.700 -> [ 25607][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:42.732 -> [ 25613][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:42.732 -> [ 25621][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:24:42.732 -> [ 25630][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:42.732 -> [ 25638][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 2
19:24:42.764 -> [ 25646][D][BluetoothA2DPSink.cpp:596] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_REMOTE_FEATURES_EVT
19:24:42.764 -> [ 25654][D][BluetoothA2DPSink.cpp:633] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt ESP_A2D_AUDIO_CFG_EVT
19:24:42.764 -> [ 25664][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x5, param len 12
19:24:42.796 -> [ 25673][D][BluetoothA2DPSink.cpp:658] handle_audio_cfg(): [BT_AV] handle_audio_cfg evt 2
19:24:42.796 -> [ 25683][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:42.796 -> [ 25691][I][BluetoothA2DPSink.cpp:661] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , codec type 0
19:24:42.796 -> [ 25697][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:24:42.828 -> [ 25706][I][BluetoothA2DPSink.cpp:673] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , sample_rate 44100
19:24:42.828 -> [ 25715][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:24:42.828 -> [ 25724][I][BluetoothA2DPSink.cpp:684] handle_audio_cfg(): [BT_AV] configure audio player 21-15-2-35
19:24:42.828 -> 
19:24:42.828 -> [ 25732][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x1, param len 12
19:24:42.860 -> [ 25741][I][BluetoothA2DPSink.cpp:692] handle_audio_cfg(): [BT_AV] audio player configured, samplerate=44100
19:24:42.860 -> [ 25751][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:42.860 -> [ 25760][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:24:42.892 -> [ 25767][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:24:42.892 -> [ 25776][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:42.892 -> [ 25784][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:24:42.892 -> [ 25794][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:42.925 -> [ 25802][D][BluetoothA2DPSink.cpp:1092] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_CONNECTION_STATE_EVT
19:24:42.925 -> [ 25810][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:42.925 -> [ 25820][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x0, param len 16
19:24:42.925 -> [ 25828][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 0
19:24:42.956 -> [ 25838][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:42.956 -> [ 25845][I][BluetoothA2DPSink.cpp:939] av_hdl_avrc_evt(): [BT_AV] AVRC conn_state evt: state 1, [c0:b6:58:63:bf:5d]
19:24:42.956 -> [ 25862][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x5
19:24:42.956 -> [ 25871][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:42.988 -> [ 25881][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:42.988 -> [ 25889][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:42.988 -> [ 25897][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 5
19:24:43.020 -> [ 25905][I][BluetoothA2DPSink.cpp:984] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
19:24:43.020 -> [ 25913][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x1
19:24:43.020 -> [ 25921][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.020 -> [ 25932][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.052 -> [ 25939][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:24:43.052 -> [ 25948][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 1
19:24:43.052 -> [ 25957][I][BluetoothA2DPSink.cpp:1494] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
19:24:43.052 -> [ 25966][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x0
19:24:43.085 -> [ 25975][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.085 -> [ 25985][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.085 -> [ 25993][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:24:43.116 -> [ 26001][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 0
19:24:43.116 -> [ 26009][D][BluetoothA2DPSink.cpp:623] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt ESP_A2D_CONNECTION_STATE_EVT
19:24:43.116 -> [ 26014][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:43.116 -> [ 26018][D][BluetoothA2DPSink.cpp:748] handle_connection_state(): [BT_AV] handle_connection_state evt 0
19:24:43.148 -> [ 26027][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:43.148 -> [ 26036][I][BluetoothA2DPSink.cpp:753] handle_connection_state(): [BT_AV] partner address: c0:b6:58:63:bf:5d
19:24:43.148 -> [ 26044][D][BluetoothA2DPSink.cpp:604] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_GET_RN_CAPABILITIES_RSP_EVT
19:24:43.180 -> [ 26053][I][BluetoothA2DPSink.cpp:755] handle_connection_state(): [BT_AV] A2DP connection state: Connected, [c0:b6:58:63:bf:5d]
19:24:43.180 -> [ 26065][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x6, param len 12
19:24:43.180 -> [ 26076][I][BluetoothA2DPSink.cpp:819] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTED
19:24:43.180 -> [ 26086][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:43.212 -> [ 26095][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable false
19:24:43.212 -> Connected
19:24:43.212 -> [ 26122][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x6
19:24:43.212 -> [ 26122][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.244 -> [ 26131][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.244 -> [ 26139][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:43.244 -> [ 26147][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 6
19:24:43.244 -> [ 26155][I][BluetoothA2DPSink.cpp:992] av_hdl_avrc_evt(): [BT_AV] remote rn_cap: count 7, bitmask 0x1f06
19:24:43.276 -> [ 26155][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:24:43.276 -> [ 26164][D][BluetoothA2DPSink.cpp:883] av_new_track(): [BT_AV] av_new_track
19:24:43.276 -> [ 26173][I][BluetoothA2DPSink.cpp:550] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT stat:0
19:24:43.276 -> [ 26180][D][BluetoothA2DPSink.cpp:896] av_playback_changed(): [BT_AV] av_playback_changed
19:24:43.308 -> [ 26189][I][BluetoothA2DPSink.cpp:552] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT remote name:iPhone (16)
19:24:43.308 -> [ 26197][D][BluetoothA2DPSink.cpp:702] handle_avrc_connection_state(): [BT_AV] handle_avrc_connection_state state 1
19:24:43.308 -> [ 26224][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:43.340 -> [ 26226][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:43.340 -> [ 26234][D][BluetoothA2DPSink.cpp:596] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_REMOTE_FEATURES_EVT
19:24:43.340 -> [ 26245][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x5, param len 12
19:24:43.340 -> [ 26254][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:43.372 -> [ 26261][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:24:43.372 -> [ 26261][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x5
19:24:43.372 -> [ 26270][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:24:43.372 -> [ 26279][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.404 -> [ 26286][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x1, param len 12
19:24:43.404 -> [ 26296][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.404 -> [ 26306][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:43.436 -> [ 26314][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:43.436 -> [ 26321][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:43.436 -> [ 26329][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 5
19:24:43.436 -> [ 26338][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:43.468 -> [ 26346][I][BluetoothA2DPSink.cpp:984] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
19:24:43.468 -> [ 26353][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:24:43.468 -> [ 26361][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x1
19:24:43.468 -> [ 26372][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:24:43.500 -> [ 26380][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.500 -> [ 26389][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:24:43.500 -> [ 26399][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.532 -> [ 26408][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:43.532 -> [ 26416][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:24:43.532 -> [ 26423][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:43.532 -> [ 26432][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 1
19:24:43.563 -> [ 26441][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:43.563 -> [ 26449][I][BluetoothA2DPSink.cpp:1494] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
19:24:43.563 -> [ 26457][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:24:43.563 -> [ 26466][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:24:43.596 -> [ 26477][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:24:43.596 -> [ 26485][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.596 -> [ 26494][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:24:43.628 -> [ 26504][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.628 -> [ 26513][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:43.628 -> [ 26521][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:43.628 -> [ 26528][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:43.660 -> [ 26536][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:24:43.660 -> [ 26545][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:43.660 -> [ 26553][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x1, My Dad's Gone Crazy (feat. Hailie Jade)
19:24:43.660 -> [ 26561][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:24:43.692 -> [ 26573][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:24:43.692 -> [ 26583][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:24:43.692 -> [ 26592][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.724 -> [ 26600][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:24:43.724 -> [ 26610][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.724 -> [ 26620][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:43.724 -> [ 26628][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:43.756 -> [ 26635][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:43.756 -> [ 26643][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:24:43.756 -> [ 26652][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:43.756 -> [ 26660][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x2, Eminem
19:24:43.788 -> [ 26667][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:24:43.788 -> [ 26677][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:24:43.788 -> [ 26687][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:24:43.820 -> [ 26696][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.820 -> [ 26704][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:24:43.820 -> [ 26714][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.820 -> [ 26724][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:43.852 -> [ 26756][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:43.884 -> [ 26763][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x4, 
19:24:43.884 -> [ 26771][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:24:43.884 -> [ 26780][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:24:43.884 -> [ 26790][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:24:43.916 -> [ 26799][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:43.916 -> [ 26807][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:24:43.916 -> [ 26817][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:43.948 -> [ 26827][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:43.948 -> [ 26835][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:43.948 -> [ 26842][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:43.948 -> [ 26850][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:24:43.980 -> [ 26859][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:43.980 -> [ 26867][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x8, 1
19:24:43.980 -> [ 26874][D][BluetoothA2DPSink.cpp:579] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_METADATA_RSP_EVT
19:24:43.980 -> [ 26884][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:24:44.012 -> [ 26894][D][BluetoothA2DPSink.cpp:482] app_alloc_meta_buffer(): [BT_AV] app_alloc_meta_buffer
19:24:44.012 -> [ 26902][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:44.012 -> [ 26911][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x2, param len 12
19:24:44.044 -> [ 26921][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:44.044 -> [ 26931][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:44.044 -> [ 26938][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:44.044 -> [ 26953][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:24:44.076 -> [ 26961][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x10, 126
19:24:44.076 -> [ 26971][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x2
19:24:44.076 -> [ 26979][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:44.076 -> [ 26989][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:44.116 -> [ 26997][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:44.116 -> [ 27006][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
9:24:44.116 -> [ 27006][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 2
19:24:44.116 -> [ 27013][I][BluetoothA2DPSink.cpp:965] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x20, 
19:24:45.638 -> [ 28548][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:24:45.638 -> [ 28548][I][BluetoothA2DPSink.cpp:559] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
19:24:45.638 -> [ 28553][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 107724
19:24:48.111 -> [ 31033][D][BluetoothA2DPSink.cpp:1313] ccall_app_gap_callback(): [BT_AV] ccall_app_gap_callback
19:24:48.142 -> [ 31033][I][BluetoothA2DPSink.cpp:559] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
19:24:48.142 -> [ 31038][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 107724
19:24:48.143 -> [ 31047][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:24:48.143 -> [ 31055][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:24:48.175 -> [ 31063][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x3, param len 12
19:24:48.175 -> [ 31072][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:48.175 -> [ 31079][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x3
19:24:48.175 -> [ 31079][D][BluetoothA2DPSink.cpp:1301] ccall_app_a2d_callback(): [BT_AV] ccall_app_a2d_callback
19:24:48.207 -> [ 31088][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:48.207 -> [ 31096][D][BluetoothA2DPSink.cpp:1088] app_a2d_callback(): [BT_AV] app_a2d_callback
19:24:48.207 -> [ 31106][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:48.207 -> [ 31114][D][BluetoothA2DPSink.cpp:1096] app_a2d_callback(): [BT_AV] app_a2d_callback ESP_A2D_AUDIO_STATE_EVT
19:24:48.239 -> [ 31122][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:24:48.239 -> [ 31131][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x1, param len 16
19:24:48.239 -> [ 31140][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
19:24:48.271 -> [ 31150][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:48.271 -> [ 31158][I][BluetoothA2DPSink.cpp:1473] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 100%
19:24:48.271 -> [ 31168][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.271 -> [ 31174][I][BluetoothA2DPSink.cpp:1413] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 100
19:24:48.303 -> [ 31182][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:24:48.303 -> [ 31193][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x1
19:24:48.303 -> [ 31204][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.303 -> [ 31210][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:48.335 -> [ 31218][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:24:48.335 -> [ 31228][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:48.303 -> [ 31204][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.303 -> [ 31210][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:48.335 -> [ 31218][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:24:48.335 -> [ 31228][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:48.335 -> [ 31239][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.367 -> [ 31245][D][BluetoothA2DPSink.cpp:1333] ccall_av_hdl_a2d_evt(): [BT_AV] ccall_av_hdl_a2d_evt
19:24:48.367 -> [ 31253][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:24:48.367 -> [ 31261][D][BluetoothA2DPSink.cpp:619] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt evt 1
19:24:48.367 -> [ 31272][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.399 -> [ 31277][D][BluetoothA2DPSink.cpp:628] av_hdl_a2d_evt(): [BT_AV] av_hdl_a2d_evt ESP_A2D_AUDIO_STATE_EVT
19:24:48.399 -> [ 31285][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:24:48.399 -> [ 31294][D][BluetoothA2DPSink.cpp:710] handle_audio_state(): [BT_AV] handle_audio_state evt 1
19:24:48.399 -> [ 31305][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.431 -> [ 31311][I][BluetoothA2DPSink.cpp:712] handle_audio_state(): [BT_AV] A2DP audio state: Started
19:24:48.431 -> [ 31319][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:24:48.431 -> Started
19:24:48.431 -> [ 31338][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.431 -> [ 31346][I][BluetoothA2DPSink.cpp:724] handle_audio_state(): [BT_AV] i2s_start
19:24:48.463 -> [ 31347][E][BluetoothA2DPSink.cpp:1344] i2s_write_data(): [BT_AV] i2s_write_data failed - inactive
19:24:48.463 -> [ 31360][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:24:48.463 -> [ 31369][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:24:48.463 -> [ 31378][D][BluetoothA2DPSink.cpp:592] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_CHANGE_NOTIFY_EVT
19:24:48.495 -> [ 31387][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x4, param len 12
19:24:48.495 -> [ 31397][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:48.495 -> [ 31404][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x4
19:24:48.527 -> [ 31412][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:48.527 -> [ 31407][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.527 -> [ 31422][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:48.527 -> [ 31438][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:24:48.559 -> [ 31445][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.559 -> [ 31447][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 4
19:24:48.559 -> [ 31462][D][BluetoothA2DPSink.cpp:911] av_notify_evt_handler(): [BT_AV] av_notify_evt_handler
19:24:48.559 -> [ 31470][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.595 -> [ 31471][D][BluetoothA2DPSink.cpp:918] av_notify_evt_handler(): [BT_AV] av_notify_evt_handler ESP_AVRC_RN_PLAY_STATUS_CHANGE 1, to 1
19:24:48.595 -> [ 31490][D][BluetoothA2DPSink.cpp:896] av_playback_changed(): [BT_AV] av_playback_changed
19:24:48.595 -> [ 31495][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:48.627 -> [ 31522][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
--- Volume lowered, manually,  from 100 to 0. Only at 0 does the device respond by silencing the audio --- 
19:24:57.760 -> [ 40664][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:57.792 -> [ 40687][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:57.792 -> [ 40709][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:24:57.792 -> [ 40709][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:24:57.824 -> [ 40714][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x3, param len 12
19:24:57.824 -> [ 40724][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:57.824 -> [ 40731][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x3
19:24:57.856 -> [ 40732][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:24:57.856 -> [ 40739][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:57.856 -> [ 40748][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:24:57.856 -> [ 40758][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:57.888 -> [ 40766][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x3, param len 12
19:24:57.888 -> [ 40774][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:24:57.888 -> [ 40784][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:57.888 -> [ 40793][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
19:24:57.920 -> [ 40802][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:57.920 -> [ 40808][I][BluetoothA2DPSink.cpp:1473] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 93%
19:24:57.920 -> [ 40825][I][BluetoothA2DPSink.cpp:1413] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 93
19:24:57.920 -> [ 40832][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:57.952 -> [ 40835][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x3
19:24:57.952 -> [ 40852][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:57.952 -> [ 40860][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:57.984 -> [ 40862][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:57.984 -> [ 40878][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:24:57.984 -> [ 40886][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:57.984 -> [ 40887][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
19:24:58.016 -> [ 40903][I][BluetoothA2DPSink.cpp:1473] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 0%
19:24:58.016 -> [ 40910][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:58.016 -> [ 40912][I][BluetoothA2DPSink.cpp:1413] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 0
19:24:58.016 -> [ 40936][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:58.056 -> [ 40960][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
...
19:24:58.296 -> [ 41192][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:58.297 -> [ 41216][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:58.329 -> [ 41237][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:24:58.329 -> [ 41237][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:24:58.329 -> [ 41243][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x3, param len 12
19:24:58.361 -> [ 41252][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:24:58.361 -> [ 41259][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x3
19:24:58.361 -> [ 41261][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:58.361 -> [ 41267][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:24:58.393 -> [ 41285][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:24:58.393 -> [ 41291][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:58.393 -> [ 41293][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:24:58.425 -> [ 41310][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
19:24:58.425 -> [ 41317][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:58.425 -> [ 41319][I][BluetoothA2DPSink.cpp:1473] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 5%
19:24:58.425 -> [ 41336][I][BluetoothA2DPSink.cpp:1413] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 5
19:24:58.460 -> [ 41341][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:24:58.460 -> [ 41369][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
...
19:25:01.581 -> [ 44470][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:25:01.581 -> [ 44493][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
---- Pause is pressed ----
19:25:01.614 -> [ 44516][D][BluetoothA2DPSink.cpp:1443] ccall_app_rc_tg_callback(): [BT_AV] ccall_app_rc_tg_callback
19:25:01.614 -> [ 44517][D][BluetoothA2DPSink.cpp:1393] app_rc_tg_callback(): [BT_AV] app_rc_tg_callback
19:25:01.614 -> [ 44522][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x3, param len 12
19:25:01.646 -> [ 44532][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:25:01.646 -> [ 44539][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x3
19:25:01.646 -> [ 44539][D][BluetoothA2DPSink.cpp:1307] ccall_app_rc_ct_callback(): [BT_AV] ccall_app_rc_ct_callback
19:25:01.646 -> [ 44547][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:25:01.678 -> [ 44556][D][BluetoothA2DPSink.cpp:575] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback
19:25:01.678 -> [ 44566][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:25:01.678 -> [ 44574][D][BluetoothA2DPSink.cpp:592] app_rc_ct_callback(): [BT_AV] app_rc_ct_callback ESP_AVRC_CT_CHANGE_NOTIFY_EVT
19:25:01.678 -> [ 44582][D][BluetoothA2DPSink.cpp:1449] ccall_av_hdl_avrc_tg_evt(): [BT_AV] ccall_av_hdl_avrc_tg_evt
19:25:01.710 -> [ 44592][D][BluetoothA2DPSink.cpp:363] app_work_dispatch(): [BT_API] app_work_dispatch event 0x4, param len 12
19:25:01.710 -> [ 44601][D][BluetoothA2DPSink.cpp:1457] av_hdl_avrc_tg_evt(): [BT_AV] av_hdl_avrc_tg_evt evt 3
19:25:01.710 -> [ 44611][D][BluetoothA2DPSink.cpp:395] app_send_msg(): [BT_AV] app_send_msg
19:25:01.742 -> [ 44619][I][BluetoothA2DPSink.cpp:1473] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 11%
19:25:01.742 -> [ 44628][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:25:01.742 -> [ 44635][I][BluetoothA2DPSink.cpp:1413] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 11
19:25:01.742 -> [ 44653][D][BluetoothA2DPSink.cpp:418] app_task_handler(): [BT_API] app_task_handler, sig 0x1, 0x4
19:25:01.774 -> [ 44660][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:25:01.774 -> [ 44662][I][BluetoothA2DPSink.cpp:421] app_task_handler(): [BT_API] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
19:25:01.774 -> [ 44680][D][BluetoothA2DPSink.cpp:386] app_work_dispatched(): [BT_AV] app_work_dispatched
19:25:01.774 -> [ 44685][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:25:01.806 -> [ 44688][D][BluetoothA2DPSink.cpp:1326] ccall_av_hdl_avrc_evt(): [BT_AV] ccall_av_hdl_avrc_evt
19:25:01.806 -> [ 44704][D][BluetoothA2DPSink.cpp:935] av_hdl_avrc_evt(): [BT_AV] av_hdl_avrc_evt evt 4
19:25:01.806 -> [ 44711][D][BluetoothA2DPSink.cpp:1121] audio_data_callback(): [BT_AV] audio_data_callback
19:25:01.806 -> [ 44712][D][BluetoothA2DPSink.cpp:911] av_notify_evt_handler(): [BT_AV] av_notify_evt_handler
19:25:01.838 -> [ 44728][D][BluetoothA2DPSink.cpp:918] av_notify_evt_handler(): [BT_AV] av_notify_evt_handler ESP_AVRC_RN_PLAY_STATUS_CHANGE 1, to 2

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 20, 2023

I could not really reproduce your issue on my Android or old IPhones: All were playing the audio.
However after some start and stops, there was the risk that things were getting bad.
I committed some correction hoping that this might help you as well.

Were/Are you getting no audio at all with BluetoothA2DPSinkQueued but with BluetoothA2DPSink ?

A couple of comments:

  • please remove the a2dp_sink.i2s_mclk_pin_select(mclkPin); This method will be obsoleted and is not necessary when you can specify the pin in the i2s_pin_config_t
  • Log level Info should give a better overview then Debug
  • Don't forget to replace the BluetoothA2DPSink with BluetoothA2DPSinkQueued
  • I am usually using much bigger i2s buffer sizes: e.g. 6 * 512 bytes
===> Startup:
rst:0x1 (POWERON_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
[    48][I][esp32-hal-i2c.c:75] i2cInit(): Initialising I2C Master: sda=33 scl=32 freq=100000
Starting A2DP...
[    69][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 219332
[    69][I][BluetoothA2DPSink.cpp:172] start(): [BT_AV] Device name will be set to 'AudioKit'
[    75][I][BluetoothA2DPCommon.cpp:166] get_last_connection(): [BT_AV] nvs_blob does not exist
[    83][I][BluetoothA2DPSink.cpp:240] init_i2s(): [BT_AV] init_i2s
[    89][I][BluetoothA2DPSink.cpp:242] init_i2s(): [BT_AV] init_i2s is_i2s_output
[   162][I][BluetoothA2DPSink.cpp:322] init_bluetooth(): [BT_AV] controller initialized
[   483][I][BluetoothA2DPSink.cpp:331] init_bluetooth(): [BT_AV] bluedroid initialized
[   552][I][BluetoothA2DPSink.cpp:340] init_bluetooth(): [BT_AV] bluedroid enabled
[   553][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable true
[   558][I][BluetoothA2DPSink.cpp:232] start(): [BT_AV] IDF Version 4.4
[   559][I][BluetoothA2DPSink.cpp:568] app_gap_callback(): [BT_AV] event: 10
[   559][I][BluetoothA2DPSink.cpp:645] av_hdl_a2d_evt(): [BT_AV] A2DP PROF STATE: Init Compl

[   571][I][BluetoothA2DPSink.cpp:568] app_gap_callback(): [BT_AV] event: 10
[   564][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 112696
[   586][I][BluetoothA2DPSink.cpp:568] app_gap_callback(): [BT_AV] event: 10
[   602][I][BluetoothA2DPSink.cpp:568] app_gap_callback(): [BT_AV] event: 10

===> Connecting:

[ 85301][I][BluetoothA2DPSink.cpp:568] app_gap_callback(): [BT_AV] event: 16
[ 85611][I][BluetoothA2DPSink.cpp:765] handle_connection_state(): [BT_AV] partner address: 98:0d:6f:b9:ad:d9
[ 85611][I][BluetoothA2DPSink.cpp:767] handle_connection_state(): [BT_AV] A2DP connection state: Connecting, [98:0d:6f:b9:ad:d9]
[ 85621][I][BluetoothA2DPSink.cpp:826] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTING
[ 85673][I][BluetoothA2DPSink.cpp:663] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , codec type 0
[ 85673][I][BluetoothA2DPSink.cpp:675] handle_audio_cfg(): [BT_AV] a2dp audio_cfg_cb , sample_rate 44100
[ 85679][I][BluetoothA2DPSink.cpp:686] handle_audio_cfg(): [BT_AV] configure audio player 21-15-2-35

[ 85689][I][BluetoothA2DPSink.cpp:694] handle_audio_cfg(): [BT_AV] audio player configured, samplerate=44100
[ 85724][I][BluetoothA2DPSink.cpp:765] handle_connection_state(): [BT_AV] partner address: 98:0d:6f:b9:ad:d9
[ 85724][I][BluetoothA2DPSink.cpp:767] handle_connection_state(): [BT_AV] A2DP connection state: Connected, [98:0d:6f:b9:ad:d9]
[ 85734][I][BluetoothA2DPSink.cpp:831] handle_connection_state(): [BT_AV] ESP_A2D_CONNECTION_STATE_CONNECTED
[ 85743][I][BluetoothA2DPCommon.cpp:289] set_scan_mode_connectable(): [BT_AV] set_scan_mode_connectable false
[ 85753][I][BluetoothA2DPSinkQueued.cpp:6] bt_i2s_task_start_up(): [BT_API] ringbuffer data empty! mode changed: RINGBUFFER_MODE_PREFETCHING
[ 85765][I][BluetoothA2DPSinkQueued.cpp:21] bt_i2s_task_start_up(): [BT_AV] BtI2STask Started
[ 85812][I][BluetoothA2DPSink.cpp:552] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT stat:0
[ 85813][I][BluetoothA2DPSink.cpp:554] app_gap_callback(): [BT_AV] ESP_BT_GAP_READ_REMOTE_NAME_EVT remote name:A34 von Phil
[ 85829][I][BluetoothA2DPSink.cpp:951] av_hdl_avrc_evt(): [BT_AV] AVRC conn_state evt: state 1, [98:0d:6f:b9:ad:d9]
[ 85832][I][BluetoothA2DPSink.cpp:1481] av_hdl_avrc_tg_evt(): [BT_AV] AVRC conn_state evt: state 1, [98:0d:6f:b9:ad:d9]
[ 85842][I][BluetoothA2DPSink.cpp:996] av_hdl_avrc_evt(): [BT_AV] AVRC remote features 25b
[ 85850][I][BluetoothA2DPSink.cpp:1512] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote features 25b, CT features 2
[ 85860][I][BluetoothA2DPSink.cpp:1004] av_hdl_avrc_evt(): [BT_AV] remote rn_cap: count 7, bitmask 0xf26
[ 85886][I][BluetoothA2DPSink.cpp:1497] av_hdl_avrc_tg_evt(): [BT_AV] AVRC register event notification: 13, param: 0x0
[ 86063][I][BluetoothA2DPSink.cpp:977] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x1, New Age [Live]
[ 86063][I][BluetoothA2DPSink.cpp:977] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x2, The Velvet Underground
[ 86073][I][BluetoothA2DPSink.cpp:977] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x4, Gold [Disc 2]
[ 86083][I][BluetoothA2DPSink.cpp:977] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x8, 311
[ 86093][I][BluetoothA2DPSink.cpp:977] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x10, 501
[ 86102][I][BluetoothA2DPSink.cpp:977] av_hdl_avrc_evt(): [BT_AV] AVRC metadata rsp: attribute id 0x20, Rock
[ 86112][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 37%
[ 86121][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 37
[ 88943][I][BluetoothA2DPSink.cpp:561] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
[ 88943][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 68832

===> Playing

[126994][I][BluetoothA2DPSink.cpp:561] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
[126994][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 68832
[127023][I][BluetoothA2DPSink.cpp:714] handle_audio_state(): [BT_AV] A2DP audio state: Started
[127023][I][BluetoothA2DPSink.cpp:738] set_i2s_active(): [BT_AV] i2s_start
[127172][I][BluetoothA2DPSinkQueued.cpp:121] write_audio(): [BT_API] ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING

====> Stop
[168672][I][BluetoothA2DPSink.cpp:714] handle_audio_state(): [BT_AV] A2DP audio state: Suspended
[168673][W][BluetoothA2DPSink.cpp:746] set_i2s_active(): [BT_AV] i2s_stop
[171899][I][BluetoothA2DPSink.cpp:561] app_gap_callback(): [BT_AV] ESP_BT_GAP_MODE_CHG_EVT
[171899][I][BluetoothA2DPCommon.cpp:246] log_free_heap(): [BT_AV] Available Heap: 68832

====> Volume Changes
[210589][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 30%
[210589][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 30
[212074][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 37%
[212075][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 37
[213559][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 44%
[213559][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 44
[215044][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 57%
[215044][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 57
[216529][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 84%
[216529][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 84
[218014][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 100%
[218014][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 100

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 20, 2023

Queued class

I do have audio with the queued class after those changes, and I don't think I did before. The volume changes are still delayed.

When music is played, this is output constantly (almost like it's taking up the full processor):

13:23:46.970 -> [ 76312][I][BluetoothA2DPSinkQueued.cpp:69] i2s_task_handler(): [BT_API] ringbuffer underflowed! mode changed: RINGBUFFER_MODE_PREFETCHING

If I pause the music, I get:

13:25:24.739 -> [174077][I][BluetoothA2DPSinkQueued.cpp:121] write_audio(): [BT_API] ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING
13:25:24.778 -> [174099][W][BluetoothA2DPSinkQueued.cpp:114] write_audio(): [BT_API] ringbuffer overflowed, ready to decrease data! mode changed: RINGBUFFER_MODE_DROPPING
13:25:24.810 -> [174128][W][BluetoothA2DPSinkQueued.cpp:102] write_audio(): [BT_API] ringbuffer is full, drop this packet!
13:25:24.810 -> [174133][W][BluetoothA2DPSinkQueued.cpp:102] write_audio(): [BT_API] ringbuffer is full, drop this packet!
13:25:24.845 -> [174160][W][BluetoothA2DPSinkQueued.cpp:102] write_audio(): [BT_API] ringbuffer is full, drop this packet!
13:25:24.845 -> [174160][I][BluetoothA2DPSinkQueued.cpp:105] write_audio(): [BT_API] ringbuffer data decreased! mode changed: RINGBUFFER_MODE_PROCESSING

For only 10-20 seconds!!! Then it may go back to "PREFETCHING" repeating over and over.

The volume changes work instantly when it is paused. But again, it goes back to "PREFETCHING" even when paused for a while especially after volume changes.

Btw, I'm assuming your last bullet point meant me changing the config values to this:

        .dma_buf_count = 6,
        .dma_buf_len = 512,

which I did also btw.

Non-Queued Class

For the regular a2dp sink class, the audio works, but I get no ringbuffer results. The volume requires play / pauses to update.

One more important thing

I should've mentioned this earlier, as I now realize that it may be very significant. When I set the volume to 0.0, the controller receives this one instantly. So any value between 1 and 100 requires pausing the music for the volume to update. But volume 0 is immediately received, for some reason. This makes me think you may need an iPhone 6S or newer to debug this further. Or you can tell me what to do to try to see what the iPhone is communicating here.

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 20, 2023

This is very strange: You would get some underflow when the audio is not coming in fast enough which is virtually impossible.
It is also strange that if you press pause, it continues to receive data..

You can also try to play around with some parameters.

  • increase the message queue size
  • increase the i2s ringbuffer size and or percentage. The audio starts playing after the ringbuffer is filled > percentage
  • in the BluetoothA2DPSinkQueued::i2s_task_handler I have added a delay(5). You can try to move this before the xRingbufferReceiveUpTo() and maybe increase the value. The idea is to give the task which is filling the ringbuffer some opportunity to do it's job.

Maybe it's time to go back to the Espressif example to try to reproduce the issue and file a bug report.

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 20, 2023

  • in the BluetoothA2DPSinkQueued::i2s_task_handler I have added a delay(5). You can try to move this before the xRingbufferReceiveUpTo() and maybe increase the value. The idea is to give the task which is filling the ringbuffer some opportunity to do it's job.

Lol, this did something. Delay of "1" was constant "underflow". Delay of "25" was constant "overflow". Delay of "7" was a little bit of underflow, with volume changes only coming at about a 1 second delay. "This is fine", I thought, "good enough". Then the device rebooted itself!

Can you tell me which of these buffers will affect the value I should put in this delay?

  1. Config's buf_count:16, buf_len:1024.
  2. "Message queue size" (Not sure where this is set in the code)
  3. ringbuffer size and prefetch percent ( i know where to find these)

Which of these are most affecting that delay value?

Some logs....:

15:09:33.217 -> [ 55194][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 62%
15:09:33.217 -> [ 55195][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 62
15:09:34.288 -> [ 56240][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 68%
15:09:34.288 -> [ 56240][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 68
15:09:35.780 -> [ 57736][I][BluetoothA2DPSink.cpp:1491] av_hdl_avrc_tg_evt(): [BT_AV] AVRC remote set absolute volume: 74%
15:09:35.780 -> [ 57736][I][BluetoothA2DPSink.cpp:1431] volume_set_by_controller(): [BT_AV] Volume is set by remote controller to 74
15:09:35.780 -> [ 57738][I][BluetoothA2DPSinkQueued.cpp:69] i2s_task_handler(): [BT_API] ringbuffer underflowed! mode changed: RINGBUFFER_MODE_PREFETCHING
15:09:35.811 -> [ 57767][I][BluetoothA2DPSinkQueued.cpp:123] write_audio(): [BT_API] ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING
15:09:35.811 -> [ 57769][E][BluetoothA2DPSinkQueued.cpp:126] write_audio(): [BT_API] semphore give failed
15:09:35.811 -> [ 57788][W][BluetoothA2DPSinkQueued.cpp:116] write_audio(): [BT_API] ringbuffer overflowed, ready to decrease data! mode changed: RINGBUFFER_MODE_DROPPING
15:09:36.015 -> [ 57990][W][BluetoothA2DPSinkQueued.cpp:104] write_audio(): [BT_API] ringbuffer is full, drop this packet!
15:09:36.015 -> [ 57990][I][BluetoothA2DPSinkQueued.cpp:107] write_audio(): [BT_API] ringbuffer data decreased! mode changed: RINGBUFFER_MODE_PROCESSING
15:09:36.048 -> [ 57992][I][BluetoothA2DPSinkQueued.cpp:69] i2s_task_handler(): [BT_API] ringbuffer underflowed! mode changed: RINGBUFFER_MODE_PREFETCHING
15:09:36.048 -> [ 58021][I][BluetoothA2DPSinkQueued.cpp:123] write_audio(): [BT_API] ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING
15:09:36.079 -> [ 58025][E][BluetoothA2DPSinkQueued
15:09:36.079 -> assert failed: host_recv_pkt_cb hci_hal_h4.c:548 (0)
15:09:36.079 -> 
15:09:36.079 -> 
15:09:36.079 -> Backtrace: 0x400837f9:0x3ffde1b0 0x400932bd:0x3ffde1d0 0x40098ae5:0x3ffde1f0 0x4011600e:0x3ffde320 0x40170aea:0x3ffde340 0x4015fb6a:0x3ffde360 0x4001791d:0x3ffde380 0x401604d9:0x3ffde3a0 0x401605b6:0x3ffde3e0 0x400188f5:0x3ffde410 0x4015fdf9:0x3ffde450 0x40163925:0x3ffde470 0x40086904:0x3ffde490 0x40019d11:0x3ffde4c0 0x40055b4d:0x3ffde4e0 0x4015e3bb:0x3ffde500 0x4015ea21:0x3ffde520
15:09:36.122 -> 
15:09:36.122 -> 
15:09:36.122 -> 
15:09:36.122 -> 
15:09:36.122 -> ELF file SHA256: 20352cf904d9c325

It is also strange that if you press pause, it continues to receive data..

Any ideas on how I could debug why this is happening? Technically, it is receiving "item_size==0" worth of data.

You can also try to play around with some parameters.

  • increase the message queue size
  • increase the i2s ringbuffer size and or percentage. The audio starts playing after the ringbuffer is filled > percentage

I am using my brain now and will try these two next.

If you have any comments or suggestions, please share them. For some reason your last suggestions made me understand a bit more about what is going on

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 20, 2023

Not sure if this makes a difference, but I was testing with ESP32 2.0.14.

I am also not sure in which task the audio data is written, so it might make sense to try to add some delays to the BluetoothA2DPSinkQueued::write_audio()

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 20, 2023

I upgraded to ESP32 2.0.14, but nothing seemed to change

It is also strange that if you press pause, it continues to receive data..

Just want to add this comment, that my Android tablet works perfectly with the queued and non-queued classes, but it does enter an underflow repeater when the music is paused too under the queued class. Its underflows and semphore gives (whatever that is) are more like hiccups than constant conditions....

I am also not sure in which task the audio data is written, so it might make sense to try to add some delays to the BluetoothA2DPSinkQueued::write_audio()

Okay I did that and got the volume to change consistently. See the code below...

---> I think something common to both the Queued and Non-Queued class could be the issue here. Reason is, with the Queued class, I get an underflow condition, like not enough data is being sent. And with the non-queued class, while the logs don't say anything like that, the audio quality is choppy too, almost like it is not receiving enough data, in the exact same way. Both classes result in very "choppy" audio, seemingly identical audio, but the queued class gives the hint that maybe the iphone or some part of the protocol isn't receiving audio data fast enough.... But theoretically a queue's purpose would be to fix that issue.... so idk

--> Not sure if this would be unexpected, but when I disable tx_desc_auto_clear, the iphone outputs pure noise, while the android works fine

---> The audio quality is consistently bad. Even if I time the delays correctly, so that there's very few underflow / overflow, the audio quality is still bad (queued and non-queued, with the iphone only)

---> I just found your suggestion from the discussion 2 days ago (#495 (comment)), to increase "event queue size"! I thought this would help, and maybe 20 to 30 did, but it did not seem to help it as much as the delays. When i set it back to 20, i couldn't lower "defaultDelay" below 3 still in the below code.

I did get the volume to change consistently with only a few overflows:

int defaultDelay=3;
void BluetoothA2DPSinkQueued::i2s_task_handler(void *arg) {
    uint8_t *data = NULL;
    size_t item_size = 0;
    /**
     * The total length of DMA buffer of I2S is:
     * `dma_frame_num * dma_desc_num * i2s_channel_num * i2s_data_bit_width / 8`.
     * Transmit `dma_frame_num * dma_desc_num` bytes to DMA is trade-off.
     */
    size_t bytes_written = 0;
    is_starting = true;

    while (true) {
        if (is_starting){
            // wait for ringbuffer to be filled
            if (pdTRUE != xSemaphoreTake(s_i2s_write_semaphore, portMAX_DELAY)){
                continue;
            }
            is_starting = false;
        }
        // xSemaphoreTake was succeeding here, so we have the buffer filled up
        item_size = 0;

        // receive data from ringbuffer and write it to I2S DMA transmit buffer 
        delay(defaultDelay);

        data = (uint8_t *)xRingbufferReceiveUpTo(s_ringbuf_i2s, &item_size, (TickType_t)pdMS_TO_TICKS(i2s_ticks), i2s_write_size_upto);
        if (item_size == 0) {
            ESP_LOGI(BT_APP_TAG, "ringbuffer underflowed! mode changed: RINGBUFFER_MODE_PREFETCHING");
            ringbuffer_mode = RINGBUFFER_MODE_PREFETCHING;
            continue;
        } 

        // if i2s is not active we just consume the buffer w/o output
        if (is_i2s_active){
            size_t written = i2s_write_data(data, item_size);
            ESP_LOGD(BT_AV_TAG, "i2s_task_handler: %d->%d", item_size, written);
            if (written==0){
                ESP_LOGE(BT_APP_TAG, "i2s_write_data failed %d->%d", item_size, written);
                continue;
            }
        }
        delay(defaultDelay);

        vRingbufferReturnItem(s_ringbuf_i2s, (void *)data);
        delay(defaultDelay);

    }
}

size_t BluetoothA2DPSinkQueued::write_audio(const uint8_t *data, size_t size)
{
    size_t item_size = 0;
    BaseType_t done = pdFALSE;

    // This should not really happen!
    if (!is_i2s_active){
        ESP_LOGW(BT_APP_TAG, "i2s is not active: we try to activate it");
        is_i2s_active = i2s_start(i2s_port)==ESP_OK;
        delay(200);
    }

    if (ringbuffer_mode == RINGBUFFER_MODE_DROPPING) {
        ESP_LOGW(BT_APP_TAG, "ringbuffer is full, drop this packet!");
        vRingbufferGetInfo(s_ringbuf_i2s, NULL, NULL, NULL, NULL, &item_size);
        if (item_size <= i2s_ringbuffer_prefetch_size()) {
            ESP_LOGI(BT_APP_TAG, "ringbuffer data decreased! mode changed: RINGBUFFER_MODE_PROCESSING");
            ringbuffer_mode = RINGBUFFER_MODE_PROCESSING;
        }
        return 0;
    }
    delay(defaultDelay);
    done = xRingbufferSend(s_ringbuf_i2s, (void *)data, size, (TickType_t)0);
    delay(defaultDelay);

    if (!done) {
        ESP_LOGW(BT_APP_TAG, "ringbuffer overflowed, ready to decrease data! mode changed: RINGBUFFER_MODE_DROPPING");
        ringbuffer_mode = RINGBUFFER_MODE_DROPPING;
    }

    if (ringbuffer_mode == RINGBUFFER_MODE_PREFETCHING) {
        vRingbufferGetInfo(s_ringbuf_i2s, NULL, NULL, NULL, NULL, &item_size);
        if (item_size >= i2s_ringbuffer_prefetch_size()) {
            ESP_LOGI(BT_APP_TAG, "ringbuffer data increased! mode changed: RINGBUFFER_MODE_PROCESSING");
            ringbuffer_mode = RINGBUFFER_MODE_PROCESSING;
            if (pdFALSE == xSemaphoreGive(s_i2s_write_semaphore)) {
                ESP_LOGE(BT_APP_TAG, "semphore give failed");
            }
        }
    }
    delay(defaultDelay);

    return done ? size : 0;
}
#endif

But the audio quality is still quite bad, i do not know why. it is too bad to really use for anything. With two separate DACs tested.... (And the audio quality is much better on Android)

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 20, 2023

I think to solve this issue, @pschatzmann, even though the above code works, I have to know why it sounds like the singer is gargling water when he talks? It's not a "bass" issue, it's like the whole audio file is choppy. this happens in both the queued and non-queued classes, before and after the above changes were made. I do not think it is a "bass" issue, it happens like more like choppy and gargly throughout all frequencies (but could be wrong).

Also, this happens on iPhone with earbuds, but not on Android with earbuds! When going line-in to my PC (instead of earbuds), they both sound like this. With Android and earbuds the sound quality is much better!!!

  1. https://drive.google.com/file/d/1DxDCHhuKqY5LDVzHzNBXlpdmr9Mu-MZt/view?usp=share_link

  2. https://drive.google.com/file/d/1CR9PSLW2CMQPmCYgI9psTNVKhguCAZ4U/view?usp=share_link

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 21, 2023

I noticed that the original design from Espressif was working with different task priorities. I changed the approach and made sure that all tasks are running with the same priority and I am forcing a task switch with yield().

I have also added some more debug log statements which print the size of the audio data. This should make it possible to find if there are any differences between Apple and Android (in debug level). See A2DP_DEBUG_AUDIO in config.h
I am wondering if Apple is providing different array sizes?

This changes have been committed in the issue-apple branch. I am wondering if this helps even when using the BluetoothA2DPSink class.

I am getting the same audio effect like you when I use the debug log level, so when testing the audio quality I recommend to use the Warning or Info log level.

I have also updated the Optimizations Chapter in the Wiki....

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 21, 2023

I noticed that the original design from Espressif was working with different task priorities. I changed the approach and made sure that all tasks are running with the same priority and I am forcing a task switch with yield().

This changes have been committed in the issue-apple branch. I am wondering if this helps even when using the BluetoothA2DPSink class.

I am getting the same audio effect like you when I use the debug log level, so when testing the audio quality I recommend to use the Warning or Info log level.

First pass, the audio is still the same as before, but....

I have also added some more debug log statements which print the size of the audio data. This should make it possible to find if there are any differences between Apple and Android (in debug level). See A2DP_DEBUG_AUDIO in config.h I am wondering if Apple is providing different array sizes?

See below logs..

IPhone:

09:55:35.028 -> [ 45292][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
09:55:35.028 -> [ 45299][I][BluetoothA2DPSink.cpp:763] set_i2s_active(): [BT] i2s_start
09:55:35.028 -> [ 45299][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
09:55:35.060 -> [ 45305][D][BluetoothA2DPSink.cpp:429] app_task_handler(): [BT] app_task_handler, sig 0x1, 0x4
09:55:35.060 -> [ 45314][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 4096
09:55:35.060 -> [ 45322][D][BluetoothA2DPSink.cpp:432] app_task_handler(): [BT] app_task_handler, APP_SIG_WORK_DISPATCH sig: 1
09:55:35.060 -> [ 45332][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
09:55:35.092 -> [ 45339][D][BluetoothA2DPSink.cpp:397] app_work_dispatched(): [BT] app_work_dispatched
09:55:35.092 -> [ 45348][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
09:55:35.092 -> [ 45356][D][BluetoothA2DPSink.cpp:1378] ccall_av_hdl_avrc_evt(): [BT] ccall_av_hdl_avrc_evt
09:55:35.124 -> [ 45364][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 4096
09:55:35.124 -> [ 45372][D][BluetoothA2DPSink.cpp:972] av_hdl_avrc_evt(): [BT] av_hdl_avrc_evt evt 4
09:55:35.124 -> [ 45382][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
09:55:35.124 -> [ 45387][D][BluetoothA2DPSink.cpp:948] av_notify_evt_handler(): [BT] av_notify_evt_handler
09:55:35.156 -> [ 45396][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
09:55:35.156 -> [ 45404][D][BluetoothA2DPSink.cpp:955] av_notify_evt_handler(): [BT] av_notify_evt_handler ESP_AVRC_RN_PLAY_STATUS_CHANGE 1, to 1
09:55:35.156 -> [ 45413][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 4096
09:55:35.156 -> [ 45424][D][BluetoothA2DPSink.cpp:933] av_playback_changed(): [BT] av_playback_changed
09:55:35.188 -> [ 45434][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
09:55:35.188 -> [ 45448][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
09:55:35.188 -> [ 45457][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 4096
09:55:35.188 -> [ 45466][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
09:55:35.220 -> [ 45473][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
09:55:35.220 -> [ 45482][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 4096
09:55:35.220 -> [ 45491][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
09:55:35.220 -> [ 45498][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096

Android:

09:57:26.267 -> Started
09:57:26.267 -> [101118][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
09:57:26.267 -> [101125][I][BluetoothA2DPSink.cpp:763] set_i2s_active(): [BT] i2s_start
09:57:26.299 -> [101125][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
09:57:26.299 -> [101139][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3584
09:57:26.299 -> [101149][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
09:57:26.299 -> [101156][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
09:57:26.331 -> [101164][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3584
09:57:26.331 -> [101177][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
09:57:26.331 -> [101181][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
09:57:26.331 -> [101189][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3584
09:57:26.363 -> [101199][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
09:57:26.363 -> [101206][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
09:57:26.363 -> [101214][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3584
09:57:26.363 -> [101223][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3072
09:57:26.395 -> [101230][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3072
09:57:26.395 -> [101244][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3072
09:57:26.395 -> [101249][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
09:57:26.427 -> [101255][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
09:57:26.427 -> [101264][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3584
09:57:26.427 -> [101273][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
09:57:26.427 -> [101280][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
09:57:26.459 -> [101289][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3584
09:57:26.459 -> [101298][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
09:57:26.459 -> [101305][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
09:57:26.459 -> [101313][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3584
09:57:26.491 -> [101323][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
09:57:26.491 -> [101330][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
09:57:26.491 -> [101338][D][BluetoothA2DPSink.cpp:1398] i2s_write_data(): [BT] i2s_write_data: 3584

It seems like iPhone is keeping the write_data at 4096, while Android has it go up and down, 3584 or 3072...

Does this mean anything to you conceptually on what I should change? I'm using default values from the iphone branch.

I have also updated the Optimizations Chapter in the Wiki....

This was useful... Let me know if you think I should change any of these values based on that log.... I'm tempted to try setting MAX_PRIORITIES higher... but I should be addressing something with that changing data callback

I read what you wrote about newer versions of Espressif using more RAM. I should probably test with an older version of Espressif at some point...

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 21, 2023

I tend to think that in this case the i2s buffer should be at least 4096 bytes or more.
I don't feel comfortable with these big array sizes, so will try to split this up into individual 1k writes...

@pschatzmann
Copy link
Owner

I committed the change of making max 1k i2s writes...

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 21, 2023

Not sure why these didn't throw as errors before, but a couple typos:

Typo on line 1414 of BluetoothA2DPSink.cpp: Should be "BT_TAG" not "BTe_TAG" - said BTe_TAG not declared in scope

On 1399: Should be printing "size" not "item_size" for this log statement (?) - said item_size not declared in scope

I made those changes and...

On iPhone:

11:00:52.214 -> [ 39267][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:00:52.214 -> [ 39274][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:00:52.246 -> [ 39283][D][BluetoothA2DPSink.cpp:1399] write_audio(): [BT] write_audio: 4096
11:00:52.246 -> [ 39289][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:00:52.246 -> [ 39296][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:00:52.246 -> [ 39304][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:00:52.246 -> [ 39311][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024

On Android:

11:02:11.753 -> [ 76693][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:02:11.753 -> [ 76701][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:02:11.753 -> [ 76709][D][BluetoothA2DPSink.cpp:1399] write_audio(): [BT] write_audio: 3584
11:02:11.753 -> [ 76716][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:02:11.785 -> [ 76723][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:02:11.785 -> [ 76730][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:02:11.785 -> [ 76738][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 512
11:02:11.785 -> [ 76748][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3072
11:02:11.817 -> [ 76754][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3072
11:02:11.817 -> [ 76763][D][BluetoothA2DPSink.cpp:1399] write_audio(): [BT] write_audio: 3072
11:02:11.817 -> [ 76769][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:02:11.817 -> [ 76777][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:02:11.849 -> [ 76785][D][BluetoothA2DPSink.cpp:1414] i2s_write_data(): [BT] i2s_write_data: 1024
11:02:11.849 -> [ 76794][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:02:11.849 -> [ 76801][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584

Audio qualities are pretty similar. Without debugging enabled, some pops on Android that are noticeable but come maybe once every 5 seconds. On iOS, a lot more pops, still slightly choppy audio. With debugging enabled, both sound choppy and poppy.

You don't think iOS is padding their data with zeros do you? (Imagine how dumb that would be lol). How can I use ESP_LOGD to look at the value of *data? (Sorry, my cpp is pretty bad).

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 21, 2023

My mistake, I did not compile with log level Debug
To look at the data you can use https://github.com/pschatzmann/ESP32-A2DP/blob/main/examples/bt_music_receiver_datacallback/bt_music_receiver_datacallback.ino

For me the audio quality is perfect using my Android phone with log level Info!

@mrhempman69
Copy link
Author

mrhempman69 commented Oct 21, 2023

Here's a look at the raw data (from the same point in the same song)....

Based on the fact that the values are mostly similar at the end of one array and the beginning of the next array, I wouldn't expect the data stream to be causing the pops (it's good). Much more likely some kind of RAM issue like we've been trying to figure out....

On iPhone:

11:32:11.381 -> 0,0,0,0,0,0,0,0[ 75543][D][BluetoothA2DPSink.cpp:972] av_hdl_avrc_evt(): [BT] av_hdl_avrc_evt evt 4
11:32:11.381 -> ,0,0,0,0,0,0,[ 75554][D][BluetoothA2DPSink.cpp:948] av_notify_evt_handler(): [BT] av_notify_evt_handler
11:32:11.413 -> 0,0[ 75561][D][BluetoothA2DPSink.cpp:955] av_notify_evt_handler(): [BT] av_notify_evt_handler ESP_AVRC_RN_PLAY_STATUS_CHANGE 1, to 1
11:32:11.413 -> ,0,0,0,0,0,[ 75572][D][BluetoothA2DPSink.cpp:933] av_playback_changed(): [BT] av_playback_changed
11:32:11.413 -> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
11:32:11.605 -> [ 75759][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:11.605 -> [ 75764][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:11.605 -> [ 75773][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:11.605 -> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
11:32:11.797 -> [ 75967][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:11.797 -> [ 75967][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:11.829 -> [ 75976][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:11.829 -> 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-1,-2,-2,-3,-3,-3,-3,-3,-3,-3,-2,-2,-1,-1,0,0,0,1,2,2,3,3,4,4,4,5,5,5,5,5,5,5,5,4,4,4,4,3,3,3,3,3,2,2,2,2,1,1,1,1,1,0,0,0,0,0,0,0,0,-1,-1,-1,-2,-2,-3,-3,-4,-4,-5,-5,-6,-6,-7,-7,-7,-7,-7,-7,-6,-6,-5,-5,-4,-3,-3,-2,-1,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,-1,-1,-1,-1,-1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,-1,-1,-2,-2,-2,-3,-3,-3,-3,-3,-3,-3,-3,-3,-2,-2,-2,-1,-1,0,0,0,0,1,1,2,3,3,4,5,5,6,7,7,8,8,8,8,9,9,9,8,8,8,8,8,7,7,7,7,7,7,7,7,7,7,6,7,7,6,6,6,6,6,6,5,5,5,5,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,1,0,0,0,-1,-2,-2,-3,-4,-5,-6,-7,-7,-8,-9,-9,-10,-10,-11,-11,-12,-12,-12,-13,-13,-14,-14,-15,-15,-16,-16,-17,-17,-17,-18,-19,-20,-21,-22,-22,-23,-24,-25,-26,-28,-29,-32,-33,-34,-35,-36,-38,-39,-42,-43,-44,-44,-42,-40,-37,-33,-28,-22,-15,-6,2,10,18,25,31,36,41,44,46,46,45,42,40,37,33,30,26,23,20,18,16,15,15,15,16,17,19,21,24,26,29,31,33,35,37,40,42,43,44,45,45,45,45,44,43,40,37,34,30,27,24,21,18,15,11,8,5,3,1,0,0,-1,-2,-2,-2,-2,-2,-3,-3,-4,-5,-5,-6,-7,-8,-10,-12,-13,-15,-16,-18,-21,-24,-27,-30,-34,-36,-39,-43,-46,-50,-54,-58,-61,-64,-67,-70,-74,-77,-79,-80,-81,-81,-81,-80,-79,-78,-76,-73,-70,-65,-60,-55,-50,-45,-38,-31,-24,-18,-10,-3,4,11,19,27,34,42,50,56,62,67,71,74,75,74,72,69,65,60,55,49,43,37,31,25,19,14,10,6,3,1,1,0,1,1,2,4,6,9,12,14,18,21,24,28,31,35,38,40,42,44,45,46,47,47,45,44,42,39,37,34,31,27,23,18,13,9,5,2,-1,-4,-7,-10,-12,-14,-15,-15,-15,-14,-14,-13,-11,-9,-6,-4,-2,0,1,2,3,4,4,3,2,0,-2,-5,-7,-10,-13,-15,-18,-21,-23,-25,-27,-28,-28,-28,-27,-26,-24,-23,-21,-19,-17,-16,-14,-12,-10,-8,-7,-7,-7,-7,-7,-6,-5,-5,-4,-4,-4,-4,-3,-3,-2,-1,0,0,0,1,2,3,3,3,3,4,5,5,5,4,4,3,2,2,1,1,1,1,2,2,4,5,7,10,13,16,18,21,24,25,27,28,29,29,30,30,31,31,31,31,31,31,32,33,34,35,37,39,41,42,43,43,42,41,38,36,32,28,23,18,12,6,0,-4,-8,-11,-14,-16,-17,-17,-16,-14,-11,-7,-3,1,5,9,12,15,17,17,17,14,10,5,-1,-11,-22,-34,-47,-61,-76,-91,-106,-119,-131,-144,-155,-164,-170,-175,-178,-179,-178,-175,-169,-161,-151,-139,-125,-108,-89,-70,-49,-26,-3,20,44,67,90,113,136,157,176,193,209,223,234,241,246,250,251,249,245,238,230,220,209,196,182,169,156,142,129,116,103,92,82,72,64,58,52,47,42,38,35,33,31,29,28,27,25,24,24,24,24,23,23,23,22,21,21,20,19,18,16,14,11,9,6,2,0,-5,-9,-14,-18,-23,-29,-34,-38,-43,-48,-52,-55,-59,-62,-64,-66,-67,-67,-67,-66,-65,-63,-61,-59,-56,-53,-50,-46,-42,-38,-34,-30,-26,-23,-19,-16,-13,-10,-8,-6,-4,-3,-2,-3,-3,-5,-7,-9,-12,-16,-20,-25,-30,-36,-41,-47,-52,-58,-63,-68,-73,-77,-80,-83,-86,-88,-89,-90,-91,-92,-92,-91,-91,-90,-89,-88,-87,-86,-85,-84,-84,-84,-83,-83,-83,-83,-83,-83,-82,-82,-81,-80,-79,-77,-76,-75,-73,-71,-69,-67,-66,-64,-63,-63,-62,-62,-62,-62,-64,-65,-67,-70,-74,-78,-83,-88,-94,-99,-106,-112,-117,-123,-129,-134,-139,-143,-147,-150,-152,-154,-156,-156,-156,-155,-154,-153,-150,-148,-146,-143,-140,-138,-135,-132,-130,-128,-125,-123,-121,-119,-116,-114,-112,-110,-108,-105,-102,-99,-97,-94,-91,-88,-86,-83,-81,-78,-76,-75,-74,-72,-71,-70,-69,-68,-66,-65,-63,-60,-58,-56,-53,-50,-47,-43,-39,-35,-30,-26,-21,-16,-11,-6,-1,3,7,11,15,19,23,26,29,32,34,37,
11:32:12.085 -> [ 76262][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:12.117 -> [ 76268][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:12.117 -> [ 76276][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:12.117 -> 39,41,43,44,46,48,49,51,53,54,55,57,58,59,60,62,63,64,65,66,67,68,69,70,71,72,73,73,74,74,75,75,75,76,76,76,75,75,75,74,73,72,70,69,67,66,65,64,63,63,63,63,63,64,64,65,67,68,70,72,73,75,77,78,79,80,80,80,80,79,78,77,76,74,72,70,68,66,64,62,60,59,57,56,55,54,54,54,54,55,55,57,58,60,62,64,66,68,70,72,75,77,80,82,86,89,92,96,100,104,109,114,118,123,128,133,137,142,145,149,153,156,159,162,164,167,169,170,172,174,175,176,178,179,180,182,184,185,187,188,189,191,192,193,194,194,194,195,194,194,193,193,192,190,189,187,186,184,183,181,180,178,176,175,173,172,170,168,165,163,161,158,155,152,149,145,141,137,133,129,124,120,115,111,106,102,98,94,90,86,82,77,73,69,65,60,56,51,47,42,37,33,28,24,19,15,11,8,4,1,-1,-4,-6,-8,-10,-12,-14,-16,-17,-18,-19,-20,-21,-21,-21,-21,-20,-19,-17,-16,-14,-11,-8,-6,-3,0,3,7,11,15,18,22,26,29,33,36,39,42,45,47,49,51,53,55,56,57,59,60,62,63,65,67,69,72,74,77,80,82,85,87,89,91,92,93,94,94,94,93,92,91,89,87,86,84,83,83,83,83,84,85,87,89,92,95,98,101,104,106,109,111,113,115,116,116,116,116,115,114,112,111,109,106,104,102,100,97,95,93,90,88,85,83,81,78,75,73,70,67,63,60,56,52,48,44,39,35,30,25,20,14,8,2,-2,-8,-14,-19,-25,-29,-34,-38,-41,-44,-46,-48,-50,-52,-53,-55,-56,-58,-60,-61,-63,-65,-67,-69,-70,-72,-73,-74,-75,-76,-76,-76,-76,-75,-74,-73,-71,-69,-66,-64,-61,-59,-57,-56,-55,-54,-54,-55,-56,-58,-60,-63,-67,-70,-74,-78,-82,-86,-89,-92,-94,-96,-96,-96,-95,-93,-90,-87,-83,-79,-75,-71,-67,-63,-59,-56,-54,-52,-51,-51,-51,-52,-53,-55,-56,-59,-61,-64,-67,-70,-72,-75,-77,-80,-82,-84,-86,-88,-90,-91,-93,-94,-96,-97,-99,-100,-102,-103,-105,-106,-108,-109,-111,-112,-114,-115,-117,-118,-120,-122,-123,-125,-127,-129,-130,-132,-133,-135,-136,-138,-139,-140,-141,-143,-144,-145,-147,-148,-150,-152,-153,-155,-157,-159,-160,-162,-163,-165,-166,-167,-168,-170,-171,-173,-175,-178,-181,-184,-187,-191,-195,-199,-204,-210,-215,-221,-228,-234,-240,-247,-253,-259,-265,-271,-276,-281,-285,-289,-293,-296,-298,-300,-302,-303,-305,-306,-307,-308,-309,-310,-311,-312,-314,-315,-316,-317,-318,-319,-321,-322,-324,-326,-328,-330,-333,-335,-337,-339,-341,-344,-346,-348,-350,-351,-353,-354,-355,-356,-357,-357,-358,-358,-358,-358,-359,-359,-360,-360,-360,-360,-359,-359,-358,-356,-355,-353,-350,-347,-344,-340,-336,-331,-325,-320,-313,-306,-299,-292,-284,-277,-269,-262,-255,-249,-242,-237,-232,-228,-224,-221,-217,-214,-212,-209,-206,-204,-202,-200,-198,-195,-193,-192,-190,-188,-186,-184,-182,-180,-179,-177,-176,-175,-175,-174,-174,-173,-173,-173,-173,-173,-174,-174,-174,-174,-173,-173,-172,-171,-170,-169,-167,-166,-164,-161,-159,-157,-154,-151,-147,-144,-140,-136,-133,-129,-125,-121,-117,-114,-110,-106,-103,-99,-95,-91,-88,-84,-80,-76,-73,-69,-65,-62,-59,-57,-54,-52,-50,-48,-46,-44,-42,-40,-38,-36,-33,-31,-29,-27,-25,-22,-20,-18,-16,-13,-11,-8,-6,-3,0,2,4,7,10,13,15,19,22,25,29,33,37,42,46,51,56,60,65,69,74,78,83,87,91,95,98,102,105,108,110,112,114,115,116,117,117,117,118,118,118,119,120,121,122,124,126,129,131,134,137,141,144,147,151,154,158,161,164,167,170,173,176,178,181,184,187,189,192,195,198,202,206,209,214,218,222,225,229,232,236,239,242,245,247,249,251,253,254,255,257,258,258,259,259,259,259,260,260,260,260,261,261,261,261,261,262,262,263,263,264,264,265,266,267,268,270,271,273,275,278,281,285,289,294,300,306,312,319,326,333,340,347,353,359,365,370,376,381,385,390,394,397,400,402,405,407,409,410,412,413,414,415,415,416,416,417,417,416,416,416,416,416,416,416,415,413,411,409,407,405,403,401,400,398,398,398,398,400,401,403,405,407,410,413,416,420,424,428,432,435,438,441,444,447,449,451,453,455,456,458,459,460,461,462,462,462,462,461,460,460,458,457,456,454,453,451,450,449,448,447,446,444,442,439,437,434,432,429,426,423,419,415,411,406,401,395,389,383,376,369,362,356,349,342,336,329,323,317,311,306,301,296,293,289,287,285,283,282,282,281,280,279,278,277,275,273,271,269,266,264,261,258,255,252,249,246,243,239,236,232,229,227,225,223,221,219,218,216,215,213,212,211,209,208,207,206,205,204,203,203,202,201,201,201,201,201,202,202,204,205,206,208,209,210,212,212,213,213,213,214,214,215,216,
11:32:12.469 -> [ 76643][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:12.469 -> [ 76644][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:12.501 -> [ 76652][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:12.501 -> 217,218,219,221,222,224,225,227,227,228,227,226,224,221,218,214,210,206,202,198,195,193,191,189,187,184,181,177,172,165,158,151,144,138,133,130,127,125,123,120,117,113,108,103,98,94,90,86,82,79,76,73,71,68,66,63,60,56,53,49,45,41,37,32,26,21,14,8,2,-3,-9,-15,-20,-25,-30,-34,-38,-42,-46,-51,-55,-60,-66,-72,-78,-85,-93,-101,-108,-116,-123,-129,-135,-141,-147,-152,-157,-162,-167,-172,-177,-182,-187,-192,-198,-202,-206,-209,-210,-211,-212,-212,-214,-216,-219,-222,-224,-226,-227,-227,-226,-225,-224,-222,-220,-218,-217,-217,-218,-220,-223,-227,-231,-234,-237,-240,-242,-245,-248,-251,-254,-258,-261,-264,-267,-270,-273,-277,-281,-284,-287,-289,-290,-290,-289,-287,-283,-279,-275,-270,-265,-261,-257,-254,-253,-253,-254,-256,-258,-259,-261,-261,-262,-262,-262,-262,-262,-262,-263,-264,-266,-269,-272,-274,-277,-279,-281,-282,-283,-283,-284,-285,-286,-288,-290,-293,-295,-297,-298,-298,-298,-298,-298,-297,-297,-296,-296,-296,-297,-298,-300,-302,-305,-308,-311,-315,-318,-321,-324,-327,-329,-330,-332,-333,-334,-334,-333,-332,-331,-330,-329,-328,-328,-326,-325,-323,-320,-317,-313,-309,-305,-301,-296,-292,-289,-286,-285,-284,-284,-285,-286,-286,-286,-287,-287,-287,-287,-287,-287,-287,-286,-286,-286,-285,-285,-285,-285,-284,-283,-283,-282,-281,-280,-278,-275,-271,-268,-264,-261,-257,-254,-251,-248,-245,-242,-239,-235,-232,-229,-227,-226,-225,-226,-227,-229,-232,-234,-237,-239,-241,-241,-241,-241,-240,-238,-237,-235,-235,-234,-235,-236,-238,-240,-242,-245,-247,-249,-251,-252,-252,-251,-250,-248,-247,-246,-246,-246,-247,-247,-247,-247,-247,-246,-245,-244,-243,-241,-239,-237,-235,-233,-232,-231,-231,-232,-233,-235,-238,-240,-243,-246,-248,-250,-250,-249,-248,-247,-246,-245,-245,-245,-246,-247,-248,-249,-250,-252,-253,-254,-255,-256,-257,-258,-259,-260,-261,-262,-262,-263,-264,-264,-264,-264,-263,-262,-260,-257,-254,-250,-246,-242,-237,-233,-230,-226,-223,-221,-219,-217,-215,-213,-210,-207,-203,-199,-195,-191,-188,-184,-181,-178,-176,-173,-172,-170,-168,-166,-164,-161,-159,-157,-154,-151,-148,-145,-143,-141,-139,-138,-136,-135,-132,-130,-127,-123,-119,-115,-111,-108,-104,-101,-99,-96,-94,-92,-90,-89,-88,-86,-85,-83,-82,-80,-78,-76,-75,-75,-75,-75,-76,-77,-79,-80,-82,-84,-86,-87,-88,-88,-89,-89,-89,-89,-89,-89,-88,-88,-89,-89,-90,-92,-93,-95,-97,-98,-100,-102,-105,-107,-108,-110,-112,-113,-115,-117,-118,-120,-121,-122,-123,-124,-124,-125,-125,-125,-125,-125,-125,-124,-124,-124,-124,-125,-125,-125,-125,-126,-126,-127,-127,-127,-128,-128,-128,-129,-130,-130,-131,-130,-129,-128,-125,-123,-119,-115,-112,-107,-103,-99,-94,-90,-86,-81,-77,-72,-67,-62,-57,-53,-49,-47,-45,-44,-43,-44,-44,-45,-44,-44,-42,-40,-38,-34,-30,-25,-20,-14,-8,-2,3,9,16,24,31,39,46,54,63,71,79,87,95,102,108,114,120,124,129,132,135,137,140,142,143,145,146,149,151,155,160,165,170,175,180,185,189,193,197,200,202,204,206,207,208,208,209,209,209,208,208,207,205,203,200,197,193,188,184,180,176,172,168,165,162,160,159,158,158,158,159,159,160,161,162,162,162,162,161,159,157,153,150,145,140,135,129,124,119,115,111,108,105,102,100,97,95,92,89,86,84,81,78,76,73,71,68,65,62,59,56,53,50,47,45,43,42,41,40,40,40,41,43,45,47,50,53,55,57,57,56,55,53,52,50,49,48,48,48,48,48,48,48,48,49,50,52,54,56,60,63,67,70,73,76,79,82,85,88,91,93,96,97,99,100,101,102,103,103,104,104,104,105,106,107,110,113,117,121,127,132,139,145,150,156,161,165,169,172,175,178,180,183,185,187,189,191,193,195,197,199,201,203,204,205,206,207,207,206,205,204,202,201,199,197,195,193,191,189,186,183,180,176,172,167,162,156,151,146,142,138,136,134,134,135,137,139,143,146,149,152,155,158,161,163,165,166,167,168,168,168,168,168,168,168,169,170,170,171,172,172,172,172,172,171,170,169,169,169,170,171,172,175,177,179,181,183,184,186,187,188,189,190,191,192,193,195,196,198,199,200,201,203,204,205,205,206,205,205,205,205,205,205,205,205,204,203,202,200,199,198,198,197,197,197,197,198,199,199,199,199,199,199,198,197,195,192,189,185,181,178,174,172,169,167,165,164,162,161,160,160,159,159,158,157,157,157,156,157,157,157,156,156,155,153,152,151,149,149,148,148,148,148,149,149,149,149,149,148,146,145,143,142,140,138,136,133,131,129,127,125,123,121,119,117,116,115,114,113,113,112,111,110,109,109,109,109,109,110,110,110,110,110,110,111,113,115,117,119,121,124,126,128,131,134,137,140,144,148,151,155,158,161,164,167,171,175,180,185,190,195,200,205,210,214,219,224,228,232,237,241,244,248,251,254,256,258,260,261,263,263,264,264,265,265,
11:32:12.885 -> [ 77043][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:12.885 -> [ 77049][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:12.885 -> [ 77058][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:12.917 -> 266,267,267,268,268,267,267,266,264,263,262,261,259,258,256,254,252,250,248,246,243,241,239,238,236,236,235,234,233,233,231,229,226,223,219,214,210,205,199,194,188,181,175,168,160,153,146,139,131,125,118,111,105,99,94,89,85,81,77,74,70,67,63,59,55,50,46,42,38,35,32,29,26,24,23,21,20,18,17,16,14,11,8,5,1,-1,-5,-8,-12,-14,-17,-19,-21,-23,-25,-26,-27,-28,-28,-28,-28,-28,-28,-28,-28,-28,-29,-30,-31,-32,-33,-33,-34,-34,-34,-33,-32,-31,-30,-28,-26,-24,-22,-20,-18,-17,-15,-13,-11,-9,-8,-6,-4,-2,-1,0,2,3,5,6,7,9,10,13,15,18,20,23,27,30,33,36,39,42,45,47,50,53,55,58,60,62,64,66,68,70,72,74,75,76,77,77,77,76,75,73,71,68,65,62,58,54,50,47,43,40,37,34,32,30,28,26,24,22,20,18,16,13,11,9,7,5,3,1,0,-3,-5,-9,-12,-16,-20,-25,-29,-33,-37,-41,-45,-50,-54,-58,-63,-68,-73,-78,-84,-89,-95,-102,-108,-115,-121,-128,-133,-138,-143,-147,-151,-154,-157,-159,-161,-163,-164,-165,-165,-166,-166,-165,-165,-164,-163,-162,-161,-161,-160,-159,-158,-158,-157,-156,-156,-155,-154,-153,-152,-151,-151,-150,-149,-148,-147,-147,-146,-146,-146,-146,-146,-146,-146,-146,-146,-146,-146,-146,-146,-146,-147,-147,-147,-147,-147,-146,-145,-144,-142,-141,-140,-138,-137,-137,-136,-136,-135,-134,-134,-133,-132,-132,-131,-131,-131,-132,-131,-131,-130,-130,-129,-128,-127,-126,-125,-124,-123,-122,-121,-120,-120,-119,-118,-116,-115,-113,-112,-112,-111,-111,-111,-111,-112,-113,-114,-116,-118,-120,-121,-123,-124,-126,-129,-131,-134,-137,-141,-143,-146,-149,-152,-155,-158,-160,-162,-163,-165,-166,-167,-167,-168,-169,-171,-172,-174,-176,-177,-179,-180,-181,-182,-182,-182,-182,-182,-182,-183,-183,-184,-185,-187,-189,-191,-194,-197,-200,-204,-208,-213,-217,-221,-225,-228,-230,-231,-232,-232,-232,-232,-231,-230,-230,-229,-229,-228,-227,-226,-225,-224,-223,-222,-221,-220,-219,-218,-216,-215,-213,-211,-209,-206,-204,-201,-197,-194,-190,-187,-184,-181,-179,-177,-176,-175,-175,-174,-174,-173,-171,-170,-168,-166,-164,-162,-161,-160,-160,-161,-162,-163,-165,-167,-169,-171,-173,-176,-178,-180,-183,-185,-186,-187,-188,-189,-188,-188,-187,-186,-185,-183,-181,-180,-179,-177,-176,-175,-174,-172,-171,-170,-169,-169,-169,-169,-169,-170,-171,-172,-174,-175,-177,-179,-181,-183,-185,-186,-187,-188,-189,-188,-187,-186,-184,-182,-181,-180,-179,-178,-178,-177,-176,-176,-176,-176,-176,-176,-177,-177,-178,-178,-177,-177,-176,-174,-173,-171,-169,-166,-163,-160,-157,-153,-148,-144,-139,-133,-128,-124,-120,-116,-113,-111,-108,-107,-105,-105,-104,-103,-101,-100,-98,-95,-93,-92,-90,-89,-89,-88,-87,-86,-85,-84,-82,-80,-78,-76,-73,-71,-69,-68,-67,-67,-67,-68,-69,-71,-72,-73,-75,-76,-77,-77,-78,-79,-80,-80,-80,-81,-81,-81,-81,-81,-81,-81,-82,-82,-83,-84,-86,-87,-88,-89,-89,-90,-91,-92,-94,-96,-99,-101,-104,-107,-110,-114,-117,-121,-126,-130,-135,-140,-145,-150,-155,-160,-165,-170,-174,-178,-182,-186,-189,-193,-197,-201,-205,-209,-213,-217,-221,-225,-229,-233,-238,-242,-246,-249,-252,-255,-257,-258,-259,-260,-260,-259,-258,-257,-256,-255,-254,-252,-250,-248,-246,-244,-243,-241,-240,-239,-238,-237,-236,-234,-233,-231,-230,-228,-226,-224,-222,-220,-218,-216,-214,-212,-211,-210,-209,-208,-207,-207,-208,-208,-209,-211,-212,-214,-216,-218,-220,-221,-222,-222,-222,-220,-218,-216,-213,-209,-206,-202,-198,-195,-191,-188,-184,-181,-178,-175,-171,-167,-163,-159,-156,-152,-148,-144,-140,-136,-132,-128,-123,-119,-114,-109,-104,-99,-95,-90,-86,-82,-79,-75,-72,-68,-65,-62,-59,-56,-53,-51,-48,-46,-44,-42,-39,-37,-34,-31,-28,-25,-23,-20,-18,-16,-14,-12,-10,-8,-7,-6,-4,-4,-3,-3,-3,-3,-4,-4,-4,-4,-4,-4,-4,-4,-4,-5,-5,-6,-7,-8,-9,-9,-10,-10,-11,-11,-12,-13,-14,-15,-16,-18,-19,-21,-22,-24,-25,-26,-26,-26,-26,-26,-27,-27,-27,-28,-29,-29,-30,-30,-31,-31,-31,-31,-31,-30,-29,-29,-28,-27,-26,-25,-25,-24,-24,-23,-23,-22,-21,-19,-17,-15,-12,-9,-6,-3,0,2,4,6,8,10,11,12,12,12,11,10,8,7,5,5,4,4,5,6,7,8,9,10,12,14,15,17,19,21,23,25,28,30,33,36,39,42,44,47,50,54,58,62,66,70,74,78,83,87,92,96,99,102,105,107,109,111,113,115,118,122,126,130,134,139,142,145,147,149,150,151,151,150,150,149,148,147,145,143,142,140,138,137,136,135,135,135,136,137,138,139,141,142,143,144,145,146,147,148,149,150,150,151,151,151,151,150,149,149,147,146,144,142,141,139,137,136,134,133,133,133,134,135,137,138,140,141,142,144,145,146,146,147,148,148,147,147,147,146,146,146,145,145,145,146,147,147,149,150,152,154,156,159,163,167,171,176,180,184,188,192,195,198,201,203,204,205,206,207,208,210,212,
11:32:13.269 -> [ 77452][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:13.301 -> [ 77452][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:13.301 -> [ 77458][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:13.301 -> 214,216,217,218,219,220,220,220,220,221,221,222,223,225,226,228,229,230,231,231,231,230,228,226,224,221,218,216,214,212,210,208,206,205,203,201,200,199,198,198,197,196,196,195,194,193,191,190,189,188,187,186,186,185,185,184,183,182,181,180,178,177,176,175,173,171,169,167,165,162,159,157,155,152,150,148,146,144,142,140,138,136,134,132,129,126,123,120,118,115,113,110,108,107,105,104,104,104,105,106,108,110,113,116,120,123,128,132,137,143,148,154,160,165,170,175,180,184,189,193,198,203,208,212,218,223,228,233,238,243,248,253,257,260,263,266,268,270,271,272,272,273,272,271,269,267,265,262,260,257,256,254,254,254,255,256,257,259,260,261,262,262,262,262,261,259,258,257,256,255,254,253,252,251,250,248,247,246,245,244,244,244,244,245,245,246,246,247,247,248,248,248,247,246,245,243,241,239,236,233,230,225,221,217,212,208,204,200,196,191,186,181,176,171,166,162,157,152,147,142,136,131,125,119,112,105,99,92,86,80,75,70,66,62,58,55,52,49,47,46,44,43,41,40,39,37,36,34,32,30,29,27,25,24,23,22,21,20,19,19,18,18,18,19,20,21,22,23,25,26,28,30,32,35,38,41,44,48,52,55,60,64,68,71,75,78,81,84,86,89,92,95,98,101,103,106,109,112,115,118,121,124,126,129,130,132,133,134,135,136,137,137,137,137,136,135,134,132,129,126,123,120,116,113,111,109,107,106,105,105,105,106,107,109,111,113,115,117,118,119,119,119,119,118,117,116,114,112,110,108,106,104,102,101,99,98,97,96,95,94,92,90,87,83,79,74,70,65,60,56,51,45,40,34,28,22,16,9,3,-2,-8,-13,-19,-23,-28,-31,-35,-37,-40,-42,-43,-45,-47,-49,-51,-52,-53,-55,-56,-58,-60,-63,-65,-67,-69,-70,-70,-70,-69,-68,-66,-63,-61,-58,-55,-53,-52,-51,-50,-49,-48,-47,-46,-46,-45,-44,-43,-42,-41,-41,-40,-40,-40,-40,-40,-41,-41,-40,-40,-39,-38,-37,-35,-33,-31,-28,-26,-23,-20,-17,-14,-10,-6,-2,2,7,12,17,23,28,33,37,41,44,47,49,51,52,54,55,56,57,58,59,61,63,65,68,70,73,75,77,78,79,79,79,78,77,75,73,71,69,66,63,60,57,54,51,48,45,41,38,35,33,30,27,24,22,19,16,12,9,5,1,-2,-7,-12,-17,-23,-28,-33,-39,-44,-48,-52,-56,-60,-64,-67,-71,-74,-78,-81,-84,-87,-89,-92,-94,-96,-98,-101,-104,-107,-110,-114,-118,-122,-126,-129,-133,-136,-140,-143,-147,-151,-156,-160,-164,-168,-173,-177,-181,-184,-187,-190,-192,-193,-194,-194,-193,-191,-188,-185,-182,-178,-175,-172,-169,-166,-162,-160,-157,-154,-152,-149,-146,-143,-140,-138,-135,-132,-129,-127,-124,-121,-119,-116,-113,-110,-107,-105,-103,-102,-102,-102,-103,-104,-105,-106,-108,-110,-113,-115,-118,-121,-123,-125,-127,-129,-131,-133,-135,-137,-139,-141,-142,-143,-144,-145,-146,-146,-147,-147,-147,-148,-148,-149,-149,-150,-150,-150,-150,-150,-150,-150,-150,-150,-150,-149,-148,-147,-146,-144,-142,-140,-137,-135,-132,-130,-127,-125,-123,-120,-118,-116,-115,-113,-113,-112,-112,-112,-113,-115,-116,-117,-119,-120,-120,-121,-121,-122,-122,-121,-120,-119,-118,-116,-113,-111,-108,-104,-101,-98,-94,-90,-86,-82,-78,-74,-69,-64,-59,-54,-48,-42,-36,-29,-23,-17,-11,-5,0,6,12,17,22,26,30,33,36,38,39,40,41,41,41,41,40,40,39,39,38,37,37,37,37,38,39,40,42,43,44,45,45,46,46,46,46,46,46,45,45,44,43,42,41,40,39,39,38,38,38,38,38,38,38,38,38,38,38,39,39,38,38,38,37,35,33,31,28,24,20,15,10,5,0,-5,-11,-17,-23,-29,-34,-39,-44,-48,-52,-56,-60,-64,-68,-71,-74,-76,-78,-80,-81,-82,-82,-82,-82,-81,-80,-79,-78,-77,-76,-75,-74,-74,-74,-75,-76,-77,-78,-80,-81,-83,-85,-87,-89,-91,-93,-95,-96,-98,-100,-102,-104,-106,-108,-110,-112,-114,-116,-118,-120,-122,-125,-126,-128,-129,-130,-131,-132,-132,-132,-132,-132,-132,-132,-132,-132,-133,-132,-131,-130,-129,-128,-127,-126,-126,-125,-125,-124,-124,-124,-123,-123,-123,-122,-122,-122,-122,-121,-120,-119,-118,-116,-114,-112,-110,-107,-105,-102,-100,-97,-95,-93,-90,-87,-85,-82,-80,-79,-77,-76,-75,-74,-74,-73,-74,-74,-75,-75,-75,-75,-75,-75,-75,-75,-75,-75,-74,-74,-74,-74,-74,-74,-75,-75,-76,-76,-75,-75,-74,-73,-73,-72,-71,-71,-70,-69,-68,-67,-66,-65,-63,-61,-60,-59,-58,-57,-57,-58,-59,-60,-62,-63,-65,-67,-69,-71,-73,-75,-77,-79,-80,-82,-83,-85,-86,-88,-89,-90,-92,-93,-95,-97,-99,-101,-102,-104,-105,-106,-108,-109,-109,-110,-110,-110,-110,-110,-110,-109,-109,-107,-106,-105,-104,-103,-103,-102,-102,-102,-101,-100,-99,-98,-97,-95,-94,-93,-92,-91,-90,-88,-87,-85,-83,-82,-80,-79,-78,-77,
11:32:13.653 -> [ 77828][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:13.685 -> [ 77830][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:13.685 -> [ 77838][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:13.685 -> -77,-77,-77,-77,-78,-78,-79,-79,-79,-79,-78,-77,-77,-76,-74,-73,-71,-70,-68,-66,-64,-62,-60,-59,-57,-56,-55,-54,-53,-53,-52,-52,-52,-52,-52,-52,-52,-52,-52,-52,-51,-50,-49,-47,-46,-44,-42,-41,-39,-37,-35,-34,-33,-33,-33,-34,-35,-36,-38,-40,-42,-45,-48,-51,-54,-57,-60,-63,-65,-68,-70,-73,-75,-77,-79,-80,-82,-84,-85,-86,-87,-88,-89,-89,-90,-91,-92,-92,-92,-92,-92,-91,-90,-89,-89,-88,-86,-85,-84,-83,-82,-82,-81,-82,-82,-83,-84,-85,-86,-88,-89,-91,-92,-93,-93,-94,-95,-95,-96,-96,-97,-97,-96,-96,-96,-95,-95,-95,-95,-95,-95,-95,-95,-95,-95,-94,-93,-92,-90,-89,-86,-84,-81,-78,-76,-73,-71,-68,-66,-64,-63,-62,-61,-60,-59,-58,-57,-56,-54,-52,-50,-48,-46,-43,-41,-39,-37,-36,-34,-33,-31,-30,-29,-28,-27,-27,-27,-27,-28,-29,-31,-33,-36,-39,-43,-46,-49,-51,-54,-55,-56,-57,-57,-58,-58,-58,-59,-59,-61,-62,-64,-66,-67,-69,-70,-72,-73,-75,-76,-77,-78,-79,-80,-81,-82,-83,-84,-84,-85,-85,-85,-86,-86,-86,-86,-87,-87,-88,-89,-89,-91,-92,-93,-94,-96,-97,-98,-98,-99,-100,-101,-103,-104,-106,-107,-109,-112,-114,-116,-117,-118,-119,-118,-117,-115,-112,-108,-104,-99,-94,-88,-83,-76,-70,-64,-58,-53,-47,-42,-36,-31,-27,-22,-17,-13,-9,-5,-2,0,3,6,9,12,15,18,21,24,27,30,33,35,37,39,40,40,40,40,40,40,40,40,39,39,39,40,40,41,42,43,44,46,47,49,50,52,53,54,55,55,55,54,53,52,49,45,42,38,33,29,24,20,16,11,7,4,1,-1,-3,-6,-7,-9,-11,-13,-14,-16,-17,-18,-19,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-35,-36,-38,-39,-41,-43,-44,-46,-47,-48,-49,-50,-51,-52,-53,-53,-54,-56,-57,-58,-59,-60,-61,-62,-62,-62,-62,-62,-62,-62,-61,-60,-60,-59,-58,-57,-55,-54,-52,-50,-48,-46,-44,-42,-40,-38,-36,-34,-32,-31,-29,-27,-24,-22,-19,-16,-12,-8,-4,0,3,8,12,17,22,26,31,36,41,46,51,56,61,66,71,75,80,84,88,93,97,101,104,108,112,116,119,123,127,130,133,137,140,143,146,149,152,155,158,161,163,165,166,167,169,170,171,172,172,173,174,175,176,176,177,178,178,178,179,179,179,179,179,178,178,177,176,175,174,173,172,171,170,169,169,169,169,169,169,170,169,169,169,168,168,167,166,164,163,161,159,156,154,151,149,146,142,139,136,132,129,126,123,121,118,116,113,111,108,105,102,100,97,94,90,87,83,79,75,71,66,62,58,53,49,44,40,35,31,27,23,20,16,13,11,9,7,5,4,2,2,1,1,1,1,1,1,1,1,1,1,0,0,0,-1,-1,-1,-1,-1,-1,-1,-1,0,0,0,0,1,3,4,6,8,9,12,14,16,19,21,24,26,28,30,32,33,35,36,37,39,40,41,42,43,44,45,46,48,49,50,51,52,54,54,55,56,56,57,57,57,57,57,57,57,56,56,55,54,52,51,49,48,46,44,43,41,40,39,38,37,37,36,36,36,35,35,34,33,31,29,27,25,23,20,18,15,12,10,8,5,2,0,-2,-4,-7,-10,-12,-15,-18,-21,-24,-26,-29,-31,-33,-34,-35,-36,-36,-37,-37,-37,-37,-37,-36,-36,-36,-36,-36,-36,-36,-36,-35,-35,-35,-34,-34,-33,-33,-33,-33,-33,-33,-33,-33,-33,-33,-32,-32,-32,-32,-32,-32,-32,-32,-33,-33,-33,-34,-34,-33,-33,-32,-31,-29,-27,-25,-22,-19,-15,-11,-7,-2,1,5,9,14,17,21,25,28,31,34,36,38,40,42,44,45,46,47,48,49,50,52,53,54,56,57,59,60,61,62,62,62,61,61,60,58,57,55,53,51,48,46,43,41,38,36,33,31,29,26,25,23,22,22,21,21,22,22,23,24,25,26,27,28,29,30,31,31,32,33,34,35,35,36,37,37,38,39,39,40,40,41,41,42,42,42,42,42,43,43,43,43,42,42,41,40,39,37,36,35,33,32,32,32,32,32,33,34,35,37,39,41,43,46,49,52,55,58,62,66,70,74,78,82,86,90,93,97,100,103,106,109,111,113,116,118,120,122,125,127,130,133,137,141,145,149,153,158,163,167,171,175,179,182,185,187,189,191,192,192,192,192,192,192,191,191,190,190,189,189,189,189,189,189,188,188,188,188,188,187,187,186,184,183,181,178,175,172,169,165,161,157,153,148,144,140,136,132,128,124,121,117,114,111,109,106,103,100,97,94,91,88,85,81,78,74,70,67,63,58,54,49,45,40,36,32,28,24,21,18,16,14,13,12,11,10,10,9,9,9,8,7,7,6,5,4,4,3,3,3,3,3,4,4,5,5,6,7,8,10,11,12,14,15,16,17,17,17,17,17,17,16,16,15,15,14,14,14,15,15,16,18,20,
11:32:14.005 -> [ 78166][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:14.005 -> [ 78168][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:14.005 -> [ 78177][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:14.037 -> 22,25,28,32,35,39,44,48,53,57,62,67,72,77,82,86,91,96,101,105,110,115,119,124,128,133,138,142,147,151,155,159,162,165,168,170,172,173,174,174,173,173,171,170,168,166,164,161,158,155,151,147,144,140,136,132,129,126,122,120,117,114,112,109,107,105,104,102,100,99,98,96,95,94,92,91,90,88,87,86,85,84,82,81,80,79,77,76,74,72,70,68,65,63,61,58,56,53,50,47,45,42,39,37,34,31,28,25,22,19,16,13,10,7,4,2,0,-2,-4,-6,-8,-10,-11,-12,-12,-12,-11,-11,-9,-7,-5,-3,0,2,5,8,11,14,17,20,22,25,27,29,31,33,34,34,35,35,35,35,35,34,34,34,33,33,33,33,34,34,34,35,35,35,36,36,35,35,35,34,33,33,32,32,32,33,34,35,37,39,41,44,47,50,53,55,58,60,62,63,65,65,66,66,65,65,64,63,63,62,61,60,59,59,58,57,57,56,56,55,55,54,54,53,52,51,50,48,45,42,38,34,30,25,20,15,9,4,0,-5,-10,-14,-19,-22,-26,-28,-30,-32,-33,-34,-34,-34,-34,-33,-33,-33,-33,-33,-33,-33,-33,-34,-34,-35,-36,-37,-38,-39,-39,-40,-41,-41,-42,-42,-42,-42,-42,-42,-42,-42,-43,-43,-43,-44,-44,-45,-46,-46,-47,-49,-50,-51,-53,-54,-56,-58,-59,-61,-62,-64,-65,-66,-66,-66,-66,-65,-64,-63,-62,-60,-59,-57,-55,-52,-49,-47,-44,-41,-38,-35,-32,-29,-25,-22,-19,-16,-13,-11,-8,-7,-5,-4,-3,-3,-3,-3,-4,-5,-6,-8,-9,-11,-13,-15,-17,-19,-22,-24,-26,-28,-30,-31,-33,-34,-35,-36,-37,-38,-38,-39,-39,-39,-40,-40,-40,-40,-41,-42,-42,-43,-44,-45,-46,-47,-47,-48,-49,-50,-51,-52,-54,-55,-57,-58,-60,-61,-63,-64,-66,-66,-67,-67,-68,-68,-68,-68,-67,-67,-67,-67,-67,-67,-67,-66,-66,-65,-64,-63,-62,-60,-59,-57,-56,-54,-52,-51,-49,-46,-44,-41,-37,-34,-30,-26,-21,-17,-12,-8,-3,0,3,7,10,13,15,17,20,22,24,26,29,31,34,36,39,41,43,45,47,49,50,51,52,52,52,51,49,47,44,40,36,31,26,21,15,9,3,-2,-8,-14,-19,-25,-30,-35,-40,-44,-49,-53,-57,-60,-64,-67,-70,-73,-76,-79,-81,-83,-86,-88,-90,-93,-95,-98,-101,-104,-107,-111,-114,-118,-121,-125,-129,-133,-137,-141,-145,-149,-153,-157,-161,-164,-168,-170,-173,-176,-178,-179,-181,-182,-184,-185,-186,-188,-190,-191,-193,-195,-196,-198,-199,-200,-201,-202,-202,-202,-202,-202,-201,-200,-200,-199,-198,-197,-196,-195,-194,-193,-191,-190,-189,-188,-186,-186,-185,-184,-183,-182,-180,-179,-178,-176,-174,-172,-170,-167,-164,-162,-159,-156,-153,-150,-147,-144,-142,-139,-136,-134,-131,-128,-126,-123,-121,-118,-115,-112,-109,-106,-103,-99,-96,-92,-88,-85,-81,-77,-73,-69,-66,-62,-59,-56,-52,-49,-45,-41,-38,-34,-31,-27,-23,-20,-17,-14,-11,-8,-6,-4,-3,-1,0,0,0,1,2,2,3,3,4,5,5,6,6,7,8,8,9,10,11,13,14,14,15,15,15,15,14,14,13,13,13,13,14,15,16,17,19,22,24,27,29,31,32,33,34,34,33,33,31,29,27,25,23,20,18,16,14,12,10,8,7,5,4,3,1,0,0,-1,-2,-3,-5,-6,-8,-10,-12,-14,-17,-20,-23,-26,-30,-33,-37,-41,-44,-47,-50,-53,-55,-56,-57,-58,-58,-58,-58,-58,-57,-57,-56,-56,-55,-54,-52,-50,-48,-45,-43,-40,-37,-34,-31,-28,-26,-24,-21,-19,-18,-16,-14,-13,-11,-10,-8,-6,-5,-4,-3,-2,-1,0,0,0,0,-1,-2,-3,-5,-7,-10,-13,-15,-19,-22,-25,-27,-30,-33,-36,-38,-40,-42,-44,-45,-46,-47,-47,-47,-47,-47,-46,-45,-45,-45,-44,-44,-44,-45,-46,-47,-49,-51,-53,-55,-57,-59,-61,-63,-64,-65,-66,-67,-68,-69,-70,-71,-72,-73,-74,-76,-78,-80,-83,-86,-90,-94,-98,-102,-106,-111,-115,-119,-123,-127,-131,-134,-137,-140,-142,-144,-145,-146,-147,-148,-149,-149,-149,-149,-149,-149,-150,-150,-150,-150,-150,-150,-151,-151,-151,-151,-151,-151,-151,-150,-150,-150,-149,-149,-148,-147,-146,-144,-143,-141,-139,-137,-135,-132,-129,-127,-124,-120,-117,-114,-110,-106,-103,-99,-95,-90,-86,-81,-76,-71,-66,-60,-54,-49,-43,-37,-32,-27,-22,-17,-13,-9,-6,-3,0,2,5,7,10,12,14,17,20,22,25,28,31,34,38,41,44,47,50,53,56,58,60,62,63,64,65,64,64,62,61,58,56,53,50,46,43,40,37,34,31,28,26,24,23,22,22,22,23,24,25,27,28,30,32,33,35,36,37,38,38,39,38,38,37,36,35,33,32,30,29,28,26,25,25,24,24,24,25,26,27,28,30,32,34,37,39,41,43,45,47,49,50,52,53,54,55,56,56,57,58,60,61,62,64,66,67,69,71,73,75,77,79,81,83,84,86,88,90,92,94,95,97,99,100,102,103,105,106,108,109,111,112,113,115,
11:32:14.357 -> [ 78516][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:14.357 -> [ 78519][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:14.357 -> [ 78527][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:14.389 -> 116,117,118,119,120,121,121,121,122,122,122,123,123,124,124,125,126,127,128,129,129,130,130,130,130,130,129,129,127,126,125,123,121,120,118,115,113,110,108,105,103,100,97,94,91,88,85,82,79,76,73,70,67,64,61,58,55,52,49,46,43,40,37,34,30,27,24,20,16,12,7,3,-1,-6,-11,-16,-21,-26,-32,-36,-41,-46,-50,-53,-57,-60,-63,-65,-67,-69,-70,-72,-73,-75,-76,-78,-79,-81,-83,-85,-88,-90,-92,-94,-96,-99,-101,-103,-105,-107,-108,-110,-112,-113,-114,-115,-116,-116,-117,-117,-117,-116,-116,-115,-115,-114,-113,-113,-112,-112,-111,-111,-110,-110,-109,-109,-108,-107,-105,-103,-101,-99,-96,-94,-91,-88,-85,-82,-79,-75,-72,-69,-66,-62,-59,-56,-53,-50,-47,-44,-42,-39,-36,-33,-31,-28,-25,-22,-19,-15,-12,-8,-4,0,3,7,10,14,18,21,23,26,28,29,29,30,29,29,28,27,25,24,22,20,18,16,14,13,11,9,7,5,3,2,0,-1,-3,-4,-6,-8,-9,-11,-12,-14,-15,-16,-17,-17,-18,-18,-19,-19,-20,-21,-22,-23,-24,-26,-27,-29,-31,-33,-35,-37,-39,-41,-43,-45,-47,-49,-50,-52,-53,-53,-54,-54,-53,-53,-52,-51,-50,-49,-47,-45,-43,-42,-40,-38,-36,-35,-34,-33,-32,-31,-31,-30,-30,-29,-29,-28,-27,-26,-24,-23,-21,-20,-19,-17,-16,-15,-14,-13,-13,-12,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-1,0,0,2,3,4,6,7,8,10,11,12,13,15,16,17,19,20,22,24,25,27,29,32,33,35,37,39,40,41,43,43,44,44,44,44,44,43,43,42,42,42,41,41,42,42,43,43,44,46,47,48,50,51,53,54,55,56,56,56,56,55,53,51,48,46,43,40,36,33,31,28,26,24,23,22,22,21,22,22,22,23,24,25,25,26,26,27,27,26,26,25,25,24,24,23,22,22,21,20,20,19,18,16,15,14,12,11,9,7,6,4,2,0,0,-2,-3,-5,-6,-7,-7,-8,-9,-9,-8,-8,-8,-7,-6,-5,-4,-2,0,0,2,4,6,8,10,11,13,14,15,15,15,14,13,11,9,7,3,0,-4,-9,-13,-18,-23,-28,-33,-37,-42,-46,-49,-53,-56,-58,-60,-62,-64,-65,-65,-66,-66,-66,-66,-66,-65,-64,-64,-63,-61,-60,-59,-58,-57,-57,-57,-57,-57,-58,-59,-61,-62,-64,-66,-68,-70,-73,-75,-78,-80,-82,-83,-84,-85,-86,-86,-86,-85,-85,-84,-83,-82,-80,-79,-77,-75,-74,-73,-71,-70,-69,-68,-68,-67,-67,-66,-66,-65,-65,-64,-63,-62,-61,-59,-58,-56,-53,-51,-48,-46,-43,-39,-36,-33,-29,-26,-22,-17,-13,-8,-4,0,6,11,16,22,28,33,39,44,49,55,60,66,72,77,83,89,95,101,106,111,116,120,124,128,131,133,136,138,139,140,141,142,143,143,143,143,143,143,143,143,143,143,143,143,144,144,145,145,146,147,148,150,151,152,153,155,155,156,157,157,157,157,157,156,155,153,152,150,148,146,144,142,141,139,138,137,136,135,134,134,133,132,132,131,130,129,128,127,126,124,122,120,117,114,111,108,104,100,95,90,85,80,74,69,63,57,52,46,41,35,30,25,21,16,12,8,4,0,-2,-6,-9,-12,-14,-17,-19,-21,-23,-25,-27,-28,-30,-31,-33,-34,-35,-36,-36,-37,-37,-36,-36,-35,-34,-34,-33,-32,-31,-31,-30,-30,-29,-29,-28,-27,-27,-26,-25,-24,-23,-22,-20,-18,-16,-13,-10,-7,-4,0,3,7,10,15,19,23,27,31,35,39,43,47,52,56,61,66,71,76,81,86,90,95,99,102,106,109,111,114,115,116,116,116,115,114,112,110,108,105,102,98,95,92,90,87,85,84,83,82,83,83,84,86,87,89,91,93,95,98,99,101,103,104,105,106,106,106,106,105,104,102,100,97,94,91,88,84,81,78,74,71,68,66,63,60,58,56,53,51,49,46,44,42,40,37,34,32,29,26,23,20,17,14,11,8,4,1,-2,-6,-10,-14,-18,-23,-27,-31,-35,-39,-42,-45,-47,-49,-51,-52,-53,-54,-54,-54,-53,-53,-52,-51,-49,-47,-45,-43,-41,-39,-36,-34,-32,-29,-26,-24,-21,-19,-16,-13,-11,-8,-5,-2,0,2,4,6,8,10,12,13,15,16,17,18,19,21,22,23,24,25,26,27,28,30,31,33,35,37,39,42,44,47,50,53,56,59,62,64,67,69,72,73,75,76,77,77,77,77,76,76,75,75,74,74,73,72,71,70,69,67,65,63,61,58,55,52,48,44,40,35,31,26,22,17,13,8,3,0,-5,-9,-14,-18,-22,-26,-30,-33,-36,-39,-42,-44,-46,-48,-50,-52,-54,-56,-58,-61,-63,-65,-68,-70,-72,-75,-77,-80,-83,-86,-89,-92,-95,-98,-100,-103,-106,-108,-110,-112,-114,-115,-116,-116,-115,-115,-114,-112,-110,-108,-106,-103,-100,-97,-94,-91,-87,-83,-80,-76,-72,-68,-65,-62,-59,-56,-53,-50,-48,-45,-43,-40,-37,-34,-30,-27,-23,-19,-15,-11,-6,-2,2,
11:32:14.677 -> [ 78855][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096
11:32:14.709 -> [ 78861][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 4096
11:32:14.709 -> [ 78869][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:32:14.709 -> 6,10,14,18,21,25,28,31,34,36,39,40,42,43,43,43,42,41,40,38,35,33,30,28,25,22,20,17,15,14,13,12,12,12,13,14,16,17,19,21,23,25,26,28,28,29,28,27,26,24,21,19,16,13,10,7,4,2,0,-1,-3,-4,-4,-4,-3,-2,-1,0,2,5,7,10,12,14,16,18,19,20,20,20,20,20,19,19,18,17,16,16,15,14,14,14,14,14,15,16,18,20,22,24,27,29,32,34,37,39,41,43,44,46,47,48,50,51,52,53,54,56,57,59,61,63,65,68,71,73,76,79,82,85,88,90,93,95,98,100,102,104,106,108,110,112,114,115,117,118,120,121,122,123,124,125,126,126,127,127,128,128,128,128,128,127,127,126,125,124,123,122,121,120,119,118,117,117,116,115,114,113,112,110,108,106,104,101,98,95,92,88,84,79,74,69,65,60,55,52,49,46,44,43,42,41,41,40,40,39,38,37,36,35,33,31,29,26,24,21,18,15,12,10,7,4,2,0,-2,-4,-6,-7,-9,-11,-13,-15,-18,-20,-24,-27,-31,-34,-38,-43,-47,-51,-55,-59,-63,-67,-71,-74,-77,-80,-82,-85,-87,-88,-90,-91,-91,-92,-92,-91,-91,-91,-90,-89,-88,-87,-86,-85,-83,-82,-80,-79,-78,-76,-75,-74,-73,-71,-70,-69,-67,-65,-63,-61,-58,-55,-52,-48,-43,-39,-34,-29,-23,-18,-12,-6,0,5,11,17,23,29,35,40,45,49,53,57,60,63,65,67,69,71,72,73,75,75,76,77,78,79,79,80,81,82,82,83,84,84,85,85,85,85,85,84,84,82,81,79,77,75,73,70,68,65,62,59,56,53,50,47,44,41,37,34,31,28,25,21,18,14,11,7,3,0,-5,-9,-14,-20,-25,-30,-36,-41,-47,-52,-58,-64,-70,-76,-82,-88,-94,-99,-105,-110,-116,-120,-125,-129,-133,-136,-139,-141,-143,-144,-146,-147,-147,-148,-148,-148,-149,-149,-149,-148,-148,-148,-148,-148,-149,-149,-149,-150,-150,-151,-151,-151,-151,-151,-151,-151,-150,-149,-148,-146,-144,-142,-139,-136,-132,-129,-125,-121,-117,-113,-110,-107,-104,-101,-99,-96,-95,-93,-92,-91,-90,-90,-89,-89,-88,-87,-86,-86,-84,-83,-82,-80,-78,-76,-74,-71,-69,-67,-64,-62,-59,-57,-55,-53,-51,-50,-49,-48,-47,-46,-46,-47,-47,-48,-48,-49,-50,-52,-53,-54,-55,-56,-57,-58,-59,-60,-61,-62,-63,-64,-65,-66,-66,-67,-67,-68,-68,-69,-69,-69,-69,-70,-70,-71,-72,-73,-74,-75,-76,-77,-78,-79,-79,-79,-78,-77,-76,-74,-72,-70,-67,-64,-61,-59,-56,-53,-51,-48,-46,-45,-44,-43,-43,-43,-43,-44,-44,-45,-45,-46,-46,-46,-46,-46,-45,-44,-43,-42,-40,-38,-36,-34,-32,-30,-28,-26,-24,-22,-21,-20,-19,-18,-17,-17,-16,-15,-15,-14,-14,-13,-13,-12,-12,-11,-10,-9,-8,-6,-5,-3,-1,0,3,6,9,12,15,18,21,24,27,29,31,32,32,33,33,33,33,32,31,31,30,29,28,28,27,27,27,27,27,27,27,28,28,28,28,28,28,27,26,25,24,22,19,16,14,10,7,4,0,-2,-5,-9,-12,-15,-18,-20,-23,-25,-27,-28,-30,-31,-32,-32,-33,-34,-35,-35,-35,-36,-36,-37,-37,-38,-38,-39,-39,-40,-41,-42,-42,-43,-45,-46,-47,-48,-49,-49,-50,-50,-50,-50,-49,-48,-47,-46,-45,-43,-41,-39,-37,-35,-33,-31,-29,-28,-27,-26,-25,-24,-24,-24,-25,-25,-26,-27,-28,-29,-29,-29,-29,-28,-27,-26,-24,-22,-19,-16,-14,-11,-8,-5,-2,0,2,5,7,10,13,16,19,22,25,28,30,33,36,38,40,43,45,47,49,50,52,53,54,55,55,56,56,56,55,55,55,54,54,54,54,54,54,55,55,56,56,57,57,57,57,57,57,56,56,55,54,54,52,51,50,49,48,47,45,44,43,42,41,40,39,38,37,36,35,34,33,32,30,29,27,25,23,21,18,16,14,11,9,6,3,1,-1,-3,-5,-7,-9,-11,-13,-15,-16,-18,-20,-22,-23,-25,-26,-28,-29,-31,-32,-34,-35,-36,-37,-38,-39,-39,-40,-40,-40,-40,-41,-40,-41,-41,-40,-40,-40,-40,-40,-39,-39,-38,-38,-37,-36,-34,-32,-30,-28,-26,-23,-20,-17,-14,-11,-8,-4,0,3,6,10,14,17,21,24,28,31,34,37,40,43,46,49,51,54,56,59,61,63,65,67,69,71,73,75,77,79,81,82,84,86,88,89,91,92,94,95,96,97,98,99,100,100,100,100,100,99,99,98,97,96,95,94,93,92,91,89,88,87,86,84,83,82,80,79,78,76,75,73,72,70,68,66,64,62,60,58,56,54,52,49,47,45,42,40,37,35,32,30,27,24,22,19,16,13,10,8,5,2,0,-2,-5,-8,-10,-13,-15,-17,-19,-21,-23,-25,-26,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-38,-39,-39,-40,-40,-40,-41,-41,-41,-41,-41,-41,-41,-41,-42,-42,-42,-42,-42,-42,-42,-41,-41,-41,-40,-40,-39,-38,-37,-36,-35,-34,-33,
11:32:15.029 -> [ 79196][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 4096

On Android:

11:33:43.060 -> ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,0,0,0,0,1,2,0,-1,0,1,-1,-3,-2,4,1,1,4,-4,0,-2,1,0,-1,0,0,-2,4,-2,9,-10,5,-9,13,-10,6,-4,-458,-526,-482,-517,-487,-520,-493,-522,-501,-524,-499,-509,-507,-513,-511,-515,-528,-523,-540,-539,-544,-544,-547,-544,-546,-545,-551,-550,-556,-556,-563,-568,-569,-570,-570,-567,-565,-562,-562,-562,-563,-564,-566,-567,-569,-572,-575,-580,-586,-591,-597,-602,-607,-612,-616,-620,-623,-626,-627,-628,-627,-626,-624,-621,-618,-616,-614,-612,-611,-608,-605,-601,-596,-590,-583,-575,-567,-558,-551,-544,-540,-537,-536,-536,-537,-537,-538,-538,-538,-538,-537,-537,-536,-535,-534,-533,-532,-531,-530,-529,-527,-526,-525,-523,-522,-521,-519,-516,-512,-507,-501,-494,-487,-481,-474,-468,-463,-458,-454,-450,-446,-442,-438,-434,-431,-429,-429,-430,-433,-437,-442,-448,-454,-459,-463,-465,-466,-466,-464,-462,-460,-457,-456,-455,-456,-458,-460,-463,-467,-470,-474,-477,-480,-481,-480,-479,-476,-473,-470,-467,-466,-465,-464,-464,-463,-461,-460,-458,-457,-455,-453,-449,-445,-441,-437,-433,-431,-430,-430,-431,-433,-435,-439,-444,-449,-454,-457,-459,-459,-457,-453,-450,-447,-444,-442,-441,-442,-443,-445,-447,-450,-452,-454,-456,-458,-461,-463,-465,-467,-469,-471,-472,-474,-475,-476,-476,-476,-474,-472,-468,-463,-457,-450,-442,-434,-426,-418,-410,-403,-396,-390,-385,-380,-377,-373,-369,-364,-357,-350,-342,-334,-327,-320,-314,-309,-304,-300,-297,-293,-290,-286,-282,-279,-275,-270,-266,-261,-256,-251,-247,-243,-240,-238,-236,-234,-232,-228,-224,-218,-212,-205,-197,-190,-183,-176,-170,-164,-159,-155,-151,-147,-144,-141,-137,-134,-130,-126,-121,-117,-113,-110,-109,-108,-108,-109,-111,-113,-116,-119,-121,-123,-125,-125,-126,-126,-126,-125,-125,-124,-124,-124,-124,-125,-127,-130,-132,-136,-139,-143,-146,-150,-153,-156,-159,-162,-165,-167,-170,-172,-174,-177,-179,-181,-182,-184,-185,-186,-186,-186,-186,-186,-185,-184,-183,-183,-183,-183,-183,-184,-185,-186,-187,-188,-190,-191,-192,-193,-194,-196,-198,-199,-201,-202,-202,-201,-199,-195,-190,-183,-176,-169,-161,-153,-144,-136,-128,-119,-110,-100,-91,-82,-73,-64,-56,-49,-44,-41,-40,-40,-42,-43,-44,-44,-43,-40,-36,-30,-23,-15,-6,3,14,25,36,48,60,73,86,100,114,129,143,159,175,190,205,218,231,242,252,261,270,277,282,287,291,294,297,299,302,305,308,313,321,329,338,348,358,366,375,383,390,396,401,406,409,411,414,415,417,418,418,418,417,416,415,413,409,404,397,389,381,373,365,358,351,345,339,334,331,329,328,328,329,329,330,331,332,333,334,333,332,330,326,322,316,308,300,291,281,275,271,266,261,258,254,251,248,244,240,236,231,226,220,214,208,200,193,186,178,169,160,150,140,129,117,107,97,88,81,75,70,66,63,62,63,65,69,74,80,85,90,93,95,96,95,94,93,93,93,94,96,98,101,104,108,111,115,119,124,129,135,142,150,157,165,171,178,184,190,195,201,205,209,213,215,217,218,218,218,217,216,214,213,212,211,211,211,211,214,218,224,232,242,252,263,274,285,295,304,312,319,325,331,337,343,349,354,360,365,369,374,380,385,390,394,399,402,406,409,412,414,414,413,411,409,406,402,399,395,391,387,382,377,371,364,356,346,336,325,315,304,294,285,277,272,268,267,269,274,280,286,294,301,307,314,320,325,330,333,
11:33:43.316 -> [167494][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:43.348 -> [167499][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:33:43.348 -> [167508][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:43.348 -> 336,338,340,340,341,341,342,344,345,348,350,352,354,355,356,356,356,356,355,353,352,351,351,352,354,357,360,364,368,371,373,375,376,376,376,376,377,377,378,380,382,384,386,388,389,391,393,395,396,397,398,398,397,398,398,398,399,399,397,395,393,390,388,385,383,381,380,380,380,381,381,382,383,383,382,381,378,374,369,364,357,350,342,334,326,319,313,307,302,299,296,293,290,289,287,286,284,284,283,283,283,284,285,286,287,286,285,283,280,277,275,273,272,271,271,271,271,272,272,272,271,269,266,264,261,258,254,251,248,244,240,236,233,229,226,223,220,217,214,212,210,209,208,206,204,202,201,199,199,199,200,201,201,201,201,200,200,201,203,205,209,213,217,221,226,231,235,240,246,252,259,265,272,279,285,291,297,304,311,318,327,336,345,354,363,371,380,388,396,404,412,419,427,434,440,447,452,457,461,465,468,471,473,475,477,478,478,479,480,481,482,483,484,483,482,480,477,473,470,467,464,461,458,454,450,445,441,436,431,426,422,418,414,411,409,407,406,404,401,398,394,388,382,374,366,358,348,338,327,316,303,290,277,263,250,237,223,209,195,182,169,157,146,136,127,119,111,105,98,92,86,79,71,64,56,48,41,34,29,24,20,16,12,9,6,3,1,0,-3,-7,-12,-18,-25,-32,-39,-45,-52,-58,-63,-68,-72,-76,-79,-82,-84,-86,-87,-87,-87,-86,-85,-85,-85,-85,-85,-86,-88,-90,-92,-94,-96,-97,-97,-97,-96,-95,-92,-90,-87,-83,-79,-75,-72,-68,-65,-61,-57,-53,-50,-47,-43,-40,-36,-33,-30,-27,-25,-22,-20,-18,-16,-13,-9,-5,0,6,12,19,25,31,37,43,48,54,60,65,71,76,80,85,89,93,97,100,104,107,109,111,113,114,114,113,110,107,103,98,93,86,80,73,65,59,51,45,38,33,28,23,20,16,12,9,5,1,-2,-7,-11,-16,-20,-24,-28,-31,-35,-39,-44,-50,-56,-63,-70,-78,-85,-93,-101,-108,-117,-124,-132,-140,-148,-156,-165,-175,-185,-195,-206,-217,-229,-240,-252,-264,-276,-287,-297,-306,-313,-319,-325,-330,-334,-337,-340,-342,-342,-343,-343,-342,-341,-339,-337,-335,-334,-332,-330,-329,-328,-327,-325,-324,-322,-321,-319,-317,-315,-313,-311,-309,-307,-305,-302,-300,-298,-297,-296,-295,-294,-294,-294,-294,-293,-293,-292,-291,-290,-290,-290,-289,-289,-289,-288,-287,-285,-282,-278,-275,-271,-268,-266,-264,-263,-262,-261,-259,-258,-258,-257,-257,-256,-256,-256,-256,-256,-256,-256,-255,-254,-253,-251,-249,-247,-246,-245,-243,-242,-241,-241,-239,-238,-236,-233,-230,-227,-225,-223,-223,-222,-223,-224,-226,-228,-231,-234,-238,-241,-244,-247,-251,-254,-258,-263,-268,-273,-279,-284,-290,-295,-301,-305,-309,-312,-315,-317,-319,-321,-322,-323,-324,-325,-327,-329,-332,-335,-337,-340,-341,-343,-343,-343,-343,-342,-342,-342,-343,-344,-345,-347,-349,-352,-356,-361,-367,-373,-380,-388,-395,-403,-410,-416,-422,-426,-428,-429,-429,-428,-427,-427,-426,-425,-424,-422,-420,-419,-417,-416,-414,-413,-411,-409,-407,-405,-403,-401,-399,-396,-392,-387,-382,-377,-371,-366,-359,-353,-347,-341,-336,-332,-330,-329,-328,-328,-328,-327,-326,-324,-321,-317,-314,-310,-307,-304,-303,-303,-304,-306,-309,-312,-315,-319,-323,-327,-331,-335,-340,-344,-347,-351,-353,-355,-355,-355,-354,-352,-349,-346,-343,-340,-338,-335,-333,-331,-328,-326,-323,-321,-319,-318,-317,-316,-315,-316,-316,-318,-319,-321,-323,-325,-327,-330,-333,-336,-339,-340,-341,-340,-339,-337,-335,-332,-329,-327,-325,-323,-321,-319,-318,-317,-315,-314,-314,-314,-314,-314,-315,-315,-315,-315,-313,-311,-308,-304,-300,-296,-291,-286,-279,-272,-264,-257,-248,-239,-230,-221,-212,-204,-197,-191,-186,-182,-179,-177,-174,-172,-170,-167,-164,-160,-157,-154,-151,-149,-147,-146,-145,-144,-143,-142,-140,-137,-134,-130,-126,-121,-118,-115,-112,-111,-111,-111,-113,-115,-117,-119,-122,-123,-125,-125,-126,-127,-128,-129,-130,-130,-130,-131,-130,-130,-130,-130,-131,-132,-134,-136,-138,-141,-142,-144,-146,-146,-148,-146,-144,-149,-154,-157,-163,-167,-173,-179,-185,-191,-198,-206,-214,-223,-233,-243,-253,-262,-271,-279,-287,-295,-302,-309,-316,-323,-329,-336,-343,-350,-357,-364,-372,-380,-388,-396,-403,-410,-417,-424,-430,-436,-441,-445,-447,-448,-449,-449,-449,-448,-447,-446,-443,-441,-437,-434,-430,-426,-424,-421,-419,-416,-414,-413,-411,-409,-407,-404,-402,-398,-395,-391,-387,-383,-379,-375,-370,
11:33:43.700 -> [167869][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:43.700 -> [167870][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:33:43.732 -> [167878][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:43.732 -> -366,-363,-359,-357,-355,-353,-352,-351,-350,-351,-351,-353,-355,-359,-362,-364,-367,-368,-369,-369,-367,-365,-360,-355,-348,-341,-333,-326,-318,-311,-305,-298,-292,-286,-280,-273,-267,-260,-253,-245,-238,-230,-223,-216,-209,-201,-194,-186,-178,-169,-160,-151,-142,-134,-125,-117,-110,-102,-96,-89,-83,-77,-72,-67,-61,-56,-50,-45,-40,-36,-31,-26,-21,-15,-9,-2,3,9,14,18,23,27,30,34,38,40,43,46,48,49,50,51,51,50,49,49,48,49,49,50,50,50,50,49,48,47,46,45,43,42,41,40,38,37,35,33,31,28,25,22,19,16,14,12,10,9,8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-5,-4,-4,-3,-3,-2,0,0,2,3,4,4,5,5,6,7,9,13,17,21,27,32,37,43,48,53,58,62,66,69,71,72,72,71,70,68,65,63,61,59,59,60,62,64,67,70,73,76,79,82,86,90,94,98,102,106,111,116,122,127,133,138,144,149,155,162,168,175,182,190,197,205,214,222,229,237,243,248,253,256,259,263,266,271,276,283,289,297,305,312,319,324,328,332,334,334,334,334,333,332,330,327,324,321,318,315,312,310,308,307,307,307,309,311,313,315,317,319,320,322,323,325,326,328,329,330,330,331,331,330,330,328,326,324,321,318,316,313,309,305,302,299,296,294,294,294,295,297,299,302,304,306,308,310,311,312,313,314,314,314,313,312,310,307,304,301,299,297,295,294,294,294,294,295,296,299,303,307,313,318,325,332,340,347,355,361,366,371,374,376,378,379,380,382,383,386,389,392,395,397,399,400,401,401,401,401,402,403,405,407,410,413,417,419,422,423,423,422,420,417,413,408,403,398,393,388,384,380,375,371,367,363,360,357,354,352,350,349,347,346,344,341,339,336,334,332,331,330,329,329,328,327,326,325,323,321,320,318,316,314,311,309,306,302,298,294,289,284,279,274,270,266,262,259,255,251,247,242,238,234,229,224,218,212,207,201,196,192,188,184,181,178,176,175,175,177,179,183,187,192,197,202,209,216,225,234,245,255,265,275,285,294,303,311,320,328,336,344,353,362,371,381,390,400,410,419,429,438,446,454,461,467,472,476,479,482,484,485,484,483,480,476,471,466,461,455,451,447,445,444,444,445,448,451,455,458,460,461,461,461,460,459,457,454,452,450,448,446,445,443,441,439,436,433,431,429,429,429,429,430,431,431,432,433,434,435,436,436,435,434,432,429,426,423,419,414,408,401,394,386,378,371,363,355,347,338,329,320,311,302,293,285,275,266,257,248,239,229,219,208,196,184,171,159,148,137,127,118,109,101,93,87,81,76,72,69,66,63,60,58,56,54,52,49,46,43,40,37,34,31,29,27,26,25,23,22,21,21,21,21,23,24,26,28,30,32,35,39,43,47,52,58,64,71,77,84,92,99,107,114,121,128,134,140,145,150,156,161,167,173,179,185,191,197,203,208,214,220,225,230,234,238,241,243,245,246,247,248,248,248,247,245,242,239,234,228,222,216,210,204,198,194,189,186,184,183,183,184,186,188,191,194,198,202,205,208,210,210,209,208,206,204,201,198,195,191,187,182,178,174,171,167,164,161,158,155,152,148,143,136,128,119,111,101,92,83,74,64,54,43,32,20,8,-3,-15,-27,-39,-50,-61,-70,-79,-87,-94,-99,-104,-108,-112,-114,-117,-120,-122,-125,-127,-129,-131,-134,-137,-140,-144,-148,-152,-155,-157,-157,-156,-153,-150,-145,-141,-136,-132,-128,-125,-122,-120,-119,-119,-118,-118,-117,-116,-115,-114,-112,-111,-110,-109,-109,-109,-109,-110,-111,-111,-112,-112,-112,-112,-111,-109,-106,-103,-99,-95,-90,-85,-79,-74,-68,-62,-54,-46,-37,-28,-18,-9,0,9,17,25,32,38,43,47,50,52,54,56,58,59,61,63,65,69,73,77,81,85,89,92,94,95,95,94,92,90,87,83,79,75,70,65,60,54,48,42,36,30,24,19,14,9,4,0,-4,-8,-13,-18,-23,-29,-35,-43,-51,-59,-69,-78,-88,-97,-106,-115,-123,-131,-138,-144,-150,-156,-162,-168,-175,-181,-187,-192,-197,-201,-205,-209,-213,-217,-222,-227,-232,-239,-246,-253,-261,-268,-275,-281,-287,-293,-299,-305,-313,-320,-328,-336,-345,
11:33:44.020 -> [168193][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:44.052 -> [168197][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:33:44.052 -> [168205][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:44.052 -> -353,-360,-368,-374,-380,-385,-389,-391,-392,-391,-389,-385,-380,-375,-368,-362,-355,-348,-342,-336,-330,-325,-320,-315,-309,-304,-299,-294,-288,-282,-277,-271,-266,-261,-256,-251,-245,-240,-234,-228,-223,-219,-216,-214,-213,-213,-214,-215,-218,-220,-224,-227,-231,-235,-239,-242,-246,-249,-253,-255,-258,-262,-265,-267,-270,-273,-275,-277,-278,-279,-279,-280,-280,-281,-281,-282,-282,-282,-283,-283,-282,-282,-282,-282,-282,-282,-282,-281,-280,-278,-276,-274,-271,-267,-263,-259,-254,-249,-244,-239,-233,-229,-224,-220,-216,-212,-208,-205,-204,-203,-203,-204,-205,-207,-209,-211,-213,-215,-217,-218,-219,-219,-219,-218,-216,-214,-212,-208,-204,-199,-193,-187,-180,-173,-166,-159,-151,-143,-135,-126,-117,-108,-99,-89,-79,-68,-58,-47,-36,-25,-15,-5,4,13,22,31,39,46,52,58,62,66,68,69,70,71,70,70,69,68,66,64,63,62,61,61,62,63,65,67,70,73,75,77,79,81,82,83,83,82,81,80,79,77,76,74,73,72,71,70,69,69,69,69,69,69,68,68,68,68,68,68,68,68,66,64,62,59,55,50,44,38,30,22,12,2,-7,-17,-28,-38,-49,-59,-69,-78,-86,-94,-102,-109,-116,-123,-129,-135,-140,-144,-147,-149,-151,-151,-152,-151,-149,-148,-145,-142,-139,-136,-133,-130,-128,-127,-127,-128,-129,-131,-133,-135,-138,-141,-143,-147,-150,-153,-157,-160,-163,-166,-169,-173,-176,-179,-182,-186,-189,-193,-196,-200,-204,-208,-212,-216,-218,-221,-223,-225,-226,-227,-228,-229,-230,-231,-232,-233,-233,-233,-233,-232,-230,-228,-226,-224,-222,-220,-218,-217,-216,-215,-214,-213,-212,-211,-210,-210,-209,-209,-209,-208,-205,-203,-199,-195,-191,-186,-181,-176,-171,-166,-161,-156,-151,-146,-142,-138,-134,-130,-127,-125,-123,-121,-120,-120,-120,-120,-121,-122,-123,-124,-125,-125,-125,-125,-124,-124,-123,-123,-123,-123,-124,-125,-126,-126,-127,-128,-128,-128,-128,-127,-126,-124,-123,-121,-120,-118,-117,-115,-113,-111,-109,-106,-104,-101,-99,-98,-98,-98,-99,-101,-104,-107,-110,-114,-117,-121,-126,-129,-133,-138,-141,-145,-148,-151,-154,-156,-158,-161,-163,-166,-169,-172,-175,-178,-180,-183,-185,-187,-189,-190,-191,-192,-192,-192,-192,-191,-191,-190,-188,-186,-184,-182,-180,-178,-177,-176,-175,-174,-173,-172,-171,-169,-167,-165,-162,-160,-157,-155,-154,-151,-149,-146,-143,-140,-137,-134,-131,-129,-127,-126,-126,-126,-127,-128,-129,-129,-130,-130,-129,-129,-127,-126,-124,-122,-119,-116,-113,-109,-106,-103,-100,-97,-95,-92,-90,-88,-87,-85,-84,-84,-83,-82,-82,-81,-81,-81,-80,-80,-79,-78,-76,-73,-70,-67,-64,-60,-57,-53,-50,-47,-46,-44,-44,-45,-46,-48,-51,-55,-59,-64,-69,-75,-81,-87,-93,-98,-103,-109,-114,-118,-123,-127,-131,-134,-138,-141,-143,-146,-148,-149,-150,-152,-153,-154,-155,-155,-155,-155,-154,-152,-150,-148,-146,-144,-142,-139,-137,-135,-133,-132,-131,-131,-131,-132,-133,-134,-136,-139,-141,-143,-145,-146,-147,-148,-149,-150,-151,-152,-152,-152,-152,-152,-151,-151,-151,-151,-151,-152,-153,-153,-154,-155,-155,-156,-155,-155,-153,-151,-148,-144,-140,-135,-130,-125,-120,-115,-111,-107,-104,-101,-99,-97,-96,-94,-92,-90,-88,-85,-82,-79,-75,-71,-68,-64,-61,-58,-56,-54,-52,-50,-48,-46,-44,-43,-43,-43,-43,-45,-47,-51,-55,-61,-66,-72,-78,-83,-88,-92,-94,-96,-96,-96,-96,-96,-96,-96,-97,-99,-101,-103,-106,-109,-111,-114,-116,-118,-119,-121,-123,-125,-126,-128,-130,-131,-133,-134,-135,-135,-135,-135,-134,-134,-133,-133,-132,-132,-132,-133,-133,-134,-136,-138,-139,-141,-143,-144,-145,-146,-147,-148,-151,-153,-156,-159,-162,-166,-169,-172,-175,-176,-176,-175,-172,-167,-161,-155,-147,-138,-128,-117,-106,-95,-84,-73,-63,-53,-43,-33,-24,-15,-7,1,9,17,25,32,39,45,51,56,61,67,72,78,84,89,95,99,104,108,111,113,114,115,115,114,114,113,112,111,111,111,111,111,113,114,115,118,120,123,127,130,133,136,138,140,141,141,140,139,136,132,127,120,113,106,98,89,80,72,64,56,49,42,36,31,26,22,19,15,12,9,5,2,0,-3,-5,-8,-11,-13,-16,-18,-21,-23,-25,-28,-30,-32,-35,-37,-40,-43,-46,-49,-53,-56,-60,-63,-65,-67,-69,-71,-73,-74,-76,-78,-80,-82,-84,-87,-89,-91,-93,-94,-95,-95,-95,-95,-94,-94,-93,-92,-91,-89,-88,-86,-83,-81,-78,-74,-71,-67,-63,-59,-56,-52,-49,-45,-42,-38,-34,-31,-26,-21,-16,-10,-3,3,11,19,27,36,44,53,62,71,80,89,99,108,
11:33:44.404 -> [168570][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:44.404 -> [168570][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:33:44.404 -> [168577][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:44.436 -> 117,127,135,144,153,162,170,178,186,194,201,209,216,223,230,236,242,249,255,261,267,274,280,286,292,298,303,309,314,318,321,324,327,328,330,332,333,335,336,337,338,339,340,341,341,342,342,342,342,342,341,340,340,338,337,335,332,330,327,325,323,321,319,318,317,317,316,316,316,316,316,315,315,313,312,310,308,306,303,300,296,292,287,282,277,271,265,260,254,248,242,237,232,228,223,219,214,209,204,199,193,187,181,175,168,161,154,147,139,131,123,115,107,98,90,83,75,68,61,54,48,42,36,32,28,24,22,19,18,17,16,15,14,14,15,15,15,14,14,13,12,11,10,9,7,6,5,5,5,6,6,7,8,9,11,13,15,18,21,25,28,33,37,42,47,52,57,61,65,69,73,77,80,83,86,89,91,94,97,99,101,104,106,108,110,113,115,116,118,120,121,122,123,123,124,124,123,123,122,121,120,118,116,114,112,109,106,103,100,96,92,89,86,83,80,78,76,75,73,72,71,69,67,65,62,59,55,50,46,42,37,32,27,23,18,14,9,5,0,-3,-7,-12,-17,-22,-27,-33,-38,-44,-49,-54,-58,-62,-65,-67,-69,-70,-70,-71,-71,-70,-69,-68,-67,-66,-66,-65,-64,-63,-62,-61,-60,-59,-57,-56,-55,-54,-53,-52,-51,-50,-50,-50,-49,-48,-47,-46,-45,-44,-43,-43,-42,-42,-42,-42,-42,-42,-41,-40,-39,-36,-33,-29,-24,-19,-13,-7,0,6,14,22,31,38,46,53,60,67,73,78,83,88,92,96,99,102,105,107,109,110,112,115,117,120,123,126,129,132,134,137,139,140,141,141,141,139,137,134,131,127,123,119,114,110,104,99,94,90,85,80,75,71,67,64,61,59,58,58,58,58,59,60,61,62,63,64,66,67,68,69,71,72,72,73,74,75,75,76,76,76,77,77,77,78,78,78,78,79,79,79,80,80,80,79,78,77,75,73,70,68,65,62,60,58,58,57,57,58,60,62,64,67,71,75,80,85,90,96,102,109,116,124,131,139,147,155,162,169,176,183,189,195,200,205,209,213,216,220,224,228,232,237,242,247,254,260,268,276,284,292,300,308,315,322,328,333,338,342,345,347,349,350,350,349,348,347,346,345,344,343,343,342,342,342,342,342,342,343,343,343,343,343,342,340,338,335,331,326,321,314,308,300,293,285,277,269,260,252,244,236,228,221,214,208,202,196,189,183,177,171,164,158,152,145,138,131,124,117,110,102,94,86,78,69,61,52,44,36,28,21,15,10,6,2,0,-1,-3,-4,-4,-5,-6,-7,-9,-10,-12,-14,-17,-19,-20,-21,-22,-22,-22,-23,-22,-21,-20,-18,-16,-14,-12,-9,-6,-3,0,1,3,5,6,7,7,7,6,5,4,3,2,2,1,2,3,5,7,10,14,19,25,31,38,45,53,61,70,78,87,97,106,115,124,134,143,152,161,170,179,188,198,206,216,225,234,243,252,260,269,277,283,290,295,300,303,305,306,307,306,305,303,300,297,293,289,284,278,273,266,259,251,244,237,230,224,218,212,207,202,197,193,189,186,182,179,176,174,171,170,167,165,164,162,160,158,157,155,154,152,150,149,147,144,142,139,137,134,130,127,123,119,114,110,105,100,95,89,84,79,74,68,63,58,52,47,41,35,30,24,18,13,8,2,-2,-6,-10,-14,-18,-21,-24,-26,-28,-29,-29,-28,-26,-24,-20,-17,-13,-8,-3,1,6,11,16,21,25,30,34,38,42,45,48,50,52,52,53,53,52,52,51,50,49,48,47,47,46,46,46,46,45,46,45,45,44,44,43,42,40,39,37,36,35,34,34,35,37,40,43,47,52,57,62,67,72,77,81,85,89,92,94,95,96,96,95,94,93,91,90,89,87,87,86,85,85,84,84,83,83,83,83,83,83,82,81,79,77,74,70,65,59,52,45,36,27,18,8,0,-10,-20,-29,-38,-46,-54,-60,-65,-69,-72,-74,-75,-75,-76,-75,-75,-74,-74,-73,-73,-72,-72,-72,-73,-74,-75,-77,-78,-80,-82,-84,-85,-87,-89,-90,-92,-93,-93,-94,-94,-95,-95,-96,-97,-98,-99,-101,-102,-104,-106,-108,-111,-114,-116,-119,-123,-126,-130,-133,-136,-139,-141,-143,-144,-145,-145,-144,-143,-142,-140,-137,-134,-131,
11:33:44.692 -> [168872][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:44.724 -> [168872][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:33:44.724 -> [168879][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:44.724 -> -128,-124,-119,-114,-109,-104,-99,-94,-89,-83,-78,-73,-67,-61,-56,-51,-46,-42,-39,-35,-33,-32,-31,-31,-32,-33,-35,-37,-39,-42,-45,-49,-53,-57,-61,-65,-69,-72,-76,-79,-82,-84,-87,-88,-90,-92,-93,-94,-95,-96,-97,-97,-98,-99,-99,-100,-101,-103,-104,-105,-107,-108,-109,-111,-112,-114,-115,-117,-119,-122,-124,-126,-129,-131,-134,-136,-138,-139,-141,-141,-142,-142,-142,-141,-140,-140,-139,-139,-138,-138,-138,-137,-136,-135,-133,-132,-130,-128,-126,-124,-121,-119,-117,-115,-112,-109,-105,-101,-97,-92,-85,-79,-72,-64,-56,-48,-39,-31,-23,-16,-10,-4,1,7,12,17,21,26,30,35,39,44,49,54,58,63,66,70,73,75,77,78,78,77,75,72,68,62,55,47,39,29,18,8,-2,-13,-25,-36,-46,-56,-66,-76,-85,-93,-101,-109,-116,-123,-129,-135,-140,-146,-150,-155,-159,-164,-168,-171,-175,-180,-184,-189,-195,-200,-206,-212,-218,-224,-231,-238,-245,-253,-260,-268,-275,-282,-290,-297,-304,-311,-317,-323,-328,-332,-336,-339,-342,-344,-346,-348,-350,-351,-353,-355,-357,-360,-362,-364,-366,-368,-370,-371,-372,-373,-373,-373,-372,-371,-370,-369,-367,-366,-364,-362,-360,-357,-355,-352,-350,-347,-345,-342,-340,-338,-336,-335,-333,-331,-329,-326,-323,-320,-316,-312,-307,-303,-297,-291,-286,-280,-274,-269,-263,-258,-252,-246,-241,-235,-230,-224,-219,-213,-207,-201,-195,-188,-181,-174,-167,-160,-153,-145,-138,-131,-123,-116,-109,-102,-95,-89,-82,-75,-68,-61,-54,-47,-40,-33,-26,-20,-13,-7,-2,2,7,11,15,18,21,23,25,27,29,30,31,32,34,35,36,37,38,39,40,41,43,44,46,48,49,51,52,52,52,52,51,50,49,48,47,47,47,48,50,52,55,58,61,65,69,72,75,77,78,78,78,76,74,71,67,62,58,53,48,44,39,35,31,27,24,21,18,15,12,9,7,4,2,0,-3,-6,-9,-13,-17,-21,-26,-31,-37,-43,-50,-57,-63,-70,-77,-83,-89,-94,-98,-102,-105,-107,-108,-108,-109,-109,-108,-108,-107,-106,-105,-103,-101,-98,-95,-91,-87,-81,-76,-71,-66,-61,-56,-52,-47,-43,-39,-36,-33,-29,-26,-23,-20,-17,-14,-11,-9,-7,-5,-4,-3,-2,-3,-4,-5,-7,-10,-13,-17,-21,-26,-31,-35,-40,-45,-49,-53,-57,-61,-64,-68,-70,-72,-74,-75,-76,-77,-76,-75,-74,-73,-72,-71,-71,-70,-71,-71,-72,-74,-77,-80,-83,-87,-90,-94,-97,-100,-102,-105,-107,-108,-110,-112,-113,-114,-116,-118,-121,-124,-127,-131,-135,-140,-146,-152,-159,-167,-174,-183,-191,-199,-207,-215,-222,-229,-235,-240,-245,-249,-253,-256,-258,-260,-261,-262,-263,-263,-263,-263,-263,-263,-264,-264,-264,-265,-265,-265,-265,-265,-265,-264,-264,-264,-263,-263,-262,-261,-261,-260,-258,-256,-254,-252,-249,-245,-241,-237,-233,-228,-222,-217,-211,-205,-199,-192,-185,-178,-170,-162,-154,-145,-136,-126,-116,-106,-95,-85,-74,-64,-54,-44,-35,-26,-18,-10,-3,2,8,13,18,23,28,32,37,42,47,52,57,62,68,74,80,86,92,99,104,110,115,120,124,127,131,133,134,134,133,131,128,124,120,115,109,103,97,91,85,79,73,68,64,60,56,54,53,53,54,55,57,60,63,67,70,74,77,80,83,85,86,87,87,86,84,81,78,75,71,67,64,61,58,55,53,51,50,50,50,51,52,54,57,60,64,68,73,77,81,86,90,93,97,101,104,106,108,110,112,113,115,117,119,122,124,127,130,134,138,142,146,150,154,158,163,167,171,175,179,183,187,190,194,197,200,203,206,209,212,214,217,220,223,226,229,232,234,237,239,242,244,245,247,248,249,250,251,252,254,255,256,258,259,261,263,265,267,269,270,270,271,270,270,268,267,264,262,259,255,251,247,243,239,234,229,224,219,213,207,201,195,189,182,176,169,163,157,151,145,139,134,128,123,117,112,106,100,95,89,82,76,69,61,53,45,37,27,18,8,0,-11,-21,-31,-41,-52,-62,-71,-80,-88,-96,-103,-109,-114,-119,-123,-126,-129,-132,-135,-137,-140,-143,-146,-149,-153,-157,-162,-166,-170,-175,-179,-183,-187,-191,-195,-198,-202,-205,-207,-210,-212,-214,-215,-215,-216,-215,-215,-214,-212,-211,-209,-207,-205,-203,-201,-199,-198,-197,-196,-195,-193,-191,-189,-186,-183,-180,-175,-171,-166,-160,-154,-149,-142,-136,-130,-123,-117,-111,-104,-98,-91,-85,-79,-74,-68,-62,-57,-51,-46,-41,-36,-31,-25,-19,-13,-7,0,7,15,22,30,
11:33:45.044 -> [169213][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:45.044 -> [169217][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:33:45.076 -> [169226][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:45.076 -> 37,44,50,56,61,66,69,72,73,74,74,72,70,68,65,61,58,54,50,46,42,39,35,30,27,23,19,15,11,7,3,0,-3,-6,-9,-12,-15,-18,-20,-22,-24,-25,-27,-28,-29,-30,-31,-32,-34,-35,-38,-40,-44,-47,-51,-55,-59,-63,-67,-71,-75,-78,-81,-84,-87,-90,-92,-93,-94,-94,-94,-93,-92,-90,-89,-86,-83,-80,-77,-73,-69,-65,-62,-59,-56,-54,-52,-50,-49,-48,-46,-45,-44,-42,-40,-38,-35,-32,-30,-27,-24,-21,-17,-15,-13,-12,-10,-8,-7,-5,-4,-2,0,2,4,7,10,13,16,18,21,24,27,29,32,34,37,39,41,43,45,47,49,51,53,56,58,60,63,66,69,73,76,80,83,87,89,92,94,96,97,97,97,97,96,95,93,92,90,89,88,87,87,87,87,88,88,90,91,93,96,97,100,102,103,104,105,105,104,102,99,96,91,86,80,75,69,63,58,53,48,45,42,40,39,38,38,38,39,40,41,42,44,45,46,46,47,47,47,46,45,44,43,42,41,40,39,38,37,36,34,33,32,30,28,26,24,22,19,17,14,12,10,7,5,3,1,0,-2,-3,-4,-4,-4,-4,-3,-2,0,0,3,6,9,13,17,21,25,30,34,38,42,45,48,50,51,52,51,50,47,43,39,33,26,18,10,1,-7,-16,-25,-34,-42,-50,-58,-65,-71,-76,-81,-85,-89,-92,-94,-95,-96,-97,-97,-98,-97,-96,-95,-94,-92,-90,-88,-87,-85,-84,-83,-83,-83,-84,-86,-88,-90,-93,-96,-100,-104,-108,-112,-116,-121,-125,-128,-132,-134,-136,-137,-138,-138,-137,-136,-134,-133,-131,-128,-126,-123,-120,-117,-115,-113,-112,-111,-109,-109,-108,-108,-107,-107,-106,-105,-104,-102,-100,-98,-95,-91,-87,-82,-77,-72,-67,-61,-55,-48,-41,-34,-27,-19,-11,-2,6,15,24,34,44,54,64,74,84,94,104,113,123,132,141,151,160,170,180,190,199,209,217,225,233,239,245,250,254,259,262,264,267,269,270,270,271,271,271,271,271,271,272,272,273,273,274,276,277,279,281,283,286,288,291,293,295,297,299,299,300,301,301,300,299,298,296,293,290,286,283,279,275,272,269,266,263,261,259,258,256,255,253,252,251,249,247,245,243,240,237,234,230,225,220,214,208,201,194,186,177,168,159,149,138,128,117,107,97,86,76,67,58,48,40,32,24,16,10,3,-2,-8,-13,-19,-24,-28,-33,-37,-40,-44,-48,-51,-54,-57,-60,-63,-65,-67,-69,-70,-71,-71,-71,-71,-71,-70,-68,-67,-65,-64,-63,-61,-60,-59,-58,-56,-55,-54,-52,-51,-49,-47,-44,-42,-38,-34,-29,-24,-19,-13,-6,0,6,14,21,29,36,44,51,59,67,75,84,93,102,111,121,130,140,149,158,166,174,181,188,194,199,203,207,209,210,210,209,206,204,200,195,190,185,179,173,168,162,157,153,150,148,147,147,147,149,151,153,156,160,164,167,171,175,178,181,184,186,188,189,189,189,187,186,183,179,174,169,163,157,150,143,137,130,124,118,112,107,102,98,93,89,85,82,78,74,70,66,62,58,53,48,43,38,32,27,21,16,10,4,-1,-7,-14,-21,-28,-36,-43,-51,-58,-65,-71,-77,-82,-86,-91,-94,-96,-98,-99,-99,-98,-97,-96,-94,-91,-89,-85,-82,-78,-74,-69,-65,-60,-56,-51,-47,-42,-38,-33,-28,-24,-19,-14,-10,-5,0,3,7,11,15,19,23,26,29,31,34,36,39,41,43,45,47,49,51,52,54,56,59,62,64,68,72,76,81,86,91,97,103,108,114,120,125,129,133,138,141,143,145,146,146,146,146,145,144,143,141,140,139,137,135,133,130,127,124,121,116,111,106,100,93,86,78,70,62,53,45,36,27,18,10,1,-7,-15,-23,-32,-39,-46,-53,-60,-65,-71,-76,-81,-85,-89,-93,-97,-100,-104,-108,-112,-116,-120,-124,-129,-133,-138,-142,-147,-152,-157,-162,-167,-173,-178,-184,-189,-194,-199,-203,-207,-210,-213,-215,-216,-216,-216,-215,-213,-209,-206,-202,-197,-192,-186,-179,-173,-166,-160,-153,-146,-138,-132,-125,-119,-114,-108,-103,-98,-93,-88,-83,-78,-73,-67,-61,-55,-48,-41,-34,-26,-18,-9,-1,6,14,22,30,37,44,51,58,64,69,74,78,81,84,86,86,86,85,83,80,76,72,67,62,57,51,46,41,37,33,30,28,27,27,27,29,31,34,36,40,43,46,49,51,53,53,53,51,
11:33:45.364 -> [169526][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:45.364 -> [169528][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:33:45.364 -> [169537][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:45.397 -> 49,46,42,37,33,27,22,17,12,7,3,0,-3,-5,-7,-8,-8,-8,-6,-3,0,3,6,11,15,19,23,26,28,30,32,33,33,32,31,30,29,27,25,23,21,19,18,16,15,15,15,16,18,20,23,27,31,36,40,45,50,55,60,64,68,71,74,77,80,83,85,88,90,92,95,98,101,105,108,113,117,122,127,133,138,143,148,153,158,163,167,172,176,180,184,188,192,195,199,203,206,210,213,216,219,221,224,226,228,230,232,233,235,236,237,238,238,237,236,235,233,232,229,227,224,222,219,216,214,212,210,209,207,206,204,202,200,197,194,190,185,180,174,168,161,154,146,138,129,121,112,105,99,93,89,86,84,82,80,79,77,76,74,72,70,67,64,61,57,53,49,44,39,34,29,24,19,14,10,6,2,-1,-5,-8,-10,-13,-17,-20,-24,-29,-34,-40,-47,-54,-62,-70,-79,-88,-96,-105,-114,-122,-129,-137,-144,-149,-155,-160,-164,-168,-171,-173,-174,-175,-175,-175,-174,-174,-172,-171,-169,-167,-165,-163,-160,-158,-155,-153,-151,-149,-147,-145,-143,-141,-139,-137,-135,-132,-129,-125,-121,-116,-110,-103,-95,-87,-78,-69,-59,-48,-37,-26,-15,-3,7,19,30,41,52,62,71,80,88,96,102,108,113,118,122,126,130,132,135,138,140,143,145,146,148,150,152,153,155,156,157,159,160,161,162,162,162,161,161,159,157,154,151,147,143,139,133,128,123,117,111,105,99,93,86,80,74,68,62,55,49,43,37,30,23,17,10,2,-4,-13,-22,-31,-41,-51,-61,-71,-81,-92,-102,-113,-124,-135,-146,-157,-168,-180,-191,-201,-212,-222,-231,-240,-248,-256,-262,-268,-273,-277,-280,-283,-285,-287,-288,-289,-290,-291,-291,-292,-292,-292,-292,-292,-293,-294,-294,-295,-295,-296,-296,-296,-296,-296,-295,-295,-294,-292,-290,-287,-284,-280,-275,-270,-265,-258,-252,-245,-238,-232,-225,-219,-213,-207,-202,-198,-194,-190,-187,-184,-182,-180,-178,-176,-174,-172,-170,-168,-166,-163,-159,-156,-152,-148,-143,-139,-134,-129,-123,-118,-113,-108,-103,-99,-95,-91,-88,-85,-83,-81,-81,-80,-80,-81,-83,-84,-86,-88,-90,-92,-94,-96,-98,-100,-102,-105,-107,-109,-112,-114,-116,-118,-120,-122,-123,-124,-125,-126,-126,-127,-127,-127,-128,-129,-130,-131,-133,-135,-138,-140,-142,-144,-145,-146,-146,-144,-143,-140,-138,-134,-130,-125,-121,-116,-111,-106,-101,-97,-93,-90,-87,-85,-84,-84,-84,-85,-86,-87,-88,-89,-89,-90,-90,-89,-89,-88,-86,-84,-82,-79,-75,-72,-68,-64,-60,-56,-53,-50,-47,-45,-43,-42,-41,-39,-38,-37,-36,-35,-35,-34,-32,-31,-30,-29,-27,-25,-22,-20,-17,-14,-10,-6,-1,3,8,14,20,26,33,38,44,49,53,56,59,61,62,63,64,63,63,62,61,60,58,57,56,55,54,53,52,52,51,51,51,51,52,51,51,50,49,47,44,41,36,32,27,21,14,8,2,-4,-11,-18,-24,-30,-36,-41,-47,-51,-55,-59,-63,-66,-69,-72,-74,-76,-77,-79,-80,-81,-82,-83,-83,-83,-84,-85,-85,-86,-87,-88,-89,-90,-91,-92,-94,-95,-96,-97,-98,-98,-98,-98,-97,-95,-93,-91,-88,-85,-82,-78,-74,-70,-66,-62,-57,-54,-50,-47,-44,-42,-41,-40,-40,-40,-41,-42,-43,-45,-46,-46,-46,-45,-44,-42,-39,-36,-32,-28,-23,-19,-14,-9,-5,0,3,8,13,18,23,28,34,40,46,52,58,64,69,75,80,85,90,95,98,102,105,108,110,112,113,114,115,114,114,113,112,111,110,109,108,108,107,108,108,109,109,110,110,110,110,110,110,109,108,107,106,104,102,100,97,95,92,89,87,84,82,79,77,75,73,71,69,67,65,63,61,58,55,52,48,45,40,36,32,27,22,17,12,7,2,-1,-6,-10,-15,-19,-23,-26,-29,-33,-36,-39,-42,-45,-48,-51,-54,-57,-59,-62,-64,-67,-69,-71,-73,-75,-76,-77,-77,-78,-78,-77,-77,-76,-75,-74,-73,-72,-71,-70,-69,-68,-66,-65,-64,-62,-60,-57,-54,-51,-48,-43,-39,-34,-29,-24,-18,-12,-6,0,6,13,20,26,33,40,46,52,58,64,70,76,81,86,91,96,101,105,110,114,118,122,126,130,133,137,140,144,148,152,155,158,162,165,168,171,174,177,179,182,184,185,186,188,188,189,189,188,187,186,185,183,181,179,177,175,172,170,167,165,162,159,156,154,151,148,144,141,138,134,131,127,123,119,115,111,107,103,
11:33:45.684 -> [169860][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:45.684 -> [169860][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584
11:33:45.716 -> [169866][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:45.716 -> 99,95,91,87,83,78,74,69,65,60,55,50,45,40,35,30,25,20,14,9,4,0,-5,-10,-15,-20,-25,-29,-33,-37,-41,-45,-49,-52,-55,-58,-61,-64,-66,-68,-71,-73,-75,-78,-80,-82,-84,-86,-88,-89,-91,-92,-93,-94,-94,-95,-95,-95,-96,-96,-96,-96,-96,-96,-96,-95,-95,-94,-94,-93,-92,-90,-89,-87,-86,-84,-82,-81,-79,-77,-75,-73,-70,-68,-65,-63,-60,-56,-53,-49,-45,-40,-36,-32,-27,-23,-19,-14,-10,-6,-2,1,4,7,11,14,17,20,22,25,27,29,30,31,32,32,33,32,31,30,29,27,25,23,20,18,15,12,10,7,4,2,0,-1,-3,-5,-7,-8,-9,-10,-11,-11,-12,-12,-13,-13,-14,-15,-17,-19,-21,-24,-27,-31,-34,-39,-43,-48,-53,-58,-63,-68,-72,-77,-82,-86,-90,-94,-97,-101,-104,-107,-110,-112,-115,-117,-119,-121,-123,-124,-126,-128,-129,-131,-132,-133,-135,-136,-137,-138,-138,-138,-138,-138,-138,-137,-136,-135,-134,-133,-132,-130,-129,-128,-127,-125,-124,-122,-120,-118,-116,-113,-110,-107,-103,-100,-95,-91,-87,-82,-78,-74,-70,-66,-62,-59,-56,-53,-51,-49,-48,-46,-45,-44,-43,-42,-41,-40,-38,-37,-36,-34,-32,-30,-28,-26,-23,-20,-17,-14,-11,-9,-6,-3,0,1,4,6,9,11,13,15,16,18,19,20,21,22,23,24,24,25,26,26,27,27,27,27,27,28,27,28,28,28,28,28,28,27,27,26,26,25,25,24,23,22,21,20,19,19,18,17,16,16,15,15,15,16,16,17,19,20,22,24,26,29,31,33,35,37,39,41,43,45,46,47,49,50,51,52,53,54,54,55,56,57,58,59,60,62,64,66,68,70,73,77,80,83,87,91,95,98,103,107,111,115,120,124,128,132,136,140,143,147,150,152,155,157,159,161,163,165,166,167,169,170,171,172,173,174,175,176,177,178,179,180,181,183,184,186,188,189,191,192,194,195,197,198,199,199,199,200,200,199,199,199,198,198,197,196,196,195,194,193,191,190,188,186,183,180,177,173,169,165,160,155,150,145,140,134,129,123,117,112,107,101,96,91,86,82,77,73,69,65,61,56,52,47,43,38,33,27,22,16,9,3,-3,-10,-17,-24,-31,-38,-45,-52,-59,-66,-72,-78,-84,-89,-94,-98,-103,-106,-110,-114,-117,-120,-123,-126,-128,-130,-133,-136,-137,-140,-142,-144,-146,-149,-150,-152,-154,-155,-157,-158,-158,-159,-159,-159,-159,-158,-158,-157,-156,-155,-153,-152,-151,-149,-148,-147,-146,-144,-143,-142,-140,-139,-137,-135,-133,-131,-128,-126,-123,-120,-117,-114,-111,-107,-104,-100,-96,-92,-89,-85,-81,-77,-73,-69,-65,-61,-58,-54,-51,-48,-44,-41,-38,-35,-32,-29,-26,-23,-20,-18,-15,-12,-9,-6,-3,-1,1,3,6,7,9,11,12,13,14,15,16,16,17,17,18,18,19,19,20,20,20,21,21,21,22,22,22,22,22,22,21,21,20,18,17,15,13,11,9,7,4,2,0,-2,-4,-7,-9,-11,-13,-15,-17,-19,-21,-23,-25,-27,-29,-32,-34,-36,-39,-41,-44,-47,-50,-53,-56,-59,-63,-66,-69,-72,-75,-78,-81,-83,-86,-87,-89,-90,-91,-91,-92,-91,-90,-89,-88,-86,-85,-83,-81,-79,-78,-77,-76,-75,-75,-75,-75,-76,-77,-78,-79,-81,-82,-83,-84,-84,-84,-83,-82,-80,-78,-76,-72,-69,-66,-62,-58,-54,-50,-46,-43,-39,-36,-32,-28,-25,-21,-18,-15,-11,-8,-5,-2,0,2,5,8,10,12,14,15,17,18,19,20,21,22,22,22,22,22,22,21,20,19,18,17,16,14,13,12,11,9,8,7,6,5,3,2,1,0,0,-1,-3,-4,-5,-7,-9,-11,-12,-14,-16,-18,-20,-22,-24,-26,-28,-30,-32,-35,-37,-39,-42,-44,-46,-48,-50,-51,-53,-54,-55,-56,-57,-58,-59,-59,-60,-60,-61,-61,-61,-61,-60,-59,-59,-58,-57,-56,-55,-54,-52,-52,-51,-50,-50,-49,-49,-49,-49,-49,-49,-49,-49,-49,-49,-49,-48,-47,-47,-46,-45,-44,-42,-41,-40,-39,-38,-37,-36,-35,-34,-33,-32,-31,-29,-28,-27,-25,-24,-22,-20,-18,-16,-14,-13,-11,-10,-8,-7,-7,-6,-6,-6,-5,-5,-5,-5,-5,-4,-4,-4,-3,-3,-2,-1,0,0,1,2,3,4,6,7,8,9,10,11,12,12,13,14,14,14,14,14,14,14,14,13,13,13,13,13,13,14,14,14,15,15,15,15,15,15,15,15,15,15,14,14,13,12,
11:33:46.004 -> [170169][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3072
11:33:46.004 -> [170170][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3072
11:33:46.004 -> [170177][D][BluetoothA2DPSink.cpp:1185] audio_data_callback(): [BT] stream_reader
11:33:46.036 -> 11,10,9,7,6,5,3,2,0,0,-1,-2,-3,-4,-5,-6,-7,-7,-8,-8,-9,-9,-9,-9,-8,-8,-8,-7,-6,-5,-4,-2,-1,0,1,3,5,7,9,11,13,14,16,18,20,22,24,26,28,30,32,34,36,38,41,44,47,49,53,56,59,63,67,70,74,78,82,85,88,91,94,96,98,100,102,103,104,105,106,107,108,108,109,109,110,110,111,111,111,111,111,110,110,109,109,108,108,107,106,105,104,103,102,100,99,97,96,95,93,91,90,88,86,85,83,81,79,77,75,74,72,70,68,66,64,62,61,59,57,54,52,50,47,45,43,40,37,35,32,29,26,22,19,16,13,10,7,4,2,0,-2,-4,-6,-7,-9,-10,-11,-11,-12,-12,-13,-13,-13,-14,-14,-14,-15,-16,-17,-18,-19,-21,-23,-25,-27,-29,-31,-33,-35,-37,-38,-40,-41,-41,-42,-41,-41,-40,-38,-36,-33,-31,-27,-24,-21,-18,-15,-12,-10,-7,-4,-2,0,1,3,5,7,9,11,12,14,16,18,21,23,26,29,32,35,39,43,47,51,56,60,65,70,74,79,84,89,94,98,103,108,112,117,121,125,129,133,137,141,145,149,152,155,159,162,165,168,171,173,176,178,179,181,182,183,184,184,184,184,184,183,182,181,180,179,177,176,175,173,171,170,168,166,164,161,158,155,152,149,146,142,138,134,130,126,122,117,113,108,103,98,93,88,83,78,73,67,62,57,52,47,42,37,31,26,21,16,11,6,1,-3,-8,-12,-17,-21,-26,-30,-34,-38,-42,-45,-49,-52,-54,-57,-59,-61,-62,-64,-64,-65,-65,-65,-65,-64,-63,-62,-60,-58,-56,-54,-51,-49,-46,-43,-40,-38,-35,-33,-31,-29,-27,-26,-25,-24,-23,-22,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-11,-10,-9,-7,-6,-5,-3,-2,-1,0,0,0,1,1,2,3,4,5,5,6,7,8,9,9,10,10,10,11,11,11,10,11,11,11,10,10,10,10,9,9,8,7,6,5,4,3,2,0,0,-2,-4,-6,-8,-10,-12,-14,-16,-19,-21,-24,-27,-30,-33,-37,-40,-44,-48,-51,-55,-59,-63,-66,-70,-74,-78,-81,-85,-88,-91,-93,-95,-97,-99,-101,-102,-103,-104,-105,-106,-106,-107,-108,-109,-109,-110,-112,-113,-115,-116,-118,-119,-121,-122,-123,-124,-124,-124,-124,-124,-123,-122,-121,-119,-117,-115,-113,-110,-107,-104,-101,-98,-94,-90,-87,-83,-80,-76,-73,-69,-66,-63,-60,-57,-54,-51,-48,-45,-43,-40,-37,-35,-32,-29,-26,-23,-20,-17,-14,-11,-8,-4,-1,1,5,8,11,14,16,19,21,23,26,27,30,32,34,36,38,40,42,43,44,45,46,46,46,46,45,44,43,41,39,37,35,33,30,27,25,22,19,16,12,9,6,2,0,-4,-7,-11,-15,-18,-22,-25,-29,-32,-35,-38,-41,-44,-46,-49,-51,-53,-55,-56,-58,-59,-61,-62,-63,-64,-64,-65,-66,-67,-67,-67,-67,-67,-67,-66,-66,-66,-66,-66,-66,-66,-66,-66,-67,-67,-67,-68,-68,-69,-69,-70,-70,-71,-71,-71,-71,-70,-70,-70,-70,-68,-67,-65,-63,-61,-58,-54,-51,-47,-43,-39,-34,-29,-24,-20,-15,-10,-5,0,4,9,14,18,22,27,31,34,38,42,45,48,51,54,57,60,63,66,70,73,77,80,84,87,91,95,99,102,106,109,112,115,117,119,120,121,123,123,123,123,123,123,122,121,121,120,120,120,119,119,119,119,119,120,120,120,120,120,120,120,119,119,118,117,115,114,113,111,109,107,105,103,101,98,95,92,89,86,82,79,75,72,68,64,60,56,52,48,44,40,36,31,27,22,18,13,9,4,0,-5,-11,-16,-21,-26,-31,-37,-41,-46,-50,-54,-58,-61,-64,-67,-69,-71,-72,-73,-75,-76,-76,-77,
11:33:46.260 -> [170431][D][BluetoothA2DPSink.cpp:1335] ccall_audio_data_callback(): [BT] ccall_audio_data_callback: 3584
11:33:46.260 -> [170431][D][BluetoothA2DPSink.cpp:1159] audio_data_callback(): [BT] audio_data_callback: 3584

For me the audio quality is perfect using my Android phone with log level Info!

Wondering if it's some knockoff boards now....

@pschatzmann
Copy link
Owner

pschatzmann commented Oct 21, 2023

If you have some SD drive you could save the raw data in a file and analyze it e.g. in Audacity.
The values in the beginning are usually very small - and not audible.
If you use the full volume the range should be between -32768 and 32767

With my sketch you can also try to analyze it in the Serial Plotter in Arduino

Did you check if the BluetoothA2DPSinkQueued makes a difference ?

@pschatzmann pschatzmann added the help wanted Extra attention is needed label Oct 25, 2023
@mrhempman69
Copy link
Author

mrhempman69 commented Oct 31, 2023

I have since tested with a second brand (HiLetGo) and the result is the same, functional (very good) audio for Android, and staticy / delayed volume controls for iOS.

If you have some SD drive you could save the raw data in a file and analyze it e.g. in Audacity. The values in the beginning are usually very small - and not audible. If you use the full volume the range should be between -32768 and 32767

I got an SD card module but the pins were mislabeled and it didn't function, so I will test with another one soon...

With my sketch you can also try to analyze it in the Serial Plotter in Arduino

I think I will try the SD card instead since I don't know how to do this

Did you check if the BluetoothA2DPSinkQueued makes a difference ?

Yes many times

@mrhempman69
Copy link
Author

mrhempman69 commented Nov 2, 2023

If you are interested, the cheapest phone to test with is the iPhone SE (2020 version). this one goes for about $88: https://www.ebay.com/itm/126111383313?hash=item1d5cd2ff11:g:jM0AAOSwyWdlEzKj&amdata=enc%3AAQAIAAAAwGf3wQcU9TdfnyVYhi6Dl2pmBVlartaIW%2BX%2BJ0V3ZVmaiIJ1XmDmygY1rc7ldXkwIKdtUi1pB5Z6%2B%2BmSK%2Fd31FOpWtFIb%2BuShO87gpLKDGJHAKmt1tbdf5QcVxuosaymsgWSK8vXMypu8l5TwHthQMj%2BoyjCjvNqik1%2F68%2FZaTDCrjgIlF8KKy1YyUM1Yn9GO25IgdyLOv9RtHzIMHrAdJGLwH%2BK1pLLmiPdxRTLK5hj1Oeb25HAw87xqEwaE4c1CA%3D%3D%7Ctkp%3ABk9SR9LuwKfyYg

You may be able to find it for cheaper, but this is the cheapest one that I could find that doesn't appear to have a problem (bad screen, missing home button, etc)

I stand by my offer that I would donate the money for it!!

@Leo-Ha
Copy link

Leo-Ha commented Apr 7, 2024

If you are interested, the cheapest phone to test with is the iPhone SE (2020 version). this one goes for about $88: https://www.ebay.com/itm/126111383313?hash=item1d5cd2ff11:g:jM0AAOSwyWdlEzKj&amdata=enc%3AAQAIAAAAwGf3wQcU9TdfnyVYhi6Dl2pmBVlartaIW%2BX%2BJ0V3ZVmaiIJ1XmDmygY1rc7ldXkwIKdtUi1pB5Z6%2B%2BmSK%2Fd31FOpWtFIb%2BuShO87gpLKDGJHAKmt1tbdf5QcVxuosaymsgWSK8vXMypu8l5TwHthQMj%2BoyjCjvNqik1%2F68%2FZaTDCrjgIlF8KKy1YyUM1Yn9GO25IgdyLOv9RtHzIMHrAdJGLwH%2BK1pLLmiPdxRTLK5hj1Oeb25HAw87xqEwaE4c1CA%3D%3D%7Ctkp%3ABk9SR9LuwKfyYg

You may be able to find it for cheaper, but this is the cheapest one that I could find that doesn't appear to have a problem (bad screen, missing home button, etc)

I stand by my offer that I would donate the money for it!!

Sorry for this not being directly related to the issue but what iphone are you using and does the audio work otherwise since i cant get audio to work right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants