From owner-freebsd-multimedia Tue Sep 23 01:16:16 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA28070 for multimedia-outgoing; Tue, 23 Sep 1997 01:16:16 -0700 (PDT) Received: from rah.star-gate.com (rah.star-gate.com [204.188.121.18]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA28058 for ; Tue, 23 Sep 1997 01:16:13 -0700 (PDT) Received: from rah.star-gate.com (localhost.star-gate.com [127.0.0.1]) by rah.star-gate.com (8.8.7/8.8.5) with ESMTP id BAA00712; Tue, 23 Sep 1997 01:10:17 -0700 (PDT) Message-Id: <199709230810.BAA00712@rah.star-gate.com> To: Luigi Rizzo cc: jonny@coppe.ufrj.br, gurney_j@resnet.uoregon.edu, multimedia@FreeBSD.ORG Subject: Re: More reports on the GUS PnP with Luigi's driver In-reply-to: Your message of "Tue, 23 Sep 1997 08:35:53 +0200." <199709230635.IAA18612@labinfo.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 23 Sep 1997 01:10:17 -0700 From: Amancio Hasty Sender: owner-freebsd-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Don't worry , I think I know what to do 8) Here is the doc for the gus pnp chipset: ftp://rah.star-gate.com/pub/iwpg.pdf All the code necessary to set the gus pnp is in gus_wave.c and the main entry routine to set the guspnp is IwaveOpen. In the old sound driver guspnp18, right before probing for a gus , the driver calls IwaveOpen to set the gus pnp if it finds one . IwaveOpen does the pnp isolation and detection of the gus pnp however since the PnP driver does this all whats needed is to pass all the pnp information to IwaveOpen and set the card. The following code sets the gus pnp: if (iw.pnprdp > 0 && iw.csn > 0) { IwavePnpSetCfg(); IwavePnpActivate(AUDIO, ON); IwavePnpActivate(EXT, ON); } /* reset */ outb(iw.igidxr, _URSTI);/* Pull reset */ outb(iw.i8dp, 0x00); DELAY(1000 * 30); outb(iw.i8dp, 0x01); /* Release reset */ DELAY(1000 * 30); /* end of reset */ IwaveMemCfg(NULL); tmp = IwaveRegPeek(IDECI); IwaveRegPoke(IDECI, tmp | 0x18); IwaveCodecMode(CODEC_MODE2); /* Default codec mode */ IwaveRegPoke(ICMPTI, 0); outb(iw.igidxr, 0x99); tmp = inb(iw.i8dp); outb(iw.igidxr, 0x19); outb(iw.i8dp, tmp); IwaveCodecIrq(~CODEC_IRQ_ENABLE); Iwaveinitcodec(); outb(iw.p2xr, 0x0c); /* Disable line in, mic and line out */ IwaveRegPoke(CLCI, 0x3f << 2); IwaveLineLevel(0, _CLOAI); IwaveLineLevel(0, _CROAI); IwaveLineMute(OFF, _CLOAI); IwaveLineMute(OFF, _CROAI); IwaveLineLevel(0, _CLLICI); IwaveLineLevel(0, _CRLICI); IwaveLineMute(OFF, _CLLICI); IwaveLineMute(OFF, _CRLICI); IwaveLineLevel(0, _CLDACI); IwaveLineLevel(0, _CRDACI); IwaveLineMute(ON, _CLDACI); IwaveLineMute(ON, _CRDACI); IwaveLineLevel(0, _CLLICI); IwaveLineLevel(0, _CRLICI); IwaveLineMute(ON, _CLLICI); IwaveLineMute(ON, _CRLICI); IwaveInputSource(LEFT_SOURCE, MIC_IN); IwaveInputSource(RIGHT_SOURCE, MIC_IN); outb(iw.pcodar, 0x9 | 0x40); outb(iw.cdatap, 0); IwaveCodecIrq(CODEC_IRQ_ENABLE); outb(iw.pcodar, _CFIG3I | 0x20); outb(iw.cdatap, 0xC2); /* Enable Mode 3 IRQs & Synth */ outb(iw.igidxr, _URSTI); outb(iw.i8dp, GF1_SET | GF1_OUT_ENABLE | GF1_IRQ_ENABLE); DELAY(1000 * 30); iw.size_mem = IwaveMemSize(); /* Bytes of RAM in this mode */ outb(iw.p2xr, 0xc); /* enable output */ IwaveRegPoke(CLCI, 0x3f << 2); IwaveCodecIrq(CODEC_IRQ_ENABLE); splx(flags); DELAY(1000 * 100); IwaveRegPoke(CPDFI, 0); return (TRUE); --- Cheers, Amancio >From The Desk Of Luigi Rizzo : > > The reason why Luigi's sound driver does not work with the gus pnp > > is because the gus pnp requires additional initialization beyond > > PnP which currently the driver lacks. > > exact. My driver _has never worked_ with the GusPnP, it merely has the > hooks to recongize the card. > > I have said this many times on the list but people seems to ignore > emails, README files, etc :( > > Cheers > Luigi