ASoC: mediatek: mt8192-mt6359: add format constraints for RT5682
authorTzung-Bi Shih <tzungbi@google.com>
Mon, 25 Jan 2021 06:14:53 +0000 (14:14 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 25 Jan 2021 12:53:44 +0000 (12:53 +0000)
commit339f6c73d5abe85550a0c962edc8a5df1f2b4273
tree4abaf5992ea810d8da84d624bf220d39640f6153
parente953daeb68b1abd8a7d44902786349fdeef5c297
ASoC: mediatek: mt8192-mt6359: add format constraints for RT5682

MT8192 determines the I2S clock rates according to the sampling rates.

There is only 1 set of I2S in between MT8192 and RT5682.  If playing and
capturing via RT5682 in different sampling rates, the I2S data will be
corrupted.

Adds format constraints to the corresponding DAI links to make sure the
sampling rates are symmetric.

Fixes: 18b13ff23fab ("ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682")
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20210125061453.1056535-1-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c