summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-24 09:12:21 +0200
committerTakashi Iwai <tiwai@suse.de>2010-09-24 09:12:21 +0200
commitfec88dea9d316e9d850e84c5a57c4c6b15cb9b26 (patch)
treea7cedd0acc696e202ffc4d50278b452466c40dee /sound
parent4e7d7c6018567fa03f387d06602d4145c75ebbe0 (diff)
parent01fdf1801e349302fce5d9865470a7100a2d9b74 (diff)
downloadlinux-stable-fec88dea9d316e9d850e84c5a57c4c6b15cb9b26.tar.gz
linux-stable-fec88dea9d316e9d850e84c5a57c4c6b15cb9b26.tar.bz2
linux-stable-fec88dea9d316e9d850e84c5a57c4c6b15cb9b26.zip
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index eea88b7ddb9f..f6427cc12a28 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1759,12 +1759,22 @@ static void alc_auto_parse_digital(struct hda_codec *codec)
}
if (spec->autocfg.dig_in_pin) {
- hda_nid_t dig_nid;
- err = snd_hda_get_connections(codec,
- spec->autocfg.dig_in_pin,
- &dig_nid, 1);
- if (err > 0)
- spec->dig_in_nid = dig_nid;
+ dig_nid = codec->start_nid;
+ for (i = 0; i < codec->num_nodes; i++, dig_nid++) {
+ unsigned int wcaps = get_wcaps(codec, dig_nid);
+ if (get_wcaps_type(wcaps) != AC_WID_AUD_IN)
+ continue;
+ if (!(wcaps & AC_WCAP_DIGITAL))
+ continue;
+ if (!(wcaps & AC_WCAP_CONN_LIST))
+ continue;
+ err = get_connection_index(codec, dig_nid,
+ spec->autocfg.dig_in_pin);
+ if (err >= 0) {
+ spec->dig_in_nid = dig_nid;
+ break;
+ }
+ }
}
}