[alsa-devel] ASoC/DAPM: How to make the DAPM routing complete?

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Sep 17 15:32:07 CEST 2011

On Fri, Sep 16, 2011 at 04:07:13PM +0200, Bas Vermeulen wrote:

> I want/need to go from HS1/HS2 to DIN for playback, and from MIC1 to 
> DOUT for capture. In order to do that, I have to set the following switches:

> amixer -q sset 'DAC HS1 Mux' 'Right'
> amixer -q sset 'DAC HS2 Mux' 'Left'
> amixer -q sset 'I2S Mic Mux' 'ADC'
> amixer -q sset 'ADC Left Mux' 'ADCL'

> I would like to make this automatic, but I am unsure how to express this 
> in my dapm routing table.

You shouldn't do this in kernel, decisions like this should be deferred
to userspace.  Most distributions have init scripts which can apply
settings or you can use the use case management code in alsa-lib from your
app.  Not putting this in kernel gives more runtime flexibility which is
especially useful when you get things like reference boards which can
run multiple distributions that may not always agree about the best setup.

> Note that in order to be able to use playback and capture independently 
> on the I2S interface (within reason, it is not possible to use a 
> different rate for instance), I had to add a SUPPLY control to the dapm 
> widgets that turns on the I2S clock when needed.

Can you send a patch for this please?

More information about the Alsa-devel mailing list