A2P_SINK example in Slave Mode I2S
Posted: Mon Apr 22, 2024 10:32 pm
Hello!
somebody could help me? I would like to use the a2dp_sink example from classic_bt (bluedroid), to be able to send audio via Bluetooth (A2DP) to the ESP32-Devkit 4 and in turn send it via I2S in slave mode, to be able to send it to a DSP (ADAU1701 of Wondom, here is the Master mode). In the A2DP_SINK example it is only in Master mode. but when changing it to slave mode in the file "bt_app_av.c" and when connecting YouTube it says: "W (37186) BT_APP_CORE: ringbuffer is full, please discard this packet!" , and I don't hear anything.
This is the I2S configuration from the "bt_app_av.c" file;
I haven't changed anything else in the example and I have no other ideas on how to change the settings so I can listen to something. What am I doing wrong? What could I be missing?
somebody could help me? I would like to use the a2dp_sink example from classic_bt (bluedroid), to be able to send audio via Bluetooth (A2DP) to the ESP32-Devkit 4 and in turn send it via I2S in slave mode, to be able to send it to a DSP (ADAU1701 of Wondom, here is the Master mode). In the A2DP_SINK example it is only in Master mode. but when changing it to slave mode in the file "bt_app_av.c"
- i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_0, I2S_ROLE_SLAVE);
This is the I2S configuration from the "bt_app_av.c" file
- i2s_std_config_t std_cfg = {
- .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(44100),
- .slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_STEREO),
- .gpio_cfg = {
- .mclk = I2S_GPIO_UNUSED,
- .bclk = CONFIG_EXAMPLE_I2S_BCK_PIN,
- .ws = CONFIG_EXAMPLE_I2S_LRCK_PIN,
- .dout = CONFIG_EXAMPLE_I2S_DATA_PIN,
- .din = I2S_GPIO_UNUSED,
- .invert_flags = {
- .mclk_inv = false,
- .bclk_inv = false,
- .ws_inv = false,
- },
- },
- }
I haven't changed anything else in the example and I have no other ideas on how to change the settings so I can listen to something. What am I doing wrong? What could I be missing?