This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Thingy audio streaming

Hello,

I'm playing with two thingy and I'm trying to make a sort of walkie talkie with them.

I wrote the code for the sound service client, then modified other parts for making them scanning, connecting and discovering services, exchange mtu, and till here everything works.

At the moment, when I press the button (on the gatt client side) I start the microphone and I start receiving mic frames from the driver. Now I want to write that audio to the gatt server on the peer. Anyway the mic data is provided from the driver with ADPCM encoding, while the speaker characteristic is in PCM 8bit.

At this point I think I need a ADPCM decoder, is that right? Do anybody know where I can find the code for a routine that does this without the need of implementing it? Or is it better to get the PCM from the raw PDM data of the mic?

Thanks, Davide

Parents
  • Sorry Bjørn, I have a further question. The second link you passed me seems to be the starting point for the audio driver of the thingy firmware right? If so I have a doubt, the code at that link provides the routines for converting from PCM to ADPCM and vice versa, instead inside the drv_mic.c it seems that the routine is applied to PDM data.

    Now I'm a little bit confused, is the data in pdm_buf_t (drv_mic.c) encoded in PDM or PCM?

Reply
  • Sorry Bjørn, I have a further question. The second link you passed me seems to be the starting point for the audio driver of the thingy firmware right? If so I have a doubt, the code at that link provides the routines for converting from PCM to ADPCM and vice versa, instead inside the drv_mic.c it seems that the routine is applied to PDM data.

    Now I'm a little bit confused, is the data in pdm_buf_t (drv_mic.c) encoded in PDM or PCM?

Children
No Data
Related