A2P_SINK example in Slave Mode I2S

batzare
Posts: 1
Joined: Mon Apr 22, 2024 10:11 pm

A2P_SINK example in Slave Mode I2S

Postby batzare » 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"
  1. i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_0, I2S_ROLE_SLAVE);
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
  1.      i2s_std_config_t std_cfg = {
  2.            .clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(44100),
  3.            .slot_cfg = I2S_STD_MSB_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_32BIT, I2S_SLOT_MODE_STEREO),
  4.            .gpio_cfg = {
  5.                .mclk = I2S_GPIO_UNUSED,
  6.                .bclk = CONFIG_EXAMPLE_I2S_BCK_PIN,
  7.                .ws = CONFIG_EXAMPLE_I2S_LRCK_PIN,
  8.                .dout = CONFIG_EXAMPLE_I2S_DATA_PIN,
  9.                .din = I2S_GPIO_UNUSED,
  10.                .invert_flags = {
  11.                    .mclk_inv = false,
  12.                    .bclk_inv = false,
  13.                    .ws_inv = false,
  14.                },
  15.            },
  16.        }
;
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?

Who is online

Users browsing this forum: No registered users and 71 guests