All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: HDA: Sound mutes when combination is below -48 dB
Date: Fri, 03 Dec 2010 16:34:14 +0100	[thread overview]
Message-ID: <4CF90DF6.7020008@canonical.com> (raw)
In-Reply-To: <s5hlj47ukx2.wl%tiwai@suse.de>

On 2010-12-03 12:59, Takashi Iwai wrote:
> At Fri, 03 Dec 2010 12:30:02 +0100,
> David Henningsson wrote:
>>
>> I'm trying to nail down a strange behaviour. I have one "Master" and one
>> "Speaker" (or "Headphone") volume control, each ranging from -48 dB to 0
>> dB. Whenever the sum of "Master" and "Speaker" is below -48 dB, the
>> output mutes. Codec is attached.
>>
>> "Master" is a "Virtual master" control, and both "Master" and "Speaker"
>> control amp-out on nid 0x13. Nid 0x13 does not have amp-out caps, but
>> the AFG specifies a range of -96 dB to 0 dB in 0.75 dB steps.
>>
>> There is some strange things here. First, in
>> patch_sigmatel:create_controls_idx, there is this comment:
>>
>> 		/* if dB scale is over -64dB, and finer enough,
>> 		 * let's reduce it to half
>> 		 */
>> Hmm? Removing half of the volume slider?
>>
>> Second, assuming we actually buy this decision, wouldn't it make sense
>> for people to be able to combine Master and Speaker to get the full -96
>> to 0 dB range? Instead, "Master" is just working over the range defined
>> by "Speaker".
>
> Well, the problem was fairly old.  You must think of the world before
> anything dB evaluation was introduced in the mixer apps.  They just
> took a percentage value, so we got to cut it off to give some "usable"
> interface for them.
>
> The biggest problem right now is that you can't take it back so easily
> "just for PA".  The PCM softvol is also the same.  There is no perfect
> solution, and PA isn't by 100% people here.  However, we must not give
> a regression in 100% manner.

Ok. I'm not certain I agree, but I see your point.

>
> OK, let's back to the bug point...
>
>> Third, there is an interesting condition in hda_codec.c:update_amp_value:
>>
>> 	if (val>  0)
>> 		val += ofs;
>>
>> Now this is in practice turning all volume controls which have ofs (e g
>> those being "reduced to half") to a minimum-is-mute error: I can set the
>> amp value to either 0 (-96 dB) or the 65 - 127 range (~ -48 dB - 0 dB).
>> So it isn't really mute, it's -96 dB signal, but I can't hear that anyway.
>
> OK, this looks really like a bug that the driver gives min-mute flag.
> The min-mute flag should be given only for the STAC codecs with lower
> resolution, such as STAC9200.  It seems that STAC925x (and STAC9202)
> are also in this category, while STAC9205 and other IDT codecs have
> higher resolutions.
>
> Since both STAC9200 and STAC925x have own Master definition, the
> simplest solution is to remove TLV_DB_SCALE_MUTE for vmaster like
> below...

I've tried it, but it doesn't help. Test case is simple: run the codec 
attached to the previous mail in hda-emu [1]. Then turn "Master" down 
from 64 to 60, or anything that makes the combination of "Master" and 
"Speaker" less than -48 dB, and notice that the amp value sent to the 
codec is 0x0 (i e -96 dB).

[1] If I never thanked you for that program, I do so now, it is a really 
great tool!

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

  reply	other threads:[~2010-12-03 15:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03 11:30 HDA: Sound mutes when combination is below -48 dB David Henningsson
2010-12-03 11:58 ` Clemens Ladisch
2010-12-03 11:59 ` Takashi Iwai
2010-12-03 15:34   ` David Henningsson [this message]
2010-12-03 15:50     ` Takashi Iwai
2010-12-27  5:56     ` 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=4CF90DF6.7020008@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --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 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.