Commit 4b3acaf5 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] hda-codec - Feed front signals to all surrounds

HDA Codec driver
Feed front signals to all surround channels if no data is given
for surround channels.

It seems that CLFE works as expected (only center outputs) even if
connected from the front line - at least on my test system.
If this change causes problems on other system (e.g. only the left
channel is transferred to the center channel), please let me know...
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 3e289f16
...@@ -1682,11 +1682,12 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, struct hda_multi_o ...@@ -1682,11 +1682,12 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, struct hda_multi_o
snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag, 0, format); snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag, 0, format);
/* surrounds */ /* surrounds */
for (i = 1; i < mout->num_dacs; i++) { for (i = 1; i < mout->num_dacs; i++) {
if (i == HDA_REAR && chs == 2) /* copy front to rear */ if (chs >= (i + 1) * 2) /* independent out */
snd_hda_codec_setup_stream(codec, nids[i], stream_tag, 0, format);
else if (chs >= (i + 1) * 2) /* independent out */
snd_hda_codec_setup_stream(codec, nids[i], stream_tag, i * 2, snd_hda_codec_setup_stream(codec, nids[i], stream_tag, i * 2,
format); format);
else /* copy front */
snd_hda_codec_setup_stream(codec, nids[i], stream_tag, 0,
format);
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment