From alsa-devel-owner@alsa.jcu.cz  Thu Jan 28 01:24:08 1999
Received: from dark.x.dtu.dk (IDENT:qmailr@dark.x.dtu.dk [130.225.92.246])
	by marvin.jcu.cz (8.9.1a/8.9.1) with SMTP id BAA31487
	for <alsa-devel@alsa.jcu.cz>; Thu, 28 Jan 1999 01:19:17 +0100
Received: (qmail 12666 invoked by uid 506); 28 Jan 1999 00:19:15 -0000
Date: Thu, 28 Jan 1999 01:19:15 +0100
From: Magnus Norddahl <mbn@dark.x.dtu.dk>
To: alsa-devel@alsa.jcu.cz
Subject: Re: alsa driver forgets settings between close and open
Message-ID: <19990128011914.C12308@dark.x.dtu.dk>
References: <19990127162928.A7121@neptun.iitb.fhg.de> <Pine.LNX.3.96.990127221747.4304A-100000@entry.jcu.cz>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
In-Reply-To: <Pine.LNX.3.96.990127221747.4304A-100000@entry.jcu.cz>; from Jaroslav Kysela on Wed, Jan 27, 1999 at 10:23:07PM +0100
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

Quoting Jaroslav Kysela (perex@jcu.cz):
> > 
> >  !!! every program interacting with the device must do its own setup !!!
> > 
> > On the other hand, if setting would be persistent after a close and a
> > subsequent open by another program, it would be possible to have just
> > one single program to set driver settings. After they are set as
> > necessary, playback as well as recording could proceed with just cat, dd 
> > or, in my own program, with a simple sequence of open/read,write/close.
> > 
> > Do you think it will be possible in the future to have pesistent
> > settings in alsa?
> 
> No, I don't see any improvement of driver with this way.
> Any comments from others?

I agree. It would be bad. Normally an application only changes the freq and
the sample format (8 bit, 16 bit, stereo/mono). Therefore they expect all
the other available parameters to have "logical default values" - so it has
no reason to set these values.

If the driver didn't reset its settings, it could very easily happen, that
an application forgets to set a parameter that is rarely used. The way it is
right now, the application can be sure everything should sound like it was
supposed to do.

Should such a feature be available, I recommend it is applied only to
explicit selected applications, eg:

echo "NoReset cat cp" > /proc/asound/0/pcm0o

-- 
Magnus Norddahl
ClanSoft

