The stream FFIFO device driver is designed to read/write hardware with streaming data that has hard real-time requirements such as audio streaming data from either I2S sources/sinks or DAC/ADC devices.
FFIFO stands for framed fifo. The driver assumes the underlying device reads/write data in a circular fashion and provides events for transfers and half transfers. In this case the frame count, should be set to two.
The stream FFIFO supports blocking reads/write. A write() will block until there is space in the buffer to write another frame. A read() will block until data is available. The frames must be handled before that hardware finishes the next frame, otherwise overrun/underrun conditions will occur.
STREAM_FFIFO_FLAG_FLUSHFlush all stream data
Use with STREAM_FFIFO_FLAG_START or STREAM_FFIFO_FLAG_STOP