From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Chuansheng Liu <chuansheng.liu@intel.com>
Cc: tiwai@suse.de, linux-kernel@vger.kernel.org,
alsa-devel@alsa-project.org, lrg@ti.com
Subject: Re: [PATCH] ASoC: dapm: Fix the unpaired runtime_get/put cases
Date: Wed, 19 Dec 2012 09:11:27 +0000 [thread overview]
Message-ID: <20121219091127.GL4985@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1355913397.17896.10.camel@cliu38-desktop-build>
[-- Attachment #1.1: Type: text/plain, Size: 938 bytes --]
On Wed, Dec 19, 2012 at 06:36:37PM +0800, Chuansheng Liu wrote:
> But some devices has been set to STANDY bias directly during device probing,
> such as cs42l73_probe():
> cs42l73_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
> Then it will cause runtime_get() not be called but laterly runtime_put() will
> be called. Also found some other uppaired cases.
This is just a bug in the driver, if it's idle_bias_off then it really
should be starting in _OFF or at the very least starting actually in
_STANDBY (including taking the runtime reference) rather than partially
in _STANDBY.
> So here add new flag get_runtime, and the logic will be:
> 1/ when device is from off to non-off bias, runtime_get() will be called if not yet;
> 2/ When device is off bias, runtime_put() will be called if runtime_get() has
> been called;
This is really not a good idea at all, it's just adding new special
cases and making the code more obscure.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-12-19 9:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-19 10:36 [PATCH] ASoC: dapm: Fix the unpaired runtime_get/put cases Chuansheng Liu
2012-12-19 9:11 ` Mark Brown [this message]
2012-12-20 6:37 ` Liu, Chuansheng
2012-12-20 13:51 ` Mark Brown
2012-12-21 1:34 ` Liu, Chuansheng
2012-12-21 10:17 ` [PATCH] ASoC: core: giving WARN when device starting from non-off bias with idle_bias_off Chuansheng Liu
2012-12-24 15:35 ` 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=20121219091127.GL4985@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=chuansheng.liu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).