You migh want to check the BCM2835-ARM_Periphrals data sheet. Instead of polling the (FIFO) interrupts could be used:
"8.4.2 Operating in Interrupt mode
a) Set the EN bit to enable the PCM block. Set all operational values to define the frame
and channel settings. Assert RXCLR and/or TXCLR wait for 2 PCM clocks to ensure
the FIFOs are reset. The SYNC bit can be used to determine when 2 clocks have
passed. Set RXTHR/TXTHR to determine the FIFO thresholds.
b) Set INTR and/or INTT to enable interrupts.
c) If transmitting, ensure that sufficient sample words have been written to PCMFIFO
before transmission is started. Set TXON and/or RXON to begin operation.
d) When an interrupt occurs, check RXR. If this is set then one or more sample words
are available in PCMFIFO. If TXW is set then one or more sample words can be sent
to PCMFIFO."
Now, problem is how the receive the interrups in user mode. One option is to make a kernel module which installs the IRQ (#55 me thinks) handler and then signals your user mode app/driver whenever the FIFO is becoming empty (you can set the threshold). See
http://www.tldp.org/LDP/lkmpg/2.6/html/lkmpg.htmlImplement a system call to let the kernel module know your PID and the in IRQ handler signal the user mode program (if signal is allowed kernel, don't know). However, it might be best to use alsa API and implement a proper alsa-driver after all.
It would be obviously best to write a BCM2835-i2s ALSA driver with support to capture and playback.