diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-12-14 17:53:29 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-12 08:30:14 +0100 |
commit | 0250f7cbea95c90564253cae8de80f0caad81fc0 (patch) | |
tree | 1717aa44c9c328c3916d4ce9a880b4062fc34f33 /sound/pci | |
parent | 6518f7ac5183ca77805f10323ea716fe86fd7c89 (diff) |
ALSA: hda/realtek - Fix the initialization of pin amp-in
The pin widget has only a single amp value for the input even if it
has multiple "sources". Handle the situation in activate_path().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 76c67407996..b6b929ef23e 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3921,21 +3921,27 @@ static void activate_amp_in(struct hda_codec *codec, struct nid_path *path, { struct alc_spec *spec = codec->spec; hda_nid_t conn[16]; - int n, nums; + int n, nums, idx; hda_nid_t nid = path->path[i]; nums = snd_hda_get_connections(codec, nid, conn, ARRAY_SIZE(conn)); + if (get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_PIN) { + nums = 1; + idx = 0; + } else + idx = path->idx[i]; + for (n = 0; n < nums; n++) init_amp(codec, nid, HDA_INPUT, n); - if (is_ctl_associated(codec, nid, HDA_INPUT, path->idx[i])) + if (is_ctl_associated(codec, nid, HDA_INPUT, idx)) return; /* here is a little bit tricky in comparison with activate_amp_out(); * when aa-mixer is available, we need to enable the path as well */ for (n = 0; n < nums; n++) { - if (n != path->idx[i] && conn[n] != spec->mixer_nid) + if (n != idx && conn[n] != spec->mixer_nid) continue; activate_amp(codec, nid, HDA_INPUT, n, enable); } |