Commit 91e7ba4
committed
ASoC: SOF: ipc4-topology: Correct the allocation size for bytes controls
The size of the data behind of scontrol->ipc_control_data for bytes
controls is:
[1] sizeof(struct sof_ipc4_control_data) + // kernel only struct
[2] sizeof(struct sof_abi_hdr)) + payload
The max_size specifies the size of [2] and it is coming from topology.
Change the function to take this into account and allocate adequate amount
of memory behind scontrol->ipc_control_data.
With the change we will allocate [1] amount more memory to be able to hold
the full size of data.
Fixes: 1bfde58 ("ASoC: SOF: ipc4-topology: add byte kcontrol support")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>1 parent 0354583 commit 91e7ba4
1 file changed
Lines changed: 27 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2875 | 2875 | | |
2876 | 2876 | | |
2877 | 2877 | | |
2878 | | - | |
2879 | | - | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
2880 | 2886 | | |
2881 | 2887 | | |
2882 | 2888 | | |
2883 | 2889 | | |
2884 | | - | |
2885 | | - | |
2886 | | - | |
2887 | | - | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
2888 | 2901 | | |
2889 | 2902 | | |
2890 | 2903 | | |
2891 | | - | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
2892 | 2909 | | |
2893 | | - | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
2894 | 2913 | | |
2895 | 2914 | | |
2896 | 2915 | | |
| |||
0 commit comments