https://github.com/eiffelpeter/esp32_a2dp_sink
upgrade my old 9th corolla car stereo (CQ-JS7180AAT) to support bluetooth a2dp
https://github.com/eiffelpeter/esp32_a2dp_sink
a2dp corolla esp-idf esp32
Last synced: about 1 month ago
JSON representation
upgrade my old 9th corolla car stereo (CQ-JS7180AAT) to support bluetooth a2dp
- Host: GitHub
- URL: https://github.com/eiffelpeter/esp32_a2dp_sink
- Owner: eiffelpeter
- Created: 2025-09-23T08:22:24.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-09-25T06:31:11.000Z (9 months ago)
- Last Synced: 2025-10-06T02:24:43.452Z (9 months ago)
- Topics: a2dp, corolla, esp-idf, esp32
- Language: C
- Homepage:
- Size: 16.8 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
The cheap a2dp module with serious pop-noise and can not mute FM radio.
So I build this project which use esp32 + ti pcm5102.
## Install esp-idf enviroment on ubuntu 22.04
[refer](https://docs.espressif.com/projects/esp-idf/en/release-v5.4/esp32/get-started/linux-macos-setup.html#)
clone sdk, install toolchain and export path
```
git clone -b v5.4 --recursive https://github.com/espressif/esp-idf.git esp-idf-v5.4
cd esp-idf-v5.4/
./install.sh
. ./export.sh
```
## build
1. clone this example and build
```
git clone https://github.com/eiffelpeter/esp32_a2dp_sink.git
cd esp32_a2dp_sink
idf.py set-target esp32
idf.py build
```
2. connect `esp-prog` to ubuntu usb, check `/dev/ttyUSB1` exist.
3. connect `esp-prog` to esp32.
4. Download and run `idf.py -p /dev/ttyUSB1 flash monitor`.
5. open your phone to search bt and pair, then play music.
6. If you want to listen FM radio, tund off bt on your phone.

## gpios
| esp32 | |
|-------|----------|
| 17 | I2S_LRCK |
| 18 | I2S_BCK |
| 23 | I2S_DATA |
| 19 | mute |
| 22 | led |
| mute | |
|------|-------------------------------|
| high | unmute pcm5102, mute FM radio |
| low | mute pcm5102, unmute FM radio |
## power regulator


## pcm5102 config ( green )

## esp32 and pcm5102 connection

## pcm5102 L/R audio to car stereo

## esp32 mute FM radio when a2dp streaming

## connect esp32 to car stereo ( remove tape and cd player )

## assemble in car with phone holder

## Can Use ESP32-DevKit WROOM to develop.

## Support more codec
you can refer [this](https://github.com/cfint/esp32-a2dp-sink) to develop.
but it need more memory, have to use `WROVER` DevKit.
## Reference
[link](https://github.com/espressif/esp-idf/issues/14795)