aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/davinci/davinci-mcasp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index c28508da34cf..0062601a63c2 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -459,8 +459,17 @@ static int davinci_config_channel_size(struct davinci_mcasp *mcasp,
459{ 459{
460 u32 fmt; 460 u32 fmt;
461 u32 tx_rotate = (word_length / 4) & 0x7; 461 u32 tx_rotate = (word_length / 4) & 0x7;
462 u32 rx_rotate = (32 - word_length) / 4;
463 u32 mask = (1ULL << word_length) - 1; 462 u32 mask = (1ULL << word_length) - 1;
463 /*
464 * For captured data we should not rotate, inversion and masking is
465 * enoguh to get the data to the right position:
466 * Format data from bus after reverse (XRBUF)
467 * S16_LE: |LSB|MSB|xxx|xxx| |xxx|xxx|MSB|LSB|
468 * S24_3LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB|
469 * S24_LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB|
470 * S32_LE: |LSB|DAT|DAT|MSB| |MSB|DAT|DAT|LSB|
471 */
472 u32 rx_rotate = 0;
464 473
465 /* 474 /*
466 * if s BCLK-to-LRCLK ratio has been configured via the set_clkdiv() 475 * if s BCLK-to-LRCLK ratio has been configured via the set_clkdiv()