Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
comp: add comp_get_copy_limits with lock
Typical use of existing comp_get_copy_limits() requires to lock the buffers for the operation to ensure consistent readings. Grouping the operations in a function simplifies the components code. It also guarantees correct double lock with dedicated flags and helps avoid a common bug in client code where single flags variable is used for both locks. When both buffers are shared between cores, and single variable is used, the rsil in second lock returns int level 5 set by the first lock. Later, during unlocking the original level returned by the first lock is not restored, the dsp stays on level 5. Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
- Loading branch information