From alsa-devel-owner@alsa.jcu.cz  Wed Dec  2 14:24:22 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 OAA27516;
	Wed, 2 Dec 1998 14:19:44 +0100
Date: Wed, 2 Dec 1998 14:19:43 +0100 (CET)
From: Jaroslav Kysela <perex@jcu.cz>
To: Abramo Bagnara <abbagnara@racine.ra.it>
cc: alsa-devel@alsa.jcu.cz
Subject: Re: Record volume proposal
In-Reply-To: <3665209A.9A5799EB@racine.ra.it>
Message-ID: <Pine.LNX.3.96.981202141150.25664C-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, 2 Dec 1998, Abramo Bagnara wrote:

> Jaroslav Kysela wrote:
> 
> > OK. I prepared on CVS (development line 0.3.0pre1 - not ver-0-2-patches
> > branch - look to WWW) these things:
> > 
> > SND_MIXER_CINFO_CAP_RECORDVOLUME
> > 
> > This capability flags must be set to mixer channel->hw.caps if channel
> > supports separate record volume setup.
> > 
> > Callback set_volume_level should contain in left and right parameters
> > flag SND_MIX_RECORD_VOLUME. You need get record volume via macro
> > SND_MIX_VOLUME(x).
> > 
> > I added to alsa-lib two functions snd_mixer_channel_record_read() and
> > snd_mixer_channel_record_write(). These functions operates with record
> > volume, but flags member is same for output volume!!!
> > 
> > No ALSA application support separate record volume setup yet. Maybe you
> > should modify amixer or alsamixer for testing...
> > 
> > OSS mixer emulator returns to application only output volume, but sets
> > both output and input (record) volume together. If you need some change -
> > let me know.
> > 
> >                                                         Jaroslav
> 
> I find the SND_MIX_RECORD_VOLUME and SND_MIX_VOLUME(x) mechanism a bit
> complicated.

Why? You need add only one condition to lowlevel function and you can save
some common code for both volumes (like pointer to soundcard's structure
initialization, spinlocks etc...).

> It wouldn't be better and cleaner to add a set_record_volume_level
> lowlevel functions to
> struct snd_stru_mixer_channel_hw?

I'm not sure.. My idea is save a little bit code and space if we use
multiplexing for output and record volume to one function.. Do you thing
that 28-bit volume range isn't enough? I did see only soundcards which
have maximum 255 volume steps (thus 8-bit range).

> This involve to add a line in all initialization of this struct in ALL
> lowlevel drivers,
> but I think it's worth it.

> If you agree but you don't have time, I can do this changes and send you
> the patches.

Have anyone other same meaning?

						Jaroslav

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


