Part Number: SIMPLELINK-CC2640R2-SDK
Tool/software: TI-RTOS
We refer to TI's github:
| Example | Streaming method | Input method | Output method | S/W Compression Supported | Sample Rate | Frame Size | Notifications per Frame |
|---|---|---|---|---|---|---|---|
| Bidirectional Audio | bidirectional | Analog mic + external codec | external codec + headphones | mSBC, ADPCM | 16kHz | 100 Octets | 1 |
| HID Advanced Remote, SensorTag Voice | unidirectional | Digit mic + pulse density modulation (PDM) | None | ADPCM | 16kHz | 100 Octets | 5 |
And also refer to TI's voice over BLE application note,
software-dl.ti.com/.../voice_platform.html
| Data | Calculation | rate |
|---|---|---|
| Raw | (16000 S / s) * (16 bits / S) | 256kbps |
| Compressed | 256kbps / 4 | 64kbps |
| Metadata | 4 B / 12ms | 2.67kbps |
| Compressed frame with metadata | 64kbps + 2.667kbps | 66.67kpbs |
The data flow is : I2S capture raw data -> ADPCM encoder -> BLE transmission
Regarding the BLE package size / encoded audio data size is configured to 100 (96 adpcm data + 4 byte header), so the I2S frame size should be set to 192 (96 *2 )
But we found from source code, the I2S frame size is configured to 96
#define AUDIO_DUPLEX_BUFSIZE_ADPCM 96
streamVariables.samplesPerFrame = AUDIO_DUPLEX_BUFSIZE_ADPCM
i2sParams.blockSize = streamVariables.samplesPerFrame;
In order to save bandwidth, so we need to encode the raw data,
Why the I2S frame size equal to the encoding size????