Commit 46ecff9
committed
[DNM] Audio: Buffers: Add support for DP-to-DP component binding
Previously binding two DP (Data Processing) scheduled components
was rejected with IPC4_INVALID_REQUEST. This patch adds support
for DP-to-DP binding by creating a dual ring buffer configuration
where each DP module gets its own ring buffer on either side of
the intermediate comp_buffer.
Data flow for DP-to-DP:
src_DP -> ring_buf_src -> comp_buffer -> ring_buf_sink -> sink_DP
Changes in helper.c:
- Remove the DP-to-DP bind rejection in ipc_comp_connect().
- Add src_is_dp, sink_is_dp, and dp_to_dp flags to detect the
DP-to-DP case.
- Create a second ring_buffer allocated from the source module's
heap for the source side of the comp_buffer.
- Track ring_buffer client_count on the DP heap with a NULL guard
to avoid unsafe container_of when CONFIG_USERSPACE is disabled.
Changes in audio_buffer.c:
- Change audio_buffer_attach_secondary_buffer() from a global
rejection to per-side checks, allowing both secondary_buffer_sink
and secondary_buffer_source to be set simultaneously.
- Add a dual-secondary sync path in audio_buffer_sync_secondary_buffer()
that cascades data through: input ring_buffer -> comp_buffer ->
output ring_buffer, with rate-limiting applied on the output side.
Changes in ring_buffer.c:
- Add DP heap client_count decrement in ring_buffer_free() with a
NULL heap guard, matching the pattern used in comp_buffer_free().
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>1 parent 96ab79a commit 46ecff9
File tree
3 files changed
+124
-32
lines changed- src
- audio/buffers
- ipc/ipc4
3 files changed
+124
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| |||
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
51 | 98 | | |
52 | 99 | | |
53 | 100 | | |
| |||
203 | 250 | | |
204 | 251 | | |
205 | 252 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
210 | 257 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
218 | 263 | | |
219 | 264 | | |
220 | 265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | | - | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
99 | 107 | | |
100 | | - | |
101 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
650 | | - | |
651 | | - | |
652 | | - | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
653 | 649 | | |
654 | 650 | | |
655 | | - | |
| 651 | + | |
656 | 652 | | |
657 | | - | |
| 653 | + | |
658 | 654 | | |
659 | 655 | | |
660 | 656 | | |
| |||
722 | 718 | | |
723 | 719 | | |
724 | 720 | | |
725 | | - | |
726 | | - | |
| 721 | + | |
| 722 | + | |
727 | 723 | | |
728 | 724 | | |
729 | 725 | | |
| |||
761 | 757 | | |
762 | 758 | | |
763 | 759 | | |
764 | | - | |
765 | | - | |
| 760 | + | |
766 | 761 | | |
767 | 762 | | |
768 | 763 | | |
769 | 764 | | |
| 765 | + | |
| 766 | + | |
770 | 767 | | |
771 | 768 | | |
772 | 769 | | |
| |||
778 | 775 | | |
779 | 776 | | |
780 | 777 | | |
781 | | - | |
782 | | - | |
| 778 | + | |
783 | 779 | | |
784 | 780 | | |
785 | 781 | | |
786 | 782 | | |
787 | 783 | | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
788 | 792 | | |
789 | 793 | | |
790 | 794 | | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
791 | 829 | | |
792 | 830 | | |
793 | 831 | | |
| |||
0 commit comments