All of lore.kernel.org
 help / color / mirror / Atom feed
* [query] codec suspend not called when bias level is SND_SOC_BIAS_ON
@ 2012-12-05  7:08 Shiraz Hashim
  2012-12-05  9:27 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Shiraz Hashim @ 2012-12-05  7:08 UTC (permalink / raw)
  To: Mark Brown; +Cc: viresh.kumar, Linux-ALSA, spear-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-12-05  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-05  7:08 [query] codec suspend not called when bias level is SND_SOC_BIAS_ON Shiraz Hashim
2012-12-05  9:27 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.