Re: [linux-audio-dev] ALSA features.

From: Dan Mills <dmills@email-addr-hidden>
Date: Sun Sep 04 2005 - 03:55:56 EEST

On Saturday 03 September 2005 22:00, James Courtier-Dutton wrote:

> As far as I can tell, all sound cards volume controls are based around
> gain. +dB for gain, and -dB for attenuation.
>
> Examples of sound card hardware datasheets:
> Record Volume control:
> "The range is 12dB to -33dB in steps of 1.5dB."
>
> I was planning to use the unit "dB" in the volume controls.

That is exactly as it should be, it was the notion of expressing gain as dBu
(or dbu) that I was objecting to....

>
> You seem to mention "db" but I see "dB" everywhere in the datasheets.
> Are "db" and "dB" the same. If not, can someone please explain the
> difference, as "db" seems more important to people here.

It just depends on if you consider the Bell in question to be a proper noun!

dB is probably correct, I was just being lazy.

On Nice features, How about a helper function in the library to convert given
number of blocks of samples as say floats into the correct buffer format to
pass to the soundcard? It would cut lot a lot of (paraphrasing):

if (snd_format = INTERLEAVED)
.
.
.
else if (snd_format == NON_INTERLEAVED)
.
.
.
else if (....)

which is both hard to debug without all the funky hardware out there, and
repeated in **LOTS** of ALSA applications.

Also there be lots of dragons with things like the ICE1712 taking 32 bit
samples and only using the UPPER 24 bits!

IMHO Alsa lib at present does a poor job of hiding the scary hardware details
of this stuff from those applications which don't care. Sure it provides
plenty of functionality for Jack and friends which need to know about this
stuff, but many apps don't need to know about the memory layout of the buffer
and would be happy in blissful ignorance.
I suggested float as the input format but int would serve as well as long as
the maximum sample value supported by the card was easy to discover.

Ohh yea, a similar function to unpack the card buffer back into individual
streams would also be nice.

Just a thought.

Regards, Dan (I know, just use jack and be happy...).

 
Received on Sun Sep 4 04:15:06 2005

This archive was generated by hypermail 2.1.8 : Sun Sep 04 2005 - 04:15:06 EEST