summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-01-23 17:00:31 +0100
committerTakashi Iwai <tiwai@suse.de>2013-01-23 17:00:31 +0100
commite4a395e7819b1e666b2e9da22234059f403dbc11 (patch)
treeef81eb2798030b1f8d141d2a430c46bb1cf01b13 /sound/pci/hda/hda_generic.c
parentALSA: hda - Fix invalid snd_BUG_ON() in alc271_hp_gate_mic_jack() (diff)
downloadlinux-e4a395e7819b1e666b2e9da22234059f403dbc11.tar.xz
linux-e4a395e7819b1e666b2e9da22234059f403dbc11.zip
ALSA: hda - Fix missing path between aamix and outputs in AD codecs
AD1988 family and AD1882 codecs have another mixer widget (0x21) between the analog-loopback mixer widget (0x20) and the actual outputs. Due to this hole, the analog-loopbacks aren't sent properly to the output pins. As a band-aid fix, introduce another fields holding the aamix merge path, and activate it. 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.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 758dcc1a07b0..06e203df4059 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -688,7 +688,7 @@ static void activate_amp_in(struct hda_codec *codec, struct nid_path *path,
* when aa-mixer is available, we need to enable the path as well
*/
for (n = 0; n < nums; n++) {
- if (n != idx && (!add_aamix || conn[n] != spec->mixer_nid))
+ if (n != idx && (!add_aamix || conn[n] != spec->mixer_merge_nid))
continue;
activate_amp(codec, nid, HDA_INPUT, n, idx, enable);
}
@@ -2492,6 +2492,19 @@ static int new_analog_input(struct hda_codec *codec, int input_idx,
path->active = true;
add_loopback_list(spec, mix_nid, idx);
+
+ if (spec->mixer_nid != spec->mixer_merge_nid &&
+ !spec->loopback_merge_path) {
+ path = snd_hda_add_new_path(codec, spec->mixer_nid,
+ spec->mixer_merge_nid, 0);
+ if (path) {
+ print_nid_path("loopback-merge", path);
+ path->active = true;
+ spec->loopback_merge_path =
+ snd_hda_get_path_idx(codec, path);
+ }
+ }
+
return 0;
}
@@ -3847,6 +3860,9 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
parse_user_hints(codec);
+ if (spec->mixer_nid && !spec->mixer_merge_nid)
+ spec->mixer_merge_nid = spec->mixer_nid;
+
if (cfg != &spec->autocfg) {
spec->autocfg = *cfg;
cfg = &spec->autocfg;
@@ -4673,6 +4689,11 @@ static void init_analog_input(struct hda_codec *codec)
if (path)
snd_hda_activate_path(codec, path,
path->active, false);
+ path = snd_hda_get_path_from_idx(codec,
+ spec->loopback_merge_path);
+ if (path)
+ snd_hda_activate_path(codec, path, path->active,
+ false);
}
}
}