]> nv-tegra.nvidia Code Review - linux-nvidia.git/commit
ASoC: tegra-alt: Fix support for I2S mono playback
authorJon Hunter <jonathanh@nvidia.com>
Thu, 12 Jul 2018 15:39:43 +0000 (16:39 +0100)
committermobile promotions <svcmobile_promotions@nvidia.com>
Thu, 19 Jul 2018 10:57:42 +0000 (03:57 -0700)
commit33ae2f293b12697f9d5ca19ced1eb65e3d44d159
tree582a26ea7ac5e2bf9bae1161982fb82807d4c792
parent6dc5939fc78a55caddc5bfca756ee0c2d35d3208
ASoC: tegra-alt: Fix support for I2S mono playback

Mono playback via the RT5658 codec on the Jetson TX1/TX2/Xavier is
distorted. Although the RT5658 codec is configured for standard I2S
timings (implying 2 channels), the Tegra XBAR should convert the mono
audio track from one channel to two channels. The problem is caused
because the 'CHANNEL_BIT_CNT' field in the I2S Timing Register is
being configured incorrectly. For mono playback in I2S mode (or LRCK
mode) the CHANNEL_BIT_CNT is being set to 31 instead of 15 by fixing
this mono playback works as expected.

Please note that the 'bitcnt' value programmed into the I2S Timing
Register is verified to see that it is not bigger than the mask for
the CHANNEL_BIT_CNT field. However, this is done before we shift the
bitcnt by 1 for I2S mode. Therefore, ensure the bitcnt is shifted by
1 before we do the check.

Mono playback has been tested by playing the following audio clip ...

aplay -D hw:1,0 /usr/share/sounds/alsa/Front_Center.wav

Bug 2257806

Change-Id: I4d306ccef891282e96c300d90bad2a5b6efc9968
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1777096
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
sound/soc/tegra-alt/tegra210_i2s_alt.c