Hi igorpadykov,
Thanks for your advice.I tried as section 2.2.6 told.but when i put the code in sgtl5000_suspend() like this:
static int sgtl5000_suspend(struct snd_soc_codec *codec)
{
// Configure ADC left and right analog volume to desired default.
snd_soc_write(codec, SGTL5000_CHIP_ANA_ADC_CTRL, 0x0000);
// LINEOUT and DAC volume control
snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_CTRL, 8, 0);
snd_soc_write(codec, SGTL5000_CHIP_DAC_VOL, 0x3c3c);
snd_soc_update_bits(codec, SGTL5000_CHIP_ADCDAC_CTRL, 2, 0);
snd_soc_update_bits(codec, SGTL5000_CHIP_ADCDAC_CTRL, 3, 0);
// Unmute ADC
snd_soc_update_bits(code, SGTL5000_CHIP_ANA_CTRL, 0, 0);
sgtl5000_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0;
}
and rebuild the kernel for the machine. But the machine had no sound before i set it to suspend and when the machine got into suspend status, it can't wake up.Did i missed something?
Best Regards,
bo xu