From alsa-user-owner@alsa.jcu.cz  Sat Dec 19 18:59:56 1998
Received: from entry.jcu.cz (IDENT:perex@entry.jcu.cz [160.217.1.111])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id SAA25280;
	Sat, 19 Dec 1998 18:58:51 +0100
Date: Sat, 19 Dec 1998 18:58:51 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: pingling@elka.pw.edu.pl
cc: alsa-user@alsa.jcu.cz
Subject: Re: Setting DMAs on GUS ACE
In-Reply-To: <367bcee0.673852@elektron.elka.pw.edu.pl>
Message-ID: <Pine.LNX.3.96.981219185628.6427A-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-user@alsa.jcu.cz
Sender: alsa-user-owner@alsa.jcu.cz
Precedence: list

On Sat, 19 Dec 1998 pingling@elka.pw.edu.pl wrote:

> Hello!
> 
> It's me again... This time I decided to turn off the DMA for recording. GUS
> ACE has no recording capabilities and under DOS/Win both DMAs get the same
> value. I tried it here but the driver complained. So I tried to turn off one
> of them. It works for 2nd DMA only and, unfortunately, it's the playback DMA.
> I can't turn off the 1st DMA - when I do this the driver can't load... I
> analysed the gusclassic.c file and the code indeed allows only 2nd DMA to be
> disabled. Why? I tried to modify that code so sections for 1st and 2nd DMA
> have the same structure but it produced a nice kernel oops...

If DMA2 is disabled (snd_dma2 = -1) then driver shares same DMA channel
for both record and playback. Follow code in alsa-driver/lowlevel/gus/gus.c:

        if (dma2num != SND_DMA_DISABLE) {
                gus->gf1.dma2num = dma2num;
                gus->gf1.dma2 = card->dmas[dma2num]->dma;
        } else {
                gus->gf1.dma2num = gus->gf1.dma1num;
                gus->gf1.dma2 = gus->gf1.dma1;
        }
        if (gus->gf1.dma1 == gus->gf1.dma2)
                gus->equal_dma = 1;

It isn't working?

							Jaroslav

-----
Jaroslav Kysela <perex@jcu.cz>
Academic Computer Centre, University of South Bohemia
Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic


