diff options
| author | Olivier Moysan <[email protected]> | 2019-06-19 15:03:47 +0200 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2019-06-22 10:18:51 +0100 |
| commit | 12c8398d8012ead3d3d68422067ab2f9a66ae76a (patch) | |
| tree | b584c48350b74af2f997051d6e77fa5a382281a7 /tools/perf/scripts/python | |
| parent | c2a0ffdc255101fccae1c5daa4459292d6fc8dd2 (diff) | |
iio: adc: stm32-dfsdm: fix output resolution
In buffered mode, output samples are shifted left
unconditionally. This works for filter order 3,
but this shift is not adapted for other filter orders.
Compute required shift, left or right, and shift
output data accordingly.
Add also saturation management to avoid wrap-around
when maximum positive sample is reached.
Signed-off-by: Olivier Moysan <[email protected]>
Fixes: eca949800d2d ("IIO: ADC: add stm32 DFSDM support for PDM microphone")
Acked-by: Fabrice Gasnier <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions