]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: max98357a: use mdelay for sdmode-delay
authorTzung-Bi Shih <tzungbi@google.com>
Mon, 8 Jul 2019 14:19:01 +0000 (22:19 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 10 Jul 2019 15:24:39 +0000 (16:24 +0100)
commit0c5f0369da46f4e5382406baac6c49e0b77965f4
tree89de6c97e833de61087ffb970cb3a2a5bb8e57ca
parent4ca43dada249bb3c1f9299e9ae3164162a72b31e
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: 7853aeeba7d7 ("ASoC: max98357a: avoid speaker pop when playback
startup")

Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Link: https://lore.kernel.org/r/20190708141901.68797-1-tzungbi@google.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/max98357a.c