mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
ASoC: meson: axg-tdm: fix sample clock inversion
[ Upstream commitcb36ff785e] The content of SND_SOC_DAIFMT_FORMAT_MASK is a number, not a bitfield, so the test to check if the format is i2s is wrong. Because of this the clock setting may be wrong. For example, the sample clock gets inverted in DSP B mode, when it should not. Fix the lrclk invert helper function Fixes:1a11d88f49("ASoC: meson: add tdm formatter base driver") Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c3ee70b831
commit
031cf89b51
@@ -40,7 +40,7 @@ struct axg_tdm_iface {
|
|||||||
|
|
||||||
static inline bool axg_tdm_lrclk_invert(unsigned int fmt)
|
static inline bool axg_tdm_lrclk_invert(unsigned int fmt)
|
||||||
{
|
{
|
||||||
return (fmt & SND_SOC_DAIFMT_I2S) ^
|
return ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S) ^
|
||||||
!!(fmt & (SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_NB_IF));
|
!!(fmt & (SND_SOC_DAIFMT_IB_IF | SND_SOC_DAIFMT_NB_IF));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user