Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Aug 1997 14:36:43 -0700
From:      Amancio Hasty <hasty@rah.star-gate.com>
To:        Kyle Mestery <mestery@winternet.com>
Cc:        freebsd-multimedia@FreeBSD.ORG
Subject:   Re: Xquake and sound dont work 
Message-ID:  <199708242136.OAA00994@rah.star-gate.com>
In-Reply-To: Your message of "Sun, 24 Aug 1997 14:00:33 CDT." <Pine.GSO.3.96.970824135843.7179A-100000@tundra.winternet.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
Sorry about that I discovered the problem recently here with
my gus pnp because the testing was done with my SB16 PnP since
that has been the card giving us all the headaches on 
the guspnp driver.


The problem is the isa_dma status provided with the sound
driver it works fine with the sb16 however it breaks the gus pnp.

I am going to hash out whats going with isa_dmastatus today and in
fact started working on it this morning. Just have to learn
exactly how the dma hardware works.

The symptom is that with the current isa_dmastatus on guspnp16 the 
dma counter starts counting backwards however with the old isa_dmastatus
the counting is ascending. Both drivers at least over here are
doing 16bit dma transfers and calling the dma hardware in the
exact the same way :(

If you want your sound back change the reference in dmabuf.c from
snd_isa_dmastatus to isa_dmastatus and replace the isa.c:isa_dmastatus with
the enclosed one . Please SB people don't have to do this .
Hopefully before the end of the day I will have a viable solution for
both SB cards and GUS cards.

int
isa_dmastatus(int chan)
{
    u_long phy = 0 ;
    u_long cnt = 0 ;
    u_long flags ;
    int waport;

    if ((dma_inuse & (1 << chan)) == 0) {
        printf("chan %d not acquired\n", chan);
        return -1 ;
    }

    if (((dma_busy & (1 << chan)) == 0) &&
        (dma_auto_mode & (1 << chan)) == 0 ) {
        printf("chan %d not busy\n", chan);
        return -2 ;
    }

    flags = splhigh();
    if ((chan & 4) == 0) { /* 8-bit channel */
        outb(DMA1_FFC, 0);
        waport =  DMA1_CHN(chan);
        phy= inb(waport) + (inb(waport) <<8) + (inb(dmapageport[chan]) <<16 );
        cnt = inb(waport+1) + (inb(waport+1)<<8) +1;
        cnt &= 0xffff ;
    } else {
        outb(DMA2_FFC, 0);
        waport = DMA2_CHN(chan - 4);
        phy= inb(waport) + (inb(waport) <<8) + (inb(dmapageport[chan]) <<16 );
        cnt = inb(waport+1) + (inb(waport+1)<<8) + 1;
        phy <<= 1;
        cnt <<= 1;
        cnt &= 0x1ffff ;
    }
    splx(flags);
    return cnt ;
}



>From The Desk Of Kyle Mestery :
> I just compiled a kernel built from sources of 8-24-97 at 1:30PM Central
> time, and now I have lost sound with xquake.  I have some sound, but it is
> crackly, and low volume.  Does this have to do with the recent
> isa_dmastatus stuff that has been happening?  I am using guspnp16.
> 
> Kyle Mestery
> StorageTek's Network Systems Group
> 7600 Boone Ave. N., Brooklyn Park, MN 55428
> mesteka@anubis.network.com, mestery@winternet.com
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708242136.OAA00994>