why does esp32-lyrat running a2dp_sink example without output ?

mkseven32
Posts: 32
Joined: Mon Apr 23, 2018 1:21 am

why does esp32-lyrat running a2dp_sink example without output ?

Postby mkseven32 » Tue Apr 24, 2018 9:59 am

Hi all
i have config the a2dp_sink example as like below
A2DP sink output as I2S codec;
GPIO setting :

| ESP pin | I2S signal |
| :-------- | :----------- |
| GPIO25 | LRCK |
| GPIO26 | DATA |
| GPIO5 | BCK |

when bt linked to smartphone, while playing muisc, there is a log shows bt is works fine, but there is not any voice out!

does any wrong of the setting ?

BR !
Attachments
2018-04-24_174359.png
2018-04-24_174359.png (20.47 KiB) Viewed 10748 times
2018-04-24_173911.png
2018-04-24_173911.png (36.41 KiB) Viewed 10748 times
2018-04-24_173903.png
2018-04-24_173903.png (39.04 KiB) Viewed 10748 times

User avatar
ESP_krzychb
Posts: 394
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: why does esp32-lyrat running a2dp_sink example without output ?

Postby ESP_krzychb » Tue Apr 24, 2018 11:05 am

Hi mkseven32,
mkseven32 wrote:when bt linked to smartphone, while playing muisc, there is a log shows bt is works fine, but there is not any voice out!
The ES8388 codec on board of ESP32 LyratT requires configuration.

Have you tried pipeline_bt_sink example instead?

mkseven32
Posts: 32
Joined: Mon Apr 23, 2018 1:21 am

Re: why does esp32-lyrat running a2dp_sink example without output ?

Postby mkseven32 » Wed Apr 25, 2018 4:20 am

thanks ,no i have not try other bt sink example。

i just curious about whether the GPIO setting is right or not?

please help me check it !

User avatar
ESP_krzychb
Posts: 394
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: why does esp32-lyrat running a2dp_sink example without output ?

Postby ESP_krzychb » Wed Apr 25, 2018 10:46 am

mkseven32 wrote: i just curious about whether the GPIO setting is right or not?

please help me check it !
I2S GPIO assignment of the ESP32 LyraT is listed under https://esp-adf.readthedocs.io/en/lates ... header-jp4 and your setting for the three I2S signals is the same.

mkseven32
Posts: 32
Joined: Mon Apr 23, 2018 1:21 am

Re: why does esp32-lyrat running a2dp_sink example without output ?

Postby mkseven32 » Thu Apr 26, 2018 3:03 am

Hi
do you mean the example of pipeline_bt_sink in the esp-adf ?
it is OK,but i found there is less info about make menuconfig in Readme file .

anyway , the examples is so unstable,when esp broad linked to smart phone,first time play music is OK, but when smart phone take a phone, the linked could not relinked again。

User avatar
ESP_krzychb
Posts: 394
Joined: Sat Oct 01, 2016 9:05 am
Contact:

Re: why does esp32-lyrat running a2dp_sink example without output ?

Postby ESP_krzychb » Thu Apr 26, 2018 4:37 am

mkseven32 wrote:Hi
do you mean the example of pipeline_bt_sink in the esp-adf ?
it is OK,but i found there is less info about make menuconfig in Readme file .
For the the 'pipeline_bt_sink' there is no need to configure I2S pins using menuconfig.
Related configuration is hidden in the driver 'esp-adf/components/audio_hal'

Narayanan123
Posts: 1
Joined: Sun Aug 23, 2020 4:38 am

Re: why does esp32-lyrat running a2dp_sink example without output ?

Postby Narayanan123 » Sun Aug 23, 2020 5:21 am

I tried for the a2dp_sink in ESP32 LyraT board.. I cant hear the audio in my External Speakers as well as earphones during program execution.....


I have config the a2dp_sink example as like below
A2DP sink output as I2S codec;
GPIO setting :

| ESP pin | I2S signal |
| :-------- | :----------- |
| GPIO22 | LRCK |
| GPIO25 | DATA |
| GPIO26 | BCK |

