mirror of https://github.com/thesofproject/sof.git
Audio: Volume: Fix the HiFi4 version peak meter update error
Fix the HiFi4 version of volume processing peak meter update error. Signed-off-by: Andrula Song <andrula.song@intel.com>
This commit is contained in:
parent
b27515eb2f
commit
21b637e16a
|
@ -1208,6 +1208,9 @@ static int volume_process(struct processing_module *mod,
|
|||
cd->peak_cnt = 0;
|
||||
peak_vol_update(cd);
|
||||
memset(cd->peak_regs.peak_meter, 0, sizeof(cd->peak_regs.peak_meter));
|
||||
#ifdef VOLUME_HIFI4
|
||||
memset(cd->peak_vol, 0, sizeof(int32_t) * SOF_IPC_MAX_CHANNELS * 4);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -74,7 +74,6 @@ static void vol_s24_to_s24_s32(struct processing_module *mod, struct input_strea
|
|||
ae_f32x2 *peakvol = (ae_f32x2 *)cd->peak_vol;
|
||||
|
||||
/* Set peakvol(which stores the peak volume data twice) as circular buffer */
|
||||
memset(peakvol, 0, sizeof(ae_f32) * channels_count * 2);
|
||||
AE_SETCBEGIN1(cd->peak_vol);
|
||||
AE_SETCEND1(cd->peak_vol + channels_count * 2);
|
||||
|
||||
|
@ -169,7 +168,6 @@ static void vol_passthrough_s24_to_s24_s32(struct processing_module *mod,
|
|||
ae_f32x2 *peakvol = (ae_f32x2 *)cd->peak_vol;
|
||||
|
||||
/* Set peakvol(which stores the peak volume data twice) as circular buffer */
|
||||
memset(peakvol, 0, sizeof(ae_f32) * channels_count * 2);
|
||||
AE_SETCBEGIN1(cd->peak_vol);
|
||||
AE_SETCEND1(cd->peak_vol + channels_count * 2);
|
||||
|
||||
|
@ -243,7 +241,6 @@ static void vol_s32_to_s24_s32(struct processing_module *mod, struct input_strea
|
|||
ae_f32x2 *peakvol = (ae_f32x2 *)cd->peak_vol;
|
||||
|
||||
/* Set peakvol(which stores the peak volume data twice) as circular buffer */
|
||||
memset(peakvol, 0, sizeof(ae_f32) * channels_count * 2);
|
||||
AE_SETCBEGIN1(cd->peak_vol);
|
||||
AE_SETCEND1(cd->peak_vol + channels_count * 2);
|
||||
|
||||
|
@ -341,7 +338,6 @@ static void vol_passthrough_s32_to_s24_s32(struct processing_module *mod,
|
|||
ae_f32x2 *peakvol = (ae_f32x2 *)cd->peak_vol;
|
||||
|
||||
/* Set peakvol(which stores the peak volume data twice) as circular buffer */
|
||||
memset(peakvol, 0, sizeof(ae_f32) * channels_count * 2);
|
||||
AE_SETCBEGIN1(cd->peak_vol);
|
||||
AE_SETCEND1(cd->peak_vol + channels_count * 2);
|
||||
bsource->consumed += VOL_S32_SAMPLES_TO_BYTES(samples);
|
||||
|
@ -414,7 +410,6 @@ static void vol_s16_to_s16(struct processing_module *mod, struct input_stream_bu
|
|||
ae_f32x2 *peakvol = (ae_f32x2 *)cd->peak_vol;
|
||||
|
||||
/* Set peakvol(which stores the peak volume data 4 times) as circular buffer */
|
||||
memset(peakvol, 0, sizeof(ae_f32) * channels_count * 4);
|
||||
AE_SETCBEGIN1(cd->peak_vol);
|
||||
AE_SETCEND1(cd->peak_vol + channels_count * 4);
|
||||
|
||||
|
@ -523,7 +518,6 @@ static void vol_passthrough_s16_to_s16(struct processing_module *mod,
|
|||
ae_f32x2 *peakvol = (ae_f32x2 *)cd->peak_vol;
|
||||
|
||||
/* Set peakvol(which stores the peak volume data 4 times) as circular buffer */
|
||||
memset(peakvol, 0, sizeof(ae_f32) * channels_count * 4);
|
||||
AE_SETCBEGIN1(cd->peak_vol);
|
||||
AE_SETCEND1(cd->peak_vol + channels_count * 4);
|
||||
|
||||
|
|
Loading…
Reference in New Issue