You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SRC: possible signal overflow with 8/16/32 to 48 kHz conversions #619
Here's a waveform and spectrum display from loud content 8 -> 48 kHz playback. The clicks are very easy to hear with low sample rate content. The peak and bottom of waveform wraps so the overflow is confirmed. Also it's confirmed that it happens with both gcc and xt-xcc/instrinsic version.
@juimonen This may be a bug in PCM512x DAC. If set this this gain to -1 dB most annoying rattle disappears:
amixer set Digital 205
The default 0 dB can be restored with
amixer set Digital 207
I'll test with other device too to confirm. Though since there's a smaller rattle sound left with this tricky music sample I wonder if the SRC coefficients should be re-calculated for e.g. -1 dB attenuation to avoid the filter overshoots to saturate. Now the gain is such that steady state sine waves do not clip (downscaled by filter passband ripple only).
@juimonen Another GLK + DA7219 based device does the rattle too though it sounds a lot more like "impulse noise". So better to not close this and continue investigation.
I did test code that outputs to trace samples values for a short time after reaching -1 dBFS positive or negative PCM code level. The traced values were parsed and plotted with Octave. The peaks seen at volume component input (=SRC output) and volume output are OK looking signal peaks often flattened to min/max PCM code without opposite polarity peaks. It looks very much like the frequent hit into min/max PCM causes the two DACs that I have access to make some rattle sound. I'll test next adding some small attenuation into SRC filter coefficients.
Activity
singalsu commentedon Nov 23, 2018
Thanks for testing & reporting this! Yep I will check & fix.
singalsu commentedon Dec 13, 2018
Here's a waveform and spectrum display from loud content 8 -> 48 kHz playback. The clicks are very easy to hear with low sample rate content. The peak and bottom of waveform wraps so the overflow is confirmed. Also it's confirmed that it happens with both gcc and xt-xcc/instrinsic version.
singalsu commentedon Feb 27, 2019
@juimonen This may be a bug in PCM512x DAC. If set this this gain to -1 dB most annoying rattle disappears:
amixer set Digital 205The default 0 dB can be restored with
amixer set Digital 207I'll test with other device too to confirm. Though since there's a smaller rattle sound left with this tricky music sample I wonder if the SRC coefficients should be re-calculated for e.g. -1 dB attenuation to avoid the filter overshoots to saturate. Now the gain is such that steady state sine waves do not clip (downscaled by filter passband ripple only).
singalsu commentedon Feb 27, 2019
@juimonen Another GLK + DA7219 based device does the rattle too though it sounds a lot more like "impulse noise". So better to not close this and continue investigation.
singalsu commentedon Feb 28, 2019
I did test code that outputs to trace samples values for a short time after reaching -1 dBFS positive or negative PCM code level. The traced values were parsed and plotted with Octave. The peaks seen at volume component input (=SRC output) and volume output are OK looking signal peaks often flattened to min/max PCM code without opposite polarity peaks. It looks very much like the frequent hit into min/max PCM causes the two DACs that I have access to make some rattle sound. I'll test next adding some small attenuation into SRC filter coefficients.
singalsu commentedon Mar 5, 2019
The PR #1069 is now merged so this can be closed.