audio streaming in PSoC 6 with ping-pong buffers

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jac_3880146
Level 1
Level 1

I have a PSoC 6 CY8CKIT-062-BLE board, and I was looking for a code example which implements an audio passthrough behaviour (i.e. record data and output it in real-time). Basically I was looking for something similar to this: http://www.cypress.com/file/411496/download , but in that case it is "record data, then playback".

The configuration I had in mind would employ 4 buffers: 2 for input and 2 for output. When Ping_In is full (e.g. after 64 samples), an interrupt is triggered and data is copied to Ping_Out. Meanwhile, Pong_In starts filling, etc...

pastedImage_2.png

I checked this thread: Audio Streaming and Signal Processing using DMA but it was not really similar to the scenario I just explained. Is there a code example available for the case above? Thanks in advance!

0 Likes
1 Solution
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

I am sorry but presently we don't have any CE exactly matching the requirement.

Please check this CE available at this link, it has a ping pong buffer implemented :

http://www.cypress.com/documentation/code-examples/ce222221-psoc-6-mcu-voice-recorder

This link may also be useful:

ADC and DMA in PSOC6

View solution in original post

0 Likes
3 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

I am sorry but presently we don't have any CE exactly matching the requirement.

Please check this CE available at this link, it has a ping pong buffer implemented :

http://www.cypress.com/documentation/code-examples/ce222221-psoc-6-mcu-voice-recorder

This link may also be useful:

ADC and DMA in PSOC6

0 Likes

Thanks for the feedback. For implementing a simple ping pong with 2 buffers, should I use 1 descriptor and set the "number of x loops" to 2, or 2 descriptors chained to each other without any x loops?

0 Likes

I think it should use 1 descriptor and set the "number of x loops" to 2

0 Likes