Commit 0570d14
committed
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
mod_alloc_ctx for the source side of the comp_buffer.
- Refcount the DP vregion for each created ring_buffer via
vregion_get(), with a NULL alloc guard.
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:
- Release the DP vregion in ring_buffer_free() via vregion_put()
and free the mod_alloc_ctx when the refcount reaches zero,
matching the pattern used in comp_buffer_free().
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>1 parent f3732b2 commit 0570d14
4 files changed
Lines changed: 115 additions & 29 deletions
| 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 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
51 | 102 | | |
52 | 103 | | |
53 | 104 | | |
| |||
203 | 254 | | |
204 | 255 | | |
205 | 256 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
210 | 261 | | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
218 | 267 | | |
219 | 268 | | |
220 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
1164 | 1165 | | |
1165 | 1166 | | |
1166 | 1167 | | |
1167 | | - | |
| 1168 | + | |
1168 | 1169 | | |
1169 | 1170 | | |
1170 | 1171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
813 | 809 | | |
814 | 810 | | |
815 | | - | |
| 811 | + | |
816 | 812 | | |
817 | | - | |
| 813 | + | |
818 | 814 | | |
819 | 815 | | |
820 | 816 | | |
| |||
887 | 883 | | |
888 | 884 | | |
889 | 885 | | |
890 | | - | |
891 | | - | |
| 886 | + | |
| 887 | + | |
892 | 888 | | |
893 | 889 | | |
894 | 890 | | |
| |||
923 | 919 | | |
924 | 920 | | |
925 | 921 | | |
926 | | - | |
927 | | - | |
| 922 | + | |
928 | 923 | | |
929 | 924 | | |
930 | 925 | | |
931 | 926 | | |
| 927 | + | |
| 928 | + | |
932 | 929 | | |
933 | 930 | | |
934 | 931 | | |
| |||
940 | 937 | | |
941 | 938 | | |
942 | 939 | | |
943 | | - | |
944 | | - | |
| 940 | + | |
945 | 941 | | |
946 | 942 | | |
947 | 943 | | |
948 | 944 | | |
949 | 945 | | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
950 | 952 | | |
951 | 953 | | |
952 | 954 | | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
953 | 984 | | |
954 | 985 | | |
955 | 986 | | |
| |||
0 commit comments