From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergej Sawazki Subject: Re: ASoC: How to declare volume TLV dB scale? Date: Sat, 13 Jun 2015 12:45:21 +0200 Message-ID: <557C09C1.8060708@gmx.de> References: <557B08C6.7030300@ladisch.de> <557B3260.30001@gmx.de> <557B3762.20603@ladisch.de> <557C017D.5090604@gmx.de> <557C060F.3000209@ladisch.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by alsa0.perex.cz (Postfix) with ESMTP id 6E0F2260515 for ; Sat, 13 Jun 2015 12:45:25 +0200 (CEST) In-Reply-To: <557C060F.3000209@ladisch.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Clemens Ladisch , Takashi Iwai Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Sat, 13 Jun 2015 12:29:35 +0200, Clemens Ladisch wrote: > Sergej Sawazki wrote: >> On Sat, 13 Jun 2015 09:15:49 +0200, Takashi Iwai wrote: >>> 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. > > If you're using one of the SOC_xxx_TLV macros, you would set the 'invert' > parameter. > >> I am getting the expected dB scaling with: >> DECLARE_TLV_DB_MINMAX_MUTE(vol_tlv, -12800, 0) >> does it make sense? > > Yes. (-128 would have been -1.28 dB.) > Thanks. Regards, Sergej