]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ALSA] Fix bugs in mode change/recalibration for opl3sa2 driver
authorPaul Vojta <vojta@math.berkeley.edu>
Fri, 27 Jul 2007 10:20:38 +0000 (12:20 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Oct 2007 13:58:08 +0000 (15:58 +0200)
The mode change / recalibration doesn't work always with opl3sa2 devices,
e.g. the first time it's played back.  The patch fixes the problem.

Signed-off-by: Paul Vojta <vojta@math.berkeley.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
include/sound/cs4231.h
sound/isa/cs423x/cs4231_lib.c
sound/isa/opl3sa2.c

index ab51ce1ba9a5484acef339bd72b3688c8dbb1470..b195a73c5685285e1b0a7926c628b153368bc9b5 100644 (file)
 #define CS4231_HW_CS4239       0x0404  /* CS4239 - Crystal Clear (tm) stereo enhancement */
 /* compatible, but clones */
 #define CS4231_HW_INTERWAVE     0x1000 /* InterWave chip */
-#define CS4231_HW_OPL3SA2       0x1001 /* OPL3-SA2 chip */
+#define CS4231_HW_OPL3SA2       0x1101 /* OPL3-SA2 chip, similar to cs4231 */
 
 /* defines for codec.hwshare */
 #define CS4231_HWSHARE_IRQ     (1<<0)
index 914d77b61b0c042d865b22cb7b78fa09e44f3b20..642bdaa703be5b900d52e20589ebfba49305910c 100644 (file)
@@ -555,6 +555,8 @@ static void snd_cs4231_playback_format(struct snd_cs4231 *chip,
                        snd_cs4231_out(chip, CS4231_PLAYBK_FORMAT, chip->image[CS4231_PLAYBK_FORMAT] = pdfr);
                }
                spin_unlock_irqrestore(&chip->reg_lock, flags);
+               if (chip->hardware == CS4231_HW_OPL3SA2)
+                       udelay(100);    /* this seems to help */
                snd_cs4231_mce_down(chip);
        }
        snd_cs4231_calibrate_mute(chip, 0);
index e70db32991d966073e8655cfd96f67ad1883f7be..244a00296750cd9340aa345d00d223baee23b9c4 100644 (file)
@@ -253,6 +253,7 @@ static int __devinit snd_opl3sa2_detect(struct snd_opl3sa2 *chip)
                /* 0x03 - YM715B */
                /* 0x04 - YM719 - OPL-SA4? */
                /* 0x05 - OPL3-SA3 - Libretto 100 */
+               /* 0x07 - unknown - Neomagic MagicWave 3D */
                break;
        }
        str[0] = chip->version + '0';