Environment
- Development Kit: Widora AIR v6.0
- Module or chip used: ESP32 Rev.1
- IDF version: v3.2
- Build System: CMake
- Compiler version: 1.22.0-80-g6c4433a
- Operating System: Linux
- Power Supply: USB
Problem Description
When the i2s APLL clock is set to 44100Hz 16-bit 2ch, the real rate is 43945.238, which is inaccurate and causes BT_APPL: Pkt dropped problem when using A2DP streaming.
Expected Behavior
Real rate should be 44099.xxx or 44100.xxx
Actual Behavior
Real rate is 43945.238(~155Hz Error)
Steps to repropduce
- Get the
a2dp_sink example from esp-idf v3.2.
- Add
.use_apll = 1, to i2s_config to enable APLL.
- Build the example and flash it to esp32.
- Connect to esp32 with your phone and play some music.
Code to reproduce this issue
The a2dp_sink example from esp-idf v3.2
Debug Logs
I (16536) I2S: APLL: Req RATE: 44100, real rate: 43945.238, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 11249981.000, SCLK: 1406247.625000, diva: 1, divb: 0
......
I (81856) BT_AV: Audio packet count 3800
I (83316) BT_AV: Audio packet count 3900
I (84766) BT_AV: Audio packet count 4000
I (86226) BT_AV: Audio packet count 4100
I (87686) BT_AV: Audio packet count 4200
W (88266) BT_APPL: Pkt dropped
I (89136) BT_AV: Audio packet count 4300
I (90596) BT_AV: Audio packet count 4400
I (92056) BT_AV: Audio packet count 4500
I (93506) BT_AV: Audio packet count 4600
W (93656) BT_APPL: Pkt dropped
I (94966) BT_AV: Audio packet count 4700
I (96416) BT_AV: Audio packet count 4800
W (97196) BT_APPL: Pkt dropped
I (97876) BT_AV: Audio packet count 4900
I (99336) BT_AV: Audio packet count 5000
I (100786) BT_AV: Audio packet count 5100
W (101896) BT_APPL: Pkt dropped
I (102246) BT_AV: Audio packet count 5200
I (103706) BT_AV: Audio packet count 5300
W (105016) BT_APPL: Pkt dropped
Environment
Problem Description
When the i2s APLL clock is set to 44100Hz 16-bit 2ch, the real rate is 43945.238, which is inaccurate and causes
BT_APPL: Pkt droppedproblem when using A2DP streaming.Expected Behavior
Real rate should be 44099.xxx or 44100.xxx
Actual Behavior
Real rate is 43945.238(~155Hz Error)
Steps to repropduce
a2dp_sinkexample from esp-idf v3.2..use_apll = 1,toi2s_configto enable APLL.Code to reproduce this issue
The
a2dp_sinkexample from esp-idf v3.2Debug Logs