ASoC: davinci: fix sample rotation
PATCH 1/1 ASoC: davinci: fix sample rotation
McASP serial audio engine needs different rotation values on TX and RX channels. Commit dde109fb462 ("ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback") changed the calculation to fix the playback format, but broke the capture stream by doing it for both TXFMT and RXFMT.
Signed-off-by Daniel Mack <[email protected]>
Cc Michal Bachraty <[email protected]>
Cc [email protected] [3.9 only]
--- sound/soc/davinci/davinci-mcasp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/davinci/davinci-mcasp.c +4 -3
@@ -628,7 +628,8 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev, int word_length) {u32 fmt; -u32 rotate = (word_length /4 ) &0x7 ; +u32 tx_rotate = (word_length /4 ) &0x7 ; +u32 rx_rotate = (32 - word_length) /4 ;u32 mask = (1ULL << word_length) -1 ;/*
@@ -651,9 +652,9 @@ static int davinci_config_channel_size(struct davinci_audio_dev *dev,mcasp_mod_bits (dev->base +DAVINCI_MCASP_TXFMT_REG ,TXSSZ (fmt),TXSSZ (0x0F ));mcasp_mod_bits (dev->base +DAVINCI_MCASP_TXFMT_REG , -TXROT (rotate),TXROT (7 )); +TXROT (tx_rotate),TXROT (7 ));mcasp_mod_bits (dev->base +DAVINCI_MCASP_RXFMT_REG , -RXROT (rotate),RXROT (7 )); +RXROT (rx_rotate),RXROT (7 ));mcasp_set_reg (dev->base +DAVINCI_MCASP_RXMASK_REG , mask); }
Signature · 1 line
1.8.1.4
Quoted 5 lines · Daniel Mack
McASP serial audio engine needs different rotation values on TX and RX channels. Commit
dde109fb462("ASoC: McASP: Fix data rotation for playback. Enables 24bit audio playback") changed the calculation to fix the playback format, but broke the capture stream by doing it for both TXFMT and RXFMT.
Applied, thanks.