[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:29:31 -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):

 The 'multi_audio configuration' is ~/config/settings/ '''System Audio
 Mixer''' right ? This sounded like a possible culprit so I tried an
 experiment: delete the file, and make sure it stays out of the way (indeed
 it's not recreated unless I re-open the media preflet ..etc). Then I ran
 the driver without the zero verb: no audio. Finally I re-enabled my zero-
 verb hack (with the System Audio Mixer settings still not there) and I had
 normal audio. So the off-by-one problems (I think you are right and there
 are some indeed, since I always have to juggle with sliders and stuff when
 restarting the driver) are probably just a side-show, but not the central
 problem.

 There is another oddity though: if I do not recreate the System Audio
 Mixer settings file, the HDA driver (presumably on orders from
 media_server) goes on a "rotation" of muting: each time it is launched it
 will unmute a different mixer input. So for example, the very first
 driver/media_server restart after deleting System Audio Mixer goes like
 this, it unmutes at index 0:

 {{{
 KERN: hda: set_mix: 23 mixer: 0
 KERN: hda: set_mix: 23 mixer unmuting 0 (0)
 KERN: hda: set_mix: 23 mixer muting 1 (1737180)
 KERN: hda: set_mix: 23 mixer muting 2 (1737280)
 KERN: hda: set_mix: 23 mixer muting 3 (1737380)
 KERN: hda: set_mix: 23 mixer muting 4 (1737480)
 }}}

 Then on the second restart (quit media_server, overwrite driver, restart
 media), it unmutes at index 1:

 {{{
 KERN: hda: set_mix: 23 mixer: 1
 KERN: hda: set_mix: 23 mixer muting 0 (0)
 KERN: hda: set_mix: 23 mixer unmuting 1 (1737100)
 KERN: hda: set_mix: 23 mixer muting 2 (1737280)
 KERN: hda: set_mix: 23 mixer muting 3 (1737380)
 KERN: hda: set_mix: 23 mixer muting 4 (1737480)
 }}}

 And so on and so forth. When rolling over index 4 it returns to index 0
 and starts over. Not sure what that means. Then if I recreate the settings
 file things stabilize again.

 The "Input" tab looks like this, nothing too peculiar:
 [[Image(xxx)]]

 The Mixer/23 is indeed skipped when building the input path now, such that
 Input/26 will be directly connected to JackIn/20:
 {{{
 KERN: build input tree
 KERN:   look at input widget 26 (5 inputs)
 KERN:     try widget 23: 0x82094ab4
 KERN:     widget 23 is candidate
 KERN:     try widget 20: 0x820948b0
 KERN:     widget 20 is candidate
 KERN:       input: added input widget 20
 KERN:     add pin widget 26
 }}}

 So it's not the reason why the mixer is being configured like this in
 set_mix():

 {{{
 KERN: hda: set_mix: 23 mute: 0
 KERN: hda: set_mix: sending verb to 23: 0 14 1 6114
 KERN: hda: set_mix: ctrl2 sending verb to 23: 0 14 1
 KERN: hda: set_mix: 23 gain: 2b and 23 gain: 0
 KERN: hda: set_mix: sending verb to 23: 0 2b 1 612b
 KERN: hda: set_mix: ctrl2 sending verb to 23: 0 0 1
 KERN: hda: set_mix: 23 mute: 80
 (..)
 KERN: hda: set_mix: 23 mixer: 1
 KERN: hda: set_mix: 23 mixer muting 0 (0)
 KERN: hda: set_mix: 23 mixer unmuting 1 (1737100)
 KERN: hda: set_mix: 23 mixer muting 2 (1737280)
 KERN: hda: set_mix: 23 mixer muting 3 (1737380)
 KERN: hda: set_mix: 23 mixer muting 4 (1737480)
 }}}

 I guess it's rather because of the "Output" side of the equation ??
 (Mixer/23 is used as the main mixer in the Output Path in this case; to
 recap the story of this bug: my initial "fix" for this quiet-Lenovo bug
 was to bypass Mixer/23 completely; now I've discovered that I can re-add
 Mixer/23 in the OutputPath so long as I comment out one of the set_mixer()
 actions).

 syslog coming up next !

 ====

 Side Note -- while playing with media preflet I noticed an '''odd muting
 bug''': it relates to the checkboxes and sliders and their contradicting
 each other -- I see it with the "Speaker" column and the "Left Mic In"
 columns, though I guess that bug could also be reproduced with the others.
 The bug has two mirror aspects that go like this:
 - tick the "Mute" checkbox of (for example) "Speaker". The loudspeakers go
 mute. Now move the sliders up and down slightly and... the speakers un-
 mute themselves, even though the Mute checkbox is still ticked !
 - now with the "Mute" checkbox still ticked and audio still coming
 through, click that checkbox to make the blue cross disappear and... the
 speakers go mute again, even though the "Mute" checkbox is not ticked any
 more! (in other words it behaves like a toggle regardless of its state).
 I guess this should be filed as a separate ticket (no relation to this
 "quiet Lenovo" bug here since the quietness remains no matter how hard I
 bang the media preflet sliders and stuff =8-).. But not sure if this
 should be filed against the media preflet or media_server of it it's HDA
 specific; I should try that scenario on my Soundblaster Live PC and I'll
 know for sure.

 Here's the screengrab again, as a visual support for the above
 explanations:
 [[Image(prefs_with_MixerBypassed_SendVerbsDisabled.png)]]

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

Other related posts: