]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: tegra: Fix clock DAI format on Tegra210
authorSameer Pujar <spujar@nvidia.com>
Wed, 15 Jun 2022 08:04:37 +0000 (13:34 +0530)
committerMark Brown <broonie@kernel.org>
Wed, 15 Jun 2022 08:24:37 +0000 (09:24 +0100)
commitd0081b2aaef31669829d3f57aad4c154cf7c68df
treedd7113252086c0edfbc8ee2ea4b7098319eb2d33
parentddae03a61fedc9641b7afeb3020dcabc463a3244
ASoC: tegra: Fix clock DAI format on Tegra210

I2S reset failures are seen on Tegra210 and later platforms. This indicates
absence of I2S bit clock, which is required to perform the reset operation.
Following failures are seen with I2S based tests on Tegra210 and later:

  tegra210-i2s 2901100.i2s: timeout: failed to reset I2S for playback
  tegra210-i2s 2901100.i2s: ASoC: PRE_PMU: I2S2 RX event failed: -110
  tegra210-i2s 2901100.i2s: timeout: failed to reset I2S for capture
  tegra210-i2s 2901100.i2s: ASoC: PRE_PMU: I2S2 TX event failed: -110

The commit 0e6f67afa6a9 ("ASoC: tegra: Update to use set_fmt_new callback")
regressed I2S functionality on Tegra platforms. Basically it flipped clock
provider and consumer DAI formats. This configures Tegra I2S in consumer
mode by default now and there is none to provide bit clock during loopback
tests. The external codec based tests also fail because both Tegra I2S and
codec I2S get configured in consumer mode.

ASoC core flips the DAI format before calling set_fmt() for CPU DAIs. This
is negated in above commit. Fix this by swapping SND_SOC_DAIFMT_BC_FC and
SND_SOC_DAIFMT_BP_FP switch cases.

Fixes: 0e6f67afa6a9 ("ASoC: tegra: Update to use set_fmt_new callback")
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/1655280277-4701-1-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra210_i2s.c