On 12/17/18 2:37 PM, Mark Brown wrote:
On Mon, Dec 17, 2018 at 02:17:45PM +0200, Dimitris Papavasiliou wrote:
Even worse, it would let the pop through at full volume, as it
doesn't depend on the gain. Still, there doesn't seem to be a
safe way to avoid the pop altogether, as far as I can see, since
the only way I have found to avoid it, is to suspend the chip
during the switch, and I can't synchronize access to the relevant
register by the machine and CODEC drivers.
If you have any other ideas/pointers on approaches I could
investigate, please let me know.
If you're doing this during DAPM there shouldn't be anything else
running on the card at the time.
In general the clocks need to be switched during the hw_params
callback (when the new callback specifies a new sample rate,
which needs the other clock) and, as far as I can see, this can
happen at more or less any time, i.e. in all power states and
regardless of whether the device is opened or closed.
I can't therefore depend on DAPM functionality to suspend the
chip when needed, as far as I can see at least and apart from
asking the DAPM to force-suspend the chip, as I've already
suggested.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel