Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sergej Sawazki <ce3a@gmx.de>
To: Takashi Iwai <tiwai@suse.de>, Clemens Ladisch <clemens@ladisch.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: How to declare volume TLV dB scale?
Date: Sat, 13 Jun 2015 12:10:05 +0200	[thread overview]
Message-ID: <557C017D.5090604@gmx.de> (raw)
In-Reply-To: <s5hioas5ba2.wl-tiwai@suse.de>

On Sat, 13 Jun 2015 09:15:49 +0200, Takashi Iwai wrote:
> At Fri, 12 Jun 2015 21:47:46 +0200,
> Clemens Ladisch wrote:
>>
>> Sergej Sawazki wrote:
>>>
>>> The output of the DAC can be attenuated in 0.125dB steps, so 0x200
>>> would be -64dB.
>>
>> 0.125 dB is too small for the 0.01 dB resolution of DECLARE_TLV_DB_SCALE,
>> so you have to use DB_MINMAX instead:  TLV_DB_MINMAX_MUTE_ITEM(-128, 0)
>
> And you need to implement the ctl get/put callback to revert the value
> as (0x3ff - raw value).  An decrement value isn't supposed to work.
>

Clemens, Takashi, thanks for your answers.

I am getting the expected dB scaling with:
DECLARE_TLV_DB_MINMAX_MUTE(vol_tlv, -12800, 0)
does it make sense?

Regards,
Sergej

  reply	other threads:[~2015-06-13 10:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12 12:02 ASoC: How to declare volume TLV dB scale? Sergej Sawazki
2015-06-12 16:28 ` Clemens Ladisch
2015-06-12 19:26   ` Sergej Sawazki
2015-06-12 19:47     ` Clemens Ladisch
2015-06-13  7:15       ` Takashi Iwai
2015-06-13 10:10         ` Sergej Sawazki [this message]
2015-06-13 10:29           ` Clemens Ladisch
2015-06-13 10:45             ` Sergej Sawazki

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=557C017D.5090604@gmx.de \
    --to=ce3a@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=tiwai@suse.de \
    /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