[alsa-devel] question on static dapm routes

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Dec 17 12:20:33 CET 2010


On Fri, Dec 17, 2010 at 01:56:36PM +0530, Harsha, Priya wrote:

> In the codec file which we are trying to write, we do not have any dynamic 
> Switching paths. So for the structure snd_soc_dapm_route, its always
> 		{sink, NULL, source}.
> The DAPM widgets are getting enabled at the codec probe
> (as we saw that they are getting declared as static) . So this consumes 
> power and we want them do be turned on only when DAI is started?

This most likely indicates an error in your DAPM map.  DAPM will only
power on audio routes which have a fully connected path from an input to
an output - you will have defined a path which includes the widgets
which are getting powered on.  Looking through the debugfs file for DAPM
should let you see which path this is.

> So, does that mean that for every stream, we make use of the startup and 
> shutdown functions to do our power management of the widgets. Or is there a 
> way ASOC automatically takes care of powering of the static paths as well?

If your device contains unconditionally connected paths the machine
driver should use SOC_DAPM_PIN_SWITCH() to add relevant controls for the
power if it needs them, or use something like jack detection if that's
supported.


More information about the Alsa-devel mailing list