FROMGIT: ASoC: rt1011: add mutex protection to set_fmt/set_tdm_slot

The calibration process at booting will reset registers and bypass cache
to make sure the calibration is done.
We add mutex protection to avoid unexpected settings while
the registration process and calibration are interleaved.

Signed-off-by: Shuming Fan <>
Signed-off-by: Mark Brown <>
(cherry picked from commit e9e897d5fdba9bda3a8c80ea39761413725f198c for-5.3)

TEST=Verify playback on all 4 speakers.

Change-Id: Ic6ec90d98c8ef7b70aa4d3bb3a483dfa4aee4944
Signed-off-by: Sathya Prakash M R <>
Reviewed-by: Sean Paul <>
Reviewed-by: Cheng-Yi Chiang <>
Commit-Queue: Cheng-Yi Chiang <>
Tested-by: Cheng-Yi Chiang <>
1 file changed