[alsa-devel] Need help fixing pop/click artifacts in an ASOC driver
Dimitris Papavasiliou
dpapavas at gmail.com
Wed Nov 14 23:50:30 CET 2018
On 11/15/2018 12:06 AM, Mark Brown wrote:
> Switching between clocks while the device isn't completely idle is
> unlikely to work well with any device - I'd have questions about a use
> case that's doing that.
The clocks are switched inside the hw_params callback of the
machine driver, when the sampling rate changes from a multiple of
48kHz to a multiple of 44.1kHz and vice versa, usually after
opening the device and before starting playback. That has to be
so, as far as I can see.
If by idle you mean, not playing, then the device is idle during
the switch. If by idle you mean biased off, then it depends on
circumstance. For instance if playback at 44.1kHz is stopped and
quickly restarted at 48kHz, as often happens, the device won't
have had the chance to sit long enough to be biased off (and even
if it has, I'm not entirely sure whether it won't be biased on
before the hw_params callback). The pop may still be avoided if
auto-mute is used, but that's not always the case. My proposed
fix on the other hand consistently avoids generating the pop and
does not rely on muting. I'm just not sure how to best implement
it.
More information about the Alsa-devel
mailing list