LC3 encoding compression issue of stereo mode

Hi NRF team,

I am working on one project. I have used 2 PDM Microphones (MMICT5838-00-012). And I have used Zephyr RTOS for development.

I have used the LC3 encoding and decoding method in my application. Encoding and decoding both are working as expected in Mono mode.

But it is not working in stereo mode.

Stereo mode Mic configuration:  Sample rate: 16000Hz, Bit depth of 1 sample: 16bits, audio frame duration: 10000us, bitrate: 32000bps, total number of  channels: 2 channel(s)

I am getting an error from the LC3EncodeSessionOpen API. I am getting an LC3_RESULT_INSUFFICIENT_RESOURCES error code.

My observation is that once firmware calls LC3EncodeSessionOpen the second time for the second channel, it will trigger the LC3_RESULT_INSUFFICIENT_RESOURCES error code.

My project configurations:

CONFIG_MAIN_STACK_SIZE=32768
CONFIG_HEAP_MEM_POOL_SIZE=32768
CONFIG_MICROPHONE=y
CONFIG_AUDIO=y
CONFIG_AUDIO_DMIC=y
CONFIG_AUDIO_DMIC_LOG_LEVEL_DBG=n
CONFIG_NRFX_PDM_LOG=n
CONFIG_DMA=y
CONFIG_MAX_PCM_SAMPLE_RATE=16000
CONFIG_SAMPLE_BIT_WIDTH=16
CONFIG_CHANNEL_COUNT=2
CONFIG_PRIMARY_CHANNEL=1
CONFIG_SH_LC3_CODEC=y
CONFIG_FPU=y
CONFIG_LIBLC3=y
CONFIG_PSCM=y
CONFIG_SW_CODEC_LC3_T2_SOFTWARE=y
CONFIG_CMSIS_DSP=n
# CONFIG_CMSIS_DSP_FASTMATH=n
# CONFIG_CMSIS_DSP_TABLES=n
CONFIG_LC3_ENC_CHAN_MAX=2
CONFIG_LC3_DEC_CHAN_MAX=2

What could be the probable reason for this error? I have allocated a huge stack and heap in the memory and also tweaked some parameters like sampling rate and bit depth. But still, I am facing the same issue.

Parents Reply Children
No Data
Related