aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-mcasp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/davinci/davinci-mcasp.c')
-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 6a6b2ff7d7d7..68347b55f6e1 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -467,8 +467,17 @@ static int davinci_config_channel_size(struct davinci_mcasp *mcasp,
467{ 467{
468 u32 fmt; 468 u32 fmt;
469 u32 tx_rotate = (word_length / 4) & 0x7; 469 u32 tx_rotate = (word_length / 4) & 0x7;
470 u32 rx_rotate = (32 - word_length) / 4;
471 u32 mask = (1ULL << word_length) - 1; 470 u32 mask = (1ULL << word_length) - 1;
471 /*
472 * For captured data we should not rotate, inversion and masking is
473 * enoguh to get the data to the right position:
474 * Format data from bus after reverse (XRBUF)
475 * S16_LE: |LSB|MSB|xxx|xxx| |xxx|xxx|MSB|LSB|
476 * S24_3LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB|
477 * S24_LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB|
478 * S32_LE: |LSB|DAT|DAT|MSB| |MSB|DAT|DAT|LSB|
479 */
480 u32 rx_rotate = 0;
472 481
473 /* 482 /*
474 * if s BCLK-to-LRCLK ratio has been configured via the set_clkdiv() 483 * if s BCLK-to-LRCLK ratio has been configured via the set_clkdiv()