From alsa-devel-owner@alsa.jcu.cz  Thu Aug 13 10:52:49 1998
Received: from entry.jcu.cz (perex@entry.jcu.cz [160.217.1.111])
	by marvin.jcu.cz (8.8.8/8.8.8) with SMTP id KAA16036;
	Thu, 13 Aug 1998 10:52:32 +0200
Date: Thu, 13 Aug 1998 10:52:32 +0200 (MET DST)
From: Jaroslav Kysela <perex@jcu.cz>
To: alsa-devel@jcu.cz
cc: glennm@mediaone.net
Subject: Re: Alsa extendability?
In-Reply-To: <19980812145239.A878@glennm.ne.mediaone.net>
Message-ID: <Pine.LNX.3.96.980813103912.529A-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 Wed, 12 Aug 1998 glennm@mediaone.net wrote:

> Here's one thing I've not seen anything about: How extendible is Alsa?
> 
> As a comparison, OpenGL (highly extendable 3d graphics library): there's
> the basic API (which really isn't so basic), and any card can also add
> extensions to it which weren't in the basic API.
> 
> I've not seen any of the more "modern" sound card features (hardware
> sample mixing, 3d sound, hardware effects, and so on).  I'd not expect
> the basic system to support these, either, but they're really requirements
> of a modern sound library.
> 
> One of the keys of OpenGL extensions is that an application can take
> advantage of them if they're there, without actually requiring support:
> GLQuake (Quake, rendering via OpenGL) can run on many different systems,
> using whatever horsepower it has.
> 
> From what I've seen of Alsa, it looks rather static: various SFX and midi
> features, but no way to add new features without changing the API.
> 
> Has this been considered?  Is it implemented, and intentionally worded
> in such a way that Glenn would pass it by on every pass through the various
> documentation? :)

ALSA offers basic features with same API (as you say - basic API).
This is main power for application developers. 

Most of ALSA API calls can be extended in future (you can look to
reserved[] arrays in structures).

If soundcard offers some special features (like 3D sound or something
else), there are several ways, how can be these features accessed.

1. control interface
   - lowlevel code for soundcard should add ioctl to control interface
     (numbers aren't reserved yet - maybe now is right time?)
2. /proc interface
   - lowlevel code can create device in /proc/sound/dev/ directory or proc
     entry in /proc/sound/#card#/ directory which should offer text
     or binary data (it is used for SB16 code which offers DMA width
     selection for specific direction or S3 SonicVibes to setup MIDI
     paths, WaveTable source and SRS control).

						Jaroslav

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



