ALSA: wss_lib: opti92x-ad1848 WSS_HW_DETECT fix
authorRene Herman <rene.herman@gmail.com>
Mon, 4 Aug 2008 03:26:26 +0000 (05:26 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 6 Aug 2008 13:40:05 +0000 (15:40 +0200)
snd-opti92x-ad1848 mistakingly passes WSS_HW_OPTI93X currently. This
fixes it as tested with a OPTi 82C929A/AD1848 card.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/isa/opti9xx/opti92x-ad1848.c

index cb5f66bde5d3cfd19cdd5689e2fd19e848ec0e56..19706b0d84978c5307166826b9aed76a0c40f46e 100644 (file)
@@ -719,6 +719,8 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
        chip->dma1 = dma1;
 #if defined(CS4231) || defined(OPTi93X)
        chip->dma2 = dma2;
+#else
+       chip->dma2 = -1;
 #endif
 
        if (chip->wss_base == SNDRV_AUTO_PORT) {
@@ -734,10 +736,10 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
 
        error = snd_wss_create(card, chip->wss_base + 4, -1,
                               chip->irq, chip->dma1, chip->dma2,
-#ifdef CS4231
-                              WSS_HW_DETECT, 0,
-#else /* OPTi93x */
+#ifdef OPTi93X
                               WSS_HW_OPTI93X, WSS_HWSHARE_IRQ,
+#else
+                              WSS_HW_DETECT, 0,
 #endif
                               &codec);
        if (error < 0)