diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-07-07 09:12:55 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-07 10:08:13 -0400 |
commit | a926757f0431042b32ef4188ce8201cbe0fcbb50 (patch) | |
tree | 91cc2fb1843733b9b288c20c97399e9fc083c03f /sound | |
parent | c2d986b0d21e53453de8751ecbb317148820d065 (diff) |
ALSA: hda - Fix warning with ALC882 digital-out detection
The digital out pin on ALC882 may have multiple connections.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) | |||
2080 | 2080 | ||
2081 | /* support multiple SPDIFs; the secondary is set up as a slave */ | 2081 | /* support multiple SPDIFs; the secondary is set up as a slave */ |
2082 | for (i = 0; i < spec->autocfg.dig_outs; i++) { | 2082 | for (i = 0; i < spec->autocfg.dig_outs; i++) { |
2083 | hda_nid_t conn[4]; | ||
2083 | err = snd_hda_get_connections(codec, | 2084 | err = snd_hda_get_connections(codec, |
2084 | spec->autocfg.dig_out_pins[i], | 2085 | spec->autocfg.dig_out_pins[i], |
2085 | &dig_nid, 1); | 2086 | conn, ARRAY_SIZE(conn)); |
2086 | if (err < 0) | 2087 | if (err < 0) |
2087 | continue; | 2088 | continue; |
2089 | dig_nid = conn[0]; /* assume the first element is audio-out */ | ||
2088 | if (!i) { | 2090 | if (!i) { |
2089 | spec->multiout.dig_out_nid = dig_nid; | 2091 | spec->multiout.dig_out_nid = dig_nid; |
2090 | spec->dig_out_type = spec->autocfg.dig_out_type[0]; | 2092 | spec->dig_out_type = spec->autocfg.dig_out_type[0]; |