[sdiy] Raspberry Pi 2 Synthesizer Project

Scott Gravenhorst music.maker at gte.net
Sun Feb 7 19:36:47 CET 2016


Richie Burnett <rburnett at richieburnett.co.uk> wrote:
 >Great stuff.
 >
 >Was it hard to get the ping-pong audio buffer stuff working
 >properly with the OS and audio driver? I've never programed
 >real-time audio on such a high-level platform before. I've always
 >had to set up the buffers and DMA controller myself to make this
 >sort of thing happen, on dspic33f etc.
 >
 >Look forward to seeing how you take the project forward.
 >
 >-Richie,

With the Linux ALSA lib, at least for this system, I've not been able to 
get an interrupt or flag per sample time like dsPIC33F easily does. 
That's what I'm accustomed to developing with, so ALSA is new/different 
for me.  I've been able to get a period size of 8 frames and I'm using a 
polling function instead of a callback.  Either way, the period size is 
much larger than 2 frames.  Polling is just an infinite loop that calls 
a function to try to write already generated data.  The function can 
return a value that indicates try-again-later.  So you loop on 
generate-write.  I prefer interrupt per DAC frame, but this worked 
surprisingly well so I'm encouraged to continue.

-- ScottG



More information about the Synth-diy mailing list