Commit 2427f43
committed
Audio: Modify audio_stream_avail_frames_aligned() to align for source
This change fixes an issue that is caused by the logic in the
function that calculates the aligned frames counts separately
for source and sink and then returns the smaller number of them.
The fixed logic checks the maximum number of frames that could
be processed from source to sink and adjusts the the number down
with source align constraints.
It prevents an issue where a downstream module in pipeline modifies
align constraint for it's source that is previous module's sink. A
more relaxed constraint could then break source align criteria if
the number of frames to process is limited by sink.
The proposed logic for align follows only source align criteria to
avoid conflicting constraints.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>1 parent 20c06c4 commit 2427f43
1 file changed
Lines changed: 19 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | 593 | | |
616 | 594 | | |
617 | 595 | | |
| |||
658 | 636 | | |
659 | 637 | | |
660 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
661 | 658 | | |
662 | 659 | | |
663 | 660 | | |
| |||
0 commit comments