From alsa-devel-owner@alsa.jcu.cz  Thu Dec 17 19:13:52 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 TAA23365;
	Thu, 17 Dec 1998 19:13:19 +0100
Date: Thu, 17 Dec 1998 19:13:19 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: Andrea Venturi <venturi@cineca.it>
cc: Alsa Development <alsa-devel@alsa.jcu.cz>
Subject: Re: i'm a bit confused about PCI DMA versus Bus-Master..
In-Reply-To: <36793FFC.FDAFCD4D@cineca.it>
Message-ID: <Pine.LNX.3.96.981217190224.5646D-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Thu, 17 Dec 1998, Andrea Venturi wrote:

> in brief.. i'm looking for a first implementation of a PCM/Mixer driver
> for my ess maestro ii card and i'm trying to understand the other pci
> cards alsa driver (like sonicvibes ..)
> 
> i believe that this driver is programming a _real_DMA_ to feed the Codec
> for playback.. (like in a ISA card..)

No, SonicVibes doesn't have _real_DMA_. SonicVibes DMA emulates ISA DMA
controller (who knows why?).

> in a sample implementation of a dos C program for the maestro II chip,
> instead, i found the Bus-Master way to let the chip control the bus and
> go to read the memory directly.. (so i understand ;-)

Probably same way uses AudioPCI chips..

> i believe that this is a better way to use a pci card.. (there is also
> the sound blaster compatible way to feed the codec using a real DMA,
> but, i believe only for compatibility reason..)
> 
> could someone comment on this?

I don't exactly on what you want comment. Simply use better way.
Compatible operations should have some limits (like transfer only from 
first 16MB of memory etc..).

> another source of questions is the actual way to create the interrupt
> and fill the DMA buffer.
> 
> In the "real DMA" case, i believe,  the interrupt comes at the _end_ of
> the DMA transfer.

No, this isn't true. Interrupts are always generated by soundchip. DMA is
used for data transfer only.

> Instead, in the C source that i can browse, there is an autonomous timer
> (named BOB timer), that is programmed before the bus master transfer
> start, and raise an interrupt asynchronously (obviously before the
> playback come to the end of the buffer).

Hmm. I didn't see this hardware to this time. All soundchips which I know 
generates interrupts after some block of samples is transferred. Using
some timer is a little bit complicated.

							Jaroslav

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


