diff options
Diffstat (limited to 'firmware/pcm_sw_volume.c')
-rw-r--r-- | firmware/pcm_sw_volume.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/pcm_sw_volume.c b/firmware/pcm_sw_volume.c index 7322269f44..3593c684af 100644 --- a/firmware/pcm_sw_volume.c +++ b/firmware/pcm_sw_volume.c | |||
@@ -54,7 +54,11 @@ static typeof (memcpy) *pcm_scaling_fn = NULL; | |||
54 | /* Scale sample by PCM factor */ | 54 | /* Scale sample by PCM factor */ |
55 | static inline int32_t pcm_scale_sample(PCM_F_T f, int32_t s) | 55 | static inline int32_t pcm_scale_sample(PCM_F_T f, int32_t s) |
56 | { | 56 | { |
57 | #if defined(PCM_DC_OFFSET_VALUE) | ||
58 | return (f * s + PCM_DC_OFFSET_VALUE) >> PCM_SW_VOLUME_FRACBITS; | ||
59 | #else | ||
57 | return (f * s) >> PCM_SW_VOLUME_FRACBITS; | 60 | return (f * s) >> PCM_SW_VOLUME_FRACBITS; |
61 | #endif | ||
58 | } | 62 | } |
59 | 63 | ||
60 | /* Both UNITY, use direct copy */ | 64 | /* Both UNITY, use direct copy */ |