Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Shiraz Hashim <shiraz.hashim@st.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: viresh.kumar@linaro.org, Linux-ALSA <alsa-devel@alsa-project.org>,
	spear-devel@list.st.com
Subject: [query] codec suspend not called when bias level is SND_SOC_BIAS_ON
Date: Wed, 5 Dec 2012 12:38:56 +0530	[thread overview]
Message-ID: <20121205070856.GA1017@localhost.localdomain> (raw)

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

             reply	other threads:[~2012-12-05  7:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05  7:08 Shiraz Hashim [this message]
2012-12-05  9:27 ` [query] codec suspend not called when bias level is SND_SOC_BIAS_ON Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121205070856.GA1017@localhost.localdomain \
    --to=shiraz.hashim@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=spear-devel@list.st.com \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox