This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sitara I2S endianness



Hello everyone,

I was wondering if the sitara actually supports the I2S standard, meaning that the data is actually pushed out in EB (Big endian), rather then LE (Little endian)?

I did some investigation and it looks as if the davinci mcasp driver doesn't really support the big endian formats... which I think would be strange... 

So if anyone has any experience with setting this up, I'd be very happy  :-)

Kind regards,

Arend

  • Hi Arend,

    Which Sitara and which Linux version are you asking about?

  • Arend Lapere said:

    I was wondering if the sitara actually supports the I2S standard, meaning that the data is actually pushed out in EB (Big endian), rather then LE (Little endian)?

    I did some investigation and it looks as if the davinci mcasp driver doesn't really support the big endian formats... which I think would be strange... 

    I took a quick look and it seems that, unless configured for DIT (S/PDIF), it uses big-endian order but "left aligned" TDM format (0 delay between frame sync and data) rather I2S (1 bit delay between frame sync and data).  This is configured in davinci_hw_param (it sets the TXORD/RXORD bit in TXFMT/RXFMT, which indicates big endian).

  • Arend Lapere said:
    EB (Big endian), rather then LE (Little endian)

    Note BTW that the "_LE" in SNDRV_PCM_FORMAT_S16_LE and SNDRV_PCM_FORMAT_S32_LE is referring to the endianness of the PCM audio data provided to the driver, not the on-the-wire data format.

    It does seem the on-the-wire word length (davinci_config_channel_size) is always set to the PCM data width, which strikes me as a bit weird since this is quite unnecessary and the former is much more flexible than the latter (and some audio chips can be fussy about it).

    (I'm looking at this version of the davinci-mcasp driver btw, just mentioning it in case there's more than one in circulation)