Commit b3a8c745 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Allow aamix in the primary output path

Allow the path including the loopback mixer widget in the primary
output channel as an alternative in the generic codec parser.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 4ac0eefa
...@@ -864,6 +864,10 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs, ...@@ -864,6 +864,10 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs,
badness += bad->no_dac; badness += bad->no_dac;
} }
path = snd_hda_add_new_path(codec, dac, pin, HDA_PARSE_NO_AAMIX); path = snd_hda_add_new_path(codec, dac, pin, HDA_PARSE_NO_AAMIX);
if (!path && i > 0 && spec->mixer_nid) {
/* try with aamix */
path = snd_hda_add_new_path(codec, dac, pin, HDA_PARSE_ALL);
}
if (!path) if (!path)
dac = dacs[i] = 0; dac = dacs[i] = 0;
else else
...@@ -1020,6 +1024,7 @@ static int fill_multi_ios(struct hda_codec *codec, ...@@ -1020,6 +1024,7 @@ static int fill_multi_ios(struct hda_codec *codec,
static bool map_singles(struct hda_codec *codec, int outs, static bool map_singles(struct hda_codec *codec, int outs,
const hda_nid_t *pins, hda_nid_t *dacs) const hda_nid_t *pins, hda_nid_t *dacs)
{ {
struct hda_gen_spec *spec = codec->spec;
int i; int i;
bool found = false; bool found = false;
for (i = 0; i < outs; i++) { for (i = 0; i < outs; i++) {
...@@ -1031,6 +1036,8 @@ static bool map_singles(struct hda_codec *codec, int outs, ...@@ -1031,6 +1036,8 @@ static bool map_singles(struct hda_codec *codec, int outs,
if (!dac) if (!dac)
continue; continue;
path = snd_hda_add_new_path(codec, dac, pins[i], HDA_PARSE_NO_AAMIX); path = snd_hda_add_new_path(codec, dac, pins[i], HDA_PARSE_NO_AAMIX);
if (!path && i > 0 && spec->mixer_nid)
path = snd_hda_add_new_path(codec, dac, pins[i], HDA_PARSE_ALL);
if (path) { if (path) {
dacs[i] = dac; dacs[i] = dac;
found = true; found = true;
......
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