alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* codec power question
@ 2011-03-15  9:40 Koul, Vinod
  2011-03-15  9:43 ` Koul, Vinod
  2011-03-15 11:30 ` Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Koul, Vinod @ 2011-03-15  9:40 UTC (permalink / raw)
  To: alsa; +Cc: Mark Brown, Liam


Hi,

In some cases the audio stream is kept ON and idle by application. In
that case codec is also ON. Is there a mechanism where DAPM can detect
this idle condition and turn off the idle widgets or turn of the codec
BIAS

-- 
~Vinod

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

* Re: codec power question
  2011-03-15  9:40 codec power question Koul, Vinod
@ 2011-03-15  9:43 ` Koul, Vinod
  2011-03-15 11:30 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Koul, Vinod @ 2011-03-15  9:43 UTC (permalink / raw)
  To: alsa; +Cc: Mark Brown, Liam

On Tue, 2011-03-15 at 15:10 +0530, Koul, Vinod wrote:
> Hi,
> 
> In some cases the audio stream is kept ON and idle by application. In
> that case codec is also ON. Is there a mechanism where DAPM can detect
> this idle condition and turn off the idle widgets or turn of the codec
> BIAS
> 
Oops messed up Marks email, fixed now...

-- 
~Vinod

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

* Re: codec power question
  2011-03-15  9:40 codec power question Koul, Vinod
  2011-03-15  9:43 ` Koul, Vinod
@ 2011-03-15 11:30 ` Mark Brown
  2011-03-15 12:27   ` Koul, Vinod
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2011-03-15 11:30 UTC (permalink / raw)
  To: Koul, Vinod; +Cc: alsa, Mark Brown, Liam

On Tue, Mar 15, 2011 at 03:10:23PM +0530, Koul, Vinod wrote:

> In some cases the audio stream is kept ON and idle by application. In
> that case codec is also ON. Is there a mechanism where DAPM can detect
> this idle condition and turn off the idle widgets or turn of the codec
> BIAS

If this is happening it's a framework bug - if there are no active audio
streams through the device then it should be brought down to the lowest
power state.  The application doesn't have any direct control over the
CODEC power except by configuring audio streams.  Can you provide any
more details on how this happens?

Note that for playback streams there's a delay before things are powered
down to avoid delays, pops and clicks when doing things like changing
tracks.  By default the delay is 5s.

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

* Re: codec power question
  2011-03-15 11:30 ` Mark Brown
@ 2011-03-15 12:27   ` Koul, Vinod
  2011-03-15 13:25     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Koul, Vinod @ 2011-03-15 12:27 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa, Mark Brown, Liam

On Tue, 2011-03-15 at 17:00 +0530, Mark Brown wrote:
> On Tue, Mar 15, 2011 at 03:10:23PM +0530, Koul, Vinod wrote:
> 
> > In some cases the audio stream is kept ON and idle by application. In
> > that case codec is also ON. Is there a mechanism where DAPM can detect
> > this idle condition and turn off the idle widgets or turn of the codec
> > BIAS
> 
> If this is happening it's a framework bug - if there are no active audio
> streams through the device then it should be brought down to the lowest
> power state.  The application doesn't have any direct control over the
> CODEC power except by configuring audio streams.  Can you provide any
> more details on how this happens?
In andriod, flinger opens the streams at boot and keeps them ON, and
doesn't close the stream when in idle.
Since the stream in ON, codec consumes lot of power, I was wondering if
we have something in asoc to detect this kind of state and do much
better power control.

-- 
~Vinod

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

* Re: codec power question
  2011-03-15 12:27   ` Koul, Vinod
@ 2011-03-15 13:25     ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2011-03-15 13:25 UTC (permalink / raw)
  To: Koul, Vinod; +Cc: alsa, Mark Brown, Liam

On Tue, Mar 15, 2011 at 05:57:27PM +0530, Koul, Vinod wrote:

> In andriod, flinger opens the streams at boot and keeps them ON, and
> doesn't close the stream when in idle.
> Since the stream in ON, codec consumes lot of power, I was wondering if
> we have something in asoc to detect this kind of state and do much
> better power control.

Ah, this is just a plain userspace bug in the default ALSA thing that
went up on the Android git - there's no way sensible way to figure out
that userspace is playing silence because it's being silly.

The Nexus S libaudio does a better job here though it has its own issues
due to the integration with the non-mainline CODEC driver they're using.

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

end of thread, other threads:[~2011-03-15 13:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-15  9:40 codec power question Koul, Vinod
2011-03-15  9:43 ` Koul, Vinod
2011-03-15 11:30 ` Mark Brown
2011-03-15 12:27   ` Koul, Vinod
2011-03-15 13:25     ` Mark Brown

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).