[alsa-devel] Ask a question about WM8976
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
On Wed, Dec 10, 2008 at 02:42:58PM +0800, peter meng wrote:
- Is this mean all widget in wm8976 does not have power management function ?
Yes.
- 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.
participants (2)
-
Mark Brown
-
peter meng