From alsa-devel-owner@alsa.jcu.cz  Thu Aug 20 23:43:11 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 XAA28455;
	Thu, 20 Aug 1998 23:42:56 +0200
Date: Thu, 20 Aug 1998 23:42:56 +0200 (MET DST)
From: Jaroslav Kysela <perex@jcu.cz>
To: Maximilian Bisani <bisani@kawo2.rwth-aachen.de>
cc: alsa-devel@alsa.jcu.cz
Subject: Re: Detecting ADC Overload
In-Reply-To: <Pine.LNX.3.96.980820223615.231B-100000@phoenix.kawo2.rwth-aachen.de>
Message-ID: <Pine.LNX.3.96.980820233935.3156G-100000@entry.jcu.cz>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=ISO-8859-2
Content-Transfer-Encoding: 8bit
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Thu, 20 Aug 1998, Maximilian Bisani wrote:

> > With ALSA API you can detect if driver does conversion of samples.
> > Variable snd_pcm_record_info_t -> flags have flags SND_PCM_RINFO_8BITONLY
> > and SND_PCM_RINFO_16BITONLY. This flags shows to application driver state.
> 
> I dont know if this is welcome, but I would like to make a suggestion:
> 
> Currently the "formats" field of "struct snd_pcm_record_info"  provides
> the set of supported audio data formats and the SND_PCM_RINFO_XXBITONLY
> flags tell you that some of them are supported by software emulation only.
> My suggestion would be to remove SND_PCM_RINFO_XXBITONLY and introduce a
> new field -- say "hdw_formats" -- into "struct snd_pcm_record_info" which
> is the set of all formats which are supported by hardware without
> emulation.  So for SB16 (with 8 bit DMA assigned to the record direction) 
> this would be: 
> 
>     formats == SND_PCM_SFMT_U8 | SND_PCM_SFMT_S16_LE | 
>                SND_PCM_SFMT_S8 | SND_PCM_SFMT_U16_LE 
>     hdw_formats == SND_PCM_SFMT_U8 | SND_PCM_SFMT_S8
> 
> (Or should it be hdw_formats == SND_PCM_SFMT_S8 ???)
> 
> I believe this is more consistent and flexible as you wouldnt have to
> introduce more flags if you provide more software conversion options.

Yes, your suggestion is more clean. OK. First thing which will use
reserved[] array at end of info structures ;-))

> > >P.S. Are you still in need of someone to improve the API documentation?
> > 
> > There is two documentations. One for kernel side of ALSA driver and second
> > for ALSA C library + ALSA API (aka /usr/include/linux/sound.h). If you
> > want extend second (from ALSA library package) - none is working on it at
> > this time.
> 
> OK, I will send you my corrections/extensions to the library API docs.
> Please have patience for a week or two.

Fine. All contributors are welcome.

						Jaroslav

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


