Commit ab79b4e
committed
Audio: Volume: Set align constraints for source only
This patch modifies the frame align request to match the
gain loop samples unroll number. In HiFi5 four s32 samples or
eight s16 are processed per iteration. In HiFi3, HiFi4 and
generic C two s32 samples or four s16 samples are processed
per iteration. The equation
frame_align_req = n / gcd(n, channels)
with
n = 8 or n = 4 for HiFi5 for s16 or s32
n = 4 or 4 = 2 for other builds for s16 or s32
ensures that every aligned frame count is multiple of gain
loop unroll amount.
The equation for byte_align is same as earlier but the unnecessary
SOF_USE_HIFI() are removed. The code wasn't wrong for HiFi5 but
it was confusing. The check for 6ch wasn't done because the
SOF_FRAME_BYTE_ALIGN value was the same as
VOLUME_HIFI3_HIFI4_FRAME_BYTE_ALIGN_6CH.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>1 parent 531c255 commit ab79b4e
1 file changed
Lines changed: 23 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
643 | 642 | | |
644 | | - | |
645 | | - | |
| 643 | + | |
646 | 644 | | |
647 | | - | |
648 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
649 | 651 | | |
650 | | - | |
651 | | - | |
652 | | - | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
653 | 663 | | |
654 | | - | |
655 | | - | |
656 | | - | |
| 664 | + | |
| 665 | + | |
657 | 666 | | |
658 | | - | |
| 667 | + | |
659 | 668 | | |
660 | 669 | | |
661 | | - | |
662 | | - | |
| 670 | + | |
663 | 671 | | |
664 | 672 | | |
665 | | - | |
666 | 673 | | |
667 | 674 | | |
668 | 675 | | |
| |||
698 | 705 | | |
699 | 706 | | |
700 | 707 | | |
701 | | - | |
| 708 | + | |
702 | 709 | | |
703 | 710 | | |
704 | 711 | | |
| |||
0 commit comments