[alsa-devel] ASoC: SND_SOC_DAPM_LINE behavior

Peter Ujfalusi peter.ujfalusi at nokia.com
Tue Sep 29 14:36:39 CEST 2009


as I'm writing a new codec driver I have noticed the following (using 2.6.31 

The codec itself is really simple, it is only capable of playback and it can 
bypass audio from line-in to the output.
The DAPM routing is something like this in the codec driver:

|DAC|------------->|              |              
                   |Playback Mixer|->|OUTPUT|
|INPUT|->|Bypass|->|              |

Now if in the machine driver I create the following DAPM widget:

and than connect this DAPM_LINE to the codec's INPUT (LINE-IN):
{"LINE-IN", NULL, "Line In"},

Than the codec bias level would be always in ON state, regardless of the state 
of the Bypass Switch (it is off by default).
I can use the snd_soc_dapm_disable_pin(codec, "Line In") in the machine driver 
to disable the pin, which moves the codec to STANDBY state.

Now, if I change the SND_SOC_DAPM_LINE to
in the machine driver, than the codec bias would be STANDBY as long as the 
Bypass switches are off, if they changed to on, than the codec bias goes to ON, 
as expected.

Is this expected behavior?


More information about the Alsa-devel mailing list