aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-08-23 18:16:13 +0200
committerTakashi Iwai <tiwai@suse.de>2011-08-23 18:16:13 +0200
commita06dbfc2cf0f663d98cad671e6dcdf95c557f043 (patch)
tree376549293a109bec125c4fadb566589d9c17e680 /sound/pci/hda/hda_codec.c
parentcb4e482415a2fd09e75a33516b8578ec6885240d (diff)
downloadkernel_samsung_smdk4412-a06dbfc2cf0f663d98cad671e6dcdf95c557f043.zip
kernel_samsung_smdk4412-a06dbfc2cf0f663d98cad671e6dcdf95c557f043.tar.gz
kernel_samsung_smdk4412-a06dbfc2cf0f663d98cad671e6dcdf95c557f043.tar.bz2
ALSA: hda - Add multi-headphone NIDs in multiout struct
For supporting both the multiple headphones and the multiple speakers, add the new field in struct hda_multi_out, and evaluate in the standard setup functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 09b59c8..5a8ecde 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -4566,6 +4566,11 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec,
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->hp_out_nid); i++)
+ if (!mout->no_share_stream && mout->hp_out_nid[i])
+ snd_hda_codec_setup_stream(codec,
+ mout->hp_out_nid[i],
+ stream_tag, 0, format);
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,
@@ -4598,6 +4603,10 @@ int snd_hda_multi_out_analog_cleanup(struct hda_codec *codec,
snd_hda_codec_cleanup_stream(codec, nids[i]);
if (mout->hp_nid)
snd_hda_codec_cleanup_stream(codec, mout->hp_nid);
+ for (i = 0; i < ARRAY_SIZE(mout->hp_out_nid); i++)
+ if (mout->hp_out_nid[i])
+ snd_hda_codec_cleanup_stream(codec,
+ mout->hp_out_nid[i]);
for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++)
if (mout->extra_out_nid[i])
snd_hda_codec_cleanup_stream(codec,