]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/isa/opti9xx/opti92x-ad1848.c
ALSA: wss_lib: use wss mixer code instead of ad1848 one
[linux-2.6-omap-h63xx.git] / sound / isa / opti9xx / opti92x-ad1848.c
index 1f6d6fcd6e5729e08c11792f0f1257aa83ebf548..4f172a219244b77606fe2924e96342463cdac0b2 100644 (file)
@@ -757,6 +757,15 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
        error = snd_wss_pcm(codec, 0, &pcm);
        if (error < 0)
                return error;
+#else
+       error = snd_ad1848_create(card, chip->wss_base + 4, chip->irq,
+                                 chip->dma1, WSS_HW_DETECT, &codec);
+       if (error < 0)
+               return error;
+       error = snd_ad1848_pcm(codec, 0, &pcm);
+       if (error < 0)
+               return error;
+#endif
        error = snd_wss_mixer(codec);
        if (error < 0)
                return error;
@@ -764,23 +773,14 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
        error = snd_wss_timer(codec, 0, &timer);
        if (error < 0)
                return error;
-#else /* OPTI93X */
+#endif
+#ifdef OPTi93X
        error = request_irq(chip->irq, snd_opti93x_interrupt,
                            IRQF_DISABLED, DEV_NAME" - WSS", codec);
        if (error < 0) {
                snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
                return error;
        }
-#endif
-#else
-       if ((error = snd_ad1848_create(card, chip->wss_base + 4,
-                                      chip->irq, chip->dma1,
-                                      WSS_HW_DETECT, &codec)) < 0)
-               return error;
-       if ((error = snd_ad1848_pcm(codec, 0, &pcm)) < 0)
-               return error;
-       if ((error = snd_ad1848_mixer(codec)) < 0)
-               return error;
 #endif
        strcpy(card->driver, chip->name);
        sprintf(card->shortname, "OPTi %s", card->driver);