aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-21 08:24:31 -0500
committerTakashi Iwai <tiwai@suse.de>2013-01-21 08:32:53 -0500
commitf87498b65197f951899d8bbd99e5553227c41ec9 (patch)
tree32b783d9b001644a97dbae69bec06ffedff161b4 /sound/pci/hda/hda_generic.c
parent1fa335b0b797811d66a5f88373edd523f947cce4 (diff)
ALSA: hda - Check aamix-output paths from other DACs, too
Many codecs provide routes to multiple output pins through an aamix widget, but most of them do it only from a single DAC. However, the current generic parser checks only the aamix paths from the original (directly bound) DACs through aamix NID, and miss the path: primary DAC -> aamix -> target out pin This patch adds a more check for the routes like the above. 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.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 4e9761a91816..e26e8d3430f2 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -1313,14 +1313,26 @@ static int check_aamix_out_path(struct hda_codec *codec, int path_idx)
1313{ 1313{
1314 struct hda_gen_spec *spec = codec->spec; 1314 struct hda_gen_spec *spec = codec->spec;
1315 struct nid_path *path; 1315 struct nid_path *path;
1316 hda_nid_t dac, pin;
1316 1317
1317 path = snd_hda_get_path_from_idx(codec, path_idx); 1318 path = snd_hda_get_path_from_idx(codec, path_idx);
1318 if (!path || !path->depth || 1319 if (!path || !path->depth ||
1319 is_nid_contained(path, spec->mixer_nid)) 1320 is_nid_contained(path, spec->mixer_nid))
1320 return 0; 1321 return 0;
1321 path = snd_hda_add_new_path(codec, path->path[0], 1322 dac = path->path[0];
1322 path->path[path->depth - 1], 1323 pin = path->path[path->depth - 1];
1323 spec->mixer_nid); 1324 path = snd_hda_add_new_path(codec, dac, pin, spec->mixer_nid);
1325 if (!path) {
1326 if (dac != spec->multiout.dac_nids[0])
1327 dac = spec->multiout.dac_nids[0];
1328 else if (spec->multiout.hp_out_nid[0])
1329 dac = spec->multiout.hp_out_nid[0];
1330 else if (spec->multiout.extra_out_nid[0])
1331 dac = spec->multiout.extra_out_nid[0];
1332 if (dac)
1333 path = snd_hda_add_new_path(codec, dac, pin,
1334 spec->mixer_nid);
1335 }
1324 if (!path) 1336 if (!path)
1325 return 0; 1337 return 0;
1326 /* print_nid_path("output-aamix", path); */ 1338 /* print_nid_path("output-aamix", path); */