aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-04-16 08:16:54 -0400
committerTakashi Iwai <tiwai@suse.de>2013-04-16 08:16:54 -0400
commit5ead56f2dad53c6c2eaaf13e2de4125a59a3935b (patch)
tree05514821fb2bb70e80f7cb15c88dfd5bdb761d46 /sound
parent65033cc8d5ffd9b754e04da4be9cd1e8b61eeaff (diff)
ALSA: hda - Use the primary DAC for all aamix outputs
When setting up the aamix output paths, use the primary DAC instead of the individual DAC for each output as default. Otherwise multiple DACs will be turned on for a single aamix widget, which results in doubly or more volumes, because the duplicated signals will be sent through all these DACs for a single stream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/hda_generic.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index b964e09cdec6..ac079f93c535 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -1371,22 +1371,25 @@ static int check_aamix_out_path(struct hda_codec *codec, int path_idx)
1371{ 1371{
1372 struct hda_gen_spec *spec = codec->spec; 1372 struct hda_gen_spec *spec = codec->spec;
1373 struct nid_path *path; 1373 struct nid_path *path;
1374 hda_nid_t dac, pin; 1374 hda_nid_t path_dac, dac, pin;
1375 1375
1376 path = snd_hda_get_path_from_idx(codec, path_idx); 1376 path = snd_hda_get_path_from_idx(codec, path_idx);
1377 if (!path || !path->depth || 1377 if (!path || !path->depth ||
1378 is_nid_contained(path, spec->mixer_nid)) 1378 is_nid_contained(path, spec->mixer_nid))
1379 return 0; 1379 return 0;
1380 dac = path->path[0]; 1380 path_dac = path->path[0];
1381 dac = spec->private_dac_nids[0];
1381 pin = path->path[path->depth - 1]; 1382 pin = path->path[path->depth - 1];
1382 path = snd_hda_add_new_path(codec, dac, pin, spec->mixer_nid); 1383 path = snd_hda_add_new_path(codec, dac, pin, spec->mixer_nid);
1383 if (!path) { 1384 if (!path) {
1384 if (dac != spec->multiout.dac_nids[0]) 1385 if (dac != path_dac)
1385 dac = spec->multiout.dac_nids[0]; 1386 dac = path_dac;
1386 else if (spec->multiout.hp_out_nid[0]) 1387 else if (spec->multiout.hp_out_nid[0])
1387 dac = spec->multiout.hp_out_nid[0]; 1388 dac = spec->multiout.hp_out_nid[0];
1388 else if (spec->multiout.extra_out_nid[0]) 1389 else if (spec->multiout.extra_out_nid[0])
1389 dac = spec->multiout.extra_out_nid[0]; 1390 dac = spec->multiout.extra_out_nid[0];
1391 else
1392 dac = 0;
1390 if (dac) 1393 if (dac)
1391 path = snd_hda_add_new_path(codec, dac, pin, 1394 path = snd_hda_add_new_path(codec, dac, pin,
1392 spec->mixer_nid); 1395 spec->mixer_nid);