Zephyr i2s echo code channel number

Hi,

Im currently adjusting this i2s sample code to work with my TAS2781 audio amplifier. The code works perfectly  but I just want to do a little adjustment on the channel number to 4 to give me a 64 ratio as per table 3(i2s nordic documentation) of the config clock set to "ACLK" using the settings below. Once I have change the channel from 2 --> 4 the code stop communication to the i2s channel.

I'm very new to this drivers and I would appreciate if you could suggest what I need to change on the macros below.

also, is there any plans to make the zephyr i2s drive to work with format "config.format = I2S_FMT_DATA_FORMAT_PCM_SHORT;"?

Lanz

Parents Reply
  • There is no direct relationship between the confguration of #bitwidth and #channels vs. clock ratio. Instead looking at the code and i2c_nrfx.c I can find there is a function find_suitable_clock() that calculate the ratio that best fit the requested sampling frequency vs. hfclkaudio-frequency. I can only assume by your description that this function allways calculate 32x?

    Kenneth

Children
Related