[alsa-devel] tlv320aic32x4 Codec ADC and DAC must shutdown to alter clocks

Mark Brown broonie at kernel.org
Thu Mar 13 00:31:37 CET 2014


On Wed, Mar 12, 2014 at 04:08:40PM +0100, Mike Looijmans wrote:

> What I cannot fix is that changing the parameters (like clock
> frequency) must stop the DAC core.

> The DAPM framework just sets the BIAS to "ON" only once, and does
> not shut down until after a time out. Which is good.
> But if the next stream to play needs a different clock setting, the
> DAC must be stopped first, the code must wait until the DAC has
> powered down, and then the clocks can be stopped and altered. When
> all settings are done, the DAC can be restarted.

As a first order fix the driver should just refuse to reconfigure if the
clocks are active.

> I can detect the change in the hw_params, and on the first stream to
> play, this is called while still in STANDBY or lower levels.
> However, when the codec is already in ON bias level, how do I tell
> DAPM that I had to shut down the DAC in order to change the
> parameters? Just toggling the related bits will keep the DAC powered
> down. A routine to store and restore the power state is possible,
> but very ineffective. Especially since the "I must shutdown"
> conclusion can also be in the clock setting routine. That would
> result in multiple down-up cycles.

The big problem with shutting down is disruption to other activity - if
there's something going on using the clocks.  For some devices that
don't have long startup times ignore_pmdow_time may help a lot.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140312/0c35e720/attachment.sig>


More information about the Alsa-devel mailing list