All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: alsa-devel@alsa-project.org
Subject: "Negative" volume settings in a kcontrol
Date: Thu, 02 May 2013 16:13:00 +0200	[thread overview]
Message-ID: <5182746C.1070603@topic.nl> (raw)
In-Reply-To: <1367498241.8766.3.camel@localhost>

Some codec registers need negative values. For example,
sound/soc/codecs/tlv320aic32x4.c specifies this:

  75 static DECLARE_TLV_DB_SCALE(tlv_step_0_5, 0, 50, 0);

  78         SOC_DOUBLE_R_TLV("PCM Playback Volume", AIC32X4_LDACVOL,
  79                         AIC32X4_RDACVOL, 0, 0x30, 0, tlv_step_0_5),


It's incomplete. The actual range is from -63.5dB to +24dB in 0.5 dB 
steps. The 8-bit value is interpreted as a signed 8-bit integer, so to 
get -3dB the register value must be -6 or 0xFA.

For some reason, the author seemed to think that no one would ever want 
to lower the volume of the output, so he just limited the range to 
0..24dB. Or, more likely, like me he did not have a clue how to 
configure this.

There are quite a few more registers like this, usually the range is 
limited in both negative and positive ranges.

How do I explain that to Alsa?

(and on a side note "amixer" doesn't accept negative values either)

  parent reply	other threads:[~2013-05-02 14:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 10:55 idea: a reserve alsa plugin David Henningsson
2013-05-02 12:37 ` [pulseaudio-discuss] " Arun Raghavan
2013-05-02 13:23   ` David Henningsson
2013-05-02 14:13   ` Mike Looijmans [this message]
2013-05-06 13:22     ` "Negative" volume settings in a kcontrol Clemens Ladisch
2013-05-28 11:46       ` Mike Looijmans
2013-05-29 19:42         ` Mark Brown
2013-05-31  7:01           ` Mike Looijmans
2013-07-16 13:45             ` Need help diagnosing "hw_ptr skipping" message Mike Looijmans
2013-07-17 14:02               ` Clemens Ladisch
2013-05-02 14:28 ` idea: a reserve alsa plugin Tvrtko Ursulin
2013-05-02 14:37   ` [pulseaudio-discuss] " David Henningsson
2013-05-02 14:50     ` Tvrtko Ursulin

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=5182746C.1070603@topic.nl \
    --to=mike.looijmans@topic.nl \
    --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.