diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-09-24 03:12:21 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-09-24 03:12:21 -0400 |
commit | fec88dea9d316e9d850e84c5a57c4c6b15cb9b26 (patch) | |
tree | a7cedd0acc696e202ffc4d50278b452466c40dee /sound | |
parent | 4e7d7c6018567fa03f387d06602d4145c75ebbe0 (diff) | |
parent | 01fdf1801e349302fce5d9865470a7100a2d9b74 (diff) |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 22 |
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) | |||
1759 | } | 1759 | } |
1760 | 1760 | ||
1761 | if (spec->autocfg.dig_in_pin) { | 1761 | if (spec->autocfg.dig_in_pin) { |
1762 | hda_nid_t dig_nid; | 1762 | dig_nid = codec->start_nid; |
1763 | err = snd_hda_get_connections(codec, | 1763 | for (i = 0; i < codec->num_nodes; i++, dig_nid++) { |
1764 | spec->autocfg.dig_in_pin, | 1764 | unsigned int wcaps = get_wcaps(codec, dig_nid); |
1765 | &dig_nid, 1); | 1765 | if (get_wcaps_type(wcaps) != AC_WID_AUD_IN) |
1766 | if (err > 0) | 1766 | continue; |
1767 | spec->dig_in_nid = dig_nid; | 1767 | if (!(wcaps & AC_WCAP_DIGITAL)) |
1768 | continue; | ||
1769 | if (!(wcaps & AC_WCAP_CONN_LIST)) | ||
1770 | continue; | ||
1771 | err = get_connection_index(codec, dig_nid, | ||
1772 | spec->autocfg.dig_in_pin); | ||
1773 | if (err >= 0) { | ||
1774 | spec->dig_in_nid = dig_nid; | ||
1775 | break; | ||
1776 | } | ||
1777 | } | ||
1768 | } | 1778 | } |
1769 | } | 1779 | } |
1770 | 1780 | ||