I would like to modify the USB example "dev_composite_audio_multi_ch_unified_bm" to allow me to read 8 channels of audio from the DMic board connected to the 685 board.
How should I edit the microphone configuration to read the data from the DMic board, and which buffers should I expand for the increased amount of data?
Hi, Vitaly,
Sorry for the delay.
For the example "dev_composite_audio_multi_ch_unified_bm", I suppose it is complicated to change the sampling rate, this is the PCM stream connection:
The PCM generated by DMIC are outputted to the codec WM8904, and also outputted to USB, the sampling rate of both DMIC and Codec WM8904 must be the same, furthermore, in order to avoid that part of PCM are missing or emptying, for example, assume that DMIC sampling is 48KHz, and PCM is 24 bits(extended to 32 bits with padding a byte), the 1K USB frame will cover 48*32bits*2 or 48*8bytes=384 Bytes.
If you want to change the sampling rate, all the Codec, DMIC and USB have to be modified.
Hope it can help you
BR
XiangJun Rong
Hello,
I did not wish to change the sampling rate of the example, since 16kHz is the rate I needed.
I wanted to configure the audio section to read from the DMic connected to the board instead of reading from the on-board microphone.
I was able to do this by copying the section regarding reading aduio from the Dmic from the "dmic_multi_channel" driver example, and editing the callback function to write into a buffer which is copied into the PC via USB at another point.
Thank you.