From: Takashi Iwai Date: Thu, 7 Jul 2011 13:12:55 +0000 (+0200) Subject: ALSA: hda - Fix warning with ALC882 digital-out detection X-Git-Tag: MMI-PSA29.97-13-9~18103^2~124^2~36 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a926757f0431042b32ef4188ce8201cbe0fcbb50;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ALSA: hda - Fix warning with ALC882 digital-out detection The digital out pin on ALC882 may have multiple connections. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 2e7afd434525..53188c4cbf75 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -2080,11 +2080,13 @@ static void alc_auto_parse_digital(struct hda_codec *codec) /* support multiple SPDIFs; the secondary is set up as a slave */ for (i = 0; i < spec->autocfg.dig_outs; i++) { + hda_nid_t conn[4]; err = snd_hda_get_connections(codec, spec->autocfg.dig_out_pins[i], - &dig_nid, 1); + conn, ARRAY_SIZE(conn)); if (err < 0) continue; + dig_nid = conn[0]; /* assume the first element is audio-out */ if (!i) { spec->multiout.dig_out_nid = dig_nid; spec->dig_out_type = spec->autocfg.dig_out_type[0];