Page 1 of 1

How to output a MONO array to I2S??

Posted: Mon May 07, 2018 7:07 pm
by cammiboi
Hello,

Question about the I2S driver:

I am trying to output a mono audio sample to the built in DAC. I have an array of samples (16 bit with only the upper 8 bits containing the sample).

I am confused what the difference between the following channel formats are. Let's say I use I2S_CHANNEL_FMT_ONLY_LEFT- does this mean the i2s_write_bytes() function expects an array with ONLY samples for the left channel? What is the difference in using I2S_CHANNEL_FMT_ALL_LEFT?
  • I2S_CHANNEL_FMT_ALL_RIGHT
  • I2S_CHANNEL_FMT_ALL_LEFT
  • I2S_CHANNEL_FMT_ONLY_RIGHT
  • I2S_CHANNEL_FMT_ONLY_LEFT