]> err.no Git - linux-2.6/blobdiff - sound/pci/cs46xx/cs46xx_lib.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[linux-2.6] / sound / pci / cs46xx / cs46xx_lib.c
index 8c44fefd15fc85828c43229ccffe94f895954435..e214e567dec894074568b48205d5a6c139ac6224 100644 (file)
@@ -8,7 +8,7 @@
  *    - Sometimes the SPDIF input DSP tasks get's unsynchronized
  *      and the SPDIF get somewhat "distorcionated", or/and left right channel
  *      are swapped. To get around this problem when it happens, mute and unmute 
- *      the SPDIF input mixer controll.
+ *      the SPDIF input mixer control.
  *    - On the Hercules Game Theater XP the amplifier are sometimes turned
  *      off on inadecuate moments which causes distorcions on sound.
  *
@@ -45,7 +45,6 @@
  *
  */
 
-#include <sound/driver.h>
 #include <linux/delay.h>
 #include <linux/pci.h>
 #include <linux/pm.h>
@@ -2773,6 +2772,9 @@ static int snd_cs46xx_free(struct snd_cs46xx *chip)
        if (chip->irq >= 0)
                free_irq(chip->irq, chip);
 
+       if (chip->active_ctrl)
+               chip->active_ctrl(chip, -chip->amplifier);
+
        for (idx = 0; idx < 5; idx++) {
                struct snd_cs46xx_region *region = &chip->region.idx[idx];
                if (region->remap_addr)
@@ -2780,9 +2782,6 @@ static int snd_cs46xx_free(struct snd_cs46xx *chip)
                release_and_free_resource(region->resource);
        }
 
-       if (chip->active_ctrl)
-               chip->active_ctrl(chip, -chip->amplifier);
-       
 #ifdef CONFIG_SND_CS46XX_NEW_DSP
        if (chip->dsp_spos_instance) {
                cs46xx_dsp_spos_destroy(chip);