2011/6/20 alex dot baldacchino dot alsasub at gmail dot com
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; }
I fear I cannot test it the best way (I've got a 5.1 system, but have some 'logistic' problems using it). I've made an attempt by using two headphones, connected as follows:
- one to (rear) green jack, one to orange,
- one to green, one to black,
- one to orange, one to black,
and played a short two-channels file with aplay -Dhw:0,0,0 stereo.wav a few times, in each case I was able to here (same) sound from both headsets.
However, it would seem to me that snd_hda_multi_out_analog_prepare() is not used by VIA Codecs, instead, some pcm operations are defined within patch_via.c and used by each codec, e.g.
Take a look at playback_multi_pcm_prep_0() in patch_via.c , it seem this "copy front" mode is enabled by default in via codecs
/* front */ snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag, 0, format);
if (mout->hp_nid && mout->hp_nid != nids[HDA_FRONT] && !spec->hp_independent_mode) /* 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->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 /* copy front */ snd_hda_codec_setup_stream(codec, nids[i], stream_tag, 0, format); }