Commit 5e85a71
committed
audio: module_adapter: remove unnecessary IRQ lock/unlock
In the past, the module adapter prepare and free methods called buffer_attach()
and buffer_detach() directly. To call these methods safely, it was required
to disable IRQs. See commit 3e3d0cd ("buffer: prevent cache corruption")
for history and rationale.
However, in commit ecc55f8 ("buf: split sink_list connector to 2 fields")
the direct calls to buffer.h were removed. The locks were still kept.
Reviewing the code today, the protected operations work on buffer list
maintained in "mod->raw_data_buffers_list". This list is used only by
the module adapter itself. External connections go through component
"dev->bsink_list" and "dev->bsource_list", which are separate objects
and only used in prepare() by the module adapter.
As the pipeline code will ensure module's copy() is not called concurrently
with prepare() and free(), it is no longer required to use locks to
protect against list operations on the internal list. Removing direct calls
to disable interrupts allows to run this code in user-space.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>1 parent 6f1170c commit 5e85a71
1 file changed
Lines changed: 0 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
640 | 640 | | |
641 | 641 | | |
642 | 642 | | |
643 | | - | |
644 | 643 | | |
645 | 644 | | |
646 | 645 | | |
| |||
650 | 649 | | |
651 | 650 | | |
652 | 651 | | |
653 | | - | |
654 | 652 | | |
655 | | - | |
656 | 653 | | |
657 | 654 | | |
658 | 655 | | |
| |||
682 | 679 | | |
683 | 680 | | |
684 | 681 | | |
685 | | - | |
686 | 682 | | |
687 | | - | |
688 | 683 | | |
689 | | - | |
690 | 684 | | |
691 | 685 | | |
692 | 686 | | |
| |||
1474 | 1468 | | |
1475 | 1469 | | |
1476 | 1470 | | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | 1471 | | |
1481 | | - | |
1482 | 1472 | | |
1483 | 1473 | | |
1484 | 1474 | | |
| |||
0 commit comments