I tried the both Internal DAC and External I2S codec in A2DP example configuration and I selected the "Classic Bluetooth" and "A2DP" in Component config under menuconfig

When the output is started It scans the Bluetooth devices and connect automatically and bluetooth device named "ESP SPEAKER" is also gets connected... I got the results which can see in my laptop screen

Output log:-

Executing action: flash
Running ninja in directory /home/narayanan/esp/esp-idf/examples/bluetooth/bluedroid/classic_bt/
a2dp_sink/build
Executing "ninja flash"...
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
[1/2] cd /home/narayanan/esp/esp-idf/c...omponents/esptool_py/run_esptool.cmake
esptool.py --chip esp32 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset
write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x8000 partition_table/partition-
table.bin 0x1000 bootloader/bootloader.bin 0x10000 a2dp_sink.bin
esptool.py v3.0-dev
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:0a:c4:e0:56:bc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 1079.8 kbit/s)...
Hash of data verified.
Compressed 24960 bytes to 15295...
Writing at 0x00001000... (100 %)
Wrote 24960 bytes (15295 compressed) at 0x00001000 in 0.3 seconds (effective 572.7 kbit/s)...
Hash of data verified.
Compressed 699920 bytes to 425040...
Writing at 0x00010000... (3 %)
Writing at 0x00014000... (7 %)
Writing at 0x00018000... (11 %)
Writing at 0x0001c000... (15 %)
Writing at 0x00020000... (19 %)
Writing at 0x00024000... (23 %)
Writing at 0x00028000... (26 %)Writing at 0x0002c000... (30 %)
Writing at 0x00030000... (34 %)
Writing at 0x00034000... (38 %)
Writing at 0x00038000... (42 %)
Writing at 0x0003c000... (46 %)
Writing at 0x00040000... (50 %)
Writing at 0x00044000... (53 %)
Writing at 0x00048000... (57 %)
Writing at 0x0004c000... (61 %)
Writing at 0x00050000... (65 %)
Writing at 0x00054000... (69 %)
Writing at 0x00058000... (73 %)
Writing at 0x0005c000... (76 %)
Writing at 0x00060000... (80 %)
Writing at 0x00064000... (84 %)
Writing at 0x00068000... (88 %)
Writing at 0x0006c000... (92 %)
Writing at 0x00070000... (96 %)
Writing at 0x00074000... (100 %)
Wrote 699920 bytes (425040 compressed) at 0x00010000 in 9.8 seconds (effective 571.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Executing action: monitor
Running idf_monitor in directory
/home/narayanan/esp/esp-idf/examples/bluetooth/bluedroid/classic_bt/a2dp_sink
Executing "/home/narayanan/.espressif/python_env/idf4.3_py3.6_env/bin/python /home/narayanan/
esp/esp-idf/tools/idf_monitor.py -p /dev/ttyUSB0 -b 115200 --toolchain-prefix xtensa-esp32-elf-
/home/narayanan/esp/esp-idf/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/build/
a2dp_sink.elf -m '/home/narayanan/.espressif/python_env/idf4.3_py3.6_env/bin/python'
'/home/narayanan/esp/esp-idf/tools/idf.py' '-p' '/dev/ttyUSB0'"...
--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun 8 2016 00:22:57
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:2
load:0x3fff0030,len:4
load:0x3fff0034,len:7120
ho 0 tail 12 room 4
load:0x40078000,len:13732
load:0x40080400,len:4000
0x40080400: _init at ??:?
entry 0x40080684
I (30) boot: ESP-IDF v4.3-dev-472-gcf056a7d0-dirty 2nd stage bootloader
I (31) boot: compile time 18:09:50
I (32) boot: chip revision: 1
I (35) boot_comm: chip revision: 1, min. bootloader chip revision: 0I (42) boot.esp32: SPI Speed
: 40MHz
I (47) boot.esp32: SPI Mode
: DIO
I (52) boot.esp32: SPI Flash Size : 2MB
I (56) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (65) boot: ## Label
Usage
Type ST Offset Length
I (72) boot: 0 nvs
WiFi data
01 02 00009000 00006000
I (80) boot: 1 phy_init
RF data
01 01 0000f000 00001000
I (87) boot: 2 factory
factory app 00 00 00010000 00100000
I (95) boot: End of partition table
I (99) boot_comm: chip revision: 1, min. application chip revision: 0
I (106) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1c1d0 (115152) map
I (159) esp_image: segment 1: paddr=0x0002c1f8 vaddr=0x3ffbdb60 size=0x036a0 ( 13984) load
I (165) esp_image: segment 2: paddr=0x0002f8a0 vaddr=0x40080000 size=0x00404 ( 1028) load
0x40080000: _WindowOverflow4 at
/home/narayanan/esp/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1730
I (166) esp_image: segment 3: paddr=0x0002fcac vaddr=0x40080404 size=0x0036c ( 876) load
I (175) esp_image: segment 4: paddr=0x00030020 vaddr=0x400d0020 size=0x76640 (484928) map
0x400d0020: _stext at ??:?
I (368) esp_image: segment 5: paddr=0x000a6668 vaddr=0x40080770 size=0x14784 ( 83844) load
I (416) boot: Loaded app from partition at offset 0x10000
I (416) boot: Disabling RNG early entropy source...
I (428) cpu_start: Pro cpu up.
I (428) cpu_start: Starting app cpu, entry point is 0x40081494
0x40081494: call_start_cpu1 at
/home/narayanan/esp/esp-idf/components/esp_system/port/cpu_start.c:109
I (0) cpu_start: App cpu up.
I (444) cpu_start: Pro cpu start user code
I (444) cpu_start: Application information:
I (444) cpu_start: Project name: a2dp_sink
I (449) cpu_start: App version: v4.3-dev-472-gcf056a7d0-dirty
I (456) cpu_start: Compile time: Aug 4 2020 18:09:29
I (462) cpu_start: ELF file SHA256: 03c9cb4149f08ebb...
I (468) cpu_start: ESP-IDF:
v4.3-dev-472-gcf056a7d0-dirty
I (476) heap_init: Initializing. RAM available for dynamic allocation:
I (483) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (489) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (495) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (501) heap_init: At 3FFCC608 len 000139F8 (78 KiB): DRAM
I (507) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (513) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (520) heap_init: At 40094EF4 len 0000B10C (44 KiB): IRAM
I (527) spi_flash: detected chip: generic
I (531) spi_flash: flash io: dio
W (535) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k).
Using the size in the binary image header.
I (549) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (617) I2S: DMA Malloc info, datalen=blocksize=240, dma_buf_count=6I (617) I2S: PLL_D2: Req RATE: 44100, real rate: 44642.000, BITS: 16, CLKM: 14, BCK: 8,
MCLK: 11289966.924, SCLK: 1428544.000000, diva: 64, divb: 11
I (627) BTDM_INIT: BT controller compile version [8fafaa4]
I (637) system_api: Base MAC address is not set
I (637) system_api: read default base MAC address from EFUSE
I (737) phy: phy_version: 4182, f1ba940, Jun 4 2020, 19:40:07, 0, 0
I (1337) BT_AV: event: 10
I (1347) BT_AV: event: 10
I (1347) BT_AV: event: 10
I (1347) BT_AV: event: 10
E (19507) BT_APPL: bta_av_rc_create ACP handle exist for shdl:0
I (19517) BT_AV: A2DP connection state: Connecting, [04:b1:67:e5:a2:72]
I (19777) BT_AV: A2DP audio stream configuration, codec type 0
I (19777) I2S: PLL_D2: Req RATE: 44100, real rate: 44642.000, BITS: 16, CLKM: 14, BCK: 8,
MCLK: 11289966.924, SCLK: 1428544.000000, diva: 64, divb: 11
I (19787) BT_AV: Configure audio player 21-15-2-35
I (19797) BT_AV: Audio player configured, sample rate=44100
W (19997) BT_APPL: new conn_srvc id:19, app_id:0
I (19997) BT_AV: A2DP connection state: Connected, [04:b1:67:e5:a2:72]
I (20377) RCCT: AVRC conn_state evt: state 1, [04:b1:67:e5:a2:72]
I (20377) RCTG: AVRC conn_state evt: state 1, [04:b1:67:e5:a2:72]
I (20377) RCTG: AVRC remote features 24b, CT features 3
I (20377) RCTG: start volume change simulation
I (20447) RCCT: remote rn_cap: count 5, bitmask 0x2126
I (20527) RCCT: AVRC metadata rsp: attribute id 0x1,
I (20527) RCCT: AVRC metadata rsp: attribute id 0x2,
I (20527) RCCT: AVRC metadata rsp: attribute id 0x4,
I (20527) RCCT: AVRC metadata rsp: attribute id 0x20,
I (20597) RCTG: AVRC register event notification: 13, param: 0x0
I (30387) RCTG: Volume is set locally to: 3%
I (30507) RCTG: AVRC register event notification: 13, param: 0x0
I (40387) RCTG: Volume is set locally to: 7%
I (40507) RCTG: AVRC register event notification: 13, param: 0x0
I (50387) RCTG: Volume is set locally to: 11%
I (51007) RCTG: AVRC register event notification: 13, param: 0x0
I (57007) RCCT: AVRC event notification: 5
I (57007) BT_AV: Play position changed: 0-ms
I (57507) RCCT: AVRC event notification: 2
I (58507) RCCT: AVRC metadata rsp: attribute id 0x1,
PoovukkulOlinthirukkumInstrumentalJeansRingtone
I (58507) RCCT: AVRC metadata rsp: attribute id 0x2,
I (58507) RCCT: AVRC metadata rsp: attribute id 0x4,
I (58517) RCCT: AVRC metadata rsp: attribute id 0x20,
I (60387) RCTG: Volume is set locally to: 15%
I (60507) RCTG: AVRC register event notification: 13, param: 0x0
I (70387) RCTG: Volume is set locally to: 19%
I (71007) RCTG: AVRC register event notification: 13, param: 0x0
I (71507) RCCT: AVRC event notification: 1
I (71507) BT_AV: Playback status changed: 0x1
I (72007) BT_LOG: bta_av_link_role_ok hndl:x41 role:1 conn_audio:x1 bits:1 features:x824b
W (72007) BT_APPL: new conn_srvc id:19, app_id:1I (72017) BT_AV: A2DP audio state: Started
I (72027) RCCT: AVRC event notification: 5
I (72027) BT_AV: Play position changed: 125235-ms
I (72027) RCCT: AVRC event notification: 2
I (72087) RCCT: AVRC metadata rsp: attribute id 0x1,
PoovukkulOlinthirukkumInstrumentalJeansRingtone
I (72087) RCCT: AVRC metadata rsp: attribute id 0x2,
I (72087) RCCT: AVRC metadata rsp: attribute id 0x4,
I (72097) RCCT: AVRC metadata rsp: attribute id 0x20,
I (74087) BT_AV: Audio packet count 100
I (76087) BT_AV: Audio packet count 200
I (78087) BT_AV: Audio packet count 300
I (80097) BT_AV: Audio packet count 400
I (80387) RCTG: Volume is set locally to: 23%
I (80497) RCTG: AVRC register event notification: 13, param: 0x0
I (82077) BT_AV: Audio packet count 500
I (82147) RCCT: AVRC event notification: 5
I (82147) BT_AV: Play position changed: 135496-ms
I (84077) BT_AV: Audio packet count 600
I (86077) BT_AV: Audio packet count 700
I (89407) BT_AV: Audio packet count 800
I (90387) RCTG: Volume is set locally to: 27%
I (90547) RCTG: AVRC register event notification: 13, param: 0x0
I (92287) RCCT: AVRC event notification: 5
I (92287) BT_AV: Play position changed: 145586-ms
I (92437) BT_AV: Audio packet count 900
I (95357) BT_AV: Audio packet count 1000
I (99237) BT_AV: Audio packet count 1100
I (100387) RCTG: Volume is set locally to: 31%
I (100547) RCTG: AVRC register event notification: 13, param: 0x0


As you told that "The ES8388 codec on board of ESP32 LyratT requires configuration."


Could you explain the how to configure ES8388 codec driver??



Thanks

Who is online

Users browsing this forum: No registered users and 32 guests