diff options
author | peter <peter@FreeBSD.org> | 2000-06-01 03:58:27 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-06-01 03:58:27 +0000 |
commit | bf702b67645b56ef1440e940dfddaf76bba3edb3 (patch) | |
tree | 74c82f273c0e32231d5130a30b7e9236d36e98d4 /sys/dev/sound/pci/ds1.c | |
parent | 4e96ce387c8855a164e8dec4746089c50bdfa201 (diff) | |
download | FreeBSD-src-bf702b67645b56ef1440e940dfddaf76bba3edb3.zip FreeBSD-src-bf702b67645b56ef1440e940dfddaf76bba3edb3.tar.gz |
With this evil hack the DS1 driver works on our Intel desktop
motherboards that use YMF740's. It has a strange subvendor and subdevice
ID and requires a disturbingly long delay after the ac97 codec init.
Cameron hasn't had this driver tested on another 740 yet, so we don't know
if this is a quirk of all 740's, or if its just something about the codec
that Intel used.
Diffstat (limited to 'sys/dev/sound/pci/ds1.c')
-rw-r--r-- | sys/dev/sound/pci/ds1.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c index 1fa2e1f..4536790 100644 --- a/sys/dev/sound/pci/ds1.c +++ b/sys/dev/sound/pci/ds1.c @@ -113,6 +113,7 @@ struct { char *name; u_int32_t *mcode; } ds_devs[] = { +/* Beware, things know the indexes here */ {0x00041073, 0, "Yamaha DS-1 (YMF724)", CntrlInst}, {0x000d1073, 0, "Yamaha DS-1E (YMF724F)", CntrlInst1E}, {0x00051073, 0, "Yamaha DS-1? (YMF734)", CntrlInst}, @@ -121,8 +122,10 @@ struct { {0x00061073, 0, "Yamaha DS-1? (YMF738_TEG)", CntrlInst}, {0x000a1073, 0x00041073, "Yamaha DS-1 (YMF740)", CntrlInst}, {0x000a1073, 0x000a1073, "Yamaha DS-1 (YMF740B)", CntrlInst}, +/*8*/ {0x000a1073, 0x53328086, "Yamaha DS-1 (YMF740I)", CntrlInst}, + {0x000a1073, 0, "Yamaha DS-1 (YMF740?)", CntrlInst}, {0x000c1073, 0, "Yamaha DS-1E (YMF740C)", CntrlInst1E}, - {0x00101073, 0, "Yamaha DS-1E (YMF744)", CntrlInst1E}, +/*11*/ {0x00101073, 0, "Yamaha DS-1E (YMF744)", CntrlInst1E}, {0x00121073, 0, "Yamaha DS-1E (YMF754)", CntrlInst1E}, {0, 0, NULL, NULL} }; @@ -247,6 +250,15 @@ ds_initcd(void *devinfo) pci_write_config(sc->dev, PCIR_DSXGCTRL, x & ~0x03, 1); pci_write_config(sc->dev, PCIR_DSXGCTRL, x | 0x03, 1); pci_write_config(sc->dev, PCIR_DSXGCTRL, x & ~0x03, 1); + /* + * The YMF740 on some Intel motherboards requires a pretty + * hefty delay after this reset for some reason... Otherwise: + * "pcm0: ac97 codec init failed" + * Maybe this is needed for all YMF740's? + * 400ms and 500ms here seem to work, 300ms does not. + */ + if (sc->type == 8) + DELAY(400000); } return ds_cdbusy(sc, 0); @@ -272,7 +284,7 @@ ds_rdcd(void *devinfo, int regno) if (ds_cdbusy(sc, sec)) return 0xffffffff; - if (sc->type == 9 && sc->rev < 2) + if (sc->type == 11 && sc->rev < 2) for (i = 0; i < 600; i++) ds_rd(sc, reg, 2); |