[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121219091127.GL4985@opensource.wolfsonmicro.com>
Date: Wed, 19 Dec 2012 09:11:27 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Chuansheng Liu <chuansheng.liu@...el.com>
Cc: lrg@...com, perex@...ex.cz, tiwai@...e.de,
alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: dapm: Fix the unpaired runtime_get/put cases
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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists