Skip to contentSkip to conversation

Ask a question about WM8976

DISCUSSION peter meng 2 participants 2 messages Dec 10, 2008

lore
Share & tools
lore

peter meng

author
#0 lore raw

Hi,

I'm a newbie for alsa and using wm8976 first time .
I found the driver of wm8976 comments the contents of wm8976_dapm_widgets .

1. Is this mean all widget in wm8976 does not have power management function ?
2. If wm8976 does not add widget then the process of 'set up audio path map ' will fails , is this correct ?

-------------------------------------------------------------------
// TODO Widgets
static const struct snd_soc_dapm_widget wm8976_dapm_widgets[] = { #if 0
//SND_SOC_DAPM_MUTE("Mono Mute", WM8976_MONOMIX, 6, 0), //SND_SOC_DAPM_MUTE("Speaker Mute", WM8976_SPKMIX, 6, 0),

SND_SOC_DAPM_MIXER("Speaker Mixer", WM8976_POWER3, 2, 0,

	&wm8976_speaker_mixer_controls[0],
	ARRAY_SIZE(wm8976_speaker_mixer_controls)),
SND_SOC_DAPM_MIXER("Mono Mixer", WM8976_POWER3, 3, 0,
	&wm8976_mono_mixer_controls[0],
	ARRAY_SIZE(wm8976_mono_mixer_controls)),

SND_SOC_DAPM_DAC("DAC", "HiFi Playback", WM8976_POWER3, 0, 0), SND_SOC_DAPM_ADC("ADC", "HiFi Capture", WM8976_POWER3, 0, 0), SND_SOC_DAPM_PGA("Aux Input", WM8976_POWER1, 6, 0, NULL, 0), SND_SOC_DAPM_PGA("SpkN Out", WM8976_POWER3, 5, 0, NULL, 0), SND_SOC_DAPM_PGA("SpkP Out", WM8976_POWER3, 6, 0, NULL, 0), SND_SOC_DAPM_PGA("Mono Out", WM8976_POWER3, 7, 0, NULL, 0), SND_SOC_DAPM_PGA("Mic PGA", WM8976_POWER2, 2, 0, NULL, 0),

SND_SOC_DAPM_PGA("Aux Boost", SND_SOC_NOPM, 0, 0,

	&wm8976_aux_boost_controls, 1),
SND_SOC_DAPM_PGA("Mic Boost", SND_SOC_NOPM, 0, 0,
	&wm8976_mic_boost_controls, 1),
SND_SOC_DAPM_SWITCH("Capture Boost", SND_SOC_NOPM, 0, 0,
	&wm8976_capture_boost_controls),

SND_SOC_DAPM_MIXER("Boost Mixer", WM8976_POWER2, 4, 0, NULL, 0),

SND_SOC_DAPM_MICBIAS("Mic Bias", WM8976_POWER1, 4, 0),

SND_SOC_DAPM_INPUT("MICN"),
SND_SOC_DAPM_INPUT("MICP"),
SND_SOC_DAPM_INPUT("AUX"),
SND_SOC_DAPM_OUTPUT("MONOOUT"),
SND_SOC_DAPM_OUTPUT("SPKOUTP"),
SND_SOC_DAPM_OUTPUT("SPKOUTN"),
#endif
};

static int wm8976_add_widgets(struct snd_soc_codec *codec)

{
	int i;

	for(i = 0; i < ARRAY_SIZE(wm8976_dapm_widgets); i++) {
		snd_soc_dapm_new_control(codec, &wm8976_dapm_widgets[i]);
	}

	/* set up audio path map */
	for(i = 0; audio_map[i][0] != NULL; i++) {
		snd_soc_dapm_connect_input(codec, audio_map[i][0], audio_map[i][1],
            audio_map[i][2]);
	}

	snd_soc_dapm_new_widgets(codec);
	return 0;
}

-----------------------------------------------

Thanks advanced .
Best Regards
Peter Meng

#1 lore raw
Quoted 1 line · peter meng

1. Is this mean all widget in wm8976 does not have power management function ?

Yes.

Quoted 1 line

2. If wm8976 does not add widget then the process of 'set up audio path map ' will fails , is this correct ?

It shouldn't, the driver just turns everything on all the time. This will consume more power than is required but other than that should function fine.