
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