try at unmuting the headphone pin complex when the jack is present, see ticket #6057

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36959 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2010-05-27 21:20:48 +00:00
parent 908967a199
commit 1716472d36
@@ -1117,6 +1117,12 @@ hda_codec_switch_handler(hda_codec* codec)
hda_send_verbs(audioGroup->codec, &verb, &response, 1); hda_send_verbs(audioGroup->codec, &verb, &response, 1);
disable = response & PIN_SENSE_PRESENCE_DETECT; disable = response & PIN_SENSE_PRESENCE_DETECT;
TRACE("hda: sensed pin widget %ld, %d\n", widget.node_id, disable); TRACE("hda: sensed pin widget %ld, %d\n", widget.node_id, disable);
uint32 ctrl = hda_widget_prepare_pin_ctrl(audioGroup, &widget,
true);
verb = MAKE_VERB(audioGroup->codec->addr, widget.node_id,
VID_SET_PIN_WIDGET_CONTROL, disable ? ctrl : 0);
hda_send_verbs(audioGroup->codec, &verb, NULL, 1);
break; break;
} }
@@ -1137,7 +1143,7 @@ hda_codec_switch_handler(hda_codec* codec)
true); true);
corb_t verb = MAKE_VERB(audioGroup->codec->addr, widget.node_id, corb_t verb = MAKE_VERB(audioGroup->codec->addr, widget.node_id,
VID_SET_PIN_WIDGET_CONTROL, disable ? 0 : ctrl); VID_SET_PIN_WIDGET_CONTROL, disable ? 0 : ctrl);
hda_send_verbs(audioGroup->codec, &verb, NULL, 1); hda_send_verbs(audioGroup->codec, &verb, NULL, 1);
} }
} }