Skip to content
Unverified Commit 6cd249cf authored by Tzung-Bi Shih's avatar Tzung-Bi Shih Committed by Mark Brown
Browse files

ASoC: max98357a: use mdelay for sdmode-delay

max98357a_daiops_trigger() is possible to be called in atomic context if
the .nonatomic flag is equal to 0 in the DAI links.

When cancel_delayed_work_sync() in max98357a_daiops_trigger() is called
in atomic context, kernel emits the following message: "BUG: sleeping
function called from invalid context".

According to the DT binding document, value less than or equal to 5ms of
sdmod-delay should be sufficient to avoid the pop noise.  Use mdelay
(i.e. busy loop) for such low delay should be acceptable.

Fixes: cec5b01f

 ("ASoC: max98357a: avoid speaker pop when playback
startup")

Signed-off-by: default avatarTzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190708141901.68797-1-tzungbi@google.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 87a6fe80
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment