From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raymond Yau Subject: Re: Mixer volume/decibel mapping Date: Thu, 20 May 2010 16:53:14 +0800 Message-ID: References: <201005191834.57919.vand2@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pz0-f189.google.com (mail-pz0-f189.google.com [209.85.222.189]) by alsa0.perex.cz (Postfix) with ESMTP id A97942444A for ; Thu, 20 May 2010 10:53:15 +0200 (CEST) Received: by pzk27 with SMTP id 27so5698908pzk.2 for ; Thu, 20 May 2010 01:53:14 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: ALSA Development Mailing List List-Id: alsa-devel@alsa-project.org 2010/5/20 James Courtier-Dutton > On 19 May 2010 17:34, Sebastian H. wrote: > > > > Hello everyone > > > > I'm working on an ALSA-Mixer application for C++/Qt4 and stumbled over > > volume and decibel mapping for sliders. > > My question: Is there always an 1 to 1 mapping from volume to decibel and > vice > > versa or can there be decibel values in between two volume steps? > > > > There should be a one to one mapping. > If the hardware has 200 steps on the volume scale, and those 200 steps > are published to the user. > With the dB scale, there will still be the same 200 steps in the dB scale. > The dB information simply helps the user interface convert each step > into a dB value. > a stepping function is not continuous and this is why snd_mixer_selem_set_playback_dB() cannot set decibel values in between two volume steps