aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-27 06:56:26 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-27 06:56:26 -0400
commit1ba7a7c650bd8ee567e25d9b68e9081d131c70f6 (patch)
tree4cedf50acdcc64f523943f2a32544b2e0e0d08b5 /sound/pci/hda/hda_codec.c
parenta22d543a95e82e5ad0ee1a44aad54fd6b6bf52a8 (diff)
ALSA: hda - Add exception for volume-knob in snd_hda_get_connections()
Volume-knob widgets may have connections even if they have no CONN_LIST cap bit. Allow the query exceptionally in snd_hda_get_connections(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b8c656c21feb..3a603cde8cc4 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -301,12 +301,15 @@ int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid,
301 unsigned int parm; 301 unsigned int parm;
302 int i, conn_len, conns; 302 int i, conn_len, conns;
303 unsigned int shift, num_elems, mask; 303 unsigned int shift, num_elems, mask;
304 unsigned int wcaps;
304 hda_nid_t prev_nid; 305 hda_nid_t prev_nid;
305 306
306 if (snd_BUG_ON(!conn_list || max_conns <= 0)) 307 if (snd_BUG_ON(!conn_list || max_conns <= 0))
307 return -EINVAL; 308 return -EINVAL;
308 309
309 if ((get_wcaps(codec, nid) & AC_WCAP_CONN_LIST) == 0) { 310 wcaps = get_wcaps(codec, nid);
311 if (!(wcaps & AC_WCAP_CONN_LIST) &&
312 get_wcaps_type(wcaps) != AC_WID_VOL_KNB) {
310 snd_printk(KERN_WARNING "hda_codec: " 313 snd_printk(KERN_WARNING "hda_codec: "
311 "connection list not available for 0x%x\n", nid); 314 "connection list not available for 0x%x\n", nid);
312 return -EINVAL; 315 return -EINVAL;