I'm working with the Cirrus Logic Audio Card ((Cirrus Logic Audio Card for B+ and A+ onwards V1.02 ) and raspberry pi system in an attempt to use a transducer to play and record sound. At the moment, I am using the Playback_to_Lineout and Record_from_Linein Commands to play then record sounds and I have had success with this. However, at the moment, these two commands take about .5-.6s to run which is too long for my project (ideally the commands should run in 50ms). I have tried optimizing the code, and was able to reduce the time to about .4 seconds, but after reading the datasheet for the sound card (https://d3uzseaevmutz1.cloudfront.net/pubs/proDatasheet/WM5102_v4.2.pdf ), I saw that the sound card is capable of full-duplex which means that theoretically it should be able to record and play at the same time (although the datasheet did not specify at which sampling rates this was possible, I am using 192,000hz). Does anyone know either:
a. A way to minimize the time it takes to run the playback and record commands
or
b. A command/a way to do both playback/record at the same time
Thanks so much!





