Update of /cvsroot/alsa/alsa-kernel/pci/ac97 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19577/ac97
Modified Files: ac97_codec.c Log Message: - export snd_ac97_suspend(). - mute MASTER and HEADPHONE volumes in suspend to avoid possible clicks. Index: ac97_codec.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -r1.128 -r1.129 --- ac97_codec.c 7 Apr 2004 17:48:18 -0000 1.128 +++ ac97_codec.c 14 Apr 2004 17:25:51 -0000 1.129 @@ -2001,11 +2001,19 @@ * @ac97: the ac97 instance * * Suspends the codec, power down the chip. + * MASTER and HEADPHONE registers are muted but the register cache values + * are not changed, so that the values can be restored in snd_ac97_resume(). */ void snd_ac97_suspend(ac97_t *ac97) { unsigned short power = (ac97->regs[AC97_POWERDOWN] ^ 0x8000) & ~0x8000; /* invert EAPD */ + if (ac97_is_audio(ac97)) { + /* some codecs have stereo mute bits */ + snd_ac97_write(ac97, AC97_MASTER, 0x9f9f); + snd_ac97_write(ac97, AC97_HEADPHONE, 0x9f9f); + } + power |= 0x4000; /* Headphone amplifier powerdown */ power |= 0x0300; /* ADC & DAC powerdown */ snd_ac97_write(ac97, AC97_POWERDOWN, power); @@ -2297,6 +2305,7 @@ EXPORT_SYMBOL(snd_ac97_set_rate); #ifdef CONFIG_PM EXPORT_SYMBOL(snd_ac97_resume); +EXPORT_SYMBOL(snd_ac97_suspend); #endif /* ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog