[alsa-devel] [PATCH V4 1/5] sound: asoc: Adding support for STA529 Audio Codec

Lars-Peter Clausen lars at metafoo.de
Tue Jun 7 09:06:09 CEST 2011

On 06/06/2011 12:19 PM, rajeev wrote:
> Hi Lars
> [...]
> OK,I Wlll.
> Please check the steps I need to do for dapm update. 
> 1. static const struct snd_soc_dapm_widget sta529_dapm_widgets[] = {
> 	SND_SOC_DAPM_ADC("ADC", "Capture", STA529_ADCCGF, 3, 0),

Even if your DAC itself does not support dynamic power management you probably
still want to define it. Use SND_SOC_NOPM as the register value in this case.
This will allow DAPM determine, whether the outputs are active or not. i.e. if
there is audio playback on the DACs stream, DAPM will know that the outputs
connected to the DAC are active. This will allow for example to turn speakers
connected to the outputs dynamically on or off based on DAPM events.

> };
> 2. static const struct snd_soc_dapm_route sat529_audio_map[] = {
>       {"ADC", NULL, " ADC Mixer"},
>       {"HPL", NULL, "HP Left Out"},
>       {"HPR", NULL, "HP Right Out"},
>       {"SPKL", NULL, "SPK Left Out"},
>       {"SPKR", NULL, "SPK Right Out"},                 
>       {"Left HP Mixer", "MIC Switch", "MIC Input"},
> };
> Please let me know is it fine for you?

Your routinges seem to be a bit off. You use path elements which are not
defined in your widget list, like "HP Left Out", "MIC Switch", ...
Since your codec seems to be quite simple, I guess what you basically want to
do is route all inputs to the ADC and route the DAC to all outputs, without any
mixers or switches in between.

- Lars

More information about the Alsa-devel mailing list