aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-07 09:07:00 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-12 02:44:01 -0500
commitcd5be3f9de8945f782e1bbeffd080876eb2aa9f8 (patch)
tree775559ec5e743ff1e1b0aef6fed2a94590ca8ea4 /sound/pci/hda/hda_generic.c
parent5187ac168d6552ca10a95869c1fd33c256e7746a (diff)
ALSA: hda - Clear path indices properly at each re-evaluation
The path indices must be reset at each evaluation of DAC assignment. Otherwise the badness value will be wrongly calculated and mixers may be inconsistently assigned. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 11436c115953..1b8fd4d6cae9 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -1138,6 +1138,16 @@ static int fill_and_eval_dacs(struct hda_codec *codec,
1138 memset(spec->multiout.extra_out_nid, 0, sizeof(spec->multiout.extra_out_nid)); 1138 memset(spec->multiout.extra_out_nid, 0, sizeof(spec->multiout.extra_out_nid));
1139 spec->multi_ios = 0; 1139 spec->multi_ios = 0;
1140 snd_array_free(&spec->paths); 1140 snd_array_free(&spec->paths);
1141
1142 /* clear path indices */
1143 memset(spec->out_paths, 0, sizeof(spec->out_paths));
1144 memset(spec->hp_paths, 0, sizeof(spec->hp_paths));
1145 memset(spec->speaker_paths, 0, sizeof(spec->speaker_paths));
1146 memset(spec->aamix_out_paths, 0, sizeof(spec->aamix_out_paths));
1147 memset(spec->digout_paths, 0, sizeof(spec->digout_paths));
1148 memset(spec->loopback_paths, 0, sizeof(spec->loopback_paths));
1149 memset(&spec->digin_path, 0, sizeof(spec->digin_path));
1150
1141 badness = 0; 1151 badness = 0;
1142 1152
1143 /* fill hard-wired DACs first */ 1153 /* fill hard-wired DACs first */