diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-07-22 08:43:27 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-22 08:43:27 +0200 |
commit | 76531d4166fb620375ff3c1ac24753265216d579 (patch) | |
tree | ed60dc74eda8a16de02f07b14c8036d3dee7a782 /sound/pci/hda/patch_cirrus.c | |
parent | 7d339ae99758bc21033d4a19bcd4f7b55f96e24e (diff) | |
parent | a353fbb17961780c13e585e8658006ef0e543733 (diff) |
Merge branch 'topic/hda' into for-linus
Diffstat (limited to 'sound/pci/hda/patch_cirrus.c')
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 26a1521045bb..7f93739b1e33 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -346,21 +346,15 @@ static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin, nid = codec->start_nid; for (i = 0; i < codec->num_nodes; i++, nid++) { - hda_nid_t pins[2]; unsigned int type; - int j, nums; + int idx; type = get_wcaps_type(get_wcaps(codec, nid)); if (type != AC_WID_AUD_IN) continue; - nums = snd_hda_get_connections(codec, nid, pins, - ARRAY_SIZE(pins)); - if (nums <= 0) - continue; - for (j = 0; j < nums; j++) { - if (pins[j] == pin) { - *idxp = j; - return nid; - } + idx = snd_hda_get_conn_index(codec, nid, pin, 0); + if (idx >= 0) { + *idxp = idx; + return nid; } } return 0; @@ -821,7 +815,8 @@ static int build_digital_output(struct hda_codec *codec) if (!spec->multiout.dig_out_nid) return 0; - err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid); + err = snd_hda_create_spdif_out_ctls(codec, spec->multiout.dig_out_nid, + spec->multiout.dig_out_nid); if (err < 0) return err; err = snd_hda_create_spdif_share_sw(codec, &spec->multiout); |