[haiku-bugs] Re: [Haiku] #8270: [HDA] very quiet on Lenovo laptop (due to hda mixer?)

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Tue, 28 Aug 2012 21:46:56 -0000

#8270: [HDA] very quiet on Lenovo laptop (due to hda mixer?)
---------------------------------+----------------------------
   Reporter:  ttcoder            |      Owner:  korli
       Type:  bug                |     Status:  new
   Priority:  normal             |  Milestone:  R1
  Component:  Drivers/Audio/HDA  |    Version:  R1/Development
 Resolution:                     |   Keywords:
 Blocked By:                     |   Blocking:
Has a Patch:  0                  |   Platform:  All
---------------------------------+----------------------------

Comment (by ttcoder):

 Now for something VERY odd (and with a little luck, I'm getting closer to
 the root problem here): if I remove my "zero verb" hack and do this hack
 instead:

 {{{
 -       | ((mmvi->values[i].mux == j) ? 0 : AMP_MUTE));
 +       | ((mmvi->values[i].mux == j) ? 0 : 0));
 }}}

 Then I get a situation "inbetween": instead of being completely disabled,
 the audio output is "quiet", like the baseline HDA driver in trunk does.
 That is, it is quiet after fiddling with media preflet sliders (they are
 out of whack again, so I need to unmute ..etc).

 This results in the following:
 {{{
 KERN: hda: set_mix: 23 mixer: 2
 KERN: hda: set_mix: 23 mixer muting 0 (1737000)
 KERN: hda: set_mix: 23 mixer muting 1 (1737100)
 KERN: hda: set_mix: 23 mixer unmuting 2 (1737200)
 KERN: hda: set_mix: 23 mixer muting 3 (1737300)
 KERN: hda: set_mix: 23 mixer muting 4 (1737400)
 }}}

 (i.e. the 0x80 for "unmuting 2" has been hacked away, resulting in a
 straight 1737200 value/verb). If sending 0x80 to input 3, or 4, it will
 still mute input 0 (speakers).

 To re-iterate,

 using 0x80 anywhere, even on ANOTHER input than 0 (which corresponds to
 widget Speakers/16) will cancel out the sound on Speakers/16 (as well as
 on microphone-in IIRC) ! It's like we are setting a magic "be quiet" bit
 on the mixer or something.

  ====

 This is a 2007 laptop, with HDA hardware conforming to HDA 1.0.1, whereas
 the HDA specs are up to 1.0.3+ now. Could it be that my HDA chipset does
 not understand the flags passed to it, mis-interprets them as "quiet down
 the sound" or something ?

 Here's the code with the flags again:

 {{{
                                 verb[j] =
 MAKE_VERB(audioGroup->codec->addr,
                                         control->nid,
 VID_SET_AMPLIFIER_GAIN_MUTE, AMP_SET_INPUT
                                         | AMP_SET_LEFT_CHANNEL |
 AMP_SET_RIGHT_CHANNEL
                                         | AMP_SET_INPUT_INDEX(j)
                                         | ((mmvi->values[i].mux == j) ? 0
 : AMP_MUTE));
 }}}

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8270#comment:13>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: