2011/6/12 alex dot baldacchino dot alsasub at gmail dot com alex.baldacchino.alsasub@gmail.com:
IMPORTANT UPDATE!!!!!
Node 0x0b can drive HP! The problem was function set_widgets_power_state_vt1718S() not updating power state for the correct nid, solved as follows:
static void set_widgets_power_state_vt1718S(struct hda_codec *codec) { ... if (spec->hp_independent_mode) {
- /* PW4 (28h), MW3 (1bh), MUX1(34h), AOW4 (ch) */
- /* PW4 (28h), MW3 (1bh), MUX1(34h), AOW4 (ch) of AOW3 (bh) */
parm = AC_PWRST_D3; set_pin_power_state(codec, 0x28, &parm); snd_hda_codec_write(codec, 0x1b, 0, AC_VERB_SET_POWER_STATE, parm); snd_hda_codec_write(codec, 0x34, 0, AC_VERB_SET_POWER_STATE, parm);
- snd_hda_codec_write(codec, 0xc, 0,
- snd_hda_codec_write(codec, spec->multiout.hp_nid, 0,
AC_VERB_SET_POWER_STATE, parm); }
Can your hear the same signal from black and orange jack when you playing stereo to hw:0,0,0 ?
if you look at snd_hda_multi_out_analog_prepare() in hda_codec.c,
if mout->no_share_stream=0 ,it seem that there is "upmix" feature when mout->num_dacs is 4 for those 5 jacks/6 jacks motherboard
i.e. the black and orange jacks can have the same signal as the green jack
/* front */ snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag, 0, format); if (!mout->no_share_stream && mout->hp_nid && mout->hp_nid != nids[HDA_FRONT]) /* headphone out will just decode front left/right (stereo) */ snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag, 0, format); /* extra outputs copied from front */ for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++) if (!mout->no_share_stream && mout->extra_out_nid[i]) snd_hda_codec_setup_stream(codec, mout->extra_out_nid[i], stream_tag, 0, format);
/* surrounds */ for (i = 1; i < mout->num_dacs; i++) { if (chs >= (i + 1) * 2) /* independent out */ snd_hda_codec_setup_stream(codec, nids[i], stream_tag, i * 2, format); else if (!mout->no_share_stream) /* copy front */ snd_hda_codec_setup_stream(codec, nids[i], stream_tag, 0, format); } return 0; }
but in via_independent_hp_put():
unsigned int pinsel = ucontrol->value.enumerated.item[0]; /* Get Independent Mode index of headphone pin widget */ spec->hp_independent_mode = spec->hp_independent_mode_index == pinsel ? 1 : 0; /* <- TROUBLES! */
When turning on Independent HP mode for codec VT1718S, pinsel is 1, when turning it off that's 0, thus, if spec->hp_independent_mode_index is 2, spec->hp_independent_mode is always 0 (condition spec->hp_independent_mode_index == pinsel alwyas fails) and corresponding controls can't be activated:
/* update HP volume/swtich active state */ if (spec->codec_type == VT1708S || spec->codec_type == VT1702 || spec->codec_type == VT1718S || spec->codec_type == VT1716S || VT2002P_COMPATIBLE(spec)) { activate_ctl(codec, "Headphone Playback Volume", spec->hp_independent_mode); activate_ctl(codec, "Headphone Playback Switch", spec->hp_independent_mode); }
if the hp jack can also use "copy front" mode for "redirected headphone"
the driver don't need to disable "Headphone Playback Volume" for those 10 channels codecs or change the connection in via_independent_hp_put()
For those 3 jacks motherobard, "channel mode" 6-8 or "Use HP as Side" switch may just need tot switch the connection to use 0x0b or 0x0c if 0b has "Side Playback Volume" and 0x0c has "Headphone Playback Volume"