esp-idf/examples/bluetooth/a2dp_sink
wangmengyang 645d9b9590 component/bt: add AVRC event for remote features indication
1. remove the feature mask parameter from AVRC connection state event, as the AVCTP connection can be initiated by remote device before service discovery to remote device is performed. \
In this case, AVRCP connection state event may not be reported after connection initated by remote device is established.
2. remove ESP_AVRC_CT_MAX_EVT
3. add more documentations to AVRC APIs
2018-01-08 19:43:54 +08:00
..
main component/bt: add AVRC event for remote features indication 2018-01-08 19:43:54 +08:00
Makefile component/bt: implement classic Bluetooth profiles A2DP(sink) and AVRCP(controller) 2017-04-12 16:42:14 +08:00
README.rst merge from master 2017-10-16 14:19:29 +07:00
sdkconfig.defaults merge from master 2017-10-16 14:19:29 +07:00

ESP-IDF A2DP-SINK demo
======================

Demo of A2DP audio sink role

This is the demo for user to use ESP_APIs to create a GATT Server.

Options choose step:
    1. make menuconfig.
    2. enter menuconfig "Component config", choose "Bluetooth"
    3. enter menu Bluetooth, choose "Classic Bluetooth" and do not choose "Release DRAM from Classic BT controller"
    4. choose your options.

For the I2S codec, pick whatever chip or board works for you; this code was written using a PCM5102 chip, but other I2S boards and chips will probably work as well. The default I2S connections are shown below, but these can be changed in menuconfig:

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

If the internal DAC is selected, analog audio will be available on GPIO25 and GPIO26. The output resolution on these pins will always be limited to 8 bit because of the internal structure of the DACs.


After the program started, other bluetooth devices such as smart phones can discover this device named "ESP_SPEAKER", and after connection is established, audio data can be transmitted and there will occur a count of audio data packets printed.