lkml.org 
[lkml]   [2012]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2012-12-19 10:41    [W:0.069 / U:0.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site