Re: Mixer volume/decibel mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/5/21 James Courtier-Dutton <james.dutton@xxxxxxxxx>

> On 20 May 2010 10:41, Sebastian H. <vand2@xxxxxx> wrote:
> >
> > That's clear.
> > I imagined that maybe the dB scale could be the "real thing" and the
> volume
> > steps would be a convenient but possibly coarse mapping into a denser
> > stepped dB space provided by the hardware/driver.
> > This was unlikely but I wanted to ask anyway ;-).
> >
>
> I believe it could be extended to support a continuous range.
> For example, some hardware uses a 32bit value to control the gain.
> The mix operation is simply "the_sample" * "the_control_value".
> So in this case the hardware has a linear control that can be
> considered continuous for our purposes.
> The conversion from the control value to a usable value would have to
> include a user land log operation.
> It was never implemented due to lack of demand.
> For the cards that do have this 32bit linear value, a simple lookup
> table is used in the kernel code to convert it to 256 step values.
> If implemented, one could then introduce professional gain controls
> that do not produce "clicks" in the output when adjusted.
> gain controls with steps in them produce clicks when the gain control
> is adjusted.
>

For example , the 10 band stereo graphic equalizer of au8830 has 32678 steps
but the dB range is most likely between -6dB and +6dB

I have not measured the dB values but there is no clipping occur at maximum
gain

just compared with the software equalizer alsaequal where you can hear
distortion quite easily

snd_vortex_eq_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info
*uinfo)
{
    uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
    uinfo->count = 2;
    uinfo->value.integer.min = 0x0000;
    uinfo->value.integer.max = 0x7fff;
    return 0;
}

How can I implement a dB scale for those 10  EQ gain/atten controls ?
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux