summaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97/ac97_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-08-29 15:12:46 +0200
committerJaroslav Kysela <perex@perex.cz>2007-10-16 15:59:34 +0200
commitd6c3cf81f05c8dd8e5e656d4bcb8d5f2569d0262 (patch)
tree9d928550f7c78f337427a8dea6f20439bfb40778 /sound/pci/ac97/ac97_codec.c
parent[ALSA] hda-codec - Add Mic Boost control with auto-configuration (diff)
downloadlinux-d6c3cf81f05c8dd8e5e656d4bcb8d5f2569d0262.tar.xz
linux-d6c3cf81f05c8dd8e5e656d4bcb8d5f2569d0262.zip
[ALSA] ac97 - Suppress the reset of audio-codec from modem-codec at resume
On codec chips with both audio and modem functions (e.g. Conexant one), performing AC97_RESET resets the whole registers. When both audio and modem drivers are resumed at the same time, the modem one often is resumed after the audio, and it results in the reset of audio registers (ALSA bug#3333). This patch fixes such a problem. Since the modem codec basically doesn't need AC97_RESET, skip this initialization unless specified as audio. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/ac97/ac97_codec.c')
-rw-r--r--sound/pci/ac97/ac97_codec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index df1333332a5e..3e5ff29fc499 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -2496,7 +2496,10 @@ void snd_ac97_resume(struct snd_ac97 *ac97)
snd_ac97_write(ac97, AC97_POWERDOWN, 0);
if (! (ac97->flags & AC97_DEFAULT_POWER_OFF)) {
- snd_ac97_write(ac97, AC97_RESET, 0);
+ if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO))
+ snd_ac97_write(ac97, AC97_RESET, 0);
+ else if (!(ac97->scaps & AC97_SCAP_SKIP_MODEM))
+ snd_ac97_write(ac97, AC97_EXTENDED_MID, 0);
udelay(100);
snd_ac97_write(ac97, AC97_POWERDOWN, 0);
}