[alsa-devel] Linux Kernel-3.5 crashed as dapm is not supported by codec

Rajeev kumar rajeev-dlh.kumar at st.com
Fri Nov 9 12:17:07 CET 2012


Hello Peter,

On 11/8/2012 8:08 PM, Péter Ujfalusi wrote:
> On 11/06/2012 11:40 AM, Rajeev kumar wrote:
>> Please find below the implementation for dapm.
>>
>> static const struct snd_soc_dapm_widget sta529_dapm_widgets[] = {
>>          SND_SOC_DAPM_DAC("DAC", "Play", SND_SOC_NOPM , 0, 0),
>>          SND_SOC_DAPM_ADC("ADC", "Capture", SND_SOC_NOPM, 0, 0),
>>          SND_SOC_DAPM_OUTPUT("HPL"),
>>          SND_SOC_DAPM_OUTPUT("HPR"),
>>          SND_SOC_DAPM_OUTPUT("SPKL"),
>>          SND_SOC_DAPM_OUTPUT("SPKR"),
>>          SND_SOC_DAPM_INPUT("MIC1"),
>> };
>>
>> static const struct snd_soc_dapm_route sta529_audio_map[] = {
>>          {"DAC", NULL, "output"},
>>          {"ADC", NULL, "input"},
>>          {"HPL", NULL, "HP Left Out"},
>>          {"HPR", NULL, "HP Right Out"},
>>          {"SPKL", NULL, "SPK Left Out"},
>>          {"SPKR", NULL, "SPK Right Out"},
>> };
>
> If this is all you have for DAPM routing I just wonder what the core will do
> with these... I mean you don't appear to have valid routing: no sign of
> "output", "input", "HP Left Out", etc.
>
> But it is really odd that you can not have at least some power control bits
> along the paths.

Yes I have a single bit in a register which will do power bridge 
OFF/ONN. Right now depending on biasing level this bit is getting 
manipulated.

With the DAPM macros how can I control this bit? Please share your opinion.

>
> This would look odd also but at least connects the widgets:
> static const struct snd_soc_dapm_route sta529_audio_map[] = {
>          {"HPL", NULL, "DAC"},
>          {"HPR", NULL, "DAC"},
>          {"ADC", NULL, "MIC1"},
> };


>
> Don't you have messages during boot or module loading about DAPM route error?
>

Right now I am working on it. Yes with the given sta529_dapm_widgets and 
audio_map I am getting "Failed to add route output->DAC". I have to work 
on this.

With the sta529_audio_map suggested by you, There is no any error I am 
getting during boot time. Thanks for your valuable suggestion.

As I dont have any event based dapm control, how can I test my dapm 
support whether it is working or not?

Best Regards
Rajeev







More information about the Alsa-devel mailing list