Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f59ec6f0 authored by Ben Romberger's avatar Ben Romberger
Browse files

ASoC: msm: Change ACDB driver to use mutex



Remove all atomic variables and provide greater
safety with mutex. Lock mutex for every access
from userspace to ensure that multiple threads
do not concurrently alter data in shared memory
which is used for Audio & Voice calibration. Also
use mutex to protect from concurrent read and write
for calibration that does not used shared memory.

Change-Id: Iabd1c251d9dea6ad4a1d2dfa8129ae31803987d4
CRs-Fixed: 555762
Signed-off-by: default avatarBen Romberger <bromberg@codeaurora.org>
parent bfc96c5e
Loading
Loading
Loading
Loading
+289 −371

File changed.

Preview size limit exceeded, changes collapsed.

+0 −6
Original line number Diff line number Diff line
@@ -35,12 +35,6 @@ struct acdb_cal_block {
	uint32_t		cal_paddr;
};

struct acdb_atomic_cal_block {
	atomic_t		cal_size;
	atomic_t		cal_kvaddr;
	atomic_t		cal_paddr;
};

struct hw_delay_entry {
	uint32_t sample_rate;
	uint32_t delay_usec;