Commit 0c48799
committed
ASoC: SOF: ipc4-pcm: do not report invalid samples
If the application has been late in supplying samples, the streams
can be in underrun conditions. This is an error condition, but the delay
logic should not report abnormal values in this case. Add a sanity
check to the delay calculation and if the value is clearly out-of-bounds,
return 0 delay and emit a ratelimited warning to kernel log.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>1 parent 552f865 commit 0c48799
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1279 | 1279 | | |
1280 | 1280 | | |
1281 | 1281 | | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
1282 | 1289 | | |
1283 | 1290 | | |
1284 | 1291 | | |
| |||
0 commit comments