All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Jander <manuel.jander@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Re: Alsa mix in HW
Date: Fri, 19 Aug 2005 18:30:37 +0200	[thread overview]
Message-ID: <21ed1c370508190930411554ab@mail.gmail.com> (raw)
In-Reply-To: <43054957.1000407@netvigator.com>

Hi,

> Refer to Section 3.4 Attenuation by Distance.
> 
> Samples usually use the entire dynamic range of the chosen
> format/encoding, independent of their real world intensity.
> ...
> The Application will then have to adjust source gain accordingly to
> account for relative differences.
> 
> Source gain is attenuated by distance.
> 
> 
> Do you know how to provide attenuation when using the hardware mixer of
> au88x0 ?  ( -48dB to +6dB )
> 
> #define MIX_DEFIGAIN 0x08
> #define MIX_DEFOGAIN 0x08       /* 0x8->6dB  (6dB = x4) 16 to 18 bit
> conversion? */
 
As AFAIK, many time ago, while translating the assembler jungle into
C, I found a function that looked like translating gain factors into
dB. The relation was a factor difference of 8 being equivalent to 6
dB. So in theory, on the aureal vortex we can change the gain of each
hardware channel knowing the relative gain in dB. Absolute gain can
never be known for sure.

The 16 hardware HRTF pipes have additional gains as part of the
processing pipelines, but they are used mainly for Interaural Level
Differences. Well, fiddling with the equalizer and Crosstalk canceller
the gain can be changed too, so there are plenty of posibilities to
change final mix gains.
 
> #define VORTEX_MIX_INVOL_B 0x20000      /* Input volume current */
> #define VORTEX_MIX_VOL_B 0x20800        /* Output Volume current */
> #define VORTEX_MIX_INVOL_A 0x21000      /* Input Volume target */
> #define VORTEX_MIX_VOL_A 0x21800        /* Output Volume target */

There are current and target settings for almost all hardware
parameters, which are intended to do automatic sliding / fading of
values. But the original drivers never did made use of this feature. I
guess because its just hard to do that, because OpenAL or whatever lib
would require to describe events of the future. In the end its easier
and less complex to just update the hardware context multiple times.
Looks like a neat idea that was thrown away afterwards.

Best Regards
Manuel


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

  parent reply	other threads:[~2005-08-19 16:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <42EBAE72.9090608@e4a.it>
2005-08-17 12:42 ` Alsa mix in HW Raymond
2005-08-17 16:42   ` Lee Revell
2005-08-17 17:25     ` Takashi Iwai
2005-08-18  6:05       ` Manuel Jander
     [not found]         ` <43054957.1000407@netvigator.com>
2005-08-19 16:30           ` Manuel Jander [this message]
2005-08-20  8:30 ` Raymond
2005-08-22 16:41   ` Takashi Iwai
2005-08-23 15:45     ` Raymond
2005-08-23 17:14       ` Takashi Iwai
2005-08-27  2:02     ` Raymond
2005-09-02 13:07 Raymond
  -- strict thread matches above, loose matches on Subject: below --
2005-09-05  2:32 Raymond
2005-09-06  9:26 Raymond
2005-09-10  0:22 Raymond

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21ed1c370508190930411554ab@mail.gmail.com \
    --to=manuel.jander@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.