Repository navigation
Commit 4b0bbb7
committed
topology: kpb: add topology-configurable history buffer depth
Add a bytes kcontrol kpb_cfg_<N> to each KPB widget that lets the
topology manifest set the ring-buffer pre-roll duration at load time,
without a firmware rebuild.
Firmware (IPC4 path):
- ipc4/kpb.h: add KP_BUF_CFG_BUFF_TIME_MS = 2 to the param-ID enum
- kpb.c: add buff_time_ms field to comp_data; add kpb_get_buff_time_ms()
helper (returns topology value when set, falls back to
CONFIG_KPB_MAX_BUFF_TIME); wire the helper into kpb_params(),
kpb_prepare() buffer allocation, drain-request cap; handle the new
LARGE_CONFIG_SET case in kpb_set_large_config()
Topology:
- kpb.conf: add Object.Control.bytes kpb_cfg_$index with IncludeByKey
blobs for 6000/4000/2100 ms; blob is a 36-byte sof_abi_hdr + u32 ms
- dmic-wov-multi-manifest.conf: Define KPB_BUFF_TIME_MS 6000 for TGL
The kernel sof_ipc4_widget_kcontrol_setup() path sends the blob as a
LARGE_CONFIG_SET on pipeline open with no userspace intervention.
Omitting KPB_BUFF_TIME_MS from the manifest leaves buff_time_ms = 0,
and kpb_get_buff_time_ms() falls back to CONFIG_KPB_MAX_BUFF_TIME.
Verified on spider (TGL/CAVS2.5): kpb_cfg_101/102/103 kcontrols appear
after modprobe; topology file size increased from 22001 to 22829 bytes.1 parent 7112519 commit 4b0bbb7
5 files changed
Lines changed: 99 additions & 15 deletions
File tree
- src
- audio
- wov_arbiter
- include/ipc4
- tools/topology/topology2
- include/components
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
107 | 108 | | |
108 | 109 | | |
109 | 110 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
239 | 251 | | |
240 | 252 | | |
241 | 253 | | |
| |||
298 | 310 | | |
299 | 311 | | |
300 | 312 | | |
301 | | - | |
| 313 | + | |
302 | 314 | | |
303 | 315 | | |
304 | 316 | | |
| |||
809 | 821 | | |
810 | 822 | | |
811 | 823 | | |
812 | | - | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
813 | 829 | | |
814 | 830 | | |
815 | 831 | | |
| |||
1768 | 1784 | | |
1769 | 1785 | | |
1770 | 1786 | | |
1771 | | - | |
| 1787 | + | |
1772 | 1788 | | |
1773 | 1789 | | |
1774 | 1790 | | |
| |||
2854 | 2870 | | |
2855 | 2871 | | |
2856 | 2872 | | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
2857 | 2883 | | |
2858 | 2884 | | |
2859 | 2885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
886 | | - | |
887 | | - | |
888 | | - | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
926 | | - | |
927 | | - | |
| 926 | + | |
| 927 | + | |
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
932 | | - | |
933 | | - | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
934 | 941 | | |
935 | 942 | | |
936 | | - | |
937 | | - | |
938 | | - | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
939 | 946 | | |
940 | 947 | | |
941 | | - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
942 | 955 | | |
943 | 956 | | |
944 | 957 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 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 | + | |
62 | 99 | | |
63 | 100 | | |
64 | 101 | | |
| |||
0 commit comments