[alsa-devel] [query] codec suspend not called when bias level is SND_SOC_BIAS_ON
Hi Mark,
I was going through the suspend procedure for soc-core and I could see that codec suspend is called only when its bias level is SND_SOC_BIAS_OFF.
if (!codec->suspended && codec->driver->suspend) { switch (codec->dapm.bias_level) { case SND_SOC_BIAS_STANDBY: /* * If the CODEC is capable of idle * bias off then being in STANDBY * means it's doing something, * otherwise fall through. */ if (codec->dapm.idle_bias_off) { dev_dbg(codec->dev, "idle_bias_off CODEC on over suspend\n"); break; } case SND_SOC_BIAS_OFF: codec->driver->suspend(codec); codec->suspended = 1; codec->cache_sync = 1; break; default: dev_dbg(codec->dev, "CODEC is on over suspend\n"); break; } }
My question is, during on-going audio play when system is put into suspend, codec->driver->suspend would not be called as its bias level is still SND_SOC_BIAS_ON, thus not giving a chance to codec to save its state.
Is my understanding correct ? How to deal with this ?
-- regards Shiraz
On Wed, Dec 05, 2012 at 12:38:56PM +0530, Shiraz Hashim wrote:
My question is, during on-going audio play when system is put into suspend, codec->driver->suspend would not be called as its bias level is still SND_SOC_BIAS_ON, thus not giving a chance to codec to save its state.
Is my understanding correct ? How to deal with this ?
Playback will be stopped as part of the DAPM teardown if it's supposed to be stopped, this is for cases where bypass paths are still active due to being marked as ignoring suspend.
participants (2)
-
Mark Brown
-
Shiraz Hashim