Commit 6728a75
topology1: fix buffer size calculation if period-size >44ms
Calculation of SOF_TKN_BUF_SIZE in COMP_PERIOD_FRAMES() macro
led to incorrect results with large period size values.
For example at 48000Hz sampling rate, period size larger than
44739us would be incorrectly calculated.
This happens as m4 eval does arithmetic in 32bit signed values
and multiplication of period size and sampling rate can easily
exceed 2^31.
Fix the issue by splitting the arithmetic in steps that
fit available value range.
Link: #7476
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
(cherry picked from commit be43b4e)1 parent 64968ee commit 6728a75
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
0 commit comments