public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Johannes Stezenbach <js@sig21.net>
Cc: alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Daniel Mack <zonque@gmail.com>,
	lrg@slimlogic.co.uk
Subject: Re: [PATCH 1/2] ALSA: ASoC: add STA32X codec driver
Date: Thu, 16 Jun 2011 10:39:22 +0200	[thread overview]
Message-ID: <4DF9C13A.2000205@metafoo.de> (raw)
In-Reply-To: <20110615205329.GA7445@sig21.net>

On 06/15/2011 10:53 PM, Johannes Stezenbach wrote:
> On Wed, Jun 15, 2011 at 04:05:16PM +0100, Mark Brown wrote:
>> On Tue, Jun 14, 2011 at 09:27:05PM +0200, Daniel Mack wrote:
>>
>>> +static const char *sta32x_limiter_ac_release_thr[] = {
>>> +	"-inf", "-29dB", "-20dB", "-16dB", "-14dB", "-12dB", "-10dB", "-8dB",
>>> +	"-7dB", "-6dB", "-5dB", "-4dB", "-3dB", "-2dB", "-1dB", "0dB" };
>>> +static const char *sta32x_limiter_drc_attack_thr[] = {
>>> +	"-31dB", "-29dB", "-27dB", "-25dB", "-23dB", "-21dB", "-19dB", "-17dB",
>>> +	"-16dB", "-15dB", "-14dB", "-13dB", "-12dB", "-10dB", "-7dB", "-4dB" };
>>> +static const char *sta32x_limiter_drc_release_thr[] = {
>>> +	"-inf", "-38dB", "-36dB", "-33dB", "-31dB", "-30dB", "-28dB", "-26dB",
>>> +	"-24dB", "-22dB", "-20dB", "-18dB", "-15dB", "-12dB", "-9dB", "-6dB" };
>>> +
>>
>> Doing these as regular volume TLVs will tend to work better in UIs.
> 
> The steps are not evenly distributed so I thought this is the
> only way to describe the hardware correctly.  Or is there a
> way to do controls which look like a slider in alsamixer
> with steps as shown above?
> 

You can put multiple scale items each with their own min/max value into a TLV.
For example for DRC attack in your case this would look like:

static const unsigned int drc_attack_tlv[] = {
	TLV_DB_RANGE_HEAD(3),
	0, 7, TLV_DB_SCALE_ITEM(-3100, 200, 0),
	8, 13, TLV_DB_SCALE_ITEM(-1600, 100, 0),
	14, 16, TLV_DB_SCALE_ITEM(-1000, 300, 0),
};

- Lars

  reply	other threads:[~2011-06-16  8:40 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 19:27 ASoC: Patches for an STA32X and WM8782 Daniel Mack
2011-06-14 19:27 ` [PATCH 1/2] ALSA: ASoC: add STA32X codec driver Daniel Mack
2011-06-15 15:05   ` Mark Brown
2011-06-15 20:53     ` Johannes Stezenbach
2011-06-16  8:39       ` Lars-Peter Clausen [this message]
2011-06-16  9:12         ` Johannes Stezenbach
2011-06-16  9:51         ` Daniel Mack
2011-06-16 10:13           ` Mark Brown
2011-06-16 11:03             ` Daniel Mack
2011-06-16 11:11               ` Lars-Peter Clausen
2011-06-16 11:26                 ` Daniel Mack
2011-06-16 11:38                   ` Lars-Peter Clausen
2011-06-16 11:47                     ` Daniel Mack
2011-06-16 11:51                       ` Lars-Peter Clausen
2011-06-16 11:54                         ` Daniel Mack
2011-06-16  8:19     ` Daniel Mack
2011-06-16  8:49       ` Liam Girdwood
2011-06-16  8:53         ` Daniel Mack
2011-06-16 12:07           ` [PATCH] " Daniel Mack
2011-06-17  8:30             ` Daniel Mack
2011-06-17  9:45             ` Mark Brown
2011-06-17  9:54               ` Daniel Mack
2011-06-22 12:54                 ` Mark Brown
2011-06-22 12:59                   ` [PATCH 1/2] " Daniel Mack
2011-06-22 12:59                     ` [PATCH 2/2] ALSA: ASoC: add WM8782 ADC Codec Driver Daniel Mack
2011-06-22 13:26                     ` [PATCH 1/2] ALSA: ASoC: add STA32X codec driver Mark Brown
2011-06-22 13:34                       ` Daniel Mack
2011-06-22 13:59                         ` Mark Brown
2011-06-22 14:09                         ` Paul Menzel
2011-06-20  6:07               ` [PATCH] " Daniel Mack
2011-06-22 11:06                 ` Daniel Mack
2011-06-22 11:12                   ` Mark Brown
2011-06-22 12:10                     ` Liam Girdwood
2011-06-14 19:27 ` [PATCH 2/2] ALSA: ASoC: add WM8782 ADC Codec Driver Daniel Mack
2011-06-15 15:17   ` Mark Brown
2011-06-16  8:20     ` Daniel Mack
2011-06-22 12:12       ` Liam Girdwood
2011-06-15 10:00 ` ASoC: Patches for an STA32X and WM8782 Johannes Stezenbach

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=4DF9C13A.2000205@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=js@sig21.net \
    --cc=lrg@slimlogic.co.uk \
    --cc=zonque@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox