Zephyr I2S support in NCS 1.8.0, 1.9.1

Hi,

I see that there is Zephyr I2S support in in NCS 1.8.0 (and onward), but I can't locate any reliable documentation for the API.

I have an I2S example (based on https://github.com/andenore/NordicSnippets/blob/master/examples/i2s_master/main.c) that compiles and works in 1.8.0 - but it's clearly not using the zephyr driver.

Even though I've got 'CONFIG_I2S=y' in prj.conf the zephyr.dts entry is

i2s0: i2s@40025000 {
compatible = "nordic,nrf-i2s";
#address-cells = < 0x1 >;
#size-cells = < 0x0 >;
reg = < 0x40025000 0x1000 >;
interrupts = < 0x25 0x1 >;
status = "disabled";
label = "I2S_0";
};

Note that status is 'disabled'

What I want to do is play short (one to two second) messages pre-recorded as 8 bit monaural raw .wav file. I'm comfortable with the file formats and the transitions I need to make to get the .wav data into arrays to present to I2S. 

Initialize I2S, then present relatively small chunks (on the order of 128 samples) to I2S until I've exhausted the .Wav file.

Logically I want to use two 128 byte RAM buffers, loading one with sample data, starting the I2S playback of that buffer while I load the other buffer, then switching to the other buffer when the I2S playback of the first is finished, continuing until I've exhausted the .wav data is exhausted.

Any help you can give me would be appreciated.

Thanks in advance.

Kent Overton

Parents Reply Children
No Data
Related