From alsa-devel-owner@alsa.jcu.cz  Sat Feb 27 18:01:11 1999
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 SAA21796;
	Sat, 27 Feb 1999 18:00:55 +0100
Date: Sat, 27 Feb 1999 18:00:55 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: Abramo Bagnara <abbagnara@racine.ra.it>
cc: alsa-devel@alsa.jcu.cz
Subject: Re: Another mixer change proposal
In-Reply-To: <36D81DA4.955CEAEA@racine.ra.it>
Message-ID: <Pine.LNX.3.96.990227174717.10658G-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 Sat, 27 Feb 1999, Abramo Bagnara wrote:

> Jaroslav Kysela wrote:
> > 
> > There are basically two problems. I want discuss them on the alsa-devel
> > mailing list, too.
> > 
> > 1) I don't like very much voice array in the channel structures.
> >    Unfortunately I don't have better idea than more separating of volume
> >    ioctl structures (add a structure for one voice - it will mean that
> >    volume can be set/get from two ioctl calls if the channel has stereo
> >    capability). This will also solve in very nice way all things with
> >    STEREO flags.
> 
> One advantage of your solution that I can see is that we can maintain binary
> compatibility also if we add other voices.
> Can you show the other advantages?

The binary compatibility and flexibility are main advantages, of course.

> One drawback is that we must call the lowlevel callback several times and
> probably set hardware register several times.

I think we can solve it. I preffer to set the volumes at same time. We
could pass a pointer to an integer array for example.

> At application level the two ways are perfectly equivalent: a well specified
> library interface can use both approaches.
> 
> > 2) Would be also the mixer to control PCM voice volumes?
> >    - I don't think it. The mixer would control only the output volumes.
> >      We must probably extend PCM for balance (or better PCM voice
> >      volume setup). This volume setup wouldn't be only left and right, but
> >      probably more universal to satisfy all things.
> 
> The possible manipulation of PCM output are potentially infinite:
> - 3D
> - Balancing
> - Routing
> - Bass
> - Treble
> - Equalizer
> ...
> 
> We can't choose now which we will introduce at kernel level.
> I think that the better way is to give the possibility to loaded modules to add
> PCM manipulation and contemporary to add mixer control or switch in a dynamic
> way.

OK. This isn't what I mean exactly. I mean in which way I'm able to
control 32 voices for one PCM device? Imagine that the PCM device supports
only left and right panning. The main volume is controlled over the usuall
mixer interface, but over which interface will I control balance between
left and right side? I'm thinking to implement this feature to PCM
interface rather. The application which uses multi-voice PCM stream is
probably right source for this information, doesn't?

							Jaroslav

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


