[ALSA] MC97 registers reset
authorSasha Khapyorsky <sashak@smlink.com>
Thu, 7 Apr 2005 18:23:58 +0000 (20:23 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sun, 29 May 2005 07:58:37 +0000 (09:58 +0200)
AC97 Codec
Separated ac97 registers reset for audio and modem (or both) as recommended
in AC97 spec.

Signed-off-by: Sasha Khapyorsky <sashak@smlink.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ac97/ac97_codec.c

index ab7114c51dcb8a44fb0a62e2feb1327441167c38..1ad7f83a65e1ea6844a33b6c12f430cc74e89dd0 100644 (file)
@@ -1872,7 +1872,11 @@ int snd_ac97_mixer(ac97_bus_t *bus, ac97_template_t *template, ac97_t **rac97)
                        goto __access_ok;
        }
 
-       snd_ac97_write(ac97, AC97_RESET, 0);    /* reset to defaults */
+       /* reset to defaults */
+       if (!(ac97->scaps & AC97_SCAP_SKIP_AUDIO))
+               snd_ac97_write(ac97, AC97_RESET, 0);
+       if (!(ac97->scaps & AC97_SCAP_SKIP_MODEM))
+               snd_ac97_write(ac97, AC97_EXTENDED_MID, 0);
        if (bus->ops->wait)
                bus->ops->wait(ac97);
        else {