From: Clemens Ladisch <clemens@ladisch.de>
To: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: ext Tanu Kaskinen <tanu.kaskinen@digia.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: Question about snd_mixer_selem_get_playback_dB_range()
Date: Tue, 22 Mar 2011 08:11:09 +0100 [thread overview]
Message-ID: <4D884B8D.1000103@ladisch.de> (raw)
In-Reply-To: <4D88497A.4090702@nokia.com>
Peter Ujfalusi wrote:
> Looking at the patch itself, it does going to return
> min=SND_CTL_TLV_DB_GAIN_MUTE from snd_tlv_get_dB_range function.
>
> However I have my doubts, if this is the correct way...
>
> Take these two gain controls for example:
> RAW value GAIN1 GAIN2
> 0 mute mute
> 1 -2dB 0dB
> 2 0dB 1dB
> 3 2dB 2dB
>
> If user space asks for the dB_range:
> min max
> GAIN1 mute 2dB
> GAIN2 mute 2dB
>
> They are going to return with the same range, however if you ask for
> -2dB on both:
> GAIN1 will be -2dB
> GAIN2 will be muted
Or not, depending on which direction you instruct it to round.
> So we are kind of hiding the dB range for the control.
This is unavoidable if the only information returned is min/max.
To get the entire curve and resolution, you'd have to get the dB value
for each raw volume value.
Regards,
Clemens
next prev parent reply other threads:[~2011-03-22 7:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-21 12:52 Question about snd_mixer_selem_get_playback_dB_range() Tanu Kaskinen
2011-03-21 13:43 ` Raymond Yau
2011-03-21 13:55 ` Tanu Kaskinen
2011-03-21 14:38 ` Clemens Ladisch
2011-03-21 14:44 ` Tanu Kaskinen
2011-03-22 7:02 ` Peter Ujfalusi
2011-03-22 7:11 ` Clemens Ladisch [this message]
2011-04-11 2:19 ` Raymond Yau
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=4D884B8D.1000103@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=peter.ujfalusi@nokia.com \
--cc=tanu.kaskinen@digia.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;
as well as URLs for NNTP newsgroup(s).