Skip to content
Unverified Commit 7042bde2 authored by SJLIN0's avatar SJLIN0 Committed by Mark Brown
Browse files

ASoC: nau8824: Fix semaphore is released unexpectedly



On resuming, we anticipate that the jack is detected before playback
or capture. Therefore, we use semaphore to control the jack detection
done without any bothering. During booting, the driver launches jack
detection and releases the semaphore. However, it doesn't perceive the
maniputation of semaphore is not like resuming procedure. This makes
the semaphore's count value become to 2. There is more than one thread
can enter into the critical section. This may get unexpected situation
and make some chaos.

Signed-off-by: default avatarSJLIN0 <SJLIN0@nuvoton.com>
Signed-off-by: default avatarWallace Lin <savagecin@gmail.com>
Link: https://lore.kernel.org/r/20220915012800.825196-1-SJLIN0@nuvoton.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 4a13c949
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment