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

  • From: "korli" <trac@xxxxxxxxxxxx>
  • Date: Mon, 27 Aug 2012 21:29:13 -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 korli):

 This section is about B_MIX_MUX_MIXER which represents a combobox/selector
 in the Media preferences. The code unmutes the selected input (the index
 is the value mmvi->values[i].mux), and mutes other inputs.

 This B_MIX_MUX_MIXER is supposed to be used for the input mixer, selecting
 only one input.
 Do you happen to have an input selector on the input panel?

 A more correct fix would be not avoid using the mixer on the input path
 (untested):

 {{{
 diff --git a/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp b/src/add-
 ons/kernel/drivers/audio/hda/hda_codec.cpp
 index 74de641..dacfaf5 100644
 --- a/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
 +++ b/src/add-ons/kernel/drivers/audio/hda/hda_codec.cpp
 @@ -897,7 +920,8 @@ hda_widget_find_input_path(hda_audio_group*
 audioGroup, hda_widget* widget,
         switch (widget->type) {
                 case WT_PIN_COMPLEX:
                         // already used
 -                       if (widget->flags & WIDGET_FLAG_INPUT_PATH)
 +                       if ((widget->flags & (WIDGET_FLAG_INPUT_PATH
 +                                       | WIDGET_FLAG_OUTPUT_PATH)) != 0)
                                 return false;

                         if (PIN_CAP_IS_INPUT(widget->d.pin.capabilities))
 {
 @@ -917,7 +941,8 @@ TRACE("      %*sinput: added input widget %ld\n",
 (int)depth * 2, "", widget->no
                 case WT_AUDIO_SELECTOR:
                 {
                         // already used
 -                       if (widget->flags & WIDGET_FLAG_INPUT_PATH)
 +                       if ((widget->flags & (WIDGET_FLAG_INPUT_PATH
 +                                       | WIDGET_FLAG_OUTPUT_PATH)) != 0)
                                 return false;

                         // search for pin complex in this path
 }}}

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

Other related posts: