• Peter Ujfalusi's avatar
    ASoC: davinci-mcasp: Correct rx format unit configuration · fe0a29e1
    Peter Ujfalusi authored
    In case of capture we should not use rotation. The reverse and mask is
    enough to get the data align correctly from the bus to MCU:
    Format	  data from bus    after reverse (XRBUF)
    S16_LE:  |LSB|MSB|xxx|xxx|  |xxx|xxx|MSB|LSB|
    S24_3LE: |LSB|DAT|MSB|xxx|  |xxx|MSB|DAT|LSB|
    S24_LE:  |LSB|DAT|MSB|xxx|  |xxx|MSB|DAT|LSB|
    S32_LE:  |LSB|DAT|DAT|MSB|  |MSB|DAT|DAT|LSB|
    
    With this patch all supported formats will work for playback and capture.
    
    Reported-by: Jyri Sarha <jsarha@ti.com> (broken S24_3LE capture)
    Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    Cc: stable@vger.kernel.org
    fe0a29e1
davinci-mcasp.c 36.2 KB