ALSA: msnd - Fix build error with CONFIG_PNP=n
[cascardo/linux.git] / sound / isa / es18xx.c
index ece5041..8cfbff7 100644 (file)
@@ -77,7 +77,6 @@
  *   needed for ZV, so maybe the datasheet is entirely wrong here.
  */
  
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/isa.h>
@@ -1442,6 +1441,8 @@ static int __devinit snd_es18xx_initialize(struct snd_es18xx *chip)
                snd_es18xx_write(chip, 0xB2, 0x50);
                /* Enable MPU and hardware volume interrupt */
                snd_es18xx_mixer_write(chip, 0x64, 0x42);
+               /* Enable ESS wavetable input */
+               snd_es18xx_mixer_bits(chip, 0x48, 0x10, 0x10);
        }
        else {
                int irqmask, dma1mask, dma2mask;
@@ -2124,10 +2125,10 @@ static int __devinit snd_audiodrive_pnpc(int dev, struct snd_audiodrive *acard,
 #define is_isapnp_selected(dev)                0
 #endif
 
-static struct snd_card *snd_es18xx_card_new(int dev)
+static int snd_es18xx_card_new(int dev, struct snd_card **cardp)
 {
-       return snd_card_new(index[dev], id[dev], THIS_MODULE,
-                           sizeof(struct snd_audiodrive));
+       return snd_card_create(index[dev], id[dev], THIS_MODULE,
+                              sizeof(struct snd_audiodrive), cardp);
 }
 
 static int __devinit snd_audiodrive_probe(struct snd_card *card, int dev)
@@ -2196,9 +2197,9 @@ static int __devinit snd_es18xx_isa_probe1(int dev, struct device *devptr)
        struct snd_card *card;
        int err;
 
-       card = snd_es18xx_card_new(dev);
-       if (! card)
-               return -ENOMEM;
+       err = snd_es18xx_card_new(dev, &card);
+       if (err < 0)
+               return err;
        snd_card_set_dev(card, devptr);
        if ((err = snd_audiodrive_probe(card, dev)) < 0) {
                snd_card_free(card);
@@ -2302,9 +2303,9 @@ static int __devinit snd_audiodrive_pnp_detect(struct pnp_dev *pdev,
        if (dev >= SNDRV_CARDS)
                return -ENODEV;
 
-       card = snd_es18xx_card_new(dev);
-       if (! card)
-               return -ENOMEM;
+       err = snd_es18xx_card_new(dev, &card);
+       if (err < 0)
+               return err;
        if ((err = snd_audiodrive_pnp(dev, card->private_data, pdev)) < 0) {
                snd_card_free(card);
                return err;
@@ -2361,9 +2362,9 @@ static int __devinit snd_audiodrive_pnpc_detect(struct pnp_card_link *pcard,
        if (dev >= SNDRV_CARDS)
                return -ENODEV;
 
-       card = snd_es18xx_card_new(dev);
-       if (! card)
-               return -ENOMEM;
+       res = snd_es18xx_card_new(dev, &card);
+       if (res < 0)
+               return res;
 
        if ((res = snd_audiodrive_pnpc(dev, card->private_data, pcard, pid)) < 0) {
                snd_card_free(card);