Skip to content

Commit

Permalink
Merge branch 'fix/hda' into topic/hda
Browse files Browse the repository at this point in the history
  • Loading branch information
Takashi Iwai committed Sep 24, 2010
2 parents 4e7d7c6 + 01fdf18 commit fec88de
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}

Expand Down

0 comments on commit fec88de

Please sign in to comment